From c026d2f3acf12ec12f1b8a747233cb7aa68c992a Mon Sep 17 00:00:00 2001 From: Dale Lee <112548822+ldyedu@users.noreply.github.com> Date: Mon, 7 Aug 2023 09:29:05 +0800 Subject: [PATCH 001/110] [ISSUE #10374] Support listener to get changed instances (#10905) * For #10374, Support listener to get changed instances * Update AbstractNamingChangeListener,NamingChaneEventTest * Update InstancesDiffTest * Rename NamingChangeEventTest --- .../naming/cache/ServiceInfoHolder.java | 26 ++-- .../naming/event/InstancesChangeEvent.java | 11 +- .../naming/event/InstancesChangeNotifier.java | 6 +- .../client/naming/event/InstancesDiff.java | 80 +++++++++++ .../AbstractNamingChangeListener.java | 40 ++++++ .../naming/listener/NamingChangeEvent.java | 67 +++++++++ .../event/InstancesChangeEventTest.java | 10 +- .../event/InstancesChangeNotifierTest.java | 4 +- .../naming/event/InstancesDiffTest.java | 51 +++++++ .../listener/NamingChangeEventTest.java | 135 ++++++++++++++++++ 10 files changed, 412 insertions(+), 18 deletions(-) create mode 100644 client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java create mode 100644 client/src/main/java/com/alibaba/nacos/client/naming/listener/AbstractNamingChangeListener.java create mode 100644 client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java create mode 100644 client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java create mode 100644 client/src/test/java/com/alibaba/nacos/client/naming/listener/NamingChangeEventTest.java diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolder.java b/client/src/main/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolder.java index 3a4d6311832..34ca14af0ef 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolder.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolder.java @@ -25,6 +25,7 @@ import com.alibaba.nacos.client.monitor.MetricsMonitor; import com.alibaba.nacos.client.naming.backups.FailoverReactor; import com.alibaba.nacos.client.naming.event.InstancesChangeEvent; +import com.alibaba.nacos.client.naming.event.InstancesDiff; import com.alibaba.nacos.common.lifecycle.Closeable; import com.alibaba.nacos.common.notify.NotifyCenter; import com.alibaba.nacos.common.utils.ConvertUtils; @@ -160,16 +161,17 @@ public ServiceInfo processServiceInfo(ServiceInfo serviceInfo) { return oldService; } serviceInfoMap.put(serviceInfo.getKey(), serviceInfo); - boolean changed = isChangedServiceInfo(oldService, serviceInfo); + InstancesDiff diff = getServiceInfoDiff(oldService, serviceInfo); if (StringUtils.isBlank(serviceInfo.getJsonFromServer())) { serviceInfo.setJsonFromServer(JacksonUtils.toJson(serviceInfo)); } MetricsMonitor.getServiceInfoMapSizeMonitor().set(serviceInfoMap.size()); - if (changed) { + if (diff.hasDifferent()) { NAMING_LOGGER.info("current ips:({}) service: {} -> {}", serviceInfo.ipCount(), serviceInfo.getKey(), JacksonUtils.toJson(serviceInfo.getHosts())); + NotifyCenter.publishEvent(new InstancesChangeEvent(notifierEventScope, serviceInfo.getName(), serviceInfo.getGroupName(), - serviceInfo.getClusters(), serviceInfo.getHosts())); + serviceInfo.getClusters(), serviceInfo.getHosts(), diff)); DiskCache.write(serviceInfo, cacheDir); } return serviceInfo; @@ -179,18 +181,20 @@ private boolean isEmptyOrErrorPush(ServiceInfo serviceInfo) { return null == serviceInfo.getHosts() || (pushEmptyProtection && !serviceInfo.validate()); } - private boolean isChangedServiceInfo(ServiceInfo oldService, ServiceInfo newService) { + private InstancesDiff getServiceInfoDiff(ServiceInfo oldService, ServiceInfo newService) { + InstancesDiff instancesDiff = new InstancesDiff(); if (null == oldService) { NAMING_LOGGER.info("init new ips({}) service: {} -> {}", newService.ipCount(), newService.getKey(), JacksonUtils.toJson(newService.getHosts())); - return true; + instancesDiff.setAddedInstances(newService.getHosts()); + return instancesDiff; } if (oldService.getLastRefTime() > newService.getLastRefTime()) { NAMING_LOGGER.warn("out of date data received, old-t: {}, new-t: {}", oldService.getLastRefTime(), newService.getLastRefTime()); - return false; + return instancesDiff; } - boolean changed = false; + Map oldHostMap = new HashMap<>(oldService.getHosts().size()); for (Instance host : oldService.getHosts()) { oldHostMap.put(host.toInetAddr(), host); @@ -231,23 +235,23 @@ private boolean isChangedServiceInfo(ServiceInfo oldService, ServiceInfo newServ } if (newHosts.size() > 0) { - changed = true; NAMING_LOGGER.info("new ips({}) service: {} -> {}", newHosts.size(), newService.getKey(), JacksonUtils.toJson(newHosts)); + instancesDiff.setAddedInstances(newHosts); } if (remvHosts.size() > 0) { - changed = true; NAMING_LOGGER.info("removed ips({}) service: {} -> {}", remvHosts.size(), newService.getKey(), JacksonUtils.toJson(remvHosts)); + instancesDiff.setRemovedInstances(remvHosts); } if (modHosts.size() > 0) { - changed = true; NAMING_LOGGER.info("modified ips({}) service: {} -> {}", modHosts.size(), newService.getKey(), JacksonUtils.toJson(modHosts)); + instancesDiff.setModifiedInstances(modHosts); } - return changed; + return instancesDiff; } @Override diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeEvent.java b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeEvent.java index 87cd8953882..4d7be6b06cd 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeEvent.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeEvent.java @@ -40,13 +40,16 @@ public class InstancesChangeEvent extends Event { private final String clusters; private final List hosts; + + private InstancesDiff instancesDiff; - public InstancesChangeEvent(String eventScope, String serviceName, String groupName, String clusters, List hosts) { + public InstancesChangeEvent(String eventScope, String serviceName, String groupName, String clusters, List hosts, InstancesDiff diff) { this.eventScope = eventScope; this.serviceName = serviceName; this.groupName = groupName; this.clusters = clusters; this.hosts = hosts; + this.instancesDiff = diff; } public String getServiceName() { @@ -64,7 +67,11 @@ public String getClusters() { public List getHosts() { return hosts; } - + + public InstancesDiff getInstancesDiff() { + return instancesDiff; + } + @Override public String scope() { return this.eventScope; diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifier.java b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifier.java index da1b743ed72..336345fbfd2 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifier.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifier.java @@ -18,9 +18,9 @@ import com.alibaba.nacos.api.naming.listener.AbstractEventListener; import com.alibaba.nacos.api.naming.listener.EventListener; -import com.alibaba.nacos.api.naming.listener.NamingEvent; import com.alibaba.nacos.api.naming.pojo.ServiceInfo; import com.alibaba.nacos.api.naming.utils.NamingUtils; +import com.alibaba.nacos.client.naming.listener.NamingChangeEvent; import com.alibaba.nacos.common.JustForTest; import com.alibaba.nacos.common.notify.Event; import com.alibaba.nacos.common.notify.listener.Subscriber; @@ -130,8 +130,8 @@ public void onEvent(InstancesChangeEvent event) { private com.alibaba.nacos.api.naming.listener.Event transferToNamingEvent( InstancesChangeEvent instancesChangeEvent) { - return new NamingEvent(instancesChangeEvent.getServiceName(), instancesChangeEvent.getGroupName(), - instancesChangeEvent.getClusters(), instancesChangeEvent.getHosts()); + return new NamingChangeEvent(instancesChangeEvent.getServiceName(), instancesChangeEvent.getGroupName(), + instancesChangeEvent.getClusters(), instancesChangeEvent.getHosts(), instancesChangeEvent.getInstancesDiff()); } @Override diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java new file mode 100644 index 00000000000..9884c253c46 --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java @@ -0,0 +1,80 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.event; + +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.common.utils.CollectionUtils; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * The differences in instances compared to the last callback. + * + * @author lideyou + */ +public class InstancesDiff { + private final List addedInstances = new ArrayList<>(); + + private final List removedInstances = new ArrayList<>(); + + private final List modifiedInstances = new ArrayList<>(); + + public List getAddedInstances() { + return addedInstances; + } + + public void setAddedInstances(Collection addedInstances) { + this.addedInstances.clear(); + if (CollectionUtils.isNotEmpty(addedInstances)) { + this.addedInstances.addAll(addedInstances); + } + } + + public List getRemovedInstances() { + return removedInstances; + } + + public void setRemovedInstances(Collection removedInstances) { + this.removedInstances.clear(); + if (CollectionUtils.isNotEmpty(removedInstances)) { + this.removedInstances.addAll(removedInstances); + } + } + + public List getModifiedInstances() { + return modifiedInstances; + } + + public void setModifiedInstances(Collection modifiedInstances) { + this.modifiedInstances.clear(); + if (CollectionUtils.isNotEmpty(modifiedInstances)) { + this.modifiedInstances.addAll(modifiedInstances); + } + } + + /** + * Check if any instances have changed. + * @return true if there are instances that have changed + */ + public boolean hasDifferent() { + return CollectionUtils.isNotEmpty(this.addedInstances) + || CollectionUtils.isNotEmpty(this.removedInstances) + || CollectionUtils.isNotEmpty(this.modifiedInstances); + } +} diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/listener/AbstractNamingChangeListener.java b/client/src/main/java/com/alibaba/nacos/client/naming/listener/AbstractNamingChangeListener.java new file mode 100644 index 00000000000..cb54c4356d6 --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/naming/listener/AbstractNamingChangeListener.java @@ -0,0 +1,40 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.listener; + +import com.alibaba.nacos.api.naming.listener.AbstractEventListener; +import com.alibaba.nacos.api.naming.listener.Event; + +/** + * Listener for NamingChangeEvent. + * + * @author lideyou + */ +public abstract class AbstractNamingChangeListener extends AbstractEventListener { + @Override + public final void onEvent(Event event) { + if (event instanceof NamingChangeEvent) { + onChange((NamingChangeEvent) event); + } + } + + /** + * Callback when instances have changed. + * @param event NamingChangeEvent + */ + public abstract void onChange(NamingChangeEvent event); +} diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java b/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java new file mode 100644 index 00000000000..d1c541ca32d --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java @@ -0,0 +1,67 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.listener; + +import com.alibaba.nacos.api.naming.listener.NamingEvent; +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.client.naming.event.InstancesDiff; +import com.alibaba.nacos.common.utils.CollectionUtils; + +import java.util.List; + +/** + * Naming Event with instance change information. + * + * @author lideyou + */ +public class NamingChangeEvent extends NamingEvent { + private final InstancesDiff instancesDiff; + + public NamingChangeEvent(String serviceName, List instances, InstancesDiff instancesDiff) { + super(serviceName, instances); + this.instancesDiff = instancesDiff; + } + + public NamingChangeEvent(String serviceName, String groupName, String clusters, List instances, InstancesDiff instancesDiff) { + super(serviceName, groupName, clusters, instances); + this.instancesDiff = instancesDiff; + } + + public boolean isAdded() { + return CollectionUtils.isNotEmpty(this.instancesDiff.getAddedInstances()); + } + + public boolean isRemoved() { + return CollectionUtils.isNotEmpty(this.instancesDiff.getRemovedInstances()); + } + + public boolean isModified() { + return CollectionUtils.isNotEmpty(this.instancesDiff.getModifiedInstances()); + } + + public List getAddedInstances() { + return this.instancesDiff.getAddedInstances(); + } + + public List getRemovedInstances() { + return this.instancesDiff.getRemovedInstances(); + } + + public List getModifiedInstances() { + return this.instancesDiff.getModifiedInstances(); + } +} diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java index 17cdfff75c4..742573b82ec 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java @@ -34,7 +34,9 @@ public void testGetServiceName() { List hosts = new ArrayList<>(); Instance ins = new Instance(); hosts.add(ins); - InstancesChangeEvent event = new InstancesChangeEvent(eventScope, serviceName, groupName, clusters, hosts); + InstancesDiff diff = new InstancesDiff(); + diff.setAddedInstances(hosts); + InstancesChangeEvent event = new InstancesChangeEvent(eventScope, serviceName, groupName, clusters, hosts, diff); Assert.assertEquals(eventScope, event.scope()); Assert.assertEquals(serviceName, event.getServiceName()); Assert.assertEquals(clusters, event.getClusters()); @@ -42,5 +44,11 @@ public void testGetServiceName() { List hosts1 = event.getHosts(); Assert.assertEquals(hosts.size(), hosts1.size()); Assert.assertEquals(hosts.get(0), hosts1.get(0)); + InstancesDiff diff1 = event.getInstancesDiff(); + Assert.assertTrue(diff1.hasDifferent()); + Assert.assertEquals(diff.getAddedInstances().size(), diff1.getAddedInstances().size()); + Assert.assertEquals(diff.getAddedInstances().get(0), diff.getAddedInstances().get(0)); + Assert.assertEquals(diff.getRemovedInstances().size(), diff1.getRemovedInstances().size()); + Assert.assertEquals(diff.getModifiedInstances().size(), diff1.getModifiedInstances().size()); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java index 7f20b3af629..1dece170266 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java @@ -49,7 +49,9 @@ public void testRegisterListener() { List hosts = new ArrayList<>(); Instance ins = new Instance(); hosts.add(ins); - InstancesChangeEvent event = new InstancesChangeEvent(eventScope, name, group, clusters, hosts); + InstancesDiff diff = new InstancesDiff(); + diff.setAddedInstances(hosts); + InstancesChangeEvent event = new InstancesChangeEvent(eventScope, name, group, clusters, hosts, diff); Assert.assertEquals(true, instancesChangeNotifier.scopeMatches(event)); } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java new file mode 100644 index 00000000000..a427f1fad34 --- /dev/null +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.event; + +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.naming.pojo.builder.InstanceBuilder; +import org.junit.Assert; +import org.junit.Test; + +import java.util.Collections; + +public class InstancesDiffTest { + @Test + public void testGetDiff() { + String serviceName = "testService"; + Instance addedIns = InstanceBuilder.newBuilder() + .setServiceName(serviceName) + .setClusterName("a").build(); + Instance removedIns = InstanceBuilder.newBuilder() + .setServiceName(serviceName) + .setClusterName("b").build(); + Instance modifiedIns = InstanceBuilder.newBuilder() + .setServiceName(serviceName) + .setClusterName("c").build(); + + InstancesDiff instancesDiff = new InstancesDiff(); + instancesDiff.setAddedInstances(Collections.singletonList(addedIns)); + instancesDiff.setRemovedInstances(Collections.singletonList(removedIns)); + instancesDiff.setModifiedInstances(Collections.singletonList(modifiedIns)); + + Assert.assertTrue(instancesDiff.hasDifferent()); + Assert.assertEquals(addedIns, instancesDiff.getAddedInstances().get(0)); + Assert.assertEquals(removedIns, instancesDiff.getRemovedInstances().get(0)); + Assert.assertEquals(modifiedIns, instancesDiff.getModifiedInstances().get(0)); + + } +} diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/listener/NamingChangeEventTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/listener/NamingChangeEventTest.java new file mode 100644 index 00000000000..90c90bfe9da --- /dev/null +++ b/client/src/test/java/com/alibaba/nacos/client/naming/listener/NamingChangeEventTest.java @@ -0,0 +1,135 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.listener; + +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.client.naming.event.InstancesDiff; +import org.junit.Before; +import org.junit.Test; + +import java.util.Arrays; +import java.util.Collections; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertFalse; + +public class NamingChangeEventTest { + + private MockNamingEventListener eventListener; + + private InstancesDiff instancesDiff; + + @Before + public void setUp() throws Exception { + eventListener = new MockNamingEventListener(); + instancesDiff = new InstancesDiff(); + instancesDiff.setAddedInstances(Arrays.asList(new Instance(), new Instance(), new Instance())); + instancesDiff.setRemovedInstances(Arrays.asList(new Instance(), new Instance())); + instancesDiff.setModifiedInstances(Arrays.asList(new Instance())); + } + + @Test + public void testNamingChangeEventWithSimpleConstructor() { + NamingChangeEvent event = new NamingChangeEvent("serviceName", Collections.EMPTY_LIST, instancesDiff); + assertEquals("serviceName", event.getServiceName()); + assertNull(event.getGroupName()); + assertNull(event.getClusters()); + assertTrue(event.getInstances().isEmpty()); + assertTrue(event.isAdded()); + assertEquals(3, event.getAddedInstances().size()); + assertTrue(event.isRemoved()); + assertEquals(2, event.getRemovedInstances().size()); + assertTrue(event.isModified()); + assertEquals(1, event.getModifiedInstances().size()); + eventListener.onEvent(event); + assertNull(event.getServiceName()); + assertNull(event.getGroupName()); + assertNull(event.getClusters()); + assertNull(event.getInstances()); + assertFalse(event.isAdded()); + assertEquals(0, event.getAddedInstances().size()); + assertFalse(event.isRemoved()); + assertEquals(0, event.getRemovedInstances().size()); + assertFalse(event.isModified()); + assertEquals(0, event.getRemovedInstances().size()); + } + + @Test + public void testNamingChangeEventWithFullConstructor() { + NamingChangeEvent event = new NamingChangeEvent("serviceName", "group", "clusters", Collections.EMPTY_LIST, instancesDiff); + assertEquals("serviceName", event.getServiceName()); + assertEquals("group", event.getGroupName()); + assertEquals("clusters", event.getClusters()); + assertTrue(event.getInstances().isEmpty()); + assertTrue(event.isAdded()); + assertEquals(3, event.getAddedInstances().size()); + assertTrue(event.isRemoved()); + assertEquals(2, event.getRemovedInstances().size()); + assertTrue(event.isModified()); + assertEquals(1, event.getModifiedInstances().size()); + eventListener.onEvent(event); + assertNull(event.getServiceName()); + assertNull(event.getGroupName()); + assertNull(event.getClusters()); + assertNull(event.getInstances()); + assertFalse(event.isAdded()); + assertEquals(0, event.getAddedInstances().size()); + assertFalse(event.isRemoved()); + assertEquals(0, event.getRemovedInstances().size()); + assertFalse(event.isModified()); + assertEquals(0, event.getRemovedInstances().size()); + } + + @Test + public void testGetChanges() { + NamingChangeEvent event = new NamingChangeEvent("serviceName", Collections.EMPTY_LIST, instancesDiff); + assertTrue(event.isAdded()); + assertEquals(3, event.getAddedInstances().size()); + event.getAddedInstances().clear(); + assertFalse(event.isAdded()); + assertEquals(0, event.getAddedInstances().size()); + + assertTrue(event.isRemoved()); + assertEquals(2, event.getRemovedInstances().size()); + event.getRemovedInstances().clear(); + assertFalse(event.isRemoved()); + assertEquals(0, event.getRemovedInstances().size()); + + assertTrue(event.isModified()); + assertEquals(1, event.getModifiedInstances().size()); + event.getModifiedInstances().clear(); + assertFalse(event.isModified()); + assertEquals(0, event.getRemovedInstances().size()); + } + + private static class MockNamingEventListener extends AbstractNamingChangeListener { + + @Override + public void onChange(NamingChangeEvent event) { + assertNull(getExecutor()); + event.setServiceName(null); + event.setGroupName(null); + event.setClusters(null); + event.setInstances(null); + event.getAddedInstances().clear(); + event.getRemovedInstances().clear(); + event.getModifiedInstances().clear(); + } + } +} From cc34b6ca0d0ed2fb2a34146a23fc7d790083cc8c Mon Sep 17 00:00:00 2001 From: Dale Lee <112548822+ldyedu@users.noreply.github.com> Date: Thu, 17 Aug 2023 10:48:24 +0800 Subject: [PATCH 002/110] [ISSUE #10374] Define selectors and related components (#10954) * For #10374, Define selectors and related components * Add unit test * Update NamingSelectorWrapperTest * Update selectors and related components * Update NamingSelectorWrapper --- .../api/naming/selector/NamingContext.java | 57 +++++++ .../api/naming/selector/NamingResult.java | 30 ++++ .../api/naming/selector/NamingSelector.java | 27 ++++ .../api/selector/client/SelectResult.java | 32 ++++ .../nacos/api/selector/client/Selector.java | 34 +++++ .../client/naming/event/InstancesDiff.java | 37 ++++- .../naming/listener/NamingChangeEvent.java | 7 +- .../selector/DefaultNamingSelector.java | 54 +++++++ .../selector/NamingListenerInvoker.java | 65 ++++++++ .../selector/NamingSelectorWrapper.java | 139 ++++++++++++++++++ .../selector/AbstractSelectorWrapper.java | 104 +++++++++++++ .../client/selector/ListenerInvoker.java | 32 ++++ .../client/selector/SelectorFactory.java | 93 ++++++++++++ .../client/selector/SelectorManager.java | 102 +++++++++++++ .../naming/event/InstancesDiffTest.java | 66 +++++++++ .../selector/DefaultNamingSelectorTest.java | 69 +++++++++ .../selector/NamingListenerInvokerTest.java | 75 ++++++++++ .../selector/NamingSelectorWrapperTest.java | 99 +++++++++++++ .../client/selector/SelectorFactoryTest.java | 66 +++++++++ .../client/selector/SelectorManagerTest.java | 83 +++++++++++ 20 files changed, 1264 insertions(+), 7 deletions(-) create mode 100644 api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingContext.java create mode 100644 api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingResult.java create mode 100644 api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingSelector.java create mode 100644 api/src/main/java/com/alibaba/nacos/api/selector/client/SelectResult.java create mode 100644 api/src/main/java/com/alibaba/nacos/api/selector/client/Selector.java create mode 100644 client/src/main/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelector.java create mode 100644 client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvoker.java create mode 100644 client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapper.java create mode 100644 client/src/main/java/com/alibaba/nacos/client/selector/AbstractSelectorWrapper.java create mode 100644 client/src/main/java/com/alibaba/nacos/client/selector/ListenerInvoker.java create mode 100644 client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java create mode 100644 client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java create mode 100644 client/src/test/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelectorTest.java create mode 100644 client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvokerTest.java create mode 100644 client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapperTest.java create mode 100644 client/src/test/java/com/alibaba/nacos/client/selector/SelectorFactoryTest.java create mode 100644 client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingContext.java b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingContext.java new file mode 100644 index 00000000000..04b340a6fcb --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingContext.java @@ -0,0 +1,57 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.api.naming.selector; + +import com.alibaba.nacos.api.naming.pojo.Instance; + +import java.util.List; + +/** + * Naming selector context. + * + * @author lideyou + */ +public interface NamingContext { + + /** + * Get service name. + * + * @return service name + */ + String getServiceName(); + + /** + * Get group name. + * + * @return group name + */ + String getGroupName(); + + /** + * Get clusters. + * + * @return clusters + */ + String getClusters(); + + /** + * Get current instances. + * + * @return current instances + */ + List getInstances(); +} diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingResult.java b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingResult.java new file mode 100644 index 00000000000..a3173af9c74 --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingResult.java @@ -0,0 +1,30 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.api.naming.selector; + +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.selector.client.SelectResult; + +import java.util.List; + +/** + * Naming select result. + * + * @author lideyou + */ +public interface NamingResult extends SelectResult> { +} diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingSelector.java b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingSelector.java new file mode 100644 index 00000000000..48edd76d5ab --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingSelector.java @@ -0,0 +1,27 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.api.naming.selector; + +import com.alibaba.nacos.api.selector.client.Selector; + +/** + * Naming selector. + * + * @author lideyou + */ +public interface NamingSelector extends Selector { +} diff --git a/api/src/main/java/com/alibaba/nacos/api/selector/client/SelectResult.java b/api/src/main/java/com/alibaba/nacos/api/selector/client/SelectResult.java new file mode 100644 index 00000000000..3c5979d9ef0 --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/selector/client/SelectResult.java @@ -0,0 +1,32 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.api.selector.client; + +/** + * Select result. + * + * @param the type of result + * @author lideyou + */ +public interface SelectResult { + /** + * Get select result. + * + * @return select result + */ + T getResult(); +} diff --git a/api/src/main/java/com/alibaba/nacos/api/selector/client/Selector.java b/api/src/main/java/com/alibaba/nacos/api/selector/client/Selector.java new file mode 100644 index 00000000000..523b426d6ff --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/selector/client/Selector.java @@ -0,0 +1,34 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.api.selector.client; + +/** + * Client selector. + * + * @param the type of selector context + * @param the type of select result + * @author lideyou + */ +public interface Selector { + /** + * select the target result. + * + * @param context selector context + * @return select result + */ + E select(C context); +} diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java index 9884c253c46..c374331a78c 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java @@ -35,6 +35,15 @@ public class InstancesDiff { private final List modifiedInstances = new ArrayList<>(); + public InstancesDiff() { + } + + public InstancesDiff(List addedInstances, List removedInstances, List modifiedInstances) { + setAddedInstances(addedInstances); + setRemovedInstances(removedInstances); + setModifiedInstances(modifiedInstances); + } + public List getAddedInstances() { return addedInstances; } @@ -73,8 +82,30 @@ public void setModifiedInstances(Collection modifiedInstances) { * @return true if there are instances that have changed */ public boolean hasDifferent() { - return CollectionUtils.isNotEmpty(this.addedInstances) - || CollectionUtils.isNotEmpty(this.removedInstances) - || CollectionUtils.isNotEmpty(this.modifiedInstances); + return isAdded() || isRemoved() || isModified(); + } + + /** + * Check if any instances have been added. + * @return true if there are instances that have been added. + */ + public boolean isAdded() { + return CollectionUtils.isNotEmpty(this.addedInstances); + } + + /** + * Check if any instances have been added. + * @return true if there are instances that have been added. + */ + public boolean isRemoved() { + return CollectionUtils.isNotEmpty(this.removedInstances); + } + + /** + * Check if any instances have been added. + * @return true if there are instances that have been added. + */ + public boolean isModified() { + return CollectionUtils.isNotEmpty(this.modifiedInstances); } } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java b/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java index d1c541ca32d..764afd0a253 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java @@ -19,7 +19,6 @@ import com.alibaba.nacos.api.naming.listener.NamingEvent; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.client.naming.event.InstancesDiff; -import com.alibaba.nacos.common.utils.CollectionUtils; import java.util.List; @@ -42,15 +41,15 @@ public NamingChangeEvent(String serviceName, String groupName, String clusters, } public boolean isAdded() { - return CollectionUtils.isNotEmpty(this.instancesDiff.getAddedInstances()); + return this.instancesDiff.isAdded(); } public boolean isRemoved() { - return CollectionUtils.isNotEmpty(this.instancesDiff.getRemovedInstances()); + return this.instancesDiff.isRemoved(); } public boolean isModified() { - return CollectionUtils.isNotEmpty(this.instancesDiff.getModifiedInstances()); + return this.instancesDiff.isModified(); } public List getAddedInstances() { diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelector.java b/client/src/main/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelector.java new file mode 100644 index 00000000000..fdd274d33f8 --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelector.java @@ -0,0 +1,54 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.selector; + +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.naming.selector.NamingContext; +import com.alibaba.nacos.api.naming.selector.NamingResult; +import com.alibaba.nacos.api.naming.selector.NamingSelector; + +import java.util.Collections; +import java.util.List; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +/** + * Default naming selector. + * + * @author lideyou + */ +public class DefaultNamingSelector implements NamingSelector { + private final Predicate filter; + + public DefaultNamingSelector(Predicate filter) { + this.filter = filter; + } + + @Override + public NamingResult select(NamingContext context) { + List instances = doFilter(context.getInstances()); + return () -> instances; + } + + private List doFilter(List instances) { + return instances == null ? Collections.emptyList() : + instances + .stream() + .filter(filter) + .collect(Collectors.toList()); + } +} diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvoker.java b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvoker.java new file mode 100644 index 00000000000..377f1c1b588 --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvoker.java @@ -0,0 +1,65 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.selector; + +import com.alibaba.nacos.api.naming.listener.AbstractEventListener; +import com.alibaba.nacos.api.naming.listener.EventListener; +import com.alibaba.nacos.api.naming.listener.NamingEvent; +import com.alibaba.nacos.client.selector.ListenerInvoker; + +import java.util.Objects; + +/** + * Naming listener invoker. + * + * @author lideyou + */ +public class NamingListenerInvoker implements ListenerInvoker { + private final EventListener listener; + + public NamingListenerInvoker(EventListener listener) { + this.listener = listener; + } + + @Override + public void invoke(NamingEvent event) { + if (listener instanceof AbstractEventListener && ((AbstractEventListener) listener).getExecutor() != null) { + ((AbstractEventListener) listener).getExecutor().execute(() -> listener.onEvent(event)); + } else { + listener.onEvent(event); + } + } + + @Override + public boolean equals(Object o) { + if (o == null || getClass() != o.getClass()) { + return false; + } + + if (this == o) { + return true; + } + + NamingListenerInvoker that = (NamingListenerInvoker) o; + return Objects.equals(listener, that.listener); + } + + @Override + public int hashCode() { + return Objects.hashCode(listener); + } +} diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapper.java b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapper.java new file mode 100644 index 00000000000..f42a685a272 --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapper.java @@ -0,0 +1,139 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.selector; + +import com.alibaba.nacos.api.naming.listener.EventListener; +import com.alibaba.nacos.api.naming.listener.NamingEvent; +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.naming.selector.NamingContext; +import com.alibaba.nacos.api.naming.selector.NamingSelector; +import com.alibaba.nacos.client.naming.event.InstancesChangeEvent; +import com.alibaba.nacos.client.naming.event.InstancesDiff; +import com.alibaba.nacos.client.naming.listener.NamingChangeEvent; +import com.alibaba.nacos.client.selector.AbstractSelectorWrapper; +import com.alibaba.nacos.common.utils.CollectionUtils; + +import java.util.Collections; +import java.util.List; + +/** + * Naming selector wrapper. + * + * @author lideyou + */ +public class NamingSelectorWrapper extends AbstractSelectorWrapper { + + private String serviceName; + + private String groupName; + + private String clusters; + + private final InnerNamingContext namingContext = new InnerNamingContext(); + + private class InnerNamingContext implements NamingContext { + + private List instances; + + @Override + public String getServiceName() { + return serviceName; + } + + @Override + public String getGroupName() { + return groupName; + } + + @Override + public String getClusters() { + return clusters; + } + + @Override + public List getInstances() { + return instances; + } + + private void setInstances(List instances) { + this.instances = instances; + } + } + + public NamingSelectorWrapper(NamingSelector selector, EventListener listener) { + super(selector, new NamingListenerInvoker(listener)); + } + + @Override + protected boolean isSelectable(InstancesChangeEvent event) { + return event != null + && event.getHosts() != null + && event.getInstancesDiff() != null; + } + + @Override + public boolean isCallable(NamingEvent event) { + if (event == null) { + return false; + } + NamingChangeEvent changeEvent = (NamingChangeEvent) event; + return changeEvent.isAdded() + || changeEvent.isRemoved() + || changeEvent.isModified(); + } + + @Override + protected NamingEvent buildListenerEvent(InstancesChangeEvent event) { + this.serviceName = event.getServiceName(); + this.groupName = event.getGroupName(); + this.clusters = event.getClusters(); + + List currentIns = Collections.emptyList(); + if (CollectionUtils.isNotEmpty(event.getHosts())) { + currentIns = doSelect(event.getHosts()); + } + + InstancesDiff diff = event.getInstancesDiff(); + InstancesDiff newDiff = new InstancesDiff(); + if (diff.isAdded()) { + newDiff.setAddedInstances( + doSelect(diff.getAddedInstances())); + } + if (diff.isRemoved()) { + newDiff.setRemovedInstances( + doSelect(diff.getRemovedInstances())); + } + if (diff.isModified()) { + newDiff.setModifiedInstances( + doSelect(diff.getModifiedInstances())); + } + + return new NamingChangeEvent(serviceName, groupName, clusters, currentIns, newDiff); + } + + private List doSelect(List instances) { + NamingContext context = getNamingContext(instances); + return this.getSelector() + .select(context) + .getResult(); + } + + private NamingContext getNamingContext(final List instances) { + namingContext.setInstances(instances); + return namingContext; + } +} diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/AbstractSelectorWrapper.java b/client/src/main/java/com/alibaba/nacos/client/selector/AbstractSelectorWrapper.java new file mode 100644 index 00000000000..1a7820ff376 --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/selector/AbstractSelectorWrapper.java @@ -0,0 +1,104 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.selector; + +import com.alibaba.nacos.api.selector.client.Selector; +import com.alibaba.nacos.common.notify.Event; + +import java.util.Objects; + +/** + * Selector Wrapper. + * + * @param the type of selector + * @param the type of original event + * @param the type of listener callback event + * @author lideyou + */ +public abstract class AbstractSelectorWrapper, E, T extends Event> { + private final S selector; + + private final ListenerInvoker listener; + + public AbstractSelectorWrapper(S selector, ListenerInvoker listener) { + this.selector = selector; + this.listener = listener; + } + + /** + * Check whether the event can be callback. + * + * @param event original event + * @return true if the event can be callback + */ + protected abstract boolean isSelectable(T event); + + /** + * Check whether the result can be callback. + * + * @param event select result + * @return true if the result can be callback + */ + protected abstract boolean isCallable(E event); + + /** + * Build an event received by the listener. + * @param event original event + * @return listener event + */ + protected abstract E buildListenerEvent(T event); + + /** + * Notify listener. + * + * @param event original event + */ + public void notifyListener(T event) { + if (!isSelectable(event)) { + return; + } + E newEvent = buildListenerEvent(event); + if (isCallable(newEvent)) { + listener.invoke(newEvent); + } + } + + public ListenerInvoker getListener() { + return this.listener; + } + + public S getSelector() { + return this.selector; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractSelectorWrapper that = (AbstractSelectorWrapper) o; + return Objects.equals(selector, that.selector) && Objects.equals(listener, that.listener); + } + + @Override + public int hashCode() { + return Objects.hash(selector, listener); + } +} diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/ListenerInvoker.java b/client/src/main/java/com/alibaba/nacos/client/selector/ListenerInvoker.java new file mode 100644 index 00000000000..42104762ac0 --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/selector/ListenerInvoker.java @@ -0,0 +1,32 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.selector; + +/** + * Listener invoker. + * + * @param the type of event received by the listener + * @author lideyou + */ +public interface ListenerInvoker { + /** + * Invoke inner listener. + * + * @param event event + */ + void invoke(E event); +} diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java new file mode 100644 index 00000000000..497cdd97483 --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java @@ -0,0 +1,93 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.selector; + +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.naming.selector.NamingSelector; +import com.alibaba.nacos.client.naming.selector.DefaultNamingSelector; +import com.alibaba.nacos.common.utils.CollectionUtils; +import com.alibaba.nacos.common.utils.StringUtils; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.TreeSet; +import java.util.function.Predicate; + +/** + * Selectors factory. + * + * @author lideyou + */ +public final class SelectorFactory { + private static final NamingSelector EMPTY_SELECTOR = context -> context::getInstances; + + /** + * Cluster selector. + */ + private static class ClusterSelector extends DefaultNamingSelector { + private final String clusterString; + + public ClusterSelector(Predicate filter, String clusterString) { + super(filter); + this.clusterString = clusterString; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClusterSelector that = (ClusterSelector) o; + return Objects.equals(this.clusterString, that.clusterString); + } + + @Override + public int hashCode() { + return Objects.hashCode(this.clusterString); + } + } + + private SelectorFactory() { + } + + /** + * Create a cluster selector. + * + * @param clusters target cluster + * @return cluster selector + */ + public static NamingSelector newClusterSelector(Collection clusters) { + if (CollectionUtils.isNotEmpty(clusters)) { + final Set set = new HashSet<>(clusters); + Predicate filter = instance -> set.contains(instance.getClusterName()); + String clusterString = getUniqueClusterString(clusters); + return new ClusterSelector(filter, clusterString); + } else { + return EMPTY_SELECTOR; + } + } + + private static String getUniqueClusterString(Collection cluster) { + TreeSet treeSet = new TreeSet<>(cluster); + return StringUtils.join(treeSet, ","); + } +} diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java new file mode 100644 index 00000000000..bf732565024 --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java @@ -0,0 +1,102 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.selector; + +import com.alibaba.nacos.common.utils.CollectionUtils; +import com.alibaba.nacos.common.utils.ConcurrentHashSet; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Selector Manager. + * + * @param the type of selector wrapper + * @author lideyou + */ +public class SelectorManager> { + Map> selectorMap = new ConcurrentHashMap<>(); + + /** + * Add a selectorWrapper to subId. + * + * @param subId subscription id + * @param selector selector wrapper + */ + public void addSelectorWrapper(String subId, S selector) { + Set selectors = selectorMap.computeIfAbsent(subId, key -> new ConcurrentHashSet<>()); + selectors.add(selector); + } + + /** + * Get all SelectorWrappers by id. + * + * @param subId subscription id + * @return the set of SelectorWrappers + */ + public Set getSelectorWrappers(String subId) { + return selectorMap.get(subId); + } + + /** + * Remove a SelectorWrapper by id. + * + * @param subId subscription id + * @param selector selector wrapper + */ + public void removeSelectorWrapper(String subId, S selector) { + Set selectors = selectorMap.get(subId); + if (selectors == null) { + return; + } + selectors.remove(selector); + if (CollectionUtils.isEmpty(selectors)) { + selectorMap.remove(subId); + } + } + + /** + * Remove a subscription by id. + * + * @param subId subscription id + */ + public void removeSubscription(String subId) { + selectorMap.remove(subId); + } + + /** + * Get all subscriptions. + * + * @return all subscriptions + */ + public List getSubscriptions() { + return new ArrayList<>(selectorMap.keySet()); + } + + /** + * Determine whether subId is subscribed. + * + * @param subId subscription id + * @return true if is subscribed + */ + public boolean isSubscribed(String subId) { + return CollectionUtils.isNotEmpty(this.getSelectorWrappers(subId)); + } +} diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java index a427f1fad34..cc62821d569 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java @@ -21,7 +21,10 @@ import org.junit.Assert; import org.junit.Test; +import java.util.ArrayList; import java.util.Collections; +import java.util.List; +import java.util.Random; public class InstancesDiffTest { @Test @@ -43,9 +46,72 @@ public void testGetDiff() { instancesDiff.setModifiedInstances(Collections.singletonList(modifiedIns)); Assert.assertTrue(instancesDiff.hasDifferent()); + Assert.assertTrue(instancesDiff.isAdded()); + Assert.assertTrue(instancesDiff.isRemoved()); + Assert.assertTrue(instancesDiff.isModified()); Assert.assertEquals(addedIns, instancesDiff.getAddedInstances().get(0)); Assert.assertEquals(removedIns, instancesDiff.getRemovedInstances().get(0)); Assert.assertEquals(modifiedIns, instancesDiff.getModifiedInstances().get(0)); + } + + @Test + public void testWithFullConstructor() { + Random random = new Random(); + int addedCount = random.nextInt(32) + 1; + int removedCount = random.nextInt(32) + 1; + int modifiedCount = random.nextInt(32) + 1; + InstancesDiff instancesDiff = new InstancesDiff( + getInstanceList(addedCount), + getInstanceList(removedCount), + getInstanceList(modifiedCount) + ); + + Assert.assertTrue(instancesDiff.hasDifferent()); + Assert.assertTrue(instancesDiff.isAdded()); + Assert.assertTrue(instancesDiff.isRemoved()); + Assert.assertTrue(instancesDiff.isModified()); + Assert.assertEquals(addedCount, instancesDiff.getAddedInstances().size()); + Assert.assertEquals(removedCount, instancesDiff.getRemovedInstances().size()); + Assert.assertEquals(modifiedCount, instancesDiff.getModifiedInstances().size()); + instancesDiff.getAddedInstances().clear(); + instancesDiff.getRemovedInstances().clear(); + instancesDiff.getModifiedInstances().clear(); + Assert.assertFalse(instancesDiff.hasDifferent()); + Assert.assertFalse(instancesDiff.hasDifferent()); + Assert.assertFalse(instancesDiff.isAdded()); + Assert.assertFalse(instancesDiff.isRemoved()); + Assert.assertFalse(instancesDiff.isModified()); + } + + @Test + public void testWithNoConstructor() { + Random random = new Random(); + int addedCount = random.nextInt(32) + 1; + int removedCount = random.nextInt(32) + 1; + int modifiedCount = random.nextInt(32) + 1; + InstancesDiff instancesDiff = new InstancesDiff(); + instancesDiff.setAddedInstances(getInstanceList(addedCount)); + instancesDiff.setRemovedInstances(getInstanceList(removedCount)); + instancesDiff.setModifiedInstances(getInstanceList(modifiedCount)); + + Assert.assertTrue(instancesDiff.hasDifferent()); + Assert.assertEquals(addedCount, instancesDiff.getAddedInstances().size()); + Assert.assertEquals(removedCount, instancesDiff.getRemovedInstances().size()); + Assert.assertEquals(modifiedCount, instancesDiff.getModifiedInstances().size()); + instancesDiff.getAddedInstances().clear(); + instancesDiff.getRemovedInstances().clear(); + instancesDiff.getModifiedInstances().clear(); + Assert.assertFalse(instancesDiff.hasDifferent()); + Assert.assertFalse(instancesDiff.isAdded()); + Assert.assertFalse(instancesDiff.isRemoved()); + Assert.assertFalse(instancesDiff.isModified()); + } + private static List getInstanceList(int count) { + ArrayList list = new ArrayList<>(count); + for (int i = 0; i < count; i++) { + list.add(new Instance()); + } + return list; } } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelectorTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelectorTest.java new file mode 100644 index 00000000000..4915af36d89 --- /dev/null +++ b/client/src/test/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelectorTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.selector; + +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.naming.selector.NamingContext; +import com.alibaba.nacos.api.naming.selector.NamingResult; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class DefaultNamingSelectorTest { + + @Test + public void testSelect() { + DefaultNamingSelector namingSelector = new DefaultNamingSelector(Instance::isHealthy); + Random random = new Random(); + int total = random.nextInt(32) + 1; + int health = random.nextInt(total); + + NamingContext namingContext = getMockNamingContext(total, health); + NamingResult result = namingSelector.select(namingContext); + + assertEquals(health, result.getResult().size()); + result.getResult().forEach(ins -> assertTrue(ins.isHealthy())); + } + + private NamingContext getMockNamingContext(int total, int health) { + NamingContext namingContext = mock(NamingContext.class); + when(namingContext.getInstances()).thenReturn(getInstance(total, health)); + return namingContext; + } + + private List getInstance(int total, int health) { + List list = new ArrayList<>(total); + for (int i = 0; i < total; i++) { + Instance instance = new Instance(); + instance.setHealthy(false); + list.add(instance); + } + + for (int i = 0; i < health; i++) { + list.get(i).setHealthy(true); + } + + return list; + } +} diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvokerTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvokerTest.java new file mode 100644 index 00000000000..5f49d6044cd --- /dev/null +++ b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvokerTest.java @@ -0,0 +1,75 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.selector; + +import com.alibaba.nacos.api.naming.listener.AbstractEventListener; +import com.alibaba.nacos.api.naming.listener.EventListener; +import com.alibaba.nacos.api.naming.listener.NamingEvent; +import com.alibaba.nacos.client.naming.event.InstancesDiff; +import com.alibaba.nacos.client.naming.listener.AbstractNamingChangeListener; +import com.alibaba.nacos.client.naming.listener.NamingChangeEvent; +import org.junit.Test; + +import java.util.Collections; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.verify; + +public class NamingListenerInvokerTest { + @Test + public void testEventListener() { + EventListener listener = mock(EventListener.class); + NamingListenerInvoker listenerInvoker = new NamingListenerInvoker(listener); + NamingEvent event = new NamingEvent("serviceName", Collections.emptyList()); + listenerInvoker.invoke(event); + verify(listener).onEvent(event); + } + + @Test + public void testAbstractEventListener() { + AbstractEventListener listener = mock(AbstractEventListener.class); + NamingListenerInvoker listenerInvoker = new NamingListenerInvoker(listener); + NamingEvent event = new NamingEvent("serviceName", Collections.emptyList()); + listenerInvoker.invoke(event); + verify(listener).getExecutor(); + } + + @Test + public void testAbstractNamingChaneEventListener() { + AbstractNamingChangeListener listener = spy(AbstractNamingChangeListener.class); + NamingListenerInvoker listenerInvoker = new NamingListenerInvoker(listener); + NamingChangeEvent event = new NamingChangeEvent("serviceName", Collections.emptyList(), new InstancesDiff()); + listenerInvoker.invoke(event); + verify(listener).onChange(event); + } + + @Test + public void testEquals() { + EventListener listener1 = mock(EventListener.class); + EventListener listener2 = mock(EventListener.class); + NamingListenerInvoker invoker1 = new NamingListenerInvoker(listener1); + NamingListenerInvoker invoker2 = new NamingListenerInvoker(listener1); + NamingListenerInvoker invoker3 = new NamingListenerInvoker(listener2); + assertEquals(invoker1.hashCode(), invoker2.hashCode()); + assertEquals(invoker1, invoker2); + assertNotEquals(invoker1.hashCode(), invoker3.hashCode()); + assertNotEquals(invoker1, invoker3); + } +} diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapperTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapperTest.java new file mode 100644 index 00000000000..91fe6d6e9b7 --- /dev/null +++ b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapperTest.java @@ -0,0 +1,99 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.selector; + +import com.alibaba.nacos.api.naming.listener.EventListener; +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.naming.selector.NamingSelector; +import com.alibaba.nacos.client.naming.event.InstancesChangeEvent; +import com.alibaba.nacos.client.naming.event.InstancesDiff; +import com.alibaba.nacos.client.naming.listener.NamingChangeEvent; +import org.junit.Test; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.argThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + +public class NamingSelectorWrapperTest { + + @Test + public void testEquals() { + EventListener listener = mock(EventListener.class); + NamingSelector selector1 = mock(NamingSelector.class); + NamingSelector selector2 = mock(NamingSelector.class); + NamingSelectorWrapper sw1 = new NamingSelectorWrapper(selector1, listener); + NamingSelectorWrapper sw2 = new NamingSelectorWrapper(selector2, listener); + NamingSelectorWrapper sw3 = new NamingSelectorWrapper(selector1, listener); + + assertNotEquals(sw1.hashCode(), sw2.hashCode()); + assertEquals(sw1.hashCode(), sw3.hashCode()); + assertNotEquals(sw1, sw2); + assertEquals(sw1, sw3); + + Set set = new HashSet<>(); + set.add(sw1); + assertFalse(set.contains(sw2)); + assertTrue(set.contains(sw3)); + assertTrue(set.add(sw2)); + assertFalse(set.add(sw3)); + assertTrue(set.remove(sw3)); + } + + @Test + public void testSelectable() { + NamingSelectorWrapper selectorWrapper = new NamingSelectorWrapper(null, null); + assertFalse(selectorWrapper.isSelectable(null)); + InstancesChangeEvent event1 = new InstancesChangeEvent(null, null, null, null, null, null); + assertFalse(selectorWrapper.isSelectable(event1)); + InstancesChangeEvent event2 = new InstancesChangeEvent(null, null, null, null, null, new InstancesDiff()); + assertFalse(selectorWrapper.isSelectable(event2)); + InstancesChangeEvent event3 = new InstancesChangeEvent(null, null, null, null, Collections.emptyList(), null); + assertFalse(selectorWrapper.isSelectable(event3)); + InstancesChangeEvent event4 = new InstancesChangeEvent(null, null, null, null, Collections.emptyList(), new InstancesDiff()); + assertTrue(selectorWrapper.isSelectable(event4)); + } + + @Test + public void testCallable() { + NamingSelectorWrapper selectorWrapper = new NamingSelectorWrapper(null, null); + InstancesDiff instancesDiff = new InstancesDiff(null, Collections.singletonList(new Instance()), null); + NamingChangeEvent changeEvent = new NamingChangeEvent("serviceName", Collections.emptyList(), instancesDiff); + assertTrue(selectorWrapper.isCallable(changeEvent)); + changeEvent.getRemovedInstances().clear(); + assertFalse(selectorWrapper.isCallable(changeEvent)); + } + + @Test + public void testNotifyListener() { + EventListener listener = mock(EventListener.class); + NamingSelectorWrapper selectorWrapper = new NamingSelectorWrapper(new DefaultNamingSelector(Instance::isHealthy), listener); + InstancesDiff diff = new InstancesDiff(null, Collections.singletonList(new Instance()), null); + InstancesChangeEvent event = + new InstancesChangeEvent(null, "serviceName", "groupName", "clusters", Collections.emptyList(), diff); + selectorWrapper.notifyListener(event); + verify(listener).onEvent(argThat(Objects::nonNull)); + } +} diff --git a/client/src/test/java/com/alibaba/nacos/client/selector/SelectorFactoryTest.java b/client/src/test/java/com/alibaba/nacos/client/selector/SelectorFactoryTest.java new file mode 100644 index 00000000000..c95fc7b3e68 --- /dev/null +++ b/client/src/test/java/com/alibaba/nacos/client/selector/SelectorFactoryTest.java @@ -0,0 +1,66 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.selector; + +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.naming.selector.NamingContext; +import com.alibaba.nacos.api.naming.selector.NamingResult; +import com.alibaba.nacos.api.naming.selector.NamingSelector; +import org.junit.Test; + +import java.util.Arrays; +import java.util.Collections; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class SelectorFactoryTest { + + @Test + public void testNewClusterSelector1() { + Instance ins1 = new Instance(); + ins1.setClusterName("a"); + Instance ins2 = new Instance(); + ins2.setClusterName("b"); + Instance ins3 = new Instance(); + ins3.setClusterName("c"); + + NamingContext namingContext = mock(NamingContext.class); + when(namingContext.getInstances()).thenReturn(Arrays.asList(ins1, ins2, ins3)); + + NamingSelector namingSelector1 = SelectorFactory.newClusterSelector(Collections.singletonList("a")); + NamingResult result1 = namingSelector1.select(namingContext); + assertEquals("a", result1.getResult().get(0).getClusterName()); + + NamingSelector namingSelector2 = SelectorFactory.newClusterSelector(Collections.emptyList()); + NamingResult result2 = namingSelector2.select(namingContext); + assertEquals(3, result2.getResult().size()); + } + + @Test + public void testNewClusterSelector2() { + NamingSelector namingSelector1 = SelectorFactory.newClusterSelector(Arrays.asList("a", "b", "c")); + NamingSelector namingSelector2 = SelectorFactory.newClusterSelector(Arrays.asList("c", "b", "a")); + NamingSelector namingSelector3 = SelectorFactory.newClusterSelector(Arrays.asList("a", "b", "c", "c")); + NamingSelector namingSelector4 = SelectorFactory.newClusterSelector(Arrays.asList("d", "e")); + assertEquals(namingSelector1, namingSelector2); + assertEquals(namingSelector1, namingSelector3); + assertNotEquals(namingSelector1, namingSelector4); + } +} diff --git a/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java new file mode 100644 index 00000000000..180ee1c4b1a --- /dev/null +++ b/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java @@ -0,0 +1,83 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.selector; + +import com.alibaba.nacos.client.naming.selector.NamingSelectorWrapper; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; + +public class SelectorManagerTest { + + @Test + public void testCurd() { + SelectorManager selectorManager = new SelectorManager<>(); + String subId = "subId"; + NamingSelectorWrapper sw = mock(NamingSelectorWrapper.class); + selectorManager.addSelectorWrapper(subId, sw); + assertTrue(selectorManager.getSelectorWrappers(subId).contains(sw)); + selectorManager.removeSelectorWrapper(subId, sw); + assertNull(selectorManager.getSelectorWrappers(subId)); + } + + @Test + public void testSubInfo() { + SelectorManager selectorManager = new SelectorManager<>(); + List list = new ArrayList<>(); + for (int i = 0; i < 64; i++) { + list.add(generateRandomString(2, 32)); + } + + for (String subId : list) { + selectorManager.addSelectorWrapper(subId, mock(NamingSelectorWrapper.class)); + assertTrue(selectorManager.isSubscribed(subId)); + } + + List subsList = selectorManager.getSubscriptions(); + for (String subId : subsList) { + assertTrue(list.contains(subId)); + } + + for (String subId : list) { + selectorManager.removeSubscription(subId); + assertFalse(selectorManager.isSubscribed(subId)); + } + } + + private static String generateRandomString(int minLength, int maxLength) { + String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + + Random random = new Random(); + int length = random.nextInt(maxLength - minLength + 1) + minLength; + StringBuilder sb = new StringBuilder(); + + for (int i = 0; i < length; i++) { + int index = random.nextInt(characters.length()); + char randomChar = characters.charAt(index); + sb.append(randomChar); + } + + return sb.toString(); + } +} From 4ad98d837d54e0c937b4c7bb301003e161fdd0ed Mon Sep 17 00:00:00 2001 From: Dale Lee <112548822+ldyedu@users.noreply.github.com> Date: Wed, 6 Sep 2023 17:18:18 +0800 Subject: [PATCH 003/110] [ISSUE #10374] Select clusters using the selector (#10995) * Select clusters using the selector * Add Event Cache * Update NacosNamingService,InstancesChangeNotifier --- .../nacos/api/naming/NamingService.java | 25 ++++++ .../client/naming/NacosNamingService.java | 78 +++++++++++++++---- .../naming/core/ServiceInfoUpdateService.java | 2 +- .../naming/event/InstancesChangeNotifier.java | 75 ++++++------------ .../selector/NamingSelectorWrapper.java | 71 ++++++++--------- .../client/selector/SelectorFactory.java | 2 +- .../client/selector/SelectorManager.java | 6 +- .../client/naming/NacosNamingServiceTest.java | 58 +++++++++----- .../event/InstancesChangeNotifierTest.java | 60 +++++++++----- .../selector/NamingSelectorWrapperTest.java | 24 +++--- .../client/selector/SelectorManagerTest.java | 5 +- 11 files changed, 246 insertions(+), 160 deletions(-) diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java index d27ad5bd044..09e3f9b84ea 100644 --- a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java +++ b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java @@ -21,6 +21,7 @@ import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ListView; import com.alibaba.nacos.api.naming.pojo.ServiceInfo; +import com.alibaba.nacos.api.naming.selector.NamingSelector; import com.alibaba.nacos.api.selector.AbstractSelector; import java.util.List; @@ -490,6 +491,18 @@ Instance selectOneHealthyInstance(String serviceName, String groupName, List clusters, EventListener listener) throws NacosException; + + /** + * Subscribe service to receive events of instances alteration. + * + * @param serviceName name of service + * @param groupName group of service + * @param selector selector of instances + * @param listener event listener + * @throws NacosException nacos exception + */ + void subscribe(String serviceName, String groupName, NamingSelector selector, EventListener listener) + throws NacosException; /** * Unsubscribe event listener of service. @@ -531,6 +544,18 @@ void subscribe(String serviceName, String groupName, List clusters, Even */ void unsubscribe(String serviceName, String groupName, List clusters, EventListener listener) throws NacosException; + + /** + * Unsubscribe event listener of service. + * + * @param serviceName name of service + * @param groupName group of service + * @param selector selector of instances + * @param listener event listener + * @throws NacosException nacos exception + */ + void unsubscribe(String serviceName, String groupName, NamingSelector selector, EventListener listener) + throws NacosException; /** * Get all service names from server. diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java index a03e35559e3..a56b9be47a8 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java @@ -24,6 +24,7 @@ import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ListView; import com.alibaba.nacos.api.naming.pojo.ServiceInfo; +import com.alibaba.nacos.api.naming.selector.NamingSelector; import com.alibaba.nacos.api.naming.utils.NamingUtils; import com.alibaba.nacos.api.selector.AbstractSelector; import com.alibaba.nacos.client.env.NacosClientProperties; @@ -31,11 +32,14 @@ import com.alibaba.nacos.client.naming.core.Balancer; import com.alibaba.nacos.client.naming.event.InstancesChangeEvent; import com.alibaba.nacos.client.naming.event.InstancesChangeNotifier; +import com.alibaba.nacos.client.naming.event.InstancesDiff; import com.alibaba.nacos.client.naming.remote.NamingClientProxy; import com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate; +import com.alibaba.nacos.client.naming.selector.NamingSelectorWrapper; import com.alibaba.nacos.client.naming.utils.CollectionUtils; import com.alibaba.nacos.client.naming.utils.InitUtils; import com.alibaba.nacos.client.naming.utils.UtilAndComs; +import com.alibaba.nacos.client.selector.SelectorFactory; import com.alibaba.nacos.client.utils.ValidatorUtils; import com.alibaba.nacos.common.notify.NotifyCenter; import com.alibaba.nacos.common.utils.StringUtils; @@ -46,6 +50,8 @@ import java.util.Properties; import java.util.UUID; +import static com.alibaba.nacos.client.selector.SelectorFactory.getUniqueClusterString; + /** * Nacos Naming Service. * @@ -54,7 +60,7 @@ @SuppressWarnings("PMD.ServiceOrDaoClassShouldEndWithImplRule") public class NacosNamingService implements NamingService { - private static final String DEFAULT_NAMING_LOG_FILE_PATH = "naming.log"; + private static final String DEFAULT_NAMING_LOG_FILE_PATH = "naming.log"; private static final String UP = "UP"; @@ -93,13 +99,14 @@ private void init(Properties properties) throws NacosException { InitUtils.initSerialization(); InitUtils.initWebRootContext(nacosClientProperties); initLogName(nacosClientProperties); - + this.notifierEventScope = UUID.randomUUID().toString(); this.changeNotifier = new InstancesChangeNotifier(this.notifierEventScope); NotifyCenter.registerToPublisher(InstancesChangeEvent.class, 16384); NotifyCenter.registerSubscriber(changeNotifier); this.serviceInfoHolder = new ServiceInfoHolder(namespace, this.notifierEventScope, nacosClientProperties); - this.clientProxy = new NamingClientProxyDelegate(this.namespace, serviceInfoHolder, nacosClientProperties, changeNotifier); + this.clientProxy = new NamingClientProxyDelegate(this.namespace, serviceInfoHolder, nacosClientProperties, + changeNotifier); } private void initLogName(NacosClientProperties properties) { @@ -373,8 +380,8 @@ public Instance selectOneHealthyInstance(String serviceName, String groupName, L } return Balancer.RandomByWeight.selectHost(serviceInfo); } else { - ServiceInfo serviceInfo = clientProxy - .queryInstancesOfService(serviceName, groupName, clusterString, 0, false); + ServiceInfo serviceInfo = clientProxy.queryInstancesOfService(serviceName, groupName, clusterString, 0, + false); return Balancer.RandomByWeight.selectHost(serviceInfo); } } @@ -397,12 +404,25 @@ public void subscribe(String serviceName, List clusters, EventListener l @Override public void subscribe(String serviceName, String groupName, List clusters, EventListener listener) throws NacosException { - if (null == listener) { + NamingSelector clusterSelector = SelectorFactory.newClusterSelector(clusters); + doSubscribe(serviceName, groupName, getUniqueClusterString(clusters), clusterSelector, listener); + } + + @Override + public void subscribe(String serviceName, String groupName, NamingSelector selector, EventListener listener) + throws NacosException { + doSubscribe(serviceName, groupName, Constants.NULL, selector, listener); + } + + private void doSubscribe(String serviceName, String groupName, String clusters, NamingSelector selector, + EventListener listener) throws NacosException { + if (selector == null || listener == null) { return; } - String clusterString = StringUtils.join(clusters, ","); - changeNotifier.registerListener(groupName, serviceName, clusterString, listener); - clientProxy.subscribe(serviceName, groupName, clusterString); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, groupName, clusters, selector, listener); + notifyIfSubscribed(serviceName, groupName, wrapper); + changeNotifier.registerListener(groupName, serviceName, wrapper); + clientProxy.subscribe(serviceName, groupName, Constants.NULL); } @Override @@ -423,10 +443,25 @@ public void unsubscribe(String serviceName, List clusters, EventListener @Override public void unsubscribe(String serviceName, String groupName, List clusters, EventListener listener) throws NacosException { - String clustersString = StringUtils.join(clusters, ","); - changeNotifier.deregisterListener(groupName, serviceName, clustersString, listener); - if (!changeNotifier.isSubscribed(groupName, serviceName, clustersString)) { - clientProxy.unsubscribe(serviceName, groupName, clustersString); + NamingSelector clusterSelector = SelectorFactory.newClusterSelector(clusters); + unsubscribe(serviceName, groupName, clusterSelector, listener); + } + + @Override + public void unsubscribe(String serviceName, String groupName, NamingSelector selector, EventListener listener) + throws NacosException { + doUnsubscribe(serviceName, groupName, selector, listener); + } + + private void doUnsubscribe(String serviceName, String groupName, NamingSelector selector, EventListener listener) + throws NacosException { + if (selector == null || listener == null) { + return; + } + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(selector, listener); + changeNotifier.deregisterListener(groupName, serviceName, wrapper); + if (!changeNotifier.isSubscribed(groupName, serviceName)) { + clientProxy.unsubscribe(serviceName, groupName, Constants.NULL); } } @@ -467,6 +502,23 @@ public void shutDown() throws NacosException { serviceInfoHolder.shutdown(); clientProxy.shutdown(); NotifyCenter.deregisterSubscriber(changeNotifier); + } + + private void notifyIfSubscribed(String serviceName, String groupName, NamingSelectorWrapper wrapper) { + if (changeNotifier.isSubscribed(groupName, serviceName)) { + ServiceInfo serviceInfo = serviceInfoHolder.getServiceInfo(serviceName, groupName, Constants.NULL); + InstancesChangeEvent event = transferToEvent(serviceInfo); + wrapper.notifyListener(event); + } + } + private InstancesChangeEvent transferToEvent(ServiceInfo serviceInfo) { + if (serviceInfo == null) { + return null; + } + InstancesDiff diff = new InstancesDiff(); + diff.setAddedInstances(serviceInfo.getHosts()); + return new InstancesChangeEvent(notifierEventScope, serviceInfo.getName(), serviceInfo.getGroupName(), + serviceInfo.getClusters(), serviceInfo.getHosts(), diff); } } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/core/ServiceInfoUpdateService.java b/client/src/main/java/com/alibaba/nacos/client/naming/core/ServiceInfoUpdateService.java index 9086552abd8..a4f2ce25c17 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/core/ServiceInfoUpdateService.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/core/ServiceInfoUpdateService.java @@ -179,7 +179,7 @@ public void run() { long delayTime = DEFAULT_DELAY; try { - if (!changeNotifier.isSubscribed(groupName, serviceName, clusters) && !futureMap.containsKey( + if (!changeNotifier.isSubscribed(groupName, serviceName) && !futureMap.containsKey( serviceKey)) { NAMING_LOGGER.info("update task is stopped, service:{}, clusters:{}", groupedServiceName, clusters); isCancel = true; diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifier.java b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifier.java index 336345fbfd2..8c9c7500cfa 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifier.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifier.java @@ -16,22 +16,18 @@ package com.alibaba.nacos.client.naming.event; -import com.alibaba.nacos.api.naming.listener.AbstractEventListener; -import com.alibaba.nacos.api.naming.listener.EventListener; import com.alibaba.nacos.api.naming.pojo.ServiceInfo; import com.alibaba.nacos.api.naming.utils.NamingUtils; -import com.alibaba.nacos.client.naming.listener.NamingChangeEvent; +import com.alibaba.nacos.client.naming.selector.NamingSelectorWrapper; +import com.alibaba.nacos.client.selector.SelectorManager; import com.alibaba.nacos.common.JustForTest; import com.alibaba.nacos.common.notify.Event; import com.alibaba.nacos.common.notify.listener.Subscriber; -import com.alibaba.nacos.common.utils.CollectionUtils; -import com.alibaba.nacos.common.utils.ConcurrentHashSet; import java.util.ArrayList; +import java.util.Collection; import java.util.List; -import java.util.Map; import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; /** * A subscriber to notify eventListener callback. @@ -43,7 +39,7 @@ public class InstancesChangeNotifier extends Subscriber { private final String eventScope; - private final Map> listenerMap = new ConcurrentHashMap<>(); + private final SelectorManager selectorManager = new SelectorManager<>(); @JustForTest public InstancesChangeNotifier() { @@ -59,13 +55,14 @@ public InstancesChangeNotifier(String eventScope) { * * @param groupName group name * @param serviceName serviceName - * @param clusters clusters, concat by ','. such as 'xxx,yyy' - * @param listener custom listener + * @param wrapper selectorWrapper */ - public void registerListener(String groupName, String serviceName, String clusters, EventListener listener) { - String key = ServiceInfo.getKey(NamingUtils.getGroupedName(serviceName, groupName), clusters); - ConcurrentHashSet eventListeners = listenerMap.computeIfAbsent(key, keyInner -> new ConcurrentHashSet<>()); - eventListeners.add(listener); + public void registerListener(String groupName, String serviceName, NamingSelectorWrapper wrapper) { + if (wrapper == null) { + return; + } + String subId = NamingUtils.getGroupedName(serviceName, groupName); + selectorManager.addSelectorWrapper(subId, wrapper); } /** @@ -73,38 +70,31 @@ public void registerListener(String groupName, String serviceName, String cluste * * @param groupName group name * @param serviceName serviceName - * @param clusters clusters, concat by ','. such as 'xxx,yyy' - * @param listener custom listener + * @param wrapper selectorWrapper */ - public void deregisterListener(String groupName, String serviceName, String clusters, EventListener listener) { - String key = ServiceInfo.getKey(NamingUtils.getGroupedName(serviceName, groupName), clusters); - ConcurrentHashSet eventListeners = listenerMap.get(key); - if (eventListeners == null) { + public void deregisterListener(String groupName, String serviceName, NamingSelectorWrapper wrapper) { + if (wrapper == null) { return; } - eventListeners.remove(listener); - if (CollectionUtils.isEmpty(eventListeners)) { - listenerMap.remove(key); - } + String subId = NamingUtils.getGroupedName(serviceName, groupName); + selectorManager.removeSelectorWrapper(subId, wrapper); } /** - * check serviceName,clusters is subscribed. + * check serviceName,groupName is subscribed. * * @param groupName group name * @param serviceName serviceName - * @param clusters clusters, concat by ','. such as 'xxx,yyy' * @return is serviceName,clusters subscribed */ - public boolean isSubscribed(String groupName, String serviceName, String clusters) { - String key = ServiceInfo.getKey(NamingUtils.getGroupedName(serviceName, groupName), clusters); - ConcurrentHashSet eventListeners = listenerMap.get(key); - return CollectionUtils.isNotEmpty(eventListeners); + public boolean isSubscribed(String groupName, String serviceName) { + String subId = NamingUtils.getGroupedName(serviceName, groupName); + return selectorManager.isSubscribed(subId); } public List getSubscribeServices() { List serviceInfos = new ArrayList<>(); - for (String key : listenerMap.keySet()) { + for (String key : selectorManager.getSubscriptions()) { serviceInfos.add(ServiceInfo.fromKey(key)); } return serviceInfos; @@ -112,26 +102,11 @@ public List getSubscribeServices() { @Override public void onEvent(InstancesChangeEvent event) { - String key = ServiceInfo - .getKey(NamingUtils.getGroupedName(event.getServiceName(), event.getGroupName()), event.getClusters()); - ConcurrentHashSet eventListeners = listenerMap.get(key); - if (CollectionUtils.isEmpty(eventListeners)) { - return; + String subId = NamingUtils.getGroupedName(event.getServiceName(), event.getGroupName()); + Collection selectorWrappers = selectorManager.getSelectorWrappers(subId); + for (NamingSelectorWrapper selectorWrapper : selectorWrappers) { + selectorWrapper.notifyListener(event); } - for (final EventListener listener : eventListeners) { - final com.alibaba.nacos.api.naming.listener.Event namingEvent = transferToNamingEvent(event); - if (listener instanceof AbstractEventListener && ((AbstractEventListener) listener).getExecutor() != null) { - ((AbstractEventListener) listener).getExecutor().execute(() -> listener.onEvent(namingEvent)); - } else { - listener.onEvent(namingEvent); - } - } - } - - private com.alibaba.nacos.api.naming.listener.Event transferToNamingEvent( - InstancesChangeEvent instancesChangeEvent) { - return new NamingChangeEvent(instancesChangeEvent.getServiceName(), instancesChangeEvent.getGroupName(), - instancesChangeEvent.getClusters(), instancesChangeEvent.getHosts(), instancesChangeEvent.getInstancesDiff()); } @Override diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapper.java b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapper.java index f42a685a272..412b120f03a 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapper.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapper.java @@ -36,102 +36,97 @@ * @author lideyou */ public class NamingSelectorWrapper extends AbstractSelectorWrapper { - + private String serviceName; - + private String groupName; - + private String clusters; - + private final InnerNamingContext namingContext = new InnerNamingContext(); - + private class InnerNamingContext implements NamingContext { - + private List instances; - + @Override public String getServiceName() { return serviceName; } - + @Override public String getGroupName() { return groupName; } - + @Override public String getClusters() { return clusters; } - + @Override public List getInstances() { return instances; } - + private void setInstances(List instances) { this.instances = instances; } } - + public NamingSelectorWrapper(NamingSelector selector, EventListener listener) { super(selector, new NamingListenerInvoker(listener)); } - + + public NamingSelectorWrapper(String serviceName, String groupName, String clusters, NamingSelector selector, + EventListener listener) { + this(selector, listener); + this.serviceName = serviceName; + this.groupName = groupName; + this.clusters = clusters; + } + @Override protected boolean isSelectable(InstancesChangeEvent event) { - return event != null - && event.getHosts() != null - && event.getInstancesDiff() != null; + return event != null && event.getHosts() != null && event.getInstancesDiff() != null; } - + @Override public boolean isCallable(NamingEvent event) { if (event == null) { return false; } NamingChangeEvent changeEvent = (NamingChangeEvent) event; - return changeEvent.isAdded() - || changeEvent.isRemoved() - || changeEvent.isModified(); + return changeEvent.isAdded() || changeEvent.isRemoved() || changeEvent.isModified(); } - + @Override protected NamingEvent buildListenerEvent(InstancesChangeEvent event) { - this.serviceName = event.getServiceName(); - this.groupName = event.getGroupName(); - this.clusters = event.getClusters(); - List currentIns = Collections.emptyList(); if (CollectionUtils.isNotEmpty(event.getHosts())) { currentIns = doSelect(event.getHosts()); } - + InstancesDiff diff = event.getInstancesDiff(); InstancesDiff newDiff = new InstancesDiff(); if (diff.isAdded()) { - newDiff.setAddedInstances( - doSelect(diff.getAddedInstances())); + newDiff.setAddedInstances(doSelect(diff.getAddedInstances())); } if (diff.isRemoved()) { - newDiff.setRemovedInstances( - doSelect(diff.getRemovedInstances())); + newDiff.setRemovedInstances(doSelect(diff.getRemovedInstances())); } if (diff.isModified()) { - newDiff.setModifiedInstances( - doSelect(diff.getModifiedInstances())); + newDiff.setModifiedInstances(doSelect(diff.getModifiedInstances())); } - + return new NamingChangeEvent(serviceName, groupName, clusters, currentIns, newDiff); } - + private List doSelect(List instances) { NamingContext context = getNamingContext(instances); - return this.getSelector() - .select(context) - .getResult(); + return this.getSelector().select(context).getResult(); } - + private NamingContext getNamingContext(final List instances) { namingContext.setInstances(instances); return namingContext; diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java index 497cdd97483..11ebf574562 100644 --- a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java +++ b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java @@ -86,7 +86,7 @@ public static NamingSelector newClusterSelector(Collection clusters) { } } - private static String getUniqueClusterString(Collection cluster) { + public static String getUniqueClusterString(Collection cluster) { TreeSet treeSet = new TreeSet<>(cluster); return StringUtils.join(treeSet, ","); } diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java index bf732565024..a74d03a037d 100644 --- a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java @@ -19,8 +19,6 @@ import com.alibaba.nacos.common.utils.CollectionUtils; import com.alibaba.nacos.common.utils.ConcurrentHashSet; -import java.util.ArrayList; -import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; @@ -86,8 +84,8 @@ public void removeSubscription(String subId) { * * @return all subscriptions */ - public List getSubscriptions() { - return new ArrayList<>(selectorMap.keySet()); + public Set getSubscriptions() { + return selectorMap.keySet(); } /** diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java index e42323893b6..46e0467edcb 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java @@ -29,7 +29,9 @@ import com.alibaba.nacos.client.naming.event.InstancesChangeNotifier; import com.alibaba.nacos.client.naming.remote.NamingClientProxy; import com.alibaba.nacos.client.naming.remote.http.NamingHttpClientProxy; +import com.alibaba.nacos.client.naming.selector.NamingSelectorWrapper; import com.alibaba.nacos.client.naming.utils.CollectionUtils; +import com.alibaba.nacos.client.selector.SelectorFactory; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; @@ -39,9 +41,11 @@ import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Properties; +import static com.alibaba.nacos.client.selector.SelectorFactory.getUniqueClusterString; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; @@ -710,8 +714,10 @@ public void testSubscribe1() throws NacosException { }; //when client.subscribe(serviceName, listener); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, Constants.DEFAULT_GROUP, Constants.NULL, + SelectorFactory.newClusterSelector(Collections.emptyList()), listener); //then - verify(changeNotifier, times(1)).registerListener(Constants.DEFAULT_GROUP, serviceName, "", listener); + verify(changeNotifier, times(1)).registerListener(Constants.DEFAULT_GROUP, serviceName, wrapper); verify(proxy, times(1)).subscribe(serviceName, Constants.DEFAULT_GROUP, ""); } @@ -725,8 +731,10 @@ public void testSubscribe2() throws NacosException { }; //when client.subscribe(serviceName, groupName, listener); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, groupName, Constants.NULL, + SelectorFactory.newClusterSelector(Collections.emptyList()), listener); //then - verify(changeNotifier, times(1)).registerListener(groupName, serviceName, "", listener); + verify(changeNotifier, times(1)).registerListener(groupName, serviceName, wrapper); verify(proxy, times(1)).subscribe(serviceName, groupName, ""); } @@ -740,10 +748,11 @@ public void testSubscribe3() throws NacosException { }; //when client.subscribe(serviceName, clusterList, listener); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, Constants.DEFAULT_GROUP, Constants.NULL, + SelectorFactory.newClusterSelector(clusterList), listener); //then - verify(changeNotifier, times(1)).registerListener(Constants.DEFAULT_GROUP, serviceName, "cluster1,cluster2", - listener); - verify(proxy, times(1)).subscribe(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2"); + verify(changeNotifier, times(1)).registerListener(Constants.DEFAULT_GROUP, serviceName, wrapper); + verify(proxy, times(1)).subscribe(serviceName, Constants.DEFAULT_GROUP, Constants.NULL); } @Test @@ -757,9 +766,11 @@ public void testSubscribe4() throws NacosException { }; //when client.subscribe(serviceName, groupName, clusterList, listener); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, groupName, + getUniqueClusterString(clusterList), SelectorFactory.newClusterSelector(clusterList), listener); //then - verify(changeNotifier, times(1)).registerListener(groupName, serviceName, "cluster1,cluster2", listener); - verify(proxy, times(1)).subscribe(serviceName, groupName, "cluster1,cluster2"); + verify(changeNotifier, times(1)).registerListener(groupName, serviceName, wrapper); + verify(proxy, times(1)).subscribe(serviceName, groupName, Constants.NULL); } @Test @@ -769,12 +780,14 @@ public void testUnSubscribe1() throws NacosException { EventListener listener = event -> { }; - when(changeNotifier.isSubscribed(serviceName, Constants.DEFAULT_GROUP, "")).thenReturn(false); + when(changeNotifier.isSubscribed(serviceName, Constants.DEFAULT_GROUP)).thenReturn(false); //when client.unsubscribe(serviceName, listener); //then - verify(changeNotifier, times(1)).deregisterListener(Constants.DEFAULT_GROUP, serviceName, "", listener); - verify(proxy, times(1)).unsubscribe(serviceName, Constants.DEFAULT_GROUP, ""); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper( + SelectorFactory.newClusterSelector(Collections.emptyList()), listener); + verify(changeNotifier, times(1)).deregisterListener(Constants.DEFAULT_GROUP, serviceName, wrapper); + verify(proxy, times(1)).unsubscribe(serviceName, Constants.DEFAULT_GROUP, Constants.NULL); } @Test @@ -785,13 +798,15 @@ public void testUnSubscribe2() throws NacosException { EventListener listener = event -> { }; - when(changeNotifier.isSubscribed(serviceName, groupName, "")).thenReturn(false); + when(changeNotifier.isSubscribed(serviceName, groupName)).thenReturn(false); //when client.unsubscribe(serviceName, groupName, listener); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper( + SelectorFactory.newClusterSelector(Collections.emptyList()), listener); //then - verify(changeNotifier, times(1)).deregisterListener(groupName, serviceName, "", listener); - verify(proxy, times(1)).unsubscribe(serviceName, groupName, ""); + verify(changeNotifier, times(1)).deregisterListener(groupName, serviceName, wrapper); + verify(proxy, times(1)).unsubscribe(serviceName, groupName, Constants.NULL); } @Test @@ -802,14 +817,15 @@ public void testUnSubscribe3() throws NacosException { EventListener listener = event -> { }; - when(changeNotifier.isSubscribed(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2")).thenReturn(false); + when(changeNotifier.isSubscribed(serviceName, Constants.DEFAULT_GROUP)).thenReturn(false); //when client.unsubscribe(serviceName, clusterList, listener); - //then - verify(changeNotifier, times(1)).deregisterListener(Constants.DEFAULT_GROUP, serviceName, "cluster1,cluster2", + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(SelectorFactory.newClusterSelector(clusterList), listener); - verify(proxy, times(1)).unsubscribe(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2"); + //then + verify(changeNotifier, times(1)).deregisterListener(Constants.DEFAULT_GROUP, serviceName, wrapper); + verify(proxy, times(1)).unsubscribe(serviceName, Constants.DEFAULT_GROUP, Constants.NULL); } @Test @@ -821,13 +837,15 @@ public void testUnSubscribe4() throws NacosException { EventListener listener = event -> { }; - when(changeNotifier.isSubscribed(serviceName, groupName, "cluster1,cluster2")).thenReturn(false); + when(changeNotifier.isSubscribed(serviceName, groupName)).thenReturn(false); //when client.unsubscribe(serviceName, groupName, clusterList, listener); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(SelectorFactory.newClusterSelector(clusterList), + listener); //then - verify(changeNotifier, times(1)).deregisterListener(groupName, serviceName, "cluster1,cluster2", listener); - verify(proxy, times(1)).unsubscribe(serviceName, groupName, "cluster1,cluster2"); + verify(changeNotifier, times(1)).deregisterListener(groupName, serviceName, wrapper); + verify(proxy, times(1)).unsubscribe(serviceName, groupName, Constants.NULL); } @Test diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java index 1dece170266..1bbb25ddecf 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java @@ -19,11 +19,15 @@ import com.alibaba.nacos.api.naming.listener.EventListener; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ServiceInfo; +import com.alibaba.nacos.api.naming.selector.NamingSelector; +import com.alibaba.nacos.client.naming.selector.NamingSelectorWrapper; +import com.alibaba.nacos.client.selector.SelectorFactory; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import static org.mockito.ArgumentMatchers.any; @@ -36,22 +40,25 @@ public void testRegisterListener() { String eventScope = "scope-001"; String group = "a"; String name = "b"; - String clusters = "c"; + String clusterStr = "c"; + List clusters = Collections.singletonList(clusterStr); InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); EventListener listener = Mockito.mock(EventListener.class); - instancesChangeNotifier.registerListener(group, name, clusters, listener); + NamingSelector selector = SelectorFactory.newClusterSelector(clusters); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, + listener); + instancesChangeNotifier.registerListener(group, name, wrapper); List subscribeServices = instancesChangeNotifier.getSubscribeServices(); Assert.assertEquals(1, subscribeServices.size()); Assert.assertEquals(group, subscribeServices.get(0).getGroupName()); Assert.assertEquals(name, subscribeServices.get(0).getName()); - Assert.assertEquals(clusters, subscribeServices.get(0).getClusters()); - + List hosts = new ArrayList<>(); Instance ins = new Instance(); hosts.add(ins); InstancesDiff diff = new InstancesDiff(); diff.setAddedInstances(hosts); - InstancesChangeEvent event = new InstancesChangeEvent(eventScope, name, group, clusters, hosts, diff); + InstancesChangeEvent event = new InstancesChangeEvent(eventScope, name, group, clusterStr, hosts, diff); Assert.assertEquals(true, instancesChangeNotifier.scopeMatches(event)); } @@ -60,14 +67,17 @@ public void testDeregisterListener() { String eventScope = "scope-001"; String group = "a"; String name = "b"; - String clusters = "c"; + String clusterStr = "c"; + List clusters = Collections.singletonList(clusterStr); InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); EventListener listener = Mockito.mock(EventListener.class); - instancesChangeNotifier.registerListener(group, name, clusters, listener); + NamingSelector selector = SelectorFactory.newClusterSelector(clusters); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(selector, listener); + instancesChangeNotifier.registerListener(group, name, wrapper); List subscribeServices = instancesChangeNotifier.getSubscribeServices(); Assert.assertEquals(1, subscribeServices.size()); - instancesChangeNotifier.deregisterListener(group, name, clusters, listener); + instancesChangeNotifier.deregisterListener(group, name, wrapper); List subscribeServices2 = instancesChangeNotifier.getSubscribeServices(); Assert.assertEquals(0, subscribeServices2.size()); @@ -78,13 +88,17 @@ public void testIsSubscribed() { String eventScope = "scope-001"; String group = "a"; String name = "b"; - String clusters = "c"; + String clusterStr = "c"; + List clusters = Collections.singletonList(clusterStr); InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); EventListener listener = Mockito.mock(EventListener.class); - Assert.assertFalse(instancesChangeNotifier.isSubscribed(group, name, clusters)); - - instancesChangeNotifier.registerListener(group, name, clusters, listener); - Assert.assertTrue(instancesChangeNotifier.isSubscribed(group, name, clusters)); + NamingSelector selector = SelectorFactory.newClusterSelector(clusters); + Assert.assertFalse(instancesChangeNotifier.isSubscribed(group, name)); + + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, + listener); + instancesChangeNotifier.registerListener(group, name, wrapper); + Assert.assertTrue(instancesChangeNotifier.isSubscribed(group, name)); } @Test @@ -92,16 +106,20 @@ public void testOnEvent() { String eventScope = "scope-001"; String group = "a"; String name = "b"; - String clusters = "c"; + String clusterStr = "c"; + List clusters = Collections.singletonList(clusterStr); InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); + NamingSelector selector = SelectorFactory.newClusterSelector(clusters); EventListener listener = Mockito.mock(EventListener.class); - - instancesChangeNotifier.registerListener(group, name, clusters, listener); - InstancesChangeEvent event1 = Mockito.mock(InstancesChangeEvent.class); - Mockito.when(event1.getClusters()).thenReturn(clusters); - Mockito.when(event1.getGroupName()).thenReturn(group); - Mockito.when(event1.getServiceName()).thenReturn(name); - + + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, + listener); + instancesChangeNotifier.registerListener(group, name, wrapper); + Instance instance = new Instance(); + InstancesDiff diff = new InstancesDiff(null, Collections.singletonList(instance), null); + instance.setClusterName("c"); + InstancesChangeEvent event1 = new InstancesChangeEvent(null, name, group, clusterStr, Collections.emptyList(), + diff); instancesChangeNotifier.onEvent(event1); Mockito.verify(listener, times(1)).onEvent(any()); } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapperTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapperTest.java index 91fe6d6e9b7..205a662af49 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapperTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorWrapperTest.java @@ -38,7 +38,7 @@ import static org.mockito.Mockito.verify; public class NamingSelectorWrapperTest { - + @Test public void testEquals() { EventListener listener = mock(EventListener.class); @@ -47,12 +47,12 @@ public void testEquals() { NamingSelectorWrapper sw1 = new NamingSelectorWrapper(selector1, listener); NamingSelectorWrapper sw2 = new NamingSelectorWrapper(selector2, listener); NamingSelectorWrapper sw3 = new NamingSelectorWrapper(selector1, listener); - + assertNotEquals(sw1.hashCode(), sw2.hashCode()); assertEquals(sw1.hashCode(), sw3.hashCode()); assertNotEquals(sw1, sw2); assertEquals(sw1, sw3); - + Set set = new HashSet<>(); set.add(sw1); assertFalse(set.contains(sw2)); @@ -60,8 +60,10 @@ public void testEquals() { assertTrue(set.add(sw2)); assertFalse(set.add(sw3)); assertTrue(set.remove(sw3)); + + assertEquals(sw1, new NamingSelectorWrapper("a", "b", "c", selector1, listener)); } - + @Test public void testSelectable() { NamingSelectorWrapper selectorWrapper = new NamingSelectorWrapper(null, null); @@ -72,10 +74,11 @@ public void testSelectable() { assertFalse(selectorWrapper.isSelectable(event2)); InstancesChangeEvent event3 = new InstancesChangeEvent(null, null, null, null, Collections.emptyList(), null); assertFalse(selectorWrapper.isSelectable(event3)); - InstancesChangeEvent event4 = new InstancesChangeEvent(null, null, null, null, Collections.emptyList(), new InstancesDiff()); + InstancesChangeEvent event4 = new InstancesChangeEvent(null, null, null, null, Collections.emptyList(), + new InstancesDiff()); assertTrue(selectorWrapper.isSelectable(event4)); } - + @Test public void testCallable() { NamingSelectorWrapper selectorWrapper = new NamingSelectorWrapper(null, null); @@ -85,14 +88,15 @@ public void testCallable() { changeEvent.getRemovedInstances().clear(); assertFalse(selectorWrapper.isCallable(changeEvent)); } - + @Test public void testNotifyListener() { EventListener listener = mock(EventListener.class); - NamingSelectorWrapper selectorWrapper = new NamingSelectorWrapper(new DefaultNamingSelector(Instance::isHealthy), listener); + NamingSelectorWrapper selectorWrapper = new NamingSelectorWrapper( + new DefaultNamingSelector(Instance::isHealthy), listener); InstancesDiff diff = new InstancesDiff(null, Collections.singletonList(new Instance()), null); - InstancesChangeEvent event = - new InstancesChangeEvent(null, "serviceName", "groupName", "clusters", Collections.emptyList(), diff); + InstancesChangeEvent event = new InstancesChangeEvent(null, "serviceName", "groupName", "clusters", + Collections.emptyList(), diff); selectorWrapper.notifyListener(event); verify(listener).onEvent(argThat(Objects::nonNull)); } diff --git a/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java index 180ee1c4b1a..31b3b6a31d2 100644 --- a/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; +import java.util.Set; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; @@ -54,8 +55,8 @@ public void testSubInfo() { assertTrue(selectorManager.isSubscribed(subId)); } - List subsList = selectorManager.getSubscriptions(); - for (String subId : subsList) { + Set subsSet = selectorManager.getSubscriptions(); + for (String subId : subsSet) { assertTrue(list.contains(subId)); } From 263e223d947bb4fde6b3409a87df3a38ad3b0310 Mon Sep 17 00:00:00 2001 From: Dale Lee <112548822+ldyedu@users.noreply.github.com> Date: Fri, 22 Sep 2023 13:55:46 +0800 Subject: [PATCH 004/110] [ISSUE #10374] Add default selectors (#11142) * Add default selectors * add tests * Update SubscribeSelector_ITCase * add unsubscribe test * Removes some methods for NamingSelectorFactor * Update SelectorManager --- .../nacos/api/naming/NamingService.java | 24 ++- .../client/naming/NacosNamingService.java | 18 +- .../selector/NamingSelectorFactory.java} | 81 ++++++-- .../client/selector/SelectorManager.java | 46 ++-- .../client/naming/NacosNamingServiceTest.java | 55 ++++- .../event/InstancesChangeNotifierTest.java | 10 +- .../selector/NamingSelectorFactoryTest.java | 178 ++++++++++++++++ .../client/selector/SelectorFactoryTest.java | 66 ------ .../test/naming/SubscribeSelector_ITCase.java | 167 +++++++++++++++ .../nacos/test/naming/Subscribe_ITCase.java | 196 ++++++++++++------ .../nacos/test/naming/Unsubscribe_ITCase.java | 123 +++++++---- 11 files changed, 739 insertions(+), 225 deletions(-) rename client/src/main/java/com/alibaba/nacos/client/{selector/SelectorFactory.java => naming/selector/NamingSelectorFactory.java} (54%) create mode 100644 client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorFactoryTest.java delete mode 100644 client/src/test/java/com/alibaba/nacos/client/selector/SelectorFactoryTest.java create mode 100644 test/naming-test/src/test/java/com/alibaba/nacos/test/naming/SubscribeSelector_ITCase.java diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java index 09e3f9b84ea..9f3a9dde53f 100644 --- a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java +++ b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java @@ -491,7 +491,17 @@ Instance selectOneHealthyInstance(String serviceName, String groupName, List clusters, EventListener listener) throws NacosException; - + + /** + * Subscribe service to receive events of instances alteration. + * + * @param serviceName name of service + * @param selector selector of instances + * @param listener event listener + * @throws NacosException nacos exception + */ + void subscribe(String serviceName, NamingSelector selector, EventListener listener) throws NacosException; + /** * Subscribe service to receive events of instances alteration. * @@ -544,7 +554,17 @@ void subscribe(String serviceName, String groupName, NamingSelector selector, Ev */ void unsubscribe(String serviceName, String groupName, List clusters, EventListener listener) throws NacosException; - + + /** + * Unsubscribe event listener of service. + * + * @param serviceName name of service + * @param selector selector of instances + * @param listener event listener + * @throws NacosException nacos exception + */ + void unsubscribe(String serviceName, NamingSelector selector, EventListener listener) throws NacosException; + /** * Unsubscribe event listener of service. * diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java index a56b9be47a8..5271ff47c2d 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java @@ -39,7 +39,7 @@ import com.alibaba.nacos.client.naming.utils.CollectionUtils; import com.alibaba.nacos.client.naming.utils.InitUtils; import com.alibaba.nacos.client.naming.utils.UtilAndComs; -import com.alibaba.nacos.client.selector.SelectorFactory; +import com.alibaba.nacos.client.naming.selector.NamingSelectorFactory; import com.alibaba.nacos.client.utils.ValidatorUtils; import com.alibaba.nacos.common.notify.NotifyCenter; import com.alibaba.nacos.common.utils.StringUtils; @@ -50,7 +50,7 @@ import java.util.Properties; import java.util.UUID; -import static com.alibaba.nacos.client.selector.SelectorFactory.getUniqueClusterString; +import static com.alibaba.nacos.client.naming.selector.NamingSelectorFactory.getUniqueClusterString; /** * Nacos Naming Service. @@ -404,10 +404,15 @@ public void subscribe(String serviceName, List clusters, EventListener l @Override public void subscribe(String serviceName, String groupName, List clusters, EventListener listener) throws NacosException { - NamingSelector clusterSelector = SelectorFactory.newClusterSelector(clusters); + NamingSelector clusterSelector = NamingSelectorFactory.newClusterSelector(clusters); doSubscribe(serviceName, groupName, getUniqueClusterString(clusters), clusterSelector, listener); } + @Override + public void subscribe(String serviceName, NamingSelector selector, EventListener listener) throws NacosException { + subscribe(serviceName, Constants.DEFAULT_GROUP, selector, listener); + } + @Override public void subscribe(String serviceName, String groupName, NamingSelector selector, EventListener listener) throws NacosException { @@ -443,10 +448,15 @@ public void unsubscribe(String serviceName, List clusters, EventListener @Override public void unsubscribe(String serviceName, String groupName, List clusters, EventListener listener) throws NacosException { - NamingSelector clusterSelector = SelectorFactory.newClusterSelector(clusters); + NamingSelector clusterSelector = NamingSelectorFactory.newClusterSelector(clusters); unsubscribe(serviceName, groupName, clusterSelector, listener); } + @Override + public void unsubscribe(String serviceName, NamingSelector selector, EventListener listener) throws NacosException { + unsubscribe(serviceName, Constants.DEFAULT_GROUP, selector, listener); + } + @Override public void unsubscribe(String serviceName, String groupName, NamingSelector selector, EventListener listener) throws NacosException { diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorFactory.java similarity index 54% rename from client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java rename to client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorFactory.java index 11ebf574562..6f93447d068 100644 --- a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorFactory.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingSelectorFactory.java @@ -14,40 +14,45 @@ * limitations under the License. */ -package com.alibaba.nacos.client.selector; +package com.alibaba.nacos.client.naming.selector; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.selector.NamingSelector; -import com.alibaba.nacos.client.naming.selector.DefaultNamingSelector; import com.alibaba.nacos.common.utils.CollectionUtils; import com.alibaba.nacos.common.utils.StringUtils; import java.util.Collection; import java.util.HashSet; +import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.TreeSet; import java.util.function.Predicate; +import java.util.regex.Pattern; /** * Selectors factory. * * @author lideyou */ -public final class SelectorFactory { - private static final NamingSelector EMPTY_SELECTOR = context -> context::getInstances; - +public final class NamingSelectorFactory { + + public static final NamingSelector EMPTY_SELECTOR = context -> context::getInstances; + + public static final NamingSelector HEALTHY_SELECTOR = new DefaultNamingSelector(Instance::isHealthy); + /** * Cluster selector. */ private static class ClusterSelector extends DefaultNamingSelector { + private final String clusterString; - + public ClusterSelector(Predicate filter, String clusterString) { super(filter); this.clusterString = clusterString; } - + @Override public boolean equals(Object o) { if (this == o) { @@ -59,16 +64,16 @@ public boolean equals(Object o) { ClusterSelector that = (ClusterSelector) o; return Objects.equals(this.clusterString, that.clusterString); } - + @Override public int hashCode() { return Objects.hashCode(this.clusterString); } } - - private SelectorFactory() { + + private NamingSelectorFactory() { } - + /** * Create a cluster selector. * @@ -85,9 +90,61 @@ public static NamingSelector newClusterSelector(Collection clusters) { return EMPTY_SELECTOR; } } - + + /** + * Create a IP selector. + * + * @param regex regular expression of IP + * @return IP selector + */ + public static NamingSelector newIpSelector(String regex) { + if (regex == null) { + throw new IllegalArgumentException("The parameter 'regex' cannot be null."); + } + return new DefaultNamingSelector(instance -> Pattern.matches(regex, instance.getIp())); + } + + /** + * Create a metadata selector. + * + * @param metadata metadata that needs to be matched + * @return metadata selector + */ + public static NamingSelector newMetadataSelector(Map metadata) { + return newMetadataSelector(metadata, false); + } + + /** + * Create a metadata selector. + * + * @param metadata target metadata + * @param isAny true if any of the metadata needs to be matched, false if all the metadata need to be matched. + * @return metadata selector + */ + public static NamingSelector newMetadataSelector(Map metadata, boolean isAny) { + if (metadata == null) { + throw new IllegalArgumentException("The parameter 'metadata' cannot be null."); + } + + Predicate filter = instance -> instance.getMetadata().size() >= metadata.size(); + + for (Map.Entry entry : metadata.entrySet()) { + Predicate nextFilter = instance -> { + Map map = instance.getMetadata(); + return Objects.equals(map.get(entry.getKey()), entry.getValue()); + }; + if (isAny) { + filter = filter.or(nextFilter); + } else { + filter = filter.and(nextFilter); + } + } + return new DefaultNamingSelector(filter); + } + public static String getUniqueClusterString(Collection cluster) { TreeSet treeSet = new TreeSet<>(cluster); return StringUtils.join(treeSet, ","); } + } diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java index a74d03a037d..6b4caed6c47 100644 --- a/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/selector/SelectorManager.java @@ -30,19 +30,25 @@ * @author lideyou */ public class SelectorManager> { + Map> selectorMap = new ConcurrentHashMap<>(); - + /** * Add a selectorWrapper to subId. * - * @param subId subscription id - * @param selector selector wrapper + * @param subId subscription id + * @param wrapper selector wrapper */ - public void addSelectorWrapper(String subId, S selector) { - Set selectors = selectorMap.computeIfAbsent(subId, key -> new ConcurrentHashSet<>()); - selectors.add(selector); + public void addSelectorWrapper(String subId, S wrapper) { + selectorMap.compute(subId, (k, v) -> { + if (v == null) { + v = new ConcurrentHashSet<>(); + } + v.add(wrapper); + return v; + }); } - + /** * Get all SelectorWrappers by id. * @@ -52,24 +58,20 @@ public void addSelectorWrapper(String subId, S selector) { public Set getSelectorWrappers(String subId) { return selectorMap.get(subId); } - + /** * Remove a SelectorWrapper by id. * - * @param subId subscription id - * @param selector selector wrapper + * @param subId subscription id + * @param wrapper selector wrapper */ - public void removeSelectorWrapper(String subId, S selector) { - Set selectors = selectorMap.get(subId); - if (selectors == null) { - return; - } - selectors.remove(selector); - if (CollectionUtils.isEmpty(selectors)) { - selectorMap.remove(subId); - } + public void removeSelectorWrapper(String subId, S wrapper) { + selectorMap.computeIfPresent(subId, (k, v) -> { + v.remove(wrapper); + return v.isEmpty() ? null : v; + }); } - + /** * Remove a subscription by id. * @@ -78,7 +80,7 @@ public void removeSelectorWrapper(String subId, S selector) { public void removeSubscription(String subId) { selectorMap.remove(subId); } - + /** * Get all subscriptions. * @@ -87,7 +89,7 @@ public void removeSubscription(String subId) { public Set getSubscriptions() { return selectorMap.keySet(); } - + /** * Determine whether subId is subscribed. * diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java index 46e0467edcb..1483712356e 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java @@ -31,7 +31,7 @@ import com.alibaba.nacos.client.naming.remote.http.NamingHttpClientProxy; import com.alibaba.nacos.client.naming.selector.NamingSelectorWrapper; import com.alibaba.nacos.client.naming.utils.CollectionUtils; -import com.alibaba.nacos.client.selector.SelectorFactory; +import com.alibaba.nacos.client.naming.selector.NamingSelectorFactory; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; @@ -45,7 +45,7 @@ import java.util.List; import java.util.Properties; -import static com.alibaba.nacos.client.selector.SelectorFactory.getUniqueClusterString; +import static com.alibaba.nacos.client.naming.selector.NamingSelectorFactory.getUniqueClusterString; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; @@ -715,7 +715,7 @@ public void testSubscribe1() throws NacosException { //when client.subscribe(serviceName, listener); NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, Constants.DEFAULT_GROUP, Constants.NULL, - SelectorFactory.newClusterSelector(Collections.emptyList()), listener); + NamingSelectorFactory.newClusterSelector(Collections.emptyList()), listener); //then verify(changeNotifier, times(1)).registerListener(Constants.DEFAULT_GROUP, serviceName, wrapper); verify(proxy, times(1)).subscribe(serviceName, Constants.DEFAULT_GROUP, ""); @@ -732,7 +732,7 @@ public void testSubscribe2() throws NacosException { //when client.subscribe(serviceName, groupName, listener); NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, groupName, Constants.NULL, - SelectorFactory.newClusterSelector(Collections.emptyList()), listener); + NamingSelectorFactory.newClusterSelector(Collections.emptyList()), listener); //then verify(changeNotifier, times(1)).registerListener(groupName, serviceName, wrapper); verify(proxy, times(1)).subscribe(serviceName, groupName, ""); @@ -749,7 +749,7 @@ public void testSubscribe3() throws NacosException { //when client.subscribe(serviceName, clusterList, listener); NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, Constants.DEFAULT_GROUP, Constants.NULL, - SelectorFactory.newClusterSelector(clusterList), listener); + NamingSelectorFactory.newClusterSelector(clusterList), listener); //then verify(changeNotifier, times(1)).registerListener(Constants.DEFAULT_GROUP, serviceName, wrapper); verify(proxy, times(1)).subscribe(serviceName, Constants.DEFAULT_GROUP, Constants.NULL); @@ -767,7 +767,23 @@ public void testSubscribe4() throws NacosException { //when client.subscribe(serviceName, groupName, clusterList, listener); NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, groupName, - getUniqueClusterString(clusterList), SelectorFactory.newClusterSelector(clusterList), listener); + getUniqueClusterString(clusterList), NamingSelectorFactory.newClusterSelector(clusterList), listener); + //then + verify(changeNotifier, times(1)).registerListener(groupName, serviceName, wrapper); + verify(proxy, times(1)).subscribe(serviceName, groupName, Constants.NULL); + } + + @Test + public void testSubscribe5() throws NacosException { + String serviceName = "service1"; + String groupName = "group1"; + EventListener listener = event -> { + + }; + //when + client.subscribe(serviceName, groupName, NamingSelectorFactory.HEALTHY_SELECTOR, listener); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(serviceName, groupName, + Constants.NULL, NamingSelectorFactory.HEALTHY_SELECTOR, listener); //then verify(changeNotifier, times(1)).registerListener(groupName, serviceName, wrapper); verify(proxy, times(1)).subscribe(serviceName, groupName, Constants.NULL); @@ -785,7 +801,7 @@ public void testUnSubscribe1() throws NacosException { client.unsubscribe(serviceName, listener); //then NamingSelectorWrapper wrapper = new NamingSelectorWrapper( - SelectorFactory.newClusterSelector(Collections.emptyList()), listener); + NamingSelectorFactory.newClusterSelector(Collections.emptyList()), listener); verify(changeNotifier, times(1)).deregisterListener(Constants.DEFAULT_GROUP, serviceName, wrapper); verify(proxy, times(1)).unsubscribe(serviceName, Constants.DEFAULT_GROUP, Constants.NULL); } @@ -803,7 +819,7 @@ public void testUnSubscribe2() throws NacosException { //when client.unsubscribe(serviceName, groupName, listener); NamingSelectorWrapper wrapper = new NamingSelectorWrapper( - SelectorFactory.newClusterSelector(Collections.emptyList()), listener); + NamingSelectorFactory.newClusterSelector(Collections.emptyList()), listener); //then verify(changeNotifier, times(1)).deregisterListener(groupName, serviceName, wrapper); verify(proxy, times(1)).unsubscribe(serviceName, groupName, Constants.NULL); @@ -821,7 +837,7 @@ public void testUnSubscribe3() throws NacosException { //when client.unsubscribe(serviceName, clusterList, listener); - NamingSelectorWrapper wrapper = new NamingSelectorWrapper(SelectorFactory.newClusterSelector(clusterList), + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(NamingSelectorFactory.newClusterSelector(clusterList), listener); //then verify(changeNotifier, times(1)).deregisterListener(Constants.DEFAULT_GROUP, serviceName, wrapper); @@ -841,7 +857,26 @@ public void testUnSubscribe4() throws NacosException { //when client.unsubscribe(serviceName, groupName, clusterList, listener); - NamingSelectorWrapper wrapper = new NamingSelectorWrapper(SelectorFactory.newClusterSelector(clusterList), + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(NamingSelectorFactory.newClusterSelector(clusterList), + listener); + //then + verify(changeNotifier, times(1)).deregisterListener(groupName, serviceName, wrapper); + verify(proxy, times(1)).unsubscribe(serviceName, groupName, Constants.NULL); + } + + @Test + public void testUnSubscribe5() throws NacosException { + //given + String serviceName = "service1"; + String groupName = "group1"; + EventListener listener = event -> { + + }; + when(changeNotifier.isSubscribed(serviceName, groupName)).thenReturn(false); + + //when + client.unsubscribe(serviceName, groupName, NamingSelectorFactory.HEALTHY_SELECTOR, listener); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(NamingSelectorFactory.HEALTHY_SELECTOR, listener); //then verify(changeNotifier, times(1)).deregisterListener(groupName, serviceName, wrapper); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java index 1bbb25ddecf..728657cc982 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java @@ -21,7 +21,7 @@ import com.alibaba.nacos.api.naming.pojo.ServiceInfo; import com.alibaba.nacos.api.naming.selector.NamingSelector; import com.alibaba.nacos.client.naming.selector.NamingSelectorWrapper; -import com.alibaba.nacos.client.selector.SelectorFactory; +import com.alibaba.nacos.client.naming.selector.NamingSelectorFactory; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; @@ -44,7 +44,7 @@ public void testRegisterListener() { List clusters = Collections.singletonList(clusterStr); InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); EventListener listener = Mockito.mock(EventListener.class); - NamingSelector selector = SelectorFactory.newClusterSelector(clusters); + NamingSelector selector = NamingSelectorFactory.newClusterSelector(clusters); NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, listener); instancesChangeNotifier.registerListener(group, name, wrapper); @@ -71,7 +71,7 @@ public void testDeregisterListener() { List clusters = Collections.singletonList(clusterStr); InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); EventListener listener = Mockito.mock(EventListener.class); - NamingSelector selector = SelectorFactory.newClusterSelector(clusters); + NamingSelector selector = NamingSelectorFactory.newClusterSelector(clusters); NamingSelectorWrapper wrapper = new NamingSelectorWrapper(selector, listener); instancesChangeNotifier.registerListener(group, name, wrapper); List subscribeServices = instancesChangeNotifier.getSubscribeServices(); @@ -92,7 +92,7 @@ public void testIsSubscribed() { List clusters = Collections.singletonList(clusterStr); InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); EventListener listener = Mockito.mock(EventListener.class); - NamingSelector selector = SelectorFactory.newClusterSelector(clusters); + NamingSelector selector = NamingSelectorFactory.newClusterSelector(clusters); Assert.assertFalse(instancesChangeNotifier.isSubscribed(group, name)); NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, @@ -109,7 +109,7 @@ public void testOnEvent() { String clusterStr = "c"; List clusters = Collections.singletonList(clusterStr); InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); - NamingSelector selector = SelectorFactory.newClusterSelector(clusters); + NamingSelector selector = NamingSelectorFactory.newClusterSelector(clusters); EventListener listener = Mockito.mock(EventListener.class); NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorFactoryTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorFactoryTest.java new file mode 100644 index 00000000000..af4290d643b --- /dev/null +++ b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingSelectorFactoryTest.java @@ -0,0 +1,178 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.client.naming.selector; + +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.naming.selector.NamingContext; +import com.alibaba.nacos.api.naming.selector.NamingResult; +import com.alibaba.nacos.api.naming.selector.NamingSelector; +import org.junit.Test; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class NamingSelectorFactoryTest { + + @Test + public void testNewClusterSelector1() { + Instance ins1 = new Instance(); + ins1.setClusterName("a"); + Instance ins2 = new Instance(); + ins2.setClusterName("b"); + Instance ins3 = new Instance(); + ins3.setClusterName("c"); + + NamingContext namingContext = mock(NamingContext.class); + when(namingContext.getInstances()).thenReturn(Arrays.asList(ins1, ins2, ins3)); + + NamingSelector namingSelector1 = NamingSelectorFactory.newClusterSelector(Collections.singletonList("a")); + NamingResult result1 = namingSelector1.select(namingContext); + assertEquals("a", result1.getResult().get(0).getClusterName()); + + NamingSelector namingSelector2 = NamingSelectorFactory.newClusterSelector(Collections.emptyList()); + NamingResult result2 = namingSelector2.select(namingContext); + assertEquals(3, result2.getResult().size()); + } + + @Test + public void testNewClusterSelector2() { + NamingSelector namingSelector1 = NamingSelectorFactory.newClusterSelector(Arrays.asList("a", "b", "c")); + NamingSelector namingSelector2 = NamingSelectorFactory.newClusterSelector(Arrays.asList("c", "b", "a")); + NamingSelector namingSelector3 = NamingSelectorFactory.newClusterSelector(Arrays.asList("a", "b", "c", "c")); + NamingSelector namingSelector4 = NamingSelectorFactory.newClusterSelector(Arrays.asList("d", "e")); + + assertEquals(namingSelector1, namingSelector2); + assertEquals(namingSelector1, namingSelector3); + assertNotEquals(namingSelector1, namingSelector4); + } + + @Test + public void testNewIpSelector() { + Instance ins1 = new Instance(); + ins1.setIp("172.18.137.120"); + Instance ins2 = new Instance(); + ins2.setIp("172.18.137.121"); + Instance ins3 = new Instance(); + ins3.setIp("172.18.136.111"); + + NamingContext namingContext = mock(NamingContext.class); + when(namingContext.getInstances()).thenReturn(Arrays.asList(ins1, ins2, ins3)); + + NamingSelector ipSelector = NamingSelectorFactory.newIpSelector("^172\\.18\\.137.*"); + NamingResult result = ipSelector.select(namingContext); + List list = result.getResult(); + + assertEquals(2, list.size()); + assertEquals(ins1.getIp(), list.get(0).getIp()); + assertEquals(ins2.getIp(), list.get(1).getIp()); + } + + @Test + public void testNewMetadataSelector() { + Instance ins1 = new Instance(); + ins1.addMetadata("a", "1"); + ins1.addMetadata("b", "2"); + Instance ins2 = new Instance(); + ins2.addMetadata("a", "1"); + Instance ins3 = new Instance(); + ins3.addMetadata("b", "2"); + + NamingContext namingContext = mock(NamingContext.class); + when(namingContext.getInstances()).thenReturn(Arrays.asList(ins1, ins2, ins3)); + + NamingSelector metadataSelector = NamingSelectorFactory.newMetadataSelector(new HashMap() { + { + put("a", "1"); + put("b", "2"); + } + }); + List result = metadataSelector.select(namingContext).getResult(); + + assertEquals(1, result.size()); + assertEquals(ins1, result.get(0)); + } + + @Test + public void testNewMetadataSelector2() { + Instance ins1 = new Instance(); + ins1.addMetadata("a", "1"); + ins1.addMetadata("c", "3"); + Instance ins2 = new Instance(); + ins2.addMetadata("b", "2"); + Instance ins3 = new Instance(); + ins3.addMetadata("c", "3"); + + NamingContext namingContext = mock(NamingContext.class); + when(namingContext.getInstances()).thenReturn(Arrays.asList(ins1, ins2, ins3)); + + NamingSelector metadataSelector = NamingSelectorFactory.newMetadataSelector(new HashMap() { + { + put("a", "1"); + put("b", "2"); + } + }, true); + List result = metadataSelector.select(namingContext).getResult(); + + assertEquals(2, result.size()); + assertEquals(ins1, result.get(0)); + assertEquals(ins2, result.get(1)); + } + + @Test + public void testHealthSelector() { + Instance ins1 = new Instance(); + Instance ins2 = new Instance(); + Instance ins3 = new Instance(); + ins3.setHealthy(false); + + NamingContext namingContext = mock(NamingContext.class); + when(namingContext.getInstances()).thenReturn(Arrays.asList(ins1, ins2, ins3)); + + List result = NamingSelectorFactory.HEALTHY_SELECTOR.select(namingContext).getResult(); + + assertEquals(2, result.size()); + assertTrue(result.contains(ins1)); + assertTrue(result.contains(ins2)); + assertTrue(result.get(0).isHealthy()); + assertTrue(result.get(1).isHealthy()); + } + + @Test + public void testEmptySelector() { + Instance ins1 = new Instance(); + Instance ins2 = new Instance(); + Instance ins3 = new Instance(); + + NamingContext namingContext = mock(NamingContext.class); + when(namingContext.getInstances()).thenReturn(Arrays.asList(ins1, ins2, ins3)); + + List result = NamingSelectorFactory.EMPTY_SELECTOR.select(namingContext).getResult(); + + assertEquals(3, result.size()); + assertTrue(result.contains(ins1)); + assertTrue(result.contains(ins2)); + assertTrue(result.contains(ins3)); + } +} diff --git a/client/src/test/java/com/alibaba/nacos/client/selector/SelectorFactoryTest.java b/client/src/test/java/com/alibaba/nacos/client/selector/SelectorFactoryTest.java deleted file mode 100644 index c95fc7b3e68..00000000000 --- a/client/src/test/java/com/alibaba/nacos/client/selector/SelectorFactoryTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 1999-2023 Alibaba Group Holding Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.alibaba.nacos.client.selector; - -import com.alibaba.nacos.api.naming.pojo.Instance; -import com.alibaba.nacos.api.naming.selector.NamingContext; -import com.alibaba.nacos.api.naming.selector.NamingResult; -import com.alibaba.nacos.api.naming.selector.NamingSelector; -import org.junit.Test; - -import java.util.Arrays; -import java.util.Collections; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -public class SelectorFactoryTest { - - @Test - public void testNewClusterSelector1() { - Instance ins1 = new Instance(); - ins1.setClusterName("a"); - Instance ins2 = new Instance(); - ins2.setClusterName("b"); - Instance ins3 = new Instance(); - ins3.setClusterName("c"); - - NamingContext namingContext = mock(NamingContext.class); - when(namingContext.getInstances()).thenReturn(Arrays.asList(ins1, ins2, ins3)); - - NamingSelector namingSelector1 = SelectorFactory.newClusterSelector(Collections.singletonList("a")); - NamingResult result1 = namingSelector1.select(namingContext); - assertEquals("a", result1.getResult().get(0).getClusterName()); - - NamingSelector namingSelector2 = SelectorFactory.newClusterSelector(Collections.emptyList()); - NamingResult result2 = namingSelector2.select(namingContext); - assertEquals(3, result2.getResult().size()); - } - - @Test - public void testNewClusterSelector2() { - NamingSelector namingSelector1 = SelectorFactory.newClusterSelector(Arrays.asList("a", "b", "c")); - NamingSelector namingSelector2 = SelectorFactory.newClusterSelector(Arrays.asList("c", "b", "a")); - NamingSelector namingSelector3 = SelectorFactory.newClusterSelector(Arrays.asList("a", "b", "c", "c")); - NamingSelector namingSelector4 = SelectorFactory.newClusterSelector(Arrays.asList("d", "e")); - assertEquals(namingSelector1, namingSelector2); - assertEquals(namingSelector1, namingSelector3); - assertNotEquals(namingSelector1, namingSelector4); - } -} diff --git a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/SubscribeSelector_ITCase.java b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/SubscribeSelector_ITCase.java new file mode 100644 index 00000000000..0cc641c2f9a --- /dev/null +++ b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/SubscribeSelector_ITCase.java @@ -0,0 +1,167 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.test.naming; + +import com.alibaba.nacos.Nacos; +import com.alibaba.nacos.api.naming.NamingFactory; +import com.alibaba.nacos.api.naming.NamingService; +import com.alibaba.nacos.api.naming.listener.Event; +import com.alibaba.nacos.api.naming.listener.EventListener; +import com.alibaba.nacos.api.naming.listener.NamingEvent; +import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.api.naming.selector.NamingSelector; +import com.alibaba.nacos.client.naming.selector.DefaultNamingSelector; +import com.alibaba.nacos.client.naming.selector.NamingSelectorFactory; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.Collections; +import java.util.List; +import java.util.concurrent.TimeUnit; + +/** + * @author lideyou + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Nacos.class, properties = { + "server.servlet.context-path=/nacos"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +public class SubscribeSelector_ITCase extends NamingBase { + + private NamingService naming; + + private NamingSelector selector = new DefaultNamingSelector(instance -> instance.getIp().startsWith("172.18.137")); + + @LocalServerPort + private int port; + + @Before + public void init() throws Exception { + instances.clear(); + if (naming == null) { + naming = NamingFactory.createNamingService("127.0.0.1" + ":" + port); + } + } + + private volatile List instances = Collections.emptyList(); + + /** + * Add IP and receive notification. + * + * @throws Exception + */ + @Test(timeout = 10000L) + public void subscribeAdd() throws Exception { + String serviceName = randomDomainName(); + + naming.subscribe(serviceName, selector, new EventListener() { + @Override + public void onEvent(Event event) { + System.out.println(((NamingEvent) event).getServiceName()); + System.out.println(((NamingEvent) event).getInstances()); + instances = ((NamingEvent) event).getInstances(); + } + }); + + naming.registerInstance(serviceName, "172.18.137.1", TEST_PORT); + + while (instances.isEmpty()) { + Thread.sleep(1000L); + } + + Assert.assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); + } + + /** + * Delete IP and receive notification. + * + * @throws Exception + */ + @Test(timeout = 10000L) + public void subscribeDelete() throws Exception { + String serviceName = randomDomainName(); + naming.registerInstance(serviceName, "172.18.137.1", TEST_PORT, "c1"); + + TimeUnit.SECONDS.sleep(3); + + naming.subscribe(serviceName, selector, new EventListener() { + int index = 0; + + @Override + public void onEvent(Event event) { + instances = ((NamingEvent) event).getInstances(); + if (index == 0) { + index++; + return; + } + System.out.println(((NamingEvent) event).getServiceName()); + System.out.println(((NamingEvent) event).getInstances()); + } + }); + + TimeUnit.SECONDS.sleep(1); + + naming.deregisterInstance(serviceName, "172.18.137.1", TEST_PORT, "c1"); + + while (!instances.isEmpty()) { + Thread.sleep(1000L); + } + + Assert.assertTrue(instances.isEmpty()); + } + + /** + * Add non target IP and do not receive notification. + * + * @throws Exception + */ + @Test + public void subscribeOtherIp() throws Exception { + String serviceName = randomDomainName(); + + naming.subscribe(serviceName, selector, new EventListener() { + int index = 0; + + @Override + public void onEvent(Event event) { + instances = ((NamingEvent) event).getInstances(); + if (index == 0) { + index++; + return; + } + System.out.println(((NamingEvent) event).getServiceName()); + System.out.println(((NamingEvent) event).getInstances()); + } + }); + + naming.registerInstance(serviceName, "1.1.1.1", TEST_PORT, "c1"); + + int i = 0; + while (instances.isEmpty()) { + Thread.sleep(1000L); + if (i++ > 10) { + return; + } + } + + Assert.fail(); + } +} diff --git a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/Subscribe_ITCase.java b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/Subscribe_ITCase.java index e97eb66f056..7da0c094cab 100644 --- a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/Subscribe_ITCase.java +++ b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/Subscribe_ITCase.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.alibaba.nacos.test.naming; import com.alibaba.nacos.Nacos; @@ -22,11 +23,12 @@ import com.alibaba.nacos.api.naming.listener.EventListener; import com.alibaba.nacos.api.naming.listener.NamingEvent; import com.alibaba.nacos.api.naming.pojo.Instance; +import com.alibaba.nacos.client.naming.listener.AbstractNamingChangeListener; +import com.alibaba.nacos.client.naming.listener.NamingChangeEvent; import com.alibaba.nacos.common.utils.ConcurrentHashSet; import com.alibaba.nacos.common.utils.JacksonUtils; import com.alibaba.nacos.test.base.Params; import com.fasterxml.jackson.databind.JsonNode; - import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -42,6 +44,9 @@ import java.util.List; import java.util.Properties; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.Assert.assertTrue; /** * Created by wangtong.wt on 2018/6/20. @@ -50,14 +55,15 @@ * @date 2018/6/20 */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = Nacos.class, properties = {"server.servlet.context-path=/nacos"}, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = Nacos.class, properties = { + "server.servlet.context-path=/nacos"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class Subscribe_ITCase extends NamingBase { - + private NamingService naming; + @LocalServerPort private int port; - + @Before public void init() throws Exception { instances.clear(); @@ -71,9 +77,9 @@ public void init() throws Exception { String url = String.format("http://localhost:%d/", port); this.base = new URL(url); } - + private volatile List instances = Collections.emptyList(); - + /** * 添加IP,收到通知 * @@ -82,7 +88,7 @@ public void init() throws Exception { @Test(timeout = 4 * TIME_OUT) public void subscribeAdd() throws Exception { String serviceName = randomDomainName(); - + naming.subscribe(serviceName, new EventListener() { @Override public void onEvent(Event event) { @@ -91,16 +97,16 @@ public void onEvent(Event event) { instances = ((NamingEvent) event).getInstances(); } }); - + naming.registerInstance(serviceName, "127.0.0.1", TEST_PORT, "c1"); - + while (instances.isEmpty()) { Thread.sleep(1000L); } - - Assert.assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); + + assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); } - + /** * 删除IP,收到通知 * @@ -110,12 +116,12 @@ public void onEvent(Event event) { public void subscribeDelete() throws Exception { String serviceName = randomDomainName(); naming.registerInstance(serviceName, "127.0.0.1", TEST_PORT, "c1"); - + TimeUnit.SECONDS.sleep(3); - + naming.subscribe(serviceName, new EventListener() { int index = 0; - + @Override public void onEvent(Event event) { if (index == 0) { @@ -127,18 +133,18 @@ public void onEvent(Event event) { instances = ((NamingEvent) event).getInstances(); } }); - + TimeUnit.SECONDS.sleep(1); - + naming.deregisterInstance(serviceName, "127.0.0.1", TEST_PORT, "c1"); - + while (!instances.isEmpty()) { Thread.sleep(1000L); } - - Assert.assertTrue(instances.isEmpty()); + + assertTrue(instances.isEmpty()); } - + /** * 添加不可用IP,收到通知 * @@ -147,7 +153,7 @@ public void onEvent(Event event) { @Test(timeout = 4 * TIME_OUT) public void subscribeUnhealthy() throws Exception { String serviceName = randomDomainName(); - + naming.subscribe(serviceName, new EventListener() { @Override public void onEvent(Event event) { @@ -156,21 +162,21 @@ public void onEvent(Event event) { instances = ((NamingEvent) event).getInstances(); } }); - + naming.registerInstance(serviceName, "1.1.1.1", TEST_PORT, "c1"); - + while (instances.isEmpty()) { Thread.sleep(1000L); } - - Assert.assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); + + assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); } @Test(timeout = 4 * TIME_OUT) public void subscribeEmpty() throws Exception { - + String serviceName = randomDomainName(); - + naming.subscribe(serviceName, new EventListener() { @Override public void onEvent(Event event) { @@ -179,32 +185,32 @@ public void onEvent(Event event) { instances = ((NamingEvent) event).getInstances(); } }); - + naming.registerInstance(serviceName, "1.1.1.1", TEST_PORT, "c1"); - + while (instances.isEmpty()) { Thread.sleep(1000L); } - - Assert.assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); - + + assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); + naming.deregisterInstance(serviceName, "1.1.1.1", TEST_PORT, "c1"); - + while (!instances.isEmpty()) { Thread.sleep(1000L); } - + Assert.assertEquals(0, instances.size()); Assert.assertEquals(0, naming.getAllInstances(serviceName).size()); } - + @Test public void querySubscribers() throws Exception { - + String serviceName = randomDomainName(); - + naming.registerInstance(serviceName, "1.1.1.1", TEST_PORT, "c1"); - + EventListener listener = new EventListener() { @Override public void onEvent(Event event) { @@ -213,30 +219,25 @@ public void onEvent(Event event) { instances = ((NamingEvent) event).getInstances(); } }; - + naming.subscribe(serviceName, listener); - + TimeUnit.SECONDS.sleep(3); - + ResponseEntity response = request(NamingBase.NAMING_CONTROLLER_PATH + "/service/subscribers", - Params.newParams() - .appendParam("serviceName", serviceName) - .appendParam("pageNo", "1") - .appendParam("pageSize", "10") - .done(), - String.class, - HttpMethod.GET); - Assert.assertTrue(response.getStatusCode().is2xxSuccessful()); - + Params.newParams().appendParam("serviceName", serviceName).appendParam("pageNo", "1") + .appendParam("pageSize", "10").done(), String.class, HttpMethod.GET); + assertTrue(response.getStatusCode().is2xxSuccessful()); + JsonNode body = JacksonUtils.toObj(response.getBody()); - + Assert.assertEquals(1, body.get("subscribers").size()); - + Properties properties = new Properties(); properties.setProperty("namingRequestTimeout", "300000"); properties.setProperty("serverAddr", "127.0.0.1" + ":" + port); NamingService naming2 = NamingFactory.createNamingService(properties); - + naming2.subscribe(serviceName, new EventListener() { @Override public void onEvent(Event event) { @@ -245,21 +246,16 @@ public void onEvent(Event event) { instances = ((NamingEvent) event).getInstances(); } }); - + TimeUnit.SECONDS.sleep(3); - + response = request(NamingBase.NAMING_CONTROLLER_PATH + "/service/subscribers", - Params.newParams() - .appendParam("serviceName", serviceName) - .appendParam("pageNo", "1") - .appendParam("pageSize", "10") - .done(), - String.class, - HttpMethod.GET); - Assert.assertTrue(response.getStatusCode().is2xxSuccessful()); - + Params.newParams().appendParam("serviceName", serviceName).appendParam("pageNo", "1") + .appendParam("pageSize", "10").done(), String.class, HttpMethod.GET); + assertTrue(response.getStatusCode().is2xxSuccessful()); + body = JacksonUtils.toObj(response.getBody()); - + // server will remove duplicate subscriber by ip port service app and so on Assert.assertEquals(1, body.get("subscribers").size()); } @@ -294,7 +290,7 @@ public void onEvent(Event event) { concurrentHashSet1.addAll(((NamingEvent) event).getInstances()); } }); - + naming1.registerInstance(serviceName, "1.1.1.1", TEST_PORT, "c1"); while (instances.isEmpty()) { @@ -302,11 +298,73 @@ public void onEvent(Event event) { } try { - Assert.assertTrue(verifyInstanceList(instances, naming1.getAllInstances(serviceName))); + assertTrue(verifyInstanceList(instances, naming1.getAllInstances(serviceName))); Assert.assertEquals(0, concurrentHashSet1.size()); } finally { naming1.shutDown(); naming2.shutDown(); } } + + @Test + public void subscribeUsingAbstractNamingChangeListener() throws Exception { + String serviceName = randomDomainName(); + + naming.subscribe(serviceName, new AbstractNamingChangeListener() { + @Override + public void onChange(NamingChangeEvent event) { + System.out.println(event.getServiceName()); + System.out.println(event.getInstances()); + instances = event.getInstances(); + assertTrue(event.isAdded()); + } + }); + + naming.registerInstance(serviceName, "127.0.0.1", TEST_PORT, "c1"); + + while (instances.isEmpty()) { + Thread.sleep(1000L); + } + + assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); + } + + @Test + public void testListenerFirstCallback() throws Exception { + String serviceName = randomDomainName(); + AtomicInteger count = new AtomicInteger(0); + naming.subscribe(serviceName, new EventListener() { + @Override + public void onEvent(Event event) { + System.out.println(((NamingEvent) event).getServiceName()); + System.out.println(((NamingEvent) event).getInstances()); + instances = ((NamingEvent) event).getInstances(); + count.incrementAndGet(); + } + }); + + naming.registerInstance(serviceName, "127.0.0.1", TEST_PORT, "c1"); + + while (instances.isEmpty()) { + Thread.sleep(1000L); + } + + naming.subscribe(serviceName, new EventListener() { + @Override + public void onEvent(Event event) { + System.out.println(((NamingEvent) event).getServiceName()); + System.out.println(((NamingEvent) event).getInstances()); + instances = ((NamingEvent) event).getInstances(); + count.incrementAndGet(); + } + }); + + int i = 0; + while (count.get() < 2) { + Thread.sleep(1000L); + if (i++ > 10) { + Assert.fail(); + } + } + } } diff --git a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/Unsubscribe_ITCase.java b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/Unsubscribe_ITCase.java index 993e2d21a7c..5d80619bc3a 100644 --- a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/Unsubscribe_ITCase.java +++ b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/Unsubscribe_ITCase.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.alibaba.nacos.test.naming; import com.alibaba.nacos.Nacos; @@ -22,7 +23,8 @@ import com.alibaba.nacos.api.naming.listener.EventListener; import com.alibaba.nacos.api.naming.listener.NamingEvent; import com.alibaba.nacos.api.naming.pojo.Instance; -import com.alibaba.nacos.sys.utils.ApplicationUtils; +import com.alibaba.nacos.api.naming.selector.NamingSelector; +import com.alibaba.nacos.client.naming.selector.DefaultNamingSelector; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -35,7 +37,9 @@ import java.util.Collections; import java.util.List; -import static com.alibaba.nacos.test.naming.NamingBase.*; +import static com.alibaba.nacos.test.naming.NamingBase.TEST_PORT; +import static com.alibaba.nacos.test.naming.NamingBase.randomDomainName; +import static com.alibaba.nacos.test.naming.NamingBase.verifyInstanceList; /** * Created by wangtong.wt on 2018/6/20. @@ -44,57 +48,59 @@ * @date 2018/6/20 */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = Nacos.class, properties = {"server.servlet.context-path=/nacos"}, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = Nacos.class, properties = { + "server.servlet.context-path=/nacos"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class Unsubscribe_ITCase { - + private NamingService naming; + @LocalServerPort private int port; - + @Before public void init() throws Exception { instances = Collections.emptyList(); if (naming == null) { //TimeUnit.SECONDS.sleep(10); - naming = NamingFactory.createNamingService("127.0.0.1"+":"+port); + naming = NamingFactory.createNamingService("127.0.0.1" + ":" + port); } } - + private volatile List instances = Collections.emptyList(); - + /** * 取消订阅,添加IP,不会收到通知 + * * @throws Exception */ @Test public void unsubscribe() throws Exception { String serviceName = randomDomainName(); - + EventListener listener = new EventListener() { @Override public void onEvent(Event event) { - System.out.println(((NamingEvent)event).getServiceName()); - System.out.println(((NamingEvent)event).getInstances()); - instances = ((NamingEvent)event).getInstances(); + System.out.println(((NamingEvent) event).getServiceName()); + System.out.println(((NamingEvent) event).getInstances()); + instances = ((NamingEvent) event).getInstances(); } }; - + naming.subscribe(serviceName, listener); - + naming.registerInstance(serviceName, "127.0.0.1", TEST_PORT, "c1"); - + while (instances.isEmpty()) { Thread.sleep(1000L); } - + Assert.assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); - + naming.unsubscribe(serviceName, listener); - + instances = Collections.emptyList(); naming.registerInstance(serviceName, "127.0.0.2", TEST_PORT, "c1"); - + int i = 0; while (instances.isEmpty()) { Thread.sleep(1000L); @@ -102,42 +108,43 @@ public void onEvent(Event event) { return; } } - + Assert.fail(); } - + /** * 取消订阅,在指定cluster添加IP,不会收到通知 + * * @throws Exception */ @Test public void unsubscribeCluster() throws Exception { String serviceName = randomDomainName(); - + EventListener listener = new EventListener() { @Override public void onEvent(Event event) { - System.out.println(((NamingEvent)event).getServiceName()); - System.out.println(((NamingEvent)event).getInstances()); - instances = ((NamingEvent)event).getInstances(); + System.out.println(((NamingEvent) event).getServiceName()); + System.out.println(((NamingEvent) event).getInstances()); + instances = ((NamingEvent) event).getInstances(); } }; - + naming.subscribe(serviceName, Arrays.asList("c1"), listener); - + naming.registerInstance(serviceName, "127.0.0.1", TEST_PORT, "c1"); - + while (instances.isEmpty()) { Thread.sleep(1000L); } - + Assert.assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); - + naming.unsubscribe(serviceName, Arrays.asList("c1"), listener); - + instances = Collections.emptyList(); naming.registerInstance(serviceName, "127.0.0.2", TEST_PORT, "c1"); - + int i = 0; while (instances.isEmpty()) { Thread.sleep(1000L); @@ -145,8 +152,54 @@ public void onEvent(Event event) { return; } } - + Assert.fail(); } - + + /** + * 取消订阅,添加选择器范围 IP,不会收到通知 + * + * @throws Exception + */ + @Test + public void unsubscribeSelector() throws Exception { + String serviceName = randomDomainName(); + + EventListener listener = new EventListener() { + @Override + public void onEvent(Event event) { + System.out.println(((NamingEvent) event).getServiceName()); + System.out.println(((NamingEvent) event).getInstances()); + instances = ((NamingEvent) event).getInstances(); + } + }; + + NamingSelector selector = new DefaultNamingSelector(instance -> instance.getIp().startsWith("127.0.0")); + + naming.subscribe(serviceName, selector, listener); + + naming.registerInstance(serviceName, "127.0.0.1", TEST_PORT); + + while (instances.isEmpty()) { + Thread.sleep(1000L); + } + + Assert.assertTrue(verifyInstanceList(instances, naming.getAllInstances(serviceName))); + + naming.unsubscribe(serviceName, selector, listener); + + instances = Collections.emptyList(); + naming.registerInstance(serviceName, "127.0.0.2", TEST_PORT); + + int i = 0; + while (instances.isEmpty()) { + Thread.sleep(1000L); + if (i++ > 10) { + return; + } + } + + Assert.fail(); + } + } From 7fdbc63390288b598723eb6cbbe7065023fd4be2 Mon Sep 17 00:00:00 2001 From: Dale Lee <112548822+ldyedu@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:19:42 +0800 Subject: [PATCH 005/110] For #10374, format code using Nacos Style (#11438) --- .../api/naming/selector/NamingContext.java | 8 ++--- .../api/naming/selector/NamingResult.java | 1 + .../api/naming/selector/NamingSelector.java | 1 + .../api/selector/client/SelectResult.java | 1 + .../nacos/api/selector/client/Selector.java | 1 + .../client/naming/event/InstancesDiff.java | 36 +++++++++++-------- .../AbstractNamingChangeListener.java | 4 ++- .../naming/listener/NamingChangeEvent.java | 20 ++++++----- .../selector/DefaultNamingSelector.java | 14 ++++---- .../selector/NamingListenerInvoker.java | 13 +++---- .../selector/AbstractSelectorWrapper.java | 22 ++++++------ .../client/selector/ListenerInvoker.java | 1 + .../event/InstancesChangeEventTest.java | 3 +- .../event/InstancesChangeNotifierTest.java | 13 +++---- .../naming/event/InstancesDiffTest.java | 34 +++++++----------- .../listener/NamingChangeEventTest.java | 23 ++++++------ .../selector/DefaultNamingSelectorTest.java | 14 ++++---- .../selector/NamingListenerInvokerTest.java | 7 ++-- .../client/selector/SelectorManagerTest.java | 18 +++++----- 19 files changed, 121 insertions(+), 113 deletions(-) diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingContext.java b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingContext.java index 04b340a6fcb..ae94a890216 100644 --- a/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingContext.java +++ b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingContext.java @@ -26,28 +26,28 @@ * @author lideyou */ public interface NamingContext { - + /** * Get service name. * * @return service name */ String getServiceName(); - + /** * Get group name. * * @return group name */ String getGroupName(); - + /** * Get clusters. * * @return clusters */ String getClusters(); - + /** * Get current instances. * diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingResult.java b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingResult.java index a3173af9c74..3706167751c 100644 --- a/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingResult.java +++ b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingResult.java @@ -27,4 +27,5 @@ * @author lideyou */ public interface NamingResult extends SelectResult> { + } diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingSelector.java b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingSelector.java index 48edd76d5ab..252a56977af 100644 --- a/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingSelector.java +++ b/api/src/main/java/com/alibaba/nacos/api/naming/selector/NamingSelector.java @@ -24,4 +24,5 @@ * @author lideyou */ public interface NamingSelector extends Selector { + } diff --git a/api/src/main/java/com/alibaba/nacos/api/selector/client/SelectResult.java b/api/src/main/java/com/alibaba/nacos/api/selector/client/SelectResult.java index 3c5979d9ef0..951f69bd607 100644 --- a/api/src/main/java/com/alibaba/nacos/api/selector/client/SelectResult.java +++ b/api/src/main/java/com/alibaba/nacos/api/selector/client/SelectResult.java @@ -23,6 +23,7 @@ * @author lideyou */ public interface SelectResult { + /** * Get select result. * diff --git a/api/src/main/java/com/alibaba/nacos/api/selector/client/Selector.java b/api/src/main/java/com/alibaba/nacos/api/selector/client/Selector.java index 523b426d6ff..131e777b04a 100644 --- a/api/src/main/java/com/alibaba/nacos/api/selector/client/Selector.java +++ b/api/src/main/java/com/alibaba/nacos/api/selector/client/Selector.java @@ -24,6 +24,7 @@ * @author lideyou */ public interface Selector { + /** * select the target result. * diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java index c374331a78c..5026499f6eb 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/event/InstancesDiff.java @@ -29,80 +29,86 @@ * @author lideyou */ public class InstancesDiff { + private final List addedInstances = new ArrayList<>(); - + private final List removedInstances = new ArrayList<>(); - + private final List modifiedInstances = new ArrayList<>(); - + public InstancesDiff() { } - - public InstancesDiff(List addedInstances, List removedInstances, List modifiedInstances) { + + public InstancesDiff(List addedInstances, List removedInstances, + List modifiedInstances) { setAddedInstances(addedInstances); setRemovedInstances(removedInstances); setModifiedInstances(modifiedInstances); } - + public List getAddedInstances() { return addedInstances; } - + public void setAddedInstances(Collection addedInstances) { this.addedInstances.clear(); if (CollectionUtils.isNotEmpty(addedInstances)) { this.addedInstances.addAll(addedInstances); } } - + public List getRemovedInstances() { return removedInstances; } - + public void setRemovedInstances(Collection removedInstances) { this.removedInstances.clear(); if (CollectionUtils.isNotEmpty(removedInstances)) { this.removedInstances.addAll(removedInstances); } } - + public List getModifiedInstances() { return modifiedInstances; } - + public void setModifiedInstances(Collection modifiedInstances) { this.modifiedInstances.clear(); if (CollectionUtils.isNotEmpty(modifiedInstances)) { this.modifiedInstances.addAll(modifiedInstances); } } - + /** * Check if any instances have changed. + * * @return true if there are instances that have changed */ public boolean hasDifferent() { return isAdded() || isRemoved() || isModified(); } - + /** * Check if any instances have been added. + * * @return true if there are instances that have been added. */ public boolean isAdded() { return CollectionUtils.isNotEmpty(this.addedInstances); } - + /** * Check if any instances have been added. + * * @return true if there are instances that have been added. */ public boolean isRemoved() { return CollectionUtils.isNotEmpty(this.removedInstances); } - + /** * Check if any instances have been added. + * * @return true if there are instances that have been added. */ public boolean isModified() { diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/listener/AbstractNamingChangeListener.java b/client/src/main/java/com/alibaba/nacos/client/naming/listener/AbstractNamingChangeListener.java index cb54c4356d6..93214735951 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/listener/AbstractNamingChangeListener.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/listener/AbstractNamingChangeListener.java @@ -25,15 +25,17 @@ * @author lideyou */ public abstract class AbstractNamingChangeListener extends AbstractEventListener { + @Override public final void onEvent(Event event) { if (event instanceof NamingChangeEvent) { onChange((NamingChangeEvent) event); } } - + /** * Callback when instances have changed. + * * @param event NamingChangeEvent */ public abstract void onChange(NamingChangeEvent event); diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java b/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java index 764afd0a253..62b4dbf33b1 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/listener/NamingChangeEvent.java @@ -28,38 +28,40 @@ * @author lideyou */ public class NamingChangeEvent extends NamingEvent { + private final InstancesDiff instancesDiff; - + public NamingChangeEvent(String serviceName, List instances, InstancesDiff instancesDiff) { super(serviceName, instances); this.instancesDiff = instancesDiff; } - - public NamingChangeEvent(String serviceName, String groupName, String clusters, List instances, InstancesDiff instancesDiff) { + + public NamingChangeEvent(String serviceName, String groupName, String clusters, List instances, + InstancesDiff instancesDiff) { super(serviceName, groupName, clusters, instances); this.instancesDiff = instancesDiff; } - + public boolean isAdded() { return this.instancesDiff.isAdded(); } - + public boolean isRemoved() { return this.instancesDiff.isRemoved(); } - + public boolean isModified() { return this.instancesDiff.isModified(); } - + public List getAddedInstances() { return this.instancesDiff.getAddedInstances(); } - + public List getRemovedInstances() { return this.instancesDiff.getRemovedInstances(); } - + public List getModifiedInstances() { return this.instancesDiff.getModifiedInstances(); } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelector.java b/client/src/main/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelector.java index fdd274d33f8..ad15508df7c 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelector.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelector.java @@ -32,23 +32,21 @@ * @author lideyou */ public class DefaultNamingSelector implements NamingSelector { + private final Predicate filter; - + public DefaultNamingSelector(Predicate filter) { this.filter = filter; } - + @Override public NamingResult select(NamingContext context) { List instances = doFilter(context.getInstances()); return () -> instances; } - + private List doFilter(List instances) { - return instances == null ? Collections.emptyList() : - instances - .stream() - .filter(filter) - .collect(Collectors.toList()); + return instances == null ? Collections.emptyList() + : instances.stream().filter(filter).collect(Collectors.toList()); } } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvoker.java b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvoker.java index 377f1c1b588..88279bf4e35 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvoker.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvoker.java @@ -29,12 +29,13 @@ * @author lideyou */ public class NamingListenerInvoker implements ListenerInvoker { + private final EventListener listener; - + public NamingListenerInvoker(EventListener listener) { this.listener = listener; } - + @Override public void invoke(NamingEvent event) { if (listener instanceof AbstractEventListener && ((AbstractEventListener) listener).getExecutor() != null) { @@ -43,21 +44,21 @@ public void invoke(NamingEvent event) { listener.onEvent(event); } } - + @Override public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - + if (this == o) { return true; } - + NamingListenerInvoker that = (NamingListenerInvoker) o; return Objects.equals(listener, that.listener); } - + @Override public int hashCode() { return Objects.hashCode(listener); diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/AbstractSelectorWrapper.java b/client/src/main/java/com/alibaba/nacos/client/selector/AbstractSelectorWrapper.java index 1a7820ff376..edbab0810b7 100644 --- a/client/src/main/java/com/alibaba/nacos/client/selector/AbstractSelectorWrapper.java +++ b/client/src/main/java/com/alibaba/nacos/client/selector/AbstractSelectorWrapper.java @@ -30,15 +30,16 @@ * @author lideyou */ public abstract class AbstractSelectorWrapper, E, T extends Event> { + private final S selector; - + private final ListenerInvoker listener; - + public AbstractSelectorWrapper(S selector, ListenerInvoker listener) { this.selector = selector; this.listener = listener; } - + /** * Check whether the event can be callback. * @@ -46,7 +47,7 @@ public AbstractSelectorWrapper(S selector, ListenerInvoker listener) { * @return true if the event can be callback */ protected abstract boolean isSelectable(T event); - + /** * Check whether the result can be callback. * @@ -54,14 +55,15 @@ public AbstractSelectorWrapper(S selector, ListenerInvoker listener) { * @return true if the result can be callback */ protected abstract boolean isCallable(E event); - + /** * Build an event received by the listener. + * * @param event original event * @return listener event */ protected abstract E buildListenerEvent(T event); - + /** * Notify listener. * @@ -76,15 +78,15 @@ public void notifyListener(T event) { listener.invoke(newEvent); } } - + public ListenerInvoker getListener() { return this.listener; } - + public S getSelector() { return this.selector; } - + @Override public boolean equals(Object o) { if (this == o) { @@ -96,7 +98,7 @@ public boolean equals(Object o) { AbstractSelectorWrapper that = (AbstractSelectorWrapper) o; return Objects.equals(selector, that.selector) && Objects.equals(listener, that.listener); } - + @Override public int hashCode() { return Objects.hash(selector, listener); diff --git a/client/src/main/java/com/alibaba/nacos/client/selector/ListenerInvoker.java b/client/src/main/java/com/alibaba/nacos/client/selector/ListenerInvoker.java index 42104762ac0..81996eea736 100644 --- a/client/src/main/java/com/alibaba/nacos/client/selector/ListenerInvoker.java +++ b/client/src/main/java/com/alibaba/nacos/client/selector/ListenerInvoker.java @@ -23,6 +23,7 @@ * @author lideyou */ public interface ListenerInvoker { + /** * Invoke inner listener. * diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java index 742573b82ec..9392ce17eb0 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java @@ -36,7 +36,8 @@ public void testGetServiceName() { hosts.add(ins); InstancesDiff diff = new InstancesDiff(); diff.setAddedInstances(hosts); - InstancesChangeEvent event = new InstancesChangeEvent(eventScope, serviceName, groupName, clusters, hosts, diff); + InstancesChangeEvent event = new InstancesChangeEvent(eventScope, serviceName, groupName, clusters, hosts, + diff); Assert.assertEquals(eventScope, event.scope()); Assert.assertEquals(serviceName, event.getServiceName()); Assert.assertEquals(clusters, event.getClusters()); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java index 728657cc982..3c6cd63f9cc 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java @@ -45,8 +45,7 @@ public void testRegisterListener() { InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); EventListener listener = Mockito.mock(EventListener.class); NamingSelector selector = NamingSelectorFactory.newClusterSelector(clusters); - NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, - listener); + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, listener); instancesChangeNotifier.registerListener(group, name, wrapper); List subscribeServices = instancesChangeNotifier.getSubscribeServices(); Assert.assertEquals(1, subscribeServices.size()); @@ -94,9 +93,8 @@ public void testIsSubscribed() { EventListener listener = Mockito.mock(EventListener.class); NamingSelector selector = NamingSelectorFactory.newClusterSelector(clusters); Assert.assertFalse(instancesChangeNotifier.isSubscribed(group, name)); - - NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, - listener); + + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, listener); instancesChangeNotifier.registerListener(group, name, wrapper); Assert.assertTrue(instancesChangeNotifier.isSubscribed(group, name)); } @@ -111,9 +109,8 @@ public void testOnEvent() { InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); NamingSelector selector = NamingSelectorFactory.newClusterSelector(clusters); EventListener listener = Mockito.mock(EventListener.class); - - NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, - listener); + + NamingSelectorWrapper wrapper = new NamingSelectorWrapper(name, group, clusterStr, selector, listener); instancesChangeNotifier.registerListener(group, name, wrapper); Instance instance = new Instance(); InstancesDiff diff = new InstancesDiff(null, Collections.singletonList(instance), null); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java index cc62821d569..0842558a847 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesDiffTest.java @@ -27,24 +27,19 @@ import java.util.Random; public class InstancesDiffTest { + @Test public void testGetDiff() { String serviceName = "testService"; - Instance addedIns = InstanceBuilder.newBuilder() - .setServiceName(serviceName) - .setClusterName("a").build(); - Instance removedIns = InstanceBuilder.newBuilder() - .setServiceName(serviceName) - .setClusterName("b").build(); - Instance modifiedIns = InstanceBuilder.newBuilder() - .setServiceName(serviceName) - .setClusterName("c").build(); - + Instance addedIns = InstanceBuilder.newBuilder().setServiceName(serviceName).setClusterName("a").build(); + Instance removedIns = InstanceBuilder.newBuilder().setServiceName(serviceName).setClusterName("b").build(); + Instance modifiedIns = InstanceBuilder.newBuilder().setServiceName(serviceName).setClusterName("c").build(); + InstancesDiff instancesDiff = new InstancesDiff(); instancesDiff.setAddedInstances(Collections.singletonList(addedIns)); instancesDiff.setRemovedInstances(Collections.singletonList(removedIns)); instancesDiff.setModifiedInstances(Collections.singletonList(modifiedIns)); - + Assert.assertTrue(instancesDiff.hasDifferent()); Assert.assertTrue(instancesDiff.isAdded()); Assert.assertTrue(instancesDiff.isRemoved()); @@ -53,19 +48,16 @@ public void testGetDiff() { Assert.assertEquals(removedIns, instancesDiff.getRemovedInstances().get(0)); Assert.assertEquals(modifiedIns, instancesDiff.getModifiedInstances().get(0)); } - + @Test public void testWithFullConstructor() { Random random = new Random(); int addedCount = random.nextInt(32) + 1; int removedCount = random.nextInt(32) + 1; int modifiedCount = random.nextInt(32) + 1; - InstancesDiff instancesDiff = new InstancesDiff( - getInstanceList(addedCount), - getInstanceList(removedCount), - getInstanceList(modifiedCount) - ); - + InstancesDiff instancesDiff = new InstancesDiff(getInstanceList(addedCount), getInstanceList(removedCount), + getInstanceList(modifiedCount)); + Assert.assertTrue(instancesDiff.hasDifferent()); Assert.assertTrue(instancesDiff.isAdded()); Assert.assertTrue(instancesDiff.isRemoved()); @@ -82,7 +74,7 @@ public void testWithFullConstructor() { Assert.assertFalse(instancesDiff.isRemoved()); Assert.assertFalse(instancesDiff.isModified()); } - + @Test public void testWithNoConstructor() { Random random = new Random(); @@ -93,7 +85,7 @@ public void testWithNoConstructor() { instancesDiff.setAddedInstances(getInstanceList(addedCount)); instancesDiff.setRemovedInstances(getInstanceList(removedCount)); instancesDiff.setModifiedInstances(getInstanceList(modifiedCount)); - + Assert.assertTrue(instancesDiff.hasDifferent()); Assert.assertEquals(addedCount, instancesDiff.getAddedInstances().size()); Assert.assertEquals(removedCount, instancesDiff.getRemovedInstances().size()); @@ -106,7 +98,7 @@ public void testWithNoConstructor() { Assert.assertFalse(instancesDiff.isRemoved()); Assert.assertFalse(instancesDiff.isModified()); } - + private static List getInstanceList(int count) { ArrayList list = new ArrayList<>(count); for (int i = 0; i < count; i++) { diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/listener/NamingChangeEventTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/listener/NamingChangeEventTest.java index 90c90bfe9da..66278c13a80 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/listener/NamingChangeEventTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/listener/NamingChangeEventTest.java @@ -30,11 +30,11 @@ import static org.junit.Assert.assertFalse; public class NamingChangeEventTest { - + private MockNamingEventListener eventListener; - + private InstancesDiff instancesDiff; - + @Before public void setUp() throws Exception { eventListener = new MockNamingEventListener(); @@ -43,7 +43,7 @@ public void setUp() throws Exception { instancesDiff.setRemovedInstances(Arrays.asList(new Instance(), new Instance())); instancesDiff.setModifiedInstances(Arrays.asList(new Instance())); } - + @Test public void testNamingChangeEventWithSimpleConstructor() { NamingChangeEvent event = new NamingChangeEvent("serviceName", Collections.EMPTY_LIST, instancesDiff); @@ -69,10 +69,11 @@ public void testNamingChangeEventWithSimpleConstructor() { assertFalse(event.isModified()); assertEquals(0, event.getRemovedInstances().size()); } - + @Test public void testNamingChangeEventWithFullConstructor() { - NamingChangeEvent event = new NamingChangeEvent("serviceName", "group", "clusters", Collections.EMPTY_LIST, instancesDiff); + NamingChangeEvent event = new NamingChangeEvent("serviceName", "group", "clusters", Collections.EMPTY_LIST, + instancesDiff); assertEquals("serviceName", event.getServiceName()); assertEquals("group", event.getGroupName()); assertEquals("clusters", event.getClusters()); @@ -95,7 +96,7 @@ public void testNamingChangeEventWithFullConstructor() { assertFalse(event.isModified()); assertEquals(0, event.getRemovedInstances().size()); } - + @Test public void testGetChanges() { NamingChangeEvent event = new NamingChangeEvent("serviceName", Collections.EMPTY_LIST, instancesDiff); @@ -104,22 +105,22 @@ public void testGetChanges() { event.getAddedInstances().clear(); assertFalse(event.isAdded()); assertEquals(0, event.getAddedInstances().size()); - + assertTrue(event.isRemoved()); assertEquals(2, event.getRemovedInstances().size()); event.getRemovedInstances().clear(); assertFalse(event.isRemoved()); assertEquals(0, event.getRemovedInstances().size()); - + assertTrue(event.isModified()); assertEquals(1, event.getModifiedInstances().size()); event.getModifiedInstances().clear(); assertFalse(event.isModified()); assertEquals(0, event.getRemovedInstances().size()); } - + private static class MockNamingEventListener extends AbstractNamingChangeListener { - + @Override public void onChange(NamingChangeEvent event) { assertNull(getExecutor()); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelectorTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelectorTest.java index 4915af36d89..7860d511214 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelectorTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/selector/DefaultNamingSelectorTest.java @@ -31,27 +31,27 @@ import static org.mockito.Mockito.when; public class DefaultNamingSelectorTest { - + @Test public void testSelect() { DefaultNamingSelector namingSelector = new DefaultNamingSelector(Instance::isHealthy); Random random = new Random(); int total = random.nextInt(32) + 1; int health = random.nextInt(total); - + NamingContext namingContext = getMockNamingContext(total, health); NamingResult result = namingSelector.select(namingContext); - + assertEquals(health, result.getResult().size()); result.getResult().forEach(ins -> assertTrue(ins.isHealthy())); } - + private NamingContext getMockNamingContext(int total, int health) { NamingContext namingContext = mock(NamingContext.class); when(namingContext.getInstances()).thenReturn(getInstance(total, health)); return namingContext; } - + private List getInstance(int total, int health) { List list = new ArrayList<>(total); for (int i = 0; i < total; i++) { @@ -59,11 +59,11 @@ private List getInstance(int total, int health) { instance.setHealthy(false); list.add(instance); } - + for (int i = 0; i < health; i++) { list.get(i).setHealthy(true); } - + return list; } } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvokerTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvokerTest.java index 5f49d6044cd..0614bca0c0a 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvokerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/selector/NamingListenerInvokerTest.java @@ -33,6 +33,7 @@ import static org.mockito.Mockito.verify; public class NamingListenerInvokerTest { + @Test public void testEventListener() { EventListener listener = mock(EventListener.class); @@ -41,7 +42,7 @@ public void testEventListener() { listenerInvoker.invoke(event); verify(listener).onEvent(event); } - + @Test public void testAbstractEventListener() { AbstractEventListener listener = mock(AbstractEventListener.class); @@ -50,7 +51,7 @@ public void testAbstractEventListener() { listenerInvoker.invoke(event); verify(listener).getExecutor(); } - + @Test public void testAbstractNamingChaneEventListener() { AbstractNamingChangeListener listener = spy(AbstractNamingChangeListener.class); @@ -59,7 +60,7 @@ public void testAbstractNamingChaneEventListener() { listenerInvoker.invoke(event); verify(listener).onChange(event); } - + @Test public void testEquals() { EventListener listener1 = mock(EventListener.class); diff --git a/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java index 31b3b6a31d2..b3cbace4966 100644 --- a/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/selector/SelectorManagerTest.java @@ -30,7 +30,7 @@ import static org.mockito.Mockito.mock; public class SelectorManagerTest { - + @Test public void testCurd() { SelectorManager selectorManager = new SelectorManager<>(); @@ -41,7 +41,7 @@ public void testCurd() { selectorManager.removeSelectorWrapper(subId, sw); assertNull(selectorManager.getSelectorWrappers(subId)); } - + @Test public void testSubInfo() { SelectorManager selectorManager = new SelectorManager<>(); @@ -49,36 +49,36 @@ public void testSubInfo() { for (int i = 0; i < 64; i++) { list.add(generateRandomString(2, 32)); } - + for (String subId : list) { selectorManager.addSelectorWrapper(subId, mock(NamingSelectorWrapper.class)); assertTrue(selectorManager.isSubscribed(subId)); } - + Set subsSet = selectorManager.getSubscriptions(); for (String subId : subsSet) { assertTrue(list.contains(subId)); } - + for (String subId : list) { selectorManager.removeSubscription(subId); assertFalse(selectorManager.isSubscribed(subId)); } } - + private static String generateRandomString(int minLength, int maxLength) { String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - + Random random = new Random(); int length = random.nextInt(maxLength - minLength + 1) + minLength; StringBuilder sb = new StringBuilder(); - + for (int i = 0; i < length; i++) { int index = random.nextInt(characters.length()); char randomChar = characters.charAt(index); sb.append(randomChar); } - + return sb.toString(); } } From 8d6f87eda6ca865cda10394b59726ca739a33715 Mon Sep 17 00:00:00 2001 From: shenyao Date: Mon, 6 May 2024 11:44:28 +0800 Subject: [PATCH 006/110] [ISSUE #11926] The abnormal exit mechanism does not take effect (#12045) --- .../alibaba/nacos/config/server/service/ConfigCacheService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigCacheService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigCacheService.java index 89cb9353636..beb7c6e6181 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigCacheService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigCacheService.java @@ -139,7 +139,7 @@ public static boolean dumpWithMd5(String dataId, String group, String tenant, St DUMP_LOG.error("[dump-exception] save disk error. " + groupKey + ", " + ioe); if (ioe.getMessage() != null) { String errMsg = ioe.getMessage(); - if (NO_SPACE_CN.equals(errMsg) || NO_SPACE_EN.equals(errMsg) || errMsg.contains(DISK_QUOTA_CN) + if (errMsg.contains(NO_SPACE_CN) || errMsg.contains(NO_SPACE_EN) || errMsg.contains(DISK_QUOTA_CN) || errMsg.contains(DISK_QUOTA_EN)) { // Protect from disk full. FATAL_LOG.error("Local Disk Full,Exit", ioe); From 99807358df31798511f21c4b897f671990c91572 Mon Sep 17 00:00:00 2001 From: caoyanan666 <55247691+caoyanan666@users.noreply.github.com> Date: Mon, 6 May 2024 11:49:19 +0800 Subject: [PATCH 007/110] feat(develop): [ISSUES #12013] startup.sh support environment CUSTOM_NACOS_MEMORY (#12014) * use DISABLE_NACOS_DEFAULT_MEMORY_SETTING * use CUSTOM_NACOS_MEMORY * Code optimization * remove unuse * startup.cmd support CUSTOM_NACOS_MEMORY environment variable --------- Co-authored-by: caoyanan --- distribution/bin/startup.cmd | 7 ++++--- distribution/bin/startup.sh | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/distribution/bin/startup.cmd b/distribution/bin/startup.cmd index 342c97cf5ce..805f2a02cc8 100755 --- a/distribution/bin/startup.cmd +++ b/distribution/bin/startup.cmd @@ -55,7 +55,8 @@ rem if nacos startup mode is standalone if %MODE% == "standalone" ( echo "nacos is starting with standalone" set "NACOS_OPTS=-Dnacos.standalone=true" - set "NACOS_JVM_OPTS=-Xms512m -Xmx512m -Xmn256m" + if "%CUSTOM_NACOS_MEMORY%"=="" ( set "CUSTOM_NACOS_MEMORY=-Xms512m -Xmx512m -Xmn256m" ) + set "NACOS_JVM_OPTS=%CUSTOM_NACOS_MEMORY%" ) rem if nacos startup mode is cluster @@ -64,8 +65,8 @@ if %MODE% == "cluster" ( if %EMBEDDED_STORAGE% == "embedded" ( set "NACOS_OPTS=-DembeddedStorage=true" ) - - set "NACOS_JVM_OPTS=-server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%BASE_DIR%\logs\java_heapdump.hprof -XX:-UseLargePages" + if "%CUSTOM_NACOS_MEMORY%"=="" ( set "CUSTOM_NACOS_MEMORY=-Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m" ) + set "NACOS_JVM_OPTS=-server %CUSTOM_NACOS_MEMORY% -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%BASE_DIR%\logs\java_heapdump.hprof -XX:-UseLargePages" ) rem set nacos's functionMode diff --git a/distribution/bin/startup.sh b/distribution/bin/startup.sh index feb796f7de6..cfe2f486126 100644 --- a/distribution/bin/startup.sh +++ b/distribution/bin/startup.sh @@ -89,16 +89,15 @@ export CUSTOM_SEARCH_LOCATIONS=file:${BASE_DIR}/conf/ # JVM Configuration #=========================================================================================== if [[ "${MODE}" == "standalone" ]]; then - JAVA_OPT="${JAVA_OPT} -Xms512m -Xmx512m -Xmn256m" + JAVA_OPT="${JAVA_OPT} ${CUSTOM_NACOS_MEMORY:- -Xms512m -Xmx512m -Xmn256m}" JAVA_OPT="${JAVA_OPT} -Dnacos.standalone=true" else if [[ "${EMBEDDED_STORAGE}" == "embedded" ]]; then JAVA_OPT="${JAVA_OPT} -DembeddedStorage=true" fi - JAVA_OPT="${JAVA_OPT} -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m" + JAVA_OPT="${JAVA_OPT} -server ${CUSTOM_NACOS_MEMORY:- -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m}" JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${BASE_DIR}/logs/java_heapdump.hprof" JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages" - fi if [[ "${FUNCTION_MODE}" == "config" ]]; then From ed64d1f0553c7f65e56b10464b9cd9514effcdac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E7=BF=8A=20SionYang?= Date: Mon, 6 May 2024 14:15:10 +0800 Subject: [PATCH 008/110] Depend nacos logback adapter directly. (#12059) --- client/pom.xml | 7 +++++-- pom.xml | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/client/pom.xml b/client/pom.xml index 759ed87e39a..d1a32feb191 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -64,13 +64,16 @@ com.alibaba.nacos nacos-logback-adapter-12 - ${project.version} + + + + com.alibaba.nacos + logback-adapter com.alibaba.nacos nacos-log4j2-adapter - ${project.version} diff --git a/pom.xml b/pom.xml index 55fc7b7d768..6257e8e7802 100644 --- a/pom.xml +++ b/pom.xml @@ -127,6 +127,7 @@ 1.3.0 + 1.1.0 2.7.18 3.0 2.7 @@ -724,6 +725,21 @@ nacos-client ${project.version} + + com.alibaba.nacos + nacos-logback-adapter-12 + ${project.version} + + + com.alibaba.nacos + logback-adapter + ${nacos.logback.adapter.version} + + + com.alibaba.nacos + nacos-log4j2-adapter + ${project.version} + ${project.groupId} nacos-test From 7c461fdf6718c627460f377539089a02d1ed56fe Mon Sep 17 00:00:00 2001 From: xYohn <26292685+xyohn@users.noreply.github.com> Date: Tue, 7 May 2024 16:18:36 +0800 Subject: [PATCH 009/110] [ISSUE #12046] fix console-ui bug when using encryption-plugin (#12061) * #12046 console-ui should not offer encryptedDataKey field to API * #12046 when containing encryptedDataKey,it should not execute encryption in v2 API (same as the v1 API) --- .../controller/v2/ConfigControllerV2.java | 18 +++++++------ .../config/server/model/form/ConfigForm.java | 25 ++++++++++++++----- .../controller/v2/ConfigControllerV2Test.java | 24 ++++++++++++++++++ .../ConfigEditor/NewConfigEditor.js | 2 ++ console/src/main/resources/static/index.html | 4 +-- console/src/main/resources/static/js/main.js | 4 +-- 6 files changed, 59 insertions(+), 18 deletions(-) diff --git a/config/src/main/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2.java b/config/src/main/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2.java index 68fae8550c9..b7f4b9ffdd9 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2.java @@ -118,9 +118,13 @@ public void getConfig(HttpServletRequest request, HttpServletResponse response, public Result publishConfig(ConfigForm configForm, HttpServletRequest request) throws NacosException { // check required field configForm.validate(); - // encrypted - Pair pair = EncryptionHandler.encryptHandler(configForm.getDataId(), configForm.getContent()); - configForm.setContent(pair.getSecond()); + String encryptedDataKeyFinal = configForm.getEncryptedDataKey(); + if (StringUtils.isBlank(encryptedDataKeyFinal)) { + // encrypted + Pair pair = EncryptionHandler.encryptHandler(configForm.getDataId(), configForm.getContent()); + configForm.setContent(pair.getSecond()); + encryptedDataKeyFinal = pair.getFirst(); + } //fix issue #9783 configForm.setNamespaceId(NamespaceUtil.processNamespaceParameter(configForm.getNamespaceId())); // check param @@ -134,16 +138,14 @@ public Result publishConfig(ConfigForm configForm, HttpServletRequest r if (!ConfigType.isValidType(configForm.getType())) { configForm.setType(ConfigType.getDefaultType().getType()); } - + ConfigRequestInfo configRequestInfo = new ConfigRequestInfo(); configRequestInfo.setSrcIp(RequestUtil.getRemoteIp(request)); configRequestInfo.setRequestIpApp(RequestUtil.getAppName(request)); configRequestInfo.setBetaIps(request.getHeader("betaIps")); configRequestInfo.setCasMd5(request.getHeader("casMd5")); - - String encryptedDataKey = pair.getFirst(); - - return Result.success(configOperationService.publishConfig(configForm, configRequestInfo, encryptedDataKey)); + + return Result.success(configOperationService.publishConfig(configForm, configRequestInfo, encryptedDataKeyFinal)); } /** diff --git a/config/src/main/java/com/alibaba/nacos/config/server/model/form/ConfigForm.java b/config/src/main/java/com/alibaba/nacos/config/server/model/form/ConfigForm.java index 080e9b8d554..cf58f4a6d89 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/model/form/ConfigForm.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/model/form/ConfigForm.java @@ -60,11 +60,14 @@ public class ConfigForm implements Serializable { private String schema; + private String encryptedDataKey; + public ConfigForm() { } public ConfigForm(String dataId, String group, String namespaceId, String content, String tag, String appName, - String srcUser, String configTags, String desc, String use, String effect, String type, String schema) { + String srcUser, String configTags, String desc, String use, String effect, String type, String schema, + String encryptedDataKey) { this.dataId = dataId; this.group = group; this.namespaceId = namespaceId; @@ -78,6 +81,7 @@ public ConfigForm(String dataId, String group, String namespaceId, String conten this.effect = effect; this.type = type; this.schema = schema; + this.encryptedDataKey = encryptedDataKey; } public String getDataId() { @@ -184,6 +188,14 @@ public void setSchema(String schema) { this.schema = schema; } + public String getEncryptedDataKey() { + return encryptedDataKey; + } + + public void setEncryptedDataKey(String encryptedDataKey) { + this.encryptedDataKey = encryptedDataKey; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -196,15 +208,16 @@ public boolean equals(Object o) { return dataId.equals(configForm.dataId) && group.equals(configForm.group) && Objects.equals(namespaceId, configForm.namespaceId) && content.equals(configForm.content) && Objects.equals(tag, configForm.tag) && Objects .equals(appName, configForm.appName) && Objects.equals(srcUser, configForm.srcUser) && Objects - .equals(configTags, configForm.configTags) && Objects.equals(desc, configForm.desc) && Objects - .equals(use, configForm.use) && Objects.equals(effect, configForm.effect) && Objects - .equals(type, configForm.type) && Objects.equals(schema, configForm.schema); + .equals(configTags, configForm.configTags) && Objects.equals(desc, configForm.desc) && Objects.equals( + use, configForm.use) && Objects.equals(effect, configForm.effect) && Objects.equals(type, + configForm.type) && Objects.equals(schema, configForm.schema) && Objects.equals(encryptedDataKey, + configForm.encryptedDataKey); } @Override public int hashCode() { return Objects.hash(dataId, group, namespaceId, content, tag, appName, srcUser, configTags, desc, use, effect, type, - schema); + schema, encryptedDataKey); } @Override @@ -213,7 +226,7 @@ public String toString() { + ", content='" + content + '\'' + ", tag='" + tag + '\'' + ", appName='" + appName + '\'' + ", srcUser='" + srcUser + '\'' + ", configTags='" + configTags + '\'' + ", desc='" + desc + '\'' + ", use='" + use + '\'' + ", effect='" + effect + '\'' + ", type='" + type + '\'' + ", schema='" - + schema + '\'' + '}'; + + schema + '\'' + ", encryptedDataKey='" + encryptedDataKey + '\'' + '}'; } /** diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java index 89951dc7ffb..6addabecbf2 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java @@ -104,6 +104,8 @@ public class ConfigControllerV2Test { private static final String TEST_CONTENT = "test config"; + private static final String TEST_ENCRYPTED_DATA_KEY = "test_encrypted_data_key"; + @Before public void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); @@ -161,6 +163,28 @@ public void testPublishConfig() throws Exception { assertEquals(true, booleanResult.getData()); } + @Test + public void testPublishConfigWithEncryptedDataKey() throws Exception { + + ConfigForm configForm = new ConfigForm(); + configForm.setDataId(TEST_DATA_ID); + configForm.setGroup(TEST_GROUP); + configForm.setNamespaceId(TEST_NAMESPACE_ID); + configForm.setContent(TEST_CONTENT); + configForm.setEncryptedDataKey(TEST_ENCRYPTED_DATA_KEY); + MockHttpServletRequest request = new MockHttpServletRequest(); + + when(configOperationService.publishConfig(any(ConfigForm.class), any(ConfigRequestInfo.class), + eq(TEST_ENCRYPTED_DATA_KEY))).thenReturn(true); + + Result booleanResult = configControllerV2.publishConfig(configForm, request); + + verify(configOperationService).publishConfig(any(ConfigForm.class), any(ConfigRequestInfo.class), anyString()); + + assertEquals(ErrorCode.SUCCESS.getCode(), booleanResult.getCode()); + assertEquals(true, booleanResult.getData()); + } + @Test public void testPublishConfigWhenNameSpaceIsPublic() throws Exception { diff --git a/console-ui/src/pages/ConfigurationManagement/ConfigEditor/NewConfigEditor.js b/console-ui/src/pages/ConfigurationManagement/ConfigEditor/NewConfigEditor.js index fee1d64a04b..a8fdce74e7b 100644 --- a/console-ui/src/pages/ConfigurationManagement/ConfigEditor/NewConfigEditor.js +++ b/console-ui/src/pages/ConfigurationManagement/ConfigEditor/NewConfigEditor.js @@ -259,6 +259,8 @@ class ConfigEditor extends React.Component { if (configTags.length > 0) { payload.config_tags = configTags.join(','); } + // #12046 console-ui should not offer encryptedDataKey field to API + payload.encryptedDataKey = ''; const stringify = require('qs/lib/stringify'); this.setState({ loading: true }); return request({ diff --git a/console/src/main/resources/static/index.html b/console/src/main/resources/static/index.html index f389403c6b9..b4010f33b7a 100644 --- a/console/src/main/resources/static/index.html +++ b/console/src/main/resources/static/index.html @@ -35,7 +35,7 @@ - +
@@ -56,6 +56,6 @@ - + diff --git a/console/src/main/resources/static/js/main.js b/console/src/main/resources/static/js/main.js index 8b33c0be302..2c74db18142 100644 --- a/console/src/main/resources/static/js/main.js +++ b/console/src/main/resources/static/js/main.js @@ -295,7 +295,7 @@ var t;e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_ * @author Feross Aboukhadijeh * @license MIT */ -var S=P(693),o=P(694),s=P(695);function n(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var n=(e="string"!=typeof e?""+e:e).length;if(0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return O(e).length;default:if(a)return L(e).length;t=(""+t).toLowerCase(),a=!0}}function t(e,t,n){var a,r=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,i=t,s=n,l=o.length;(!s||s<0||l=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,a)),c.isBuffer(t))return 0===t.length?-1:m(e,t,n,a,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(r?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):m(e,[t],n,a,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,a,r){var o=1,i=e.length,s=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i/=o=2,s/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r)for(var u=-1,d=n;d>8,r.push(n%256),r.push(a);return r}(t,e.length-n),e,n,a)}function E(e,t,n){n=Math.min(e.length,n);for(var a=[],r=t;r>>10&1023|55296),d=56320|1023&d),a.push(d),r+=c}var f=a,p=f.length;if(p<=v)return String.fromCharCode.apply(String,f);for(var h="",m=0;mt)&&(e+=" ... "),""},c.prototype.compare=function(e,t,n,a,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),(t=void 0===t?0:t)<0||n>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(r<=a&&n<=t)return 0;if(r<=a)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(o,i),l=this.slice(a,r),u=e.slice(t,n),d=0;dthis.length)throw new RangeError("Attempt to write outside buffer bounds");a=a||"utf8";for(var o,i,s,l=!1;;)switch(a){case"hex":var u=this,d=e,c=t,f=n,p=(c=Number(c)||0,u.length-c);if((!f||p<(f=Number(f)))&&(f=p),(p=d.length)%2!=0)throw new TypeError("Invalid hex string");p/2e.length)throw new RangeError("Index out of range")}function w(e,t,n,a){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(a?r:1-r)}function M(e,t,n,a){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(a?r:3-r)&255}function k(e,t,n,a){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,a,r){return r||k(e,0,n,4),o.write(e,t,n,a,23,4),n+4}function C(e,t,n,a,r){return r||k(e,0,n,8),o.write(e,t,n,a,52,8),n+8}c.prototype.slice=function(e,t){var n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n>>8):w(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=0,o=1,i=0;for(this[t]=255&e;++r>0)-i&255;return t+n},c.prototype.writeIntBE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=n-1,o=1,i=0;for(this[t+r]=255&e;0<=--r&&(o*=256);)e<0&&0===i&&0!==this[t+r+1]&&(i=1),this[t+r]=(e/o>>0)-i&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):w(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,a){if(n=n||0,a||0===a||(a=this.length),t>=e.length&&(t=e.length),(a=0=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length);var r,o=(a=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function O(e){return S.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}.call(this,P(65))},function(e,t,n){"use strict";var o=n(136);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return a||r?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(i,this,e)):o.nextTick(i,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,o.nextTick(i,n,e)):o.nextTick(i,n,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var a=n(137).Buffer,r=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||a.isEncoding!==r&&r(e))return t||e;throw new Error("Unknown encoding: "+e)}function i(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=d,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t,n=this.lastTotal-this.lastNeed,a=(t=this,128!=(192&(a=e)[0])?(t.lastNeed=0,"�"):1e.slidesToShow&&(n=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0&&(t=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow,t=e.rtl?(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow:t)&&(o=e.slideIndex>e.slideCount?(n=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(n=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1))):e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(n=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth),e.centerMode&&(e.infinite?n+=e.slideWidth*Math.floor(e.slidesToShow/2):n=e.slideWidth*Math.floor(e.slidesToShow/2)),a=e.vertical?e.slideIndex*e.slideHeight*-1+o:e.slideIndex*e.slideWidth*-1+n,!0===e.variableWidth&&(t=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(t=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[t]))?-1*r.offsetLeft:0,!0===e.centerMode)&&(r=!1===e.infinite?i.default.findDOMNode(e.trackRef).children[e.slideIndex]:i.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])?-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2:a)}},function(e,t,n){"use strict";t.__esModule=!0;var p=u(n(2)),h=u(n(12)),o=u(n(4)),i=u(n(6)),a=u(n(7)),m=u(n(0)),r=u(n(5)),g=u(n(17)),s=u(n(8)),y=u(n(26)),l=n(11);function u(e){return e&&e.__esModule?e:{default:e}}d=m.default.Component,(0,a.default)(c,d),c.prototype.render=function(){var e=this.props,t=e.title,n=e.children,a=e.className,r=e.isExpanded,o=e.disabled,i=e.style,s=e.prefix,l=e.onClick,u=e.id,e=(0,h.default)(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),a=(0,g.default)(((d={})[s+"collapse-panel"]=!0,d[s+"collapse-panel-hidden"]=!r,d[s+"collapse-panel-expanded"]=r,d[s+"collapse-panel-disabled"]=o,d[a]=a,d)),d=(0,g.default)(((d={})[s+"collapse-panel-icon"]=!0,d[s+"collapse-panel-icon-expanded"]=r,d)),c=u?u+"-heading":void 0,f=u?u+"-region":void 0;return m.default.createElement("div",(0,p.default)({className:a,style:i,id:u},e),m.default.createElement("div",{id:c,className:s+"collapse-panel-title",onClick:l,onKeyDown:this.onKeyDown,tabIndex:"0","aria-disabled":o,"aria-expanded":r,"aria-controls":f,role:"button"},m.default.createElement(y.default,{type:"arrow-right",className:d,"aria-hidden":"true"}),t),m.default.createElement("div",{className:s+"collapse-panel-content",role:"region",id:f},n))},a=n=c,n.propTypes={prefix:r.default.string,style:r.default.object,children:r.default.any,isExpanded:r.default.bool,disabled:r.default.bool,title:r.default.node,className:r.default.string,onClick:r.default.func,id:r.default.string},n.defaultProps={prefix:"next-",isExpanded:!1,onClick:l.func.noop},n.isNextPanel=!0;var d,r=a;function c(){var e,n;(0,o.default)(this,c);for(var t=arguments.length,a=Array(t),r=0;r\n com.alibaba.nacos\n nacos-client\n ${version}\n
\n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n *\n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("receive:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"getCSharpCode",value:function(e){return'/*\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n string serverAddr = "http://localhost:8848";\n string dataId = "'.concat(e.dataId,'";\n string group = "').concat(e.group,'";\n\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Config(x =>\n {\n x.ServerAddresses = new List { serverAddr };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.ConfigUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var configSvc = serviceProvider.GetService();\n\n var content = await configSvc.GetConfig(dataId, group, 3000);\n Console.WriteLine(content);\n\n var listener = new ConfigListener();\n\n await configSvc.AddListener(dataId, group, listener);\n\n var isPublishOk = await configSvc.PublishConfig(dataId, group, "content");\n Console.WriteLine(isPublishOk);\n\n await Task.Delay(3000);\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n\n var isRemoveOk = await configSvc.RemoveConfig(dataId, group);\n Console.WriteLine(isRemoveOk);\n await Task.Delay(3000);\n\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n await Task.Delay(300000);\n }\n\n internal class ConfigListener : IListener\n {\n public void ReceiveConfigInfo(string configInfo)\n {\n Console.WriteLine("receive:" + configInfo);\n }\n }\n}\n\n/*\nRefer to document: https://github.com/nacos-group/nacos-sdk-csharp/tree/dev/samples/MsConfigApp\nDemo for ASP.NET Core Integration\nMsConfigApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.Hosting;\nusing Serilog;\nusing Serilog.Events;\n\npublic class Program\n{\n public static void Main(string[] args)\n {\n Log.Logger = new LoggerConfiguration()\n .Enrich.FromLogContext()\n .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)\n .MinimumLevel.Override("System", LogEventLevel.Warning)\n .MinimumLevel.Debug()\n .WriteTo.Console()\n .CreateLogger();\n\n try\n {\n Log.ForContext().Information("Application starting...");\n CreateHostBuilder(args, Log.Logger).Build().Run();\n }\n catch (System.Exception ex)\n {\n Log.ForContext().Fatal(ex, "Application start-up failed!!");\n }\n finally\n {\n Log.CloseAndFlush();\n }\n }\n\n public static IHostBuilder CreateHostBuilder(string[] args, Serilog.ILogger logger) =>\n Host.CreateDefaultBuilder(args)\n .ConfigureAppConfiguration((context, builder) =>\n {\n var c = builder.Build();\n builder.AddNacosV2Configuration(c.GetSection("NacosConfig"), logAction: x => x.AddSerilog(logger));\n })\n .ConfigureWebHostDefaults(webBuilder =>\n {\n webBuilder.UseStartup().UseUrls("http://*:8787");\n })\n .UseSerilog();\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return x.a.createElement("div",null,x.a.createElement(y.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:x.a.createElement("div",null),onClose:this.closeDialog.bind(this)},x.a.createElement("div",{style:{height:500}},x.a.createElement(R.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},x.a.createElement(O.a,{shape:"text",style:{height:40,paddingBottom:10}},x.a.createElement(D,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),x.a.createElement(D,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),x.a.createElement(D,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),x.a.createElement(D,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),x.a.createElement(D,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),x.a.createElement(D,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),x.a.createElement(D,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),x.a.createElement(D,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),x.a.createElement("div",{ref:"codepreview"})))))}}]),n}(x.a.Component)).displayName="ShowCodeing",S=S))||S,S=(t(69),t(40)),S=t.n(S),F=(t(752),S.a.Row),N=S.a.Col,z=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(e){return Object(_.a)(this,n),(e=t.call(this,e)).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},e}return Object(b.a)(n,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale;this.setState({title:(void 0===e?{}:e).confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=x.a.createElement("div",{style:{textAlign:"right"}},x.a.createElement(d.a,{type:"primary",onClick:this.closeDialog.bind(this)},e.determine));return x.a.createElement("div",null,x.a.createElement(y.a,{visible:this.state.visible,footer:t,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:e.deletetitle},x.a.createElement("div",null,x.a.createElement(F,null,x.a.createElement(N,{span:"4",style:{paddingTop:16}},x.a.createElement(m.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),x.a.createElement(N,{span:"20"},x.a.createElement("div",null,x.a.createElement("h3",null,this.state.isok?e.deletedSuccessfully:e.deleteFailed),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":x.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(x.a.Component)).displayName="DeleteDialog",S=S))||S,S=(t(753),t(434)),W=t.n(S),B=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(b.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,t=void 0===t?{}:t,n=e.height,e=e.locale,a=void 0===e?{}:e;return x.a.createElement("div",null,"notice"===t.modeType?x.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},x.a.createElement(W.a,{style:{marginBottom:1\n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.deregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.subscribe("').concat(this.record.name,'", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}')}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n \n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringBootCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n* pom.xml\n \n com.alibaba.boot\n nacos-discovery-spring-boot-starter\n ${latest.version}\n \n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringCloudCode",value:function(e){return"/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml\n \n org.springframework.cloud\n spring-cloud-starter-alibaba-nacos-discovery\n ${latest.version}\n \n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=".concat(this.record.name,'\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosProviderApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(NacosProviderApplication.class, args);\n}\n\n @RestController\n class EchoController {\n @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n public String echo(@PathVariable String string) {\n return "Hello Nacos Discovery " + string;\n }\n }\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=micro-service-oauth2\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"getCSharpCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Naming(x =>\n {\n x.ServerAddresses = new List { "http://localhost:8848/" };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.NamingUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var namingSvc = serviceProvider.GetService();\n\n await namingSvc.RegisterInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n await namingSvc.RegisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(await namingSvc.GetAllInstances("').concat(this.record.name,'")));\n\n await namingSvc.DeregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n var listener = new EventListener();\n\n await namingSvc.Subscribe("').concat(this.record.name,'", listener);\n }\n\n internal class EventListener : IEventListener\n {\n public Task OnEvent(IEvent @event)\n {\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(@event));\n return Task.CompletedTask;\n }\n }\n}\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for ASP.NET Core Integration\nApp.csproj\n\n\n \n\n*/\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/appsettings.json\n* appsettings.json\n{\n "nacos": {\n "ServerAddresses": [ "http://localhost:8848" ],\n "DefaultTimeOut": 15000,\n "Namespace": "cs",\n "ServiceName": "App1",\n "GroupName": "DEFAULT_GROUP",\n "ClusterName": "DEFAULT",\n "Port": 0,\n "Weight": 100,\n "RegisterEnabled": true,\n "InstanceEnabled": true,\n "Ephemeral": true,\n "NamingUseRpc": true,\n "NamingLoadCacheAtStart": ""\n }\n}\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/Startup.cs\nusing Nacos.AspNetCore.V2;\n\npublic class Startup\n{\n public Startup(IConfiguration configuration)\n {\n Configuration = configuration;\n }\n\n public IConfiguration Configuration { get; }\n\n public void ConfigureServices(IServiceCollection services)\n {\n // ....\n services.AddNacosAspNet(Configuration);\n }\n\n public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n {\n // ....\n }\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return O.a.createElement("div",null,O.a.createElement(o.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:O.a.createElement("div",null),onClose:this.closeDialog.bind(this)},O.a.createElement("div",{style:{height:500}},O.a.createElement(h.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},O.a.createElement(m.a,{shape:"text",style:{height:40,paddingBottom:10}},O.a.createElement(g,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),O.a.createElement(g,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),O.a.createElement(g,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),O.a.createElement(g,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),O.a.createElement(g,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),O.a.createElement(g,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),O.a.createElement(g,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),O.a.createElement(g,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),O.a.createElement(g,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),O.a.createElement("div",{ref:"codepreview"})))))}}]),n}(O.a.Component)).displayName="ShowServiceCodeing",f=f))||f,Y=t(51),I=(t(774),t(23)),A=L.a.Item,R=c.a.Row,H=c.a.Col,F=T.a.Column,c=(0,n.a.config)(((f=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return a.queryServiceList()})},a.showcode=function(){setTimeout(function(){return a.queryServiceList()})},a.setNowNameSpace=function(e,t,n){return a.setState({nowNamespaceName:e,nowNamespaceId:t,nowNamespaceDesc:n})},a.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},a.editServiceDialog=O.a.createRef(),a.showcode=O.a.createRef(),a.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:Object(p.a)("serviceNameParam")||"",groupName:Object(p.a)("groupNameParam")||""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},a.field=new i.a(Object(l.a)(a)),a}return Object(a.a)(n,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.search,o=e.withInstances,o=void 0!==o&&o,e=e.hasIpCount,e=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];Object(p.d)({serviceNameParam:r.serviceName,groupNameParam:r.groupName}),this.openLoading(),Object(p.c)({url:"v1/ns/catalog/services?".concat(e.join("&")),success:function(){var e=0o&&v.a.createElement(u.a,{className:"users-pagination",current:i,total:n.totalCount,pageSize:o,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.c)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),v.a.createElement(x.a,{visible:l,username:e,onOk:function(e){return Object(_.k)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0,passwordResetUserVisible:!1})}}))}}]),n}(v.a.Component)).displayName="UserManagement",n=o))||n)||n;t.a=r},function(e,t,n){"use strict";n(67);var a=n(46),l=n.n(a),a=(n(36),n(18)),u=n.n(a),d=n(34),a=(n(66),n(21)),c=n.n(a),a=(n(32),n(19)),f=n.n(a),a=(n(92),n(54)),p=n.n(a),a=(n(38),n(3)),h=n.n(a),a=(n(37),n(10)),m=n.n(a),i=n(13),s=n(14),g=n(22),y=n(16),v=n(15),a=(n(27),n(8)),a=n.n(a),r=n(0),_=n.n(r),r=n(33),b=n(45),o=n(85),w=n(52),M=(n(49),n(28)),k=n.n(M),M=(n(59),n(29)),S=n.n(M),E=h.a.Item,x=S.a.Option,C={labelCol:{fixedSpan:4},wrapperCol:{span:19}},T=Object(r.b)(function(e){return{namespaces:e.namespace.namespaces}},{getNamespaces:o.b,searchRoles:b.l})(M=(0,a.a.config)(((M=function(e){Object(y.a)(o,e);var r=Object(v.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ai&&_.a.createElement(l.a,{className:"users-pagination",current:s,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),_.a.createElement(T,{visible:n,onOk:function(e){return Object(b.a)(e).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})},onCancel:function(){return a.colseCreatePermission()}}))}}]),n}(_.a.Component)).displayName="PermissionsManagement",n=M))||n)||n);t.a=r},function(e,t,n){"use strict";n(67);var a=n(46),l=n.n(a),a=(n(36),n(18)),u=n.n(a),a=(n(66),n(21)),d=n.n(a),a=(n(32),n(19)),c=n.n(a),a=(n(92),n(54)),f=n.n(a),a=(n(38),n(3)),p=n.n(a),a=(n(37),n(10)),h=n.n(a),i=n(13),s=n(14),m=n(22),g=n(16),y=n(15),a=(n(27),n(8)),a=n.n(a),r=n(0),v=n.n(r),r=n(33),_=n(45),b=n(52),o=(n(59),n(29)),w=n.n(o),o=(n(49),n(28)),M=n.n(o),k=p.a.Item,S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=Object(r.b)(function(e){return{users:e.authority.users}},{searchUsers:_.m})(o=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ao&&v.a.createElement(l.a,{className:"users-pagination",current:i,total:t.totalCount,pageSize:o,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.b)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}]),n}(v.a.Component)).displayName="RolesManagement",n=o))||n)||n);t.a=r},function(e,t,n){"use strict";n(36);function l(e){var t=void 0===(t=localStorage.token)?"{}":t,t=(Object(_.c)(t)&&JSON.parse(t)||{}).globalAdmin,n=[];return"naming"===e?n.push(b):"config"===e?n.push(w):n.push(w,b),t&&n.push(M),n.push(k),n.push(S),n.push(E),n.filter(function(e){return e})}var a=n(18),u=n.n(a),a=(n(48),n(25)),d=n.n(a),a=(n(43),n(26)),c=n.n(a),r=n(13),o=n(14),i=n(16),s=n(15),a=(n(27),n(8)),a=n.n(a),f=n(20),p=(n(83),n(50)),h=n.n(p),p=n(0),m=n.n(p),p=n(39),g=n(33),y=n(141),v=n(60),_=n(47),b={key:"serviceManagementVirtual",children:[{key:"serviceManagement",url:"/serviceManagement"},{key:"subscriberList",url:"/subscriberList"}]},w={key:"configurationManagementVirtual",children:[{key:"configurationManagement",url:"/configurationManagement"},{key:"historyRollback",url:"/historyRollback"},{key:"listeningToQuery",url:"/listeningToQuery"}]},M={key:"authorityControl",children:[{key:"userList",url:"/userManagement"},{key:"roleManagement",url:"/rolesManagement"},{key:"privilegeManagement",url:"/permissionsManagement"}]},k={key:"namespace",url:"/namespace"},S={key:"clusterManagementVirtual",children:[{key:"clusterManagement",url:"/clusterManagement"}]},E={key:"settingCenter",url:"/settingCenter"},x=(n(384),h.a.SubMenu),C=h.a.Item,p=(n=Object(g.b)(function(e){return Object(f.a)(Object(f.a)({},e.locale),e.base)},{getState:v.d,getNotice:v.c,getGuide:v.b}),g=a.a.config,Object(p.g)(a=n(a=g(((v=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){return Object(r.a)(this,n),(e=t.call(this,e)).state={visible:!0},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.props.getState(),this.props.getNotice(),this.props.getGuide()}},{key:"goBack",value:function(){this.props.history.goBack()}},{key:"navTo",value:function(e){var t=this.props.location.search,t=new URLSearchParams(t);t.set("namespace",window.nownamespace),t.set("namespaceShowName",window.namespaceShowName),this.props.history.push([e,"?",t.toString()].join(""))}},{key:"isCurrentPath",value:function(e){return e===this.props.location.pathname?"current-path next-selected":void 0}},{key:"defaultOpenKeys",value:function(){for(var t=this,e=l(this.props.functionMode),n=0,a=e.length;nthis.state.pageSize&&S.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},S.a.createElement(v.a,{current:this.state.pageNo,total:a,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}]),n}(S.a.Component)).displayName="SubscriberList",c=n))||c)||c;t.a=f},function(e,t,n){"use strict";n(53);var a=n(35),d=n.n(a),a=(n(67),n(46)),c=n.n(a),a=(n(180),n(77)),f=n.n(a),a=(n(37),n(10)),p=n.n(a),a=(n(32),n(19)),h=n.n(a),a=(n(36),n(18)),r=n.n(a),a=(n(48),n(25)),o=n.n(a),a=(n(49),n(28)),i=n.n(a),s=n(13),l=n(14),u=n(22),m=n(16),g=n(15),a=(n(27),n(8)),a=n.n(a),y=(n(419),n(122)),v=n.n(y),y=(n(66),n(21)),_=n.n(y),y=(n(69),n(40)),y=n.n(y),b=(n(38),n(3)),w=n.n(b),b=n(0),M=n.n(b),k=n(1),b=n(143),S=n.n(b),E=n(51),x=(n(777),w.a.Item),C=y.a.Row,T=y.a.Col,L=_.a.Column,O=v.a.Panel,y=(0,a.a.config)(((b=function(e){Object(m.a)(a,e);var t=Object(g.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return n.queryClusterStateList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:(e.voteFor,"")}},n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new i.a(Object(u.a)(n)),n}return Object(l.a)(a,[{key:"componentDidMount",value:function(){this.getQueryLater()}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"queryClusterStateList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.keyword,e=e.withInstances,e=["withInstances=".concat(void 0!==e&&e),"pageNo=".concat(t),"pageSize=".concat(a),"keyword=".concat(r)];Object(k.c)({url:"v1/core/cluster/nodes?".concat(e.join("&")),beforeSend:function(){return n.openLoading()},success:function(){var e=0this.state.pageSize&&M.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},M.a.createElement(c.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return t.setState({currentPage:e},function(){return t.queryClusterStateList()})}}))))}}]),a}(M.a.Component)).displayName="ClusterNodeList",n=b))||n;t.a=y},function(e,t,n){"use strict";n(32);var a=n(19),r=n.n(a),o=n(13),i=n(14),s=n(16),l=n(15),a=(n(27),n(8)),a=n.n(a),u=n(20),d=(n(113),n(74)),d=n.n(d),c=n(0),f=n.n(c),p=(n(780),n(51)),c=n(86),h=n(146),m=n(33),g=n(23),y=d.a.Group,m=Object(m.b)(function(e){return Object(u.a)({},e.locale)},{changeLanguage:c.a,changeTheme:h.a})(d=(0,a.a.config)(((n=function(e){Object(s.a)(a,e);var n=Object(l.a)(a);function a(e){Object(o.a)(this,a),e=n.call(this,e);var t=localStorage.getItem(g.o);return e.state={theme:"dark"===t?"dark":"light",language:localStorage.getItem(g.g)},e}return Object(i.a)(a,[{key:"newTheme",value:function(e){this.setState({theme:e})}},{key:"newLanguage",value:function(e){this.setState({language:e})}},{key:"submit",value:function(){var e=this.props,t=e.changeLanguage,e=e.changeTheme,n=this.state.language,a=this.state.theme;t(n),e(a)}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=[{value:"light",label:e.settingLight},{value:"dark",label:e.settingDark}];return f.a.createElement(f.a.Fragment,null,f.a.createElement(p.a,{title:e.settingTitle}),f.a.createElement("div",{className:"setting-box"},f.a.createElement("div",{className:"text-box"},f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingTheme),f.a.createElement(y,{dataSource:t,value:this.state.theme,onChange:this.newTheme.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingLocale),f.a.createElement(y,{dataSource:[{value:"en-US",label:"English"},{value:"zh-CN",label:"中文"}],value:this.state.language,onChange:this.newLanguage.bind(this)}))),f.a.createElement(r.a,{type:"primary",onClick:this.submit.bind(this)},e.settingSubmit)))}}]),a}(f.a.Component)).displayName="SettingCenter",d=n))||d)||d;t.a=m},function(e,t,B){"use strict";B.r(t),function(e){B(53);var t=B(35),a=B.n(t),t=(B(27),B(8)),r=B.n(t),o=B(13),i=B(14),s=B(16),l=B(15),n=B(20),t=B(0),u=B.n(t),t=B(24),t=B.n(t),d=B(124),c=B(427),f=B(438),p=B(33),h=B(39),m=B(84),g=(B(474),B(447)),y=B(23),v=B(448),_=B(441),b=B(449),w=B(450),M=B(442),k=B(451),S=B(452),E=B(453),x=B(454),C=B(455),T=B(439),L=B(443),O=B(440),D=B(456),N=B(457),P=B(444),j=B(445),I=B(446),A=B(436),R=B(458),Y=B(437),H=B(86),F=B(60),z=B(146),e=(B(781),e.hot,localStorage.getItem(y.g)||localStorage.setItem(y.g,"zh-CN"===navigator.language?"zh-CN":"en-US"),Object(d.b)(Object(n.a)(Object(n.a)({},Y.a),{},{routing:c.routerReducer}))),Y=Object(d.d)(e,Object(d.c)(Object(d.a)(f.a),window[y.k]?window[y.k]():function(e){return e})),W=[{path:"/",exact:!0,render:function(){return u.a.createElement(h.a,{to:"/welcome"})}},{path:"/welcome",component:A.a},{path:"/namespace",component:_.a},{path:"/newconfig",component:b.a},{path:"/configsync",component:w.a},{path:"/configdetail",component:M.a},{path:"/configeditor",component:k.a},{path:"/historyDetail",component:S.a},{path:"/configRollback",component:E.a},{path:"/historyRollback",component:x.a},{path:"/listeningToQuery",component:C.a},{path:"/configurationManagement",component:T.a},{path:"/serviceManagement",component:L.a},{path:"/serviceDetail",component:O.a},{path:"/subscriberList",component:D.a},{path:"/clusterManagement",component:N.a},{path:"/userManagement",component:P.a},{path:"/rolesManagement",component:I.a},{path:"/permissionsManagement",component:j.a},{path:"/settingCenter",component:R.a}],e=Object(p.b)(function(e){return Object(n.a)(Object(n.a)({},e.locale),e.base)},{changeLanguage:H.a,getState:F.d,changeTheme:z.a})(c=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){return Object(o.a)(this,n),(e=t.call(this,e)).state={shownotice:"none",noticecontent:"",nacosLoading:{}},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.props.getState();var e=localStorage.getItem(y.g),t=localStorage.getItem(y.o);this.props.changeLanguage(e),this.props.changeTheme(t)}},{key:"router",get:function(){var e=this.props,t=e.loginPageEnabled,e=e.consoleUiEnable;return u.a.createElement(m.a,null,u.a.createElement(h.d,null,t&&"false"===t?null:u.a.createElement(h.b,{path:"/login",component:v.a}),u.a.createElement(g.a,null,e&&"true"===e&&W.map(function(e){return u.a.createElement(h.b,Object.assign({key:e.path},e))}))))}},{key:"render",value:function(){var e=this.props,t=e.locale,e=e.loginPageEnabled;return u.a.createElement(a.a,Object.assign({className:"nacos-loading",shape:"flower",tip:"loading...",visible:!e,fullScreen:!0},this.state.nacosLoading),u.a.createElement(r.a,{locale:t},this.router))}}]),n}(u.a.Component))||c;t.a.render(u.a.createElement(p.a,{store:Y},u.a.createElement(e,null)),document.getElementById("root"))}.call(this,B(460)(e))},function(e,t){e.exports=function(e){var t;return e.webpackPolyfill||((t=Object.create(e)).children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(I,e,t){"use strict"; +var S=P(693),o=P(694),s=P(695);function n(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var n=(e="string"!=typeof e?""+e:e).length;if(0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return O(e).length;default:if(a)return L(e).length;t=(""+t).toLowerCase(),a=!0}}function t(e,t,n){var a,r=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,i=t,s=n,l=o.length;(!s||s<0||l=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,a)),c.isBuffer(t))return 0===t.length?-1:m(e,t,n,a,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(r?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):m(e,[t],n,a,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,a,r){var o=1,i=e.length,s=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i/=o=2,s/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r)for(var u=-1,d=n;d>8,r.push(n%256),r.push(a);return r}(t,e.length-n),e,n,a)}function E(e,t,n){n=Math.min(e.length,n);for(var a=[],r=t;r>>10&1023|55296),d=56320|1023&d),a.push(d),r+=c}var f=a,p=f.length;if(p<=v)return String.fromCharCode.apply(String,f);for(var h="",m=0;mt)&&(e+=" ... "),""},c.prototype.compare=function(e,t,n,a,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),(t=void 0===t?0:t)<0||n>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(r<=a&&n<=t)return 0;if(r<=a)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(o,i),l=this.slice(a,r),u=e.slice(t,n),d=0;dthis.length)throw new RangeError("Attempt to write outside buffer bounds");a=a||"utf8";for(var o,i,s,l=!1;;)switch(a){case"hex":var u=this,d=e,c=t,f=n,p=(c=Number(c)||0,u.length-c);if((!f||p<(f=Number(f)))&&(f=p),(p=d.length)%2!=0)throw new TypeError("Invalid hex string");p/2e.length)throw new RangeError("Index out of range")}function w(e,t,n,a){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(a?r:1-r)}function M(e,t,n,a){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(a?r:3-r)&255}function k(e,t,n,a){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,a,r){return r||k(e,0,n,4),o.write(e,t,n,a,23,4),n+4}function C(e,t,n,a,r){return r||k(e,0,n,8),o.write(e,t,n,a,52,8),n+8}c.prototype.slice=function(e,t){var n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n>>8):w(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=0,o=1,i=0;for(this[t]=255&e;++r>0)-i&255;return t+n},c.prototype.writeIntBE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=n-1,o=1,i=0;for(this[t+r]=255&e;0<=--r&&(o*=256);)e<0&&0===i&&0!==this[t+r+1]&&(i=1),this[t+r]=(e/o>>0)-i&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):w(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,a){if(n=n||0,a||0===a||(a=this.length),t>=e.length&&(t=e.length),(a=0=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length);var r,o=(a=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function O(e){return S.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}.call(this,P(65))},function(e,t,n){"use strict";var o=n(136);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return a||r?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(i,this,e)):o.nextTick(i,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,o.nextTick(i,n,e)):o.nextTick(i,n,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var a=n(137).Buffer,r=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||a.isEncoding!==r&&r(e))return t||e;throw new Error("Unknown encoding: "+e)}function i(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=d,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t,n=this.lastTotal-this.lastNeed,a=(t=this,128!=(192&(a=e)[0])?(t.lastNeed=0,"�"):1e.slidesToShow&&(n=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0&&(t=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow,t=e.rtl?(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow:t)&&(o=e.slideIndex>e.slideCount?(n=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(n=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1))):e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(n=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth),e.centerMode&&(e.infinite?n+=e.slideWidth*Math.floor(e.slidesToShow/2):n=e.slideWidth*Math.floor(e.slidesToShow/2)),a=e.vertical?e.slideIndex*e.slideHeight*-1+o:e.slideIndex*e.slideWidth*-1+n,!0===e.variableWidth&&(t=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(t=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[t]))?-1*r.offsetLeft:0,!0===e.centerMode)&&(r=!1===e.infinite?i.default.findDOMNode(e.trackRef).children[e.slideIndex]:i.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])?-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2:a)}},function(e,t,n){"use strict";t.__esModule=!0;var p=u(n(2)),h=u(n(12)),o=u(n(4)),i=u(n(6)),a=u(n(7)),m=u(n(0)),r=u(n(5)),g=u(n(17)),s=u(n(8)),y=u(n(26)),l=n(11);function u(e){return e&&e.__esModule?e:{default:e}}d=m.default.Component,(0,a.default)(c,d),c.prototype.render=function(){var e=this.props,t=e.title,n=e.children,a=e.className,r=e.isExpanded,o=e.disabled,i=e.style,s=e.prefix,l=e.onClick,u=e.id,e=(0,h.default)(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),a=(0,g.default)(((d={})[s+"collapse-panel"]=!0,d[s+"collapse-panel-hidden"]=!r,d[s+"collapse-panel-expanded"]=r,d[s+"collapse-panel-disabled"]=o,d[a]=a,d)),d=(0,g.default)(((d={})[s+"collapse-panel-icon"]=!0,d[s+"collapse-panel-icon-expanded"]=r,d)),c=u?u+"-heading":void 0,f=u?u+"-region":void 0;return m.default.createElement("div",(0,p.default)({className:a,style:i,id:u},e),m.default.createElement("div",{id:c,className:s+"collapse-panel-title",onClick:l,onKeyDown:this.onKeyDown,tabIndex:"0","aria-disabled":o,"aria-expanded":r,"aria-controls":f,role:"button"},m.default.createElement(y.default,{type:"arrow-right",className:d,"aria-hidden":"true"}),t),m.default.createElement("div",{className:s+"collapse-panel-content",role:"region",id:f},n))},a=n=c,n.propTypes={prefix:r.default.string,style:r.default.object,children:r.default.any,isExpanded:r.default.bool,disabled:r.default.bool,title:r.default.node,className:r.default.string,onClick:r.default.func,id:r.default.string},n.defaultProps={prefix:"next-",isExpanded:!1,onClick:l.func.noop},n.isNextPanel=!0;var d,r=a;function c(){var e,n;(0,o.default)(this,c);for(var t=arguments.length,a=Array(t),r=0;r\n com.alibaba.nacos\n nacos-client\n ${version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n *\n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("receive:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"getCSharpCode",value:function(e){return'/*\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n string serverAddr = "http://localhost:8848";\n string dataId = "'.concat(e.dataId,'";\n string group = "').concat(e.group,'";\n\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Config(x =>\n {\n x.ServerAddresses = new List { serverAddr };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.ConfigUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var configSvc = serviceProvider.GetService();\n\n var content = await configSvc.GetConfig(dataId, group, 3000);\n Console.WriteLine(content);\n\n var listener = new ConfigListener();\n\n await configSvc.AddListener(dataId, group, listener);\n\n var isPublishOk = await configSvc.PublishConfig(dataId, group, "content");\n Console.WriteLine(isPublishOk);\n\n await Task.Delay(3000);\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n\n var isRemoveOk = await configSvc.RemoveConfig(dataId, group);\n Console.WriteLine(isRemoveOk);\n await Task.Delay(3000);\n\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n await Task.Delay(300000);\n }\n\n internal class ConfigListener : IListener\n {\n public void ReceiveConfigInfo(string configInfo)\n {\n Console.WriteLine("receive:" + configInfo);\n }\n }\n}\n\n/*\nRefer to document: https://github.com/nacos-group/nacos-sdk-csharp/tree/dev/samples/MsConfigApp\nDemo for ASP.NET Core Integration\nMsConfigApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.Hosting;\nusing Serilog;\nusing Serilog.Events;\n\npublic class Program\n{\n public static void Main(string[] args)\n {\n Log.Logger = new LoggerConfiguration()\n .Enrich.FromLogContext()\n .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)\n .MinimumLevel.Override("System", LogEventLevel.Warning)\n .MinimumLevel.Debug()\n .WriteTo.Console()\n .CreateLogger();\n\n try\n {\n Log.ForContext().Information("Application starting...");\n CreateHostBuilder(args, Log.Logger).Build().Run();\n }\n catch (System.Exception ex)\n {\n Log.ForContext().Fatal(ex, "Application start-up failed!!");\n }\n finally\n {\n Log.CloseAndFlush();\n }\n }\n\n public static IHostBuilder CreateHostBuilder(string[] args, Serilog.ILogger logger) =>\n Host.CreateDefaultBuilder(args)\n .ConfigureAppConfiguration((context, builder) =>\n {\n var c = builder.Build();\n builder.AddNacosV2Configuration(c.GetSection("NacosConfig"), logAction: x => x.AddSerilog(logger));\n })\n .ConfigureWebHostDefaults(webBuilder =>\n {\n webBuilder.UseStartup().UseUrls("http://*:8787");\n })\n .UseSerilog();\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return x.a.createElement("div",null,x.a.createElement(y.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:x.a.createElement("div",null),onClose:this.closeDialog.bind(this)},x.a.createElement("div",{style:{height:500}},x.a.createElement(R.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},x.a.createElement(O.a,{shape:"text",style:{height:40,paddingBottom:10}},x.a.createElement(D,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),x.a.createElement(D,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),x.a.createElement(D,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),x.a.createElement(D,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),x.a.createElement(D,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),x.a.createElement(D,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),x.a.createElement(D,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),x.a.createElement(D,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),x.a.createElement("div",{ref:"codepreview"})))))}}]),n}(x.a.Component)).displayName="ShowCodeing",S=S))||S,S=(t(69),t(40)),S=t.n(S),F=(t(752),S.a.Row),N=S.a.Col,z=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(e){return Object(_.a)(this,n),(e=t.call(this,e)).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},e}return Object(b.a)(n,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale;this.setState({title:(void 0===e?{}:e).confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=x.a.createElement("div",{style:{textAlign:"right"}},x.a.createElement(d.a,{type:"primary",onClick:this.closeDialog.bind(this)},e.determine));return x.a.createElement("div",null,x.a.createElement(y.a,{visible:this.state.visible,footer:t,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:e.deletetitle},x.a.createElement("div",null,x.a.createElement(F,null,x.a.createElement(N,{span:"4",style:{paddingTop:16}},x.a.createElement(m.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),x.a.createElement(N,{span:"20"},x.a.createElement("div",null,x.a.createElement("h3",null,this.state.isok?e.deletedSuccessfully:e.deleteFailed),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":x.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(x.a.Component)).displayName="DeleteDialog",S=S))||S,S=(t(753),t(434)),W=t.n(S),B=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(b.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,t=void 0===t?{}:t,n=e.height,e=e.locale,a=void 0===e?{}:e;return x.a.createElement("div",null,"notice"===t.modeType?x.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},x.a.createElement(W.a,{style:{marginBottom:1\n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.deregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.subscribe("').concat(this.record.name,'", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}')}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n \n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringBootCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n* pom.xml\n \n com.alibaba.boot\n nacos-discovery-spring-boot-starter\n ${latest.version}\n \n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringCloudCode",value:function(e){return"/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml\n \n org.springframework.cloud\n spring-cloud-starter-alibaba-nacos-discovery\n ${latest.version}\n \n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=".concat(this.record.name,'\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosProviderApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(NacosProviderApplication.class, args);\n}\n\n @RestController\n class EchoController {\n @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n public String echo(@PathVariable String string) {\n return "Hello Nacos Discovery " + string;\n }\n }\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=micro-service-oauth2\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"getCSharpCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Naming(x =>\n {\n x.ServerAddresses = new List { "http://localhost:8848/" };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.NamingUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var namingSvc = serviceProvider.GetService();\n\n await namingSvc.RegisterInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n await namingSvc.RegisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(await namingSvc.GetAllInstances("').concat(this.record.name,'")));\n\n await namingSvc.DeregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n var listener = new EventListener();\n\n await namingSvc.Subscribe("').concat(this.record.name,'", listener);\n }\n\n internal class EventListener : IEventListener\n {\n public Task OnEvent(IEvent @event)\n {\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(@event));\n return Task.CompletedTask;\n }\n }\n}\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for ASP.NET Core Integration\nApp.csproj\n\n\n \n\n*/\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/appsettings.json\n* appsettings.json\n{\n "nacos": {\n "ServerAddresses": [ "http://localhost:8848" ],\n "DefaultTimeOut": 15000,\n "Namespace": "cs",\n "ServiceName": "App1",\n "GroupName": "DEFAULT_GROUP",\n "ClusterName": "DEFAULT",\n "Port": 0,\n "Weight": 100,\n "RegisterEnabled": true,\n "InstanceEnabled": true,\n "Ephemeral": true,\n "NamingUseRpc": true,\n "NamingLoadCacheAtStart": ""\n }\n}\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/Startup.cs\nusing Nacos.AspNetCore.V2;\n\npublic class Startup\n{\n public Startup(IConfiguration configuration)\n {\n Configuration = configuration;\n }\n\n public IConfiguration Configuration { get; }\n\n public void ConfigureServices(IServiceCollection services)\n {\n // ....\n services.AddNacosAspNet(Configuration);\n }\n\n public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n {\n // ....\n }\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return O.a.createElement("div",null,O.a.createElement(o.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:O.a.createElement("div",null),onClose:this.closeDialog.bind(this)},O.a.createElement("div",{style:{height:500}},O.a.createElement(h.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},O.a.createElement(m.a,{shape:"text",style:{height:40,paddingBottom:10}},O.a.createElement(g,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),O.a.createElement(g,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),O.a.createElement(g,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),O.a.createElement(g,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),O.a.createElement(g,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),O.a.createElement(g,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),O.a.createElement(g,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),O.a.createElement(g,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),O.a.createElement(g,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),O.a.createElement("div",{ref:"codepreview"})))))}}]),n}(O.a.Component)).displayName="ShowServiceCodeing",f=f))||f,Y=t(51),I=(t(774),t(23)),A=L.a.Item,R=c.a.Row,H=c.a.Col,F=T.a.Column,c=(0,n.a.config)(((f=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return a.queryServiceList()})},a.showcode=function(){setTimeout(function(){return a.queryServiceList()})},a.setNowNameSpace=function(e,t,n){return a.setState({nowNamespaceName:e,nowNamespaceId:t,nowNamespaceDesc:n})},a.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},a.editServiceDialog=O.a.createRef(),a.showcode=O.a.createRef(),a.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:Object(p.a)("serviceNameParam")||"",groupName:Object(p.a)("groupNameParam")||""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},a.field=new i.a(Object(l.a)(a)),a}return Object(a.a)(n,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.search,o=e.withInstances,o=void 0!==o&&o,e=e.hasIpCount,e=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];Object(p.d)({serviceNameParam:r.serviceName,groupNameParam:r.groupName}),this.openLoading(),Object(p.c)({url:"v1/ns/catalog/services?".concat(e.join("&")),success:function(){var e=0o&&v.a.createElement(u.a,{className:"users-pagination",current:i,total:n.totalCount,pageSize:o,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.c)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),v.a.createElement(x.a,{visible:l,username:e,onOk:function(e){return Object(_.k)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0,passwordResetUserVisible:!1})}}))}}]),n}(v.a.Component)).displayName="UserManagement",n=o))||n)||n;t.a=r},function(e,t,n){"use strict";n(67);var a=n(46),l=n.n(a),a=(n(36),n(18)),u=n.n(a),d=n(34),a=(n(66),n(21)),c=n.n(a),a=(n(32),n(19)),f=n.n(a),a=(n(92),n(54)),p=n.n(a),a=(n(38),n(3)),h=n.n(a),a=(n(37),n(10)),m=n.n(a),i=n(13),s=n(14),g=n(22),y=n(16),v=n(15),a=(n(27),n(8)),a=n.n(a),r=n(0),_=n.n(r),r=n(33),b=n(45),o=n(85),w=n(52),M=(n(49),n(28)),k=n.n(M),M=(n(59),n(29)),S=n.n(M),E=h.a.Item,x=S.a.Option,C={labelCol:{fixedSpan:4},wrapperCol:{span:19}},T=Object(r.b)(function(e){return{namespaces:e.namespace.namespaces}},{getNamespaces:o.b,searchRoles:b.l})(M=(0,a.a.config)(((M=function(e){Object(y.a)(o,e);var r=Object(v.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ai&&_.a.createElement(l.a,{className:"users-pagination",current:s,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),_.a.createElement(T,{visible:n,onOk:function(e){return Object(b.a)(e).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})},onCancel:function(){return a.colseCreatePermission()}}))}}]),n}(_.a.Component)).displayName="PermissionsManagement",n=M))||n)||n);t.a=r},function(e,t,n){"use strict";n(67);var a=n(46),l=n.n(a),a=(n(36),n(18)),u=n.n(a),a=(n(66),n(21)),d=n.n(a),a=(n(32),n(19)),c=n.n(a),a=(n(92),n(54)),f=n.n(a),a=(n(38),n(3)),p=n.n(a),a=(n(37),n(10)),h=n.n(a),i=n(13),s=n(14),m=n(22),g=n(16),y=n(15),a=(n(27),n(8)),a=n.n(a),r=n(0),v=n.n(r),r=n(33),_=n(45),b=n(52),o=(n(59),n(29)),w=n.n(o),o=(n(49),n(28)),M=n.n(o),k=p.a.Item,S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=Object(r.b)(function(e){return{users:e.authority.users}},{searchUsers:_.m})(o=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ao&&v.a.createElement(l.a,{className:"users-pagination",current:i,total:t.totalCount,pageSize:o,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.b)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}]),n}(v.a.Component)).displayName="RolesManagement",n=o))||n)||n);t.a=r},function(e,t,n){"use strict";n(36);function l(e){var t=void 0===(t=localStorage.token)?"{}":t,t=(Object(_.c)(t)&&JSON.parse(t)||{}).globalAdmin,n=[];return"naming"===e?n.push(b):"config"===e?n.push(w):n.push(w,b),t&&n.push(M),n.push(k),n.push(S),n.push(E),n.filter(function(e){return e})}var a=n(18),u=n.n(a),a=(n(48),n(25)),d=n.n(a),a=(n(43),n(26)),c=n.n(a),r=n(13),o=n(14),i=n(16),s=n(15),a=(n(27),n(8)),a=n.n(a),f=n(20),p=(n(83),n(50)),h=n.n(p),p=n(0),m=n.n(p),p=n(39),g=n(33),y=n(141),v=n(60),_=n(47),b={key:"serviceManagementVirtual",children:[{key:"serviceManagement",url:"/serviceManagement"},{key:"subscriberList",url:"/subscriberList"}]},w={key:"configurationManagementVirtual",children:[{key:"configurationManagement",url:"/configurationManagement"},{key:"historyRollback",url:"/historyRollback"},{key:"listeningToQuery",url:"/listeningToQuery"}]},M={key:"authorityControl",children:[{key:"userList",url:"/userManagement"},{key:"roleManagement",url:"/rolesManagement"},{key:"privilegeManagement",url:"/permissionsManagement"}]},k={key:"namespace",url:"/namespace"},S={key:"clusterManagementVirtual",children:[{key:"clusterManagement",url:"/clusterManagement"}]},E={key:"settingCenter",url:"/settingCenter"},x=(n(384),h.a.SubMenu),C=h.a.Item,p=(n=Object(g.b)(function(e){return Object(f.a)(Object(f.a)({},e.locale),e.base)},{getState:v.d,getNotice:v.c,getGuide:v.b}),g=a.a.config,Object(p.g)(a=n(a=g(((v=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){return Object(r.a)(this,n),(e=t.call(this,e)).state={visible:!0},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.props.getState(),this.props.getNotice(),this.props.getGuide()}},{key:"goBack",value:function(){this.props.history.goBack()}},{key:"navTo",value:function(e){var t=this.props.location.search,t=new URLSearchParams(t);t.set("namespace",window.nownamespace),t.set("namespaceShowName",window.namespaceShowName),this.props.history.push([e,"?",t.toString()].join(""))}},{key:"isCurrentPath",value:function(e){return e===this.props.location.pathname?"current-path next-selected":void 0}},{key:"defaultOpenKeys",value:function(){for(var t=this,e=l(this.props.functionMode),n=0,a=e.length;nthis.state.pageSize&&S.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},S.a.createElement(v.a,{current:this.state.pageNo,total:a,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}]),n}(S.a.Component)).displayName="SubscriberList",c=n))||c)||c;t.a=f},function(e,t,n){"use strict";n(53);var a=n(35),d=n.n(a),a=(n(67),n(46)),c=n.n(a),a=(n(180),n(77)),f=n.n(a),a=(n(37),n(10)),p=n.n(a),a=(n(32),n(19)),h=n.n(a),a=(n(36),n(18)),r=n.n(a),a=(n(48),n(25)),o=n.n(a),a=(n(49),n(28)),i=n.n(a),s=n(13),l=n(14),u=n(22),m=n(16),g=n(15),a=(n(27),n(8)),a=n.n(a),y=(n(419),n(122)),v=n.n(y),y=(n(66),n(21)),_=n.n(y),y=(n(69),n(40)),y=n.n(y),b=(n(38),n(3)),w=n.n(b),b=n(0),M=n.n(b),k=n(1),b=n(143),S=n.n(b),E=n(51),x=(n(777),w.a.Item),C=y.a.Row,T=y.a.Col,L=_.a.Column,O=v.a.Panel,y=(0,a.a.config)(((b=function(e){Object(m.a)(a,e);var t=Object(g.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return n.queryClusterStateList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:(e.voteFor,"")}},n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new i.a(Object(u.a)(n)),n}return Object(l.a)(a,[{key:"componentDidMount",value:function(){this.getQueryLater()}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"queryClusterStateList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.keyword,e=e.withInstances,e=["withInstances=".concat(void 0!==e&&e),"pageNo=".concat(t),"pageSize=".concat(a),"keyword=".concat(r)];Object(k.c)({url:"v1/core/cluster/nodes?".concat(e.join("&")),beforeSend:function(){return n.openLoading()},success:function(){var e=0this.state.pageSize&&M.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},M.a.createElement(c.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return t.setState({currentPage:e},function(){return t.queryClusterStateList()})}}))))}}]),a}(M.a.Component)).displayName="ClusterNodeList",n=b))||n;t.a=y},function(e,t,n){"use strict";n(32);var a=n(19),r=n.n(a),o=n(13),i=n(14),s=n(16),l=n(15),a=(n(27),n(8)),a=n.n(a),u=n(20),d=(n(113),n(74)),d=n.n(d),c=n(0),f=n.n(c),p=(n(780),n(51)),c=n(86),h=n(146),m=n(33),g=n(23),y=d.a.Group,m=Object(m.b)(function(e){return Object(u.a)({},e.locale)},{changeLanguage:c.a,changeTheme:h.a})(d=(0,a.a.config)(((n=function(e){Object(s.a)(a,e);var n=Object(l.a)(a);function a(e){Object(o.a)(this,a),e=n.call(this,e);var t=localStorage.getItem(g.o);return e.state={theme:"dark"===t?"dark":"light",language:localStorage.getItem(g.g)},e}return Object(i.a)(a,[{key:"newTheme",value:function(e){this.setState({theme:e})}},{key:"newLanguage",value:function(e){this.setState({language:e})}},{key:"submit",value:function(){var e=this.props,t=e.changeLanguage,e=e.changeTheme,n=this.state.language,a=this.state.theme;t(n),e(a)}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=[{value:"light",label:e.settingLight},{value:"dark",label:e.settingDark}];return f.a.createElement(f.a.Fragment,null,f.a.createElement(p.a,{title:e.settingTitle}),f.a.createElement("div",{className:"setting-box"},f.a.createElement("div",{className:"text-box"},f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingTheme),f.a.createElement(y,{dataSource:t,value:this.state.theme,onChange:this.newTheme.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingLocale),f.a.createElement(y,{dataSource:[{value:"en-US",label:"English"},{value:"zh-CN",label:"中文"}],value:this.state.language,onChange:this.newLanguage.bind(this)}))),f.a.createElement(r.a,{type:"primary",onClick:this.submit.bind(this)},e.settingSubmit)))}}]),a}(f.a.Component)).displayName="SettingCenter",d=n))||d)||d;t.a=m},function(e,t,B){"use strict";B.r(t),function(e){B(53);var t=B(35),a=B.n(t),t=(B(27),B(8)),r=B.n(t),o=B(13),i=B(14),s=B(16),l=B(15),n=B(20),t=B(0),u=B.n(t),t=B(24),t=B.n(t),d=B(124),c=B(427),f=B(438),p=B(33),h=B(39),m=B(84),g=(B(474),B(447)),y=B(23),v=B(448),_=B(441),b=B(449),w=B(450),M=B(442),k=B(451),S=B(452),E=B(453),x=B(454),C=B(455),T=B(439),L=B(443),O=B(440),D=B(456),N=B(457),P=B(444),j=B(445),I=B(446),A=B(436),R=B(458),Y=B(437),H=B(86),F=B(60),z=B(146),e=(B(781),e.hot,localStorage.getItem(y.g)||localStorage.setItem(y.g,"zh-CN"===navigator.language?"zh-CN":"en-US"),Object(d.b)(Object(n.a)(Object(n.a)({},Y.a),{},{routing:c.routerReducer}))),Y=Object(d.d)(e,Object(d.c)(Object(d.a)(f.a),window[y.k]?window[y.k]():function(e){return e})),W=[{path:"/",exact:!0,render:function(){return u.a.createElement(h.a,{to:"/welcome"})}},{path:"/welcome",component:A.a},{path:"/namespace",component:_.a},{path:"/newconfig",component:b.a},{path:"/configsync",component:w.a},{path:"/configdetail",component:M.a},{path:"/configeditor",component:k.a},{path:"/historyDetail",component:S.a},{path:"/configRollback",component:E.a},{path:"/historyRollback",component:x.a},{path:"/listeningToQuery",component:C.a},{path:"/configurationManagement",component:T.a},{path:"/serviceManagement",component:L.a},{path:"/serviceDetail",component:O.a},{path:"/subscriberList",component:D.a},{path:"/clusterManagement",component:N.a},{path:"/userManagement",component:P.a},{path:"/rolesManagement",component:I.a},{path:"/permissionsManagement",component:j.a},{path:"/settingCenter",component:R.a}],e=Object(p.b)(function(e){return Object(n.a)(Object(n.a)({},e.locale),e.base)},{changeLanguage:H.a,getState:F.d,changeTheme:z.a})(c=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){return Object(o.a)(this,n),(e=t.call(this,e)).state={shownotice:"none",noticecontent:"",nacosLoading:{}},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.props.getState();var e=localStorage.getItem(y.g),t=localStorage.getItem(y.o);this.props.changeLanguage(e),this.props.changeTheme(t)}},{key:"router",get:function(){var e=this.props,t=e.loginPageEnabled,e=e.consoleUiEnable;return u.a.createElement(m.a,null,u.a.createElement(h.d,null,t&&"false"===t?null:u.a.createElement(h.b,{path:"/login",component:v.a}),u.a.createElement(g.a,null,e&&"true"===e&&W.map(function(e){return u.a.createElement(h.b,Object.assign({key:e.path},e))}))))}},{key:"render",value:function(){var e=this.props,t=e.locale,e=e.loginPageEnabled;return u.a.createElement(a.a,Object.assign({className:"nacos-loading",shape:"flower",tip:"loading...",visible:!e,fullScreen:!0},this.state.nacosLoading),u.a.createElement(r.a,{locale:t},this.router))}}]),n}(u.a.Component))||c;t.a.render(u.a.createElement(p.a,{store:Y},u.a.createElement(e,null)),document.getElementById("root"))}.call(this,B(460)(e))},function(e,t){e.exports=function(e){var t;return e.webpackPolyfill||((t=Object.create(e)).children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(I,e,t){"use strict"; /** @license React v16.14.0 * react.production.min.js * @@ -335,6 +335,6 @@ var S=P(693),o=P(694),s=P(695);function n(){return c.TYPED_ARRAY_SUPPORT?2147483 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var a=60103,r=60106,o=60107,i=60108,s=60114,l=60109,u=60110,d=60112,c=60113,f=60120,p=60115,h=60116,m=60121,g=60122,y=60117,v=60129,_=60131;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case o:case s:case i:case c:case f:return e;default:switch(e=e&&e.$$typeof){case u:case d:case h:case p:case l:return e;default:return t}}case r:return t}}}"function"==typeof Symbol&&Symbol.for&&(a=(w=Symbol.for)("react.element"),r=w("react.portal"),o=w("react.fragment"),i=w("react.strict_mode"),s=w("react.profiler"),l=w("react.provider"),u=w("react.context"),d=w("react.forward_ref"),c=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),h=w("react.lazy"),m=w("react.block"),g=w("react.server.block"),y=w("react.fundamental"),v=w("react.debug_trace_mode"),_=w("react.legacy_hidden"));var w=l,M=a,k=d,S=o,E=h,x=p,C=r,T=s,L=i,O=c;t.ContextConsumer=u,t.ContextProvider=w,t.Element=M,t.ForwardRef=k,t.Fragment=S,t.Lazy=E,t.Memo=x,t.Portal=C,t.Profiler=T,t.StrictMode=L,t.Suspense=O,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return b(e)===u},t.isContextProvider=function(e){return b(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return b(e)===d},t.isFragment=function(e){return b(e)===o},t.isLazy=function(e){return b(e)===h},t.isMemo=function(e){return b(e)===p},t.isPortal=function(e){return b(e)===r},t.isProfiler=function(e){return b(e)===s},t.isStrictMode=function(e){return b(e)===i},t.isSuspense=function(e){return b(e)===c},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===v||e===i||e===c||e===f||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===y||e.$$typeof===m||e[0]===g)},t.typeOf=b},function(e,t,n){"use strict";var a,r=n(1);window.edasprefix="acm",window.globalConfig={isParentEdas:function(){return window.parent&&-1!==window.parent.location.host.indexOf("edas")}},r.c.middleWare(function(){var e=0=e.length?{value:void 0,done:!0}:(e=a(e,t),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var o=n(150),i=n(149);e.exports=function(r){return function(e,t){var n,e=String(i(e)),t=o(t),a=e.length;return t<0||a<=t?r?"":void 0:(n=e.charCodeAt(t))<55296||56319=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),o.Arguments=o.Array,a("keys"),a("values"),a("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(497),__esModule:!0}},function(e,t,n){n(498),n(503),n(504),n(505),e.exports=n(80).Symbol},function(I,A,e){"use strict";function a(e){var t=T[e]=_(M[E]);return t._k=e,t}function n(e,t){m(e);for(var n,a=B(t=g(t)),r=0,o=a.length;rr;)l(T,t=n[r++])||t==x||t==H||a.push(t);return a}function i(e){for(var t,n=e===O,a=X(n?L:g(e)),r=[],o=0;a.length>o;)!l(T,t=a[o++])||n&&!l(O,t)||r.push(T[t]);return r}var s=e(79),l=e(89),u=e(81),d=e(95),R=e(209),H=e(499).KEY,c=e(112),f=e(152),p=e(158),F=e(128),h=e(99),z=e(159),W=e(160),B=e(500),U=e(501),m=e(111),V=e(97),K=e(155),g=e(98),y=e(148),v=e(125),_=e(157),q=e(502),G=e(211),b=e(154),$=e(88),J=e(126),Q=G.f,w=$.f,X=q.f,M=s.Symbol,k=s.JSON,S=k&&k.stringify,E="prototype",x=h("_hidden"),Z=h("toPrimitive"),ee={}.propertyIsEnumerable,C=f("symbol-registry"),T=f("symbols"),L=f("op-symbols"),O=Object[E],f="function"==typeof M&&!!b.f,D=s.QObject,N=!D||!D[E]||!D[E].findChild,P=u&&c(function(){return 7!=_(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(e,t,n){var a=Q(O,t);a&&delete O[t],w(e,t,n),a&&e!==O&&w(O,t,a)}:w,j=f&&"symbol"==typeof M.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof M},Y=function(e,t,n){return e===O&&Y(L,t,n),m(e),t=y(t,!0),m(n),(l(T,t)?(n.enumerable?(l(e,x)&&e[x][t]&&(e[x][t]=!1),n=_(n,{enumerable:v(0,!1)})):(l(e,x)||w(e,x,v(1,{})),e[x][t]=!0),P):w)(e,t,n)};f||(R((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=F(0ne;)h(te[ne++]);for(var ae=J(h.store),re=0;ae.length>re;)W(ae[re++]);d(d.S+d.F*!f,"Symbol",{for:function(e){return l(C,e+="")?C[e]:C[e]=M(e)},keyFor:function(e){if(!j(e))throw TypeError(e+" is not a symbol!");for(var t in C)if(C[t]===e)return t},useSetter:function(){N=!0},useSimple:function(){N=!1}}),d(d.S+d.F*!f,"Object",{create:function(e,t){return void 0===t?_(e):n(_(e),t)},defineProperty:Y,defineProperties:n,getOwnPropertyDescriptor:r,getOwnPropertyNames:o,getOwnPropertySymbols:i});D=c(function(){b.f(1)});d(d.S+d.F*D,"Object",{getOwnPropertySymbols:function(e){return b.f(K(e))}}),k&&d(d.S+d.F*(!f||c(function(){var e=M();return"[null]"!=S([e])||"{}"!=S({a:e})||"{}"!=S(Object(e))})),"JSON",{stringify:function(e){for(var t,n,a=[e],r=1;ri;)o.call(e,a=r[i++])&&t.push(a);return t}},function(e,t,n){var a=n(207);e.exports=Array.isArray||function(e){return"Array"==a(e)}},function(e,t,n){var a=n(98),r=n(210).f,o={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){if(!i||"[object Window]"!=o.call(e))return r(a(e));try{return r(e)}catch(e){return i.slice()}}},function(e,t){},function(e,t,n){n(160)("asyncIterator")},function(e,t,n){n(160)("observable")},function(e,t,n){e.exports={default:n(507),__esModule:!0}},function(e,t,n){n(508),e.exports=n(80).Object.setPrototypeOf},function(e,t,n){var a=n(95);a(a.S,"Object",{setPrototypeOf:n(509).set})},function(e,t,r){function o(e,t){if(a(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")}var n=r(97),a=r(111);e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,a){try{(a=r(202)(Function.call,r(211).f(Object.prototype,"__proto__").set,2))(e,[]),n=!(e instanceof Array)}catch(e){n=!0}return function(e,t){return o(e,t),n?e.__proto__=t:a(e,t),e}}({},!1):void 0),check:o}},function(e,t,n){e.exports={default:n(511),__esModule:!0}},function(e,t,n){n(512);var a=n(80).Object;e.exports=function(e,t){return a.create(e,t)}},function(e,t,n){var a=n(95);a(a.S,"Object",{create:n(157)})},function(e,t,n){"use strict";var i=n(514);function a(){}function r(){}r.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,r,o){if(o!==i)throw(o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",o}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:a};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function l(e,t,n,a){e.removeEventListener&&e.removeEventListener(t,n,a||!1)}function a(e,t,n,a){return e.addEventListener&&e.addEventListener(t,n,a||!1),{off:function(){return l(e,t,n,a)}}}t.__esModule=!0,t.on=a,t.once=function(r,o,i,s){return a(r,o,function e(){for(var t=arguments.length,n=Array(t),a=0;a68?1900:2e3)},r=function(t){return function(e){this[t]=+e}},o=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],i=function(e){var t=h[e];return t&&(t.indexOf?t:t.s.concat(t.f))},s=function(e,t){var n,a=h.meridiem;if(a){for(var r=1;r<=24;r+=1)if(e.indexOf(a(r,0,t))>-1){n=r>12;break}}else n=e===(t?"pm":"PM");return n},f={A:[n,function(e){this.afternoon=s(e,!1)}],a:[n,function(e){this.afternoon=s(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[e,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[t,r("seconds")],ss:[t,r("seconds")],m:[t,r("minutes")],mm:[t,r("minutes")],H:[t,r("hours")],h:[t,r("hours")],HH:[t,r("hours")],hh:[t,r("hours")],D:[t,r("day")],DD:[e,r("day")],Do:[n,function(e){var t=h.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var a=1;a<=31;a+=1)t(a).replace(/\[|\]/g,"")===e&&(this.day=a)}],M:[t,r("month")],MM:[e,r("month")],MMM:[n,function(e){var t=i("months"),n=(i("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[n,function(e){var t=i("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,r("year")],YY:[e,function(e){this.year=a(e)}],YYYY:[/\d{4}/,r("year")],Z:o,ZZ:o};function b(e){var t,r;t=e,r=h&&h.formats;for(var u=(e=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,n){var a=n&&n.toUpperCase();return t||r[n]||l[n]||r[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})).match(c),d=u.length,n=0;n-1)return new Date(("X"===t?1e3:1)*e);var a=b(t)(e),r=a.year,o=a.month,i=a.day,s=a.hours,l=a.minutes,u=a.seconds,d=a.milliseconds,c=a.zone,f=new Date,p=i||(r||o?1:f.getDate()),h=r||f.getFullYear(),m=0;r&&!o||(m=o>0?o-1:f.getMonth());var g=s||0,y=l||0,v=u||0,_=d||0;return c?new Date(Date.UTC(h,m,p,g,y,v,_+60*c.offset*1e3)):n?new Date(Date.UTC(h,m,p,g,y,v,_)):new Date(h,m,p,g,y,v,_)}catch(e){return new Date("")}}(t,r,n),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),s&&t!=this.format(r)&&(this.$d=new Date("")),h={}}else if(r instanceof Array)for(var u=r.length,d=1;d<=u;d+=1){a[1]=r[d-1];var c=f.apply(this,a);if(c.isValid()){this.$d=c.$d,this.$L=c.$L,this.init();break}d===u&&(this.$d=new Date(""))}else p.call(this,e)}}}()},function(e,t,n){e.exports=function(){"use strict";return function(e,t,a){a.updateLocale=function(e,t){var n=a.Ls[e];if(n)return(t?Object.keys(t):[]).forEach(function(e){n[e]=t[e]}),n}}}()},function(e,t,n){e.exports=function(e,t,n){function a(e,t,n,a,r){var o,e=e.name?e:e.$locale(),t=s(e[t]),n=s(e[n]),i=t||n.map(function(e){return e.slice(0,a)});return r?(o=e.weekStart,i.map(function(e,t){return i[(t+(o||0))%7]})):i}function r(){return n.Ls[n.locale()]}function o(e,t){return e.formats[t]||e.formats[t.toUpperCase()].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}var t=t.prototype,s=function(e){return e&&(e.indexOf?e:e.s)};t.localeData=function(){return function(){var t=this;return{months:function(e){return e?e.format("MMMM"):a(t,"months")},monthsShort:function(e){return e?e.format("MMM"):a(t,"monthsShort","months",3)},firstDayOfWeek:function(){return t.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):a(t,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):a(t,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):a(t,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return o(t.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}}.bind(this)()},n.localeData=function(){var t=r();return{firstDayOfWeek:function(){return t.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(e){return o(t,e)},meridiem:t.meridiem,ordinal:t.ordinal}},n.months=function(){return a(r(),"months")},n.monthsShort=function(){return a(r(),"monthsShort","months",3)},n.weekdays=function(e){return a(r(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return a(r(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return a(r(),"weekdaysMin","weekdays",2,e)}}},function(e,t,n){e.exports=function(){"use strict";var i="month",s="quarter";return function(e,t){var n=t.prototype;n.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var a=n.add;n.add=function(e,t){return e=Number(e),this.$utils().p(t)===s?this.add(3*e,i):a.bind(this)(e,t)};var o=n.startOf;n.startOf=function(e,t){var n=this.$utils(),a=!!n.u(t)||t;if(n.p(e)===s){var r=this.quarter()-1;return a?this.month(3*r).startOf(i).startOf("day"):this.month(3*r+2).endOf(i).endOf("day")}return o.bind(this)(e,t)}}}()},function(e,t,n){e.exports=function(){"use strict";return function(e,t){var n=t.prototype,o=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return o.bind(this)(e);var a=this.$utils(),r=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return n.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return n.ordinal(t.week(),"W");case"w":case"ww":return a.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return a.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return a.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}});return o.bind(this)(r)}}}()},function(e,t,n){e.exports=function(){"use strict";var s="week",l="year";return function(e,t,i){var n=t.prototype;n.week=function(e){if(void 0===e&&(e=null),null!==e)return this.add(7*(e-this.week()),"day");var t=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var n=i(this).startOf(l).add(1,l).date(t),a=i(this).endOf(s);if(n.isBefore(a))return 1}var r=i(this).startOf(l).date(t).startOf(s).subtract(1,"millisecond"),o=this.diff(r,s,!0);return o<0?i(this).startOf("week").week():Math.ceil(o)},n.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),a={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1100?"上午":n<1300?"中午":n<1800?"下午":"晚上"}};return n.default.locale(a,null,!0),a}(n(217))},function(e,t,n){"use strict";t.__esModule=!0,t.flex=t.transition=t.animation=void 0;var r=n(213),o=n(100);function a(e){var n,a;return!!r.hasDOM&&(n=document.createElement("div"),(a=!1,o.each)(e,function(e,t){if(void 0!==n.style[t])return!(a={end:e})}),a)}var i,s;t.animation=a({WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd",animation:"animationend"}),t.transition=a({WebkitTransition:"webkitTransitionEnd",OTransition:"oTransitionEnd",transition:"transitionend"}),t.flex=(n={display:["flex","-webkit-flex","-moz-flex","-ms-flexbox"]},!!r.hasDOM&&(i=document.createElement("div"),(s=!1,o.each)(n,function(e,t){return(0,o.each)(e,function(e){try{i.style[t]=e,s=s||i.style[t]===e}catch(e){}return!s}),!s}),s))},function(e,t,n){"use strict";t.__esModule=!0,t.getFocusNodeList=i,t.saveLastFocusNode=function(){s=document.activeElement},t.clearLastFocusNode=function(){s=null},t.backLastFocusNode=function(){if(s)try{s.focus()}catch(e){}},t.limitTabRange=function(e,t){{var n,a;t.keyCode===r.default.TAB&&(e=i(e),n=e.length-1,-1<(a=e.indexOf(document.activeElement)))&&(a=a+(t.shiftKey?-1:1),e[a=n<(a=a<0?n:a)?0:a].focus(),t.preventDefault())}};var t=n(218),r=(t=t)&&t.__esModule?t:{default:t},a=n(100);function o(e){var t=e.nodeName.toLowerCase(),n=parseInt(e.getAttribute("tabindex"),10),n=!isNaN(n)&&-1a.height)&&(r[1]=-t.top-("t"===e?t.height:0)),r},this._getParentScrollOffset=function(e){var t=0,n=0;return e&&e.offsetParent&&e.offsetParent!==document.body&&(isNaN(e.offsetParent.scrollTop)||(t+=e.offsetParent.scrollTop),isNaN(e.offsetParent.scrollLeft)||(n+=e.offsetParent.scrollLeft)),{top:t,left:n}}};var p=a;function h(e){(0,o.default)(this,h),r.call(this),this.pinElement=e.pinElement,this.baseElement=e.baseElement,this.pinFollowBaseElementWhenFixed=e.pinFollowBaseElementWhenFixed,this.container=function(e){var t=e.container,e=e.baseElement;if("undefined"==typeof document)return t;for(var n=(n=(0,i.default)(t,e))||document.body;"static"===y.dom.getStyle(n,"position");){if(!n||n===document.body)return document.body;n=n.parentNode}return n}(e),this.autoFit=e.autoFit||!1,this.align=e.align||"tl tl",this.offset=e.offset||[0,0],this.needAdjust=e.needAdjust||!1,this.isRtl=e.isRtl||!1}t.default=p,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var w=a(n(2)),M=a(n(12)),k=n(0),S=a(k),E=a(n(17)),x=a(n(194)),C=a(n(82)),T=n(11);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t,n,a,r,o,i,s,l,u,d,c,f,p,h,m,g,y,v,_,b;return k.useState&&k.useRef&&k.useEffect?(t=void 0===(t=e.prefix)?"next-":t,r=e.animation,n=void 0===r?{in:"expandInDown",out:"expandOutUp"}:r,a=e.visible,r=e.hasMask,o=e.align,o=void 0===(s=e.points)?o?o.split(" "):void 0:s,i=e.onPosition,s=e.children,b=e.className,l=e.style,u=e.wrapperClassName,d=e.beforeOpen,c=e.onOpen,f=e.afterOpen,p=e.beforeClose,h=e.onClose,m=e.afterClose,e=(0,M.default)(e,["prefix","animation","visible","hasMask","align","points","onPosition","children","className","style","wrapperClassName","beforeOpen","onOpen","afterOpen","beforeClose","onClose","afterClose"]),g=(_=(0,k.useState)(!0))[0],y=_[1],v=(0,k.useRef)(null),_=S.default.createElement(C.default.OverlayAnimate,{visible:a,animation:n,onEnter:function(){y(!1),"function"==typeof d&&d(v.current)},onEntering:function(){"function"==typeof c&&c(v.current)},onEntered:function(){"function"==typeof f&&f(v.current)},onExit:function(){"function"==typeof p&&p(v.current)},onExiting:function(){"function"==typeof h&&h(v.current)},onExited:function(){y(!0),"function"==typeof m&&m(v.current)},timeout:300,style:l},s?(0,k.cloneElement)(s,{className:(0,E.default)([t+"overlay-inner",b,s&&s.props&&s.props.className])}):S.default.createElement("span",null)),b=(0,E.default)(((l={})[t+"overlay-wrapper v2"]=!0,l[u]=u,l.opened=a,l)),S.default.createElement(x.default,(0,w.default)({},e,{visible:a,isAnimationEnd:g,hasMask:r,wrapperClassName:b,maskClassName:t+"overlay-backdrop",maskRender:function(e){return S.default.createElement(C.default.OverlayAnimate,{visible:a,animation:!!n&&{in:"fadeIn",out:"fadeOut"},timeout:300,unmountOnExit:!0},e)},points:o,onPosition:function(e){(0,w.default)(e,{align:e.config.points}),"function"==typeof i&&i(e)},ref:v}),_)):(T.log.warning("need react version > 16.8.0"),null)},e.exports=t.default},function(n,e){function a(e,t){return n.exports=a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n.exports.__esModule=!0,n.exports.default=n.exports,a(e,t)}n.exports=a,n.exports.__esModule=!0,n.exports.default=n.exports},function(e,t,n){"use strict";t.__esModule=!0;var a,d=g(n(12)),c=g(n(2)),r=g(n(4)),o=g(n(6)),i=g(n(7)),l=n(0),f=g(l),p=n(24),s=n(30),u=g(n(5)),h=n(11),m=g(n(360));function g(e){return e&&e.__esModule?e:{default:e}}var y,n=h.func.noop,v=h.func.makeChain,_=h.func.bindCtx,u=(y=l.Component,(0,i.default)(b,y),b.getDerivedStateFromProps=function(e,t){return"visible"in e?(0,c.default)({},t,{visible:e.visible}):null},b.prototype.componentWillUnmount=function(){var t=this;["_timer","_hideTimer","_showTimer"].forEach(function(e){t[e]&&clearTimeout(t[e])})},b.prototype.handleVisibleChange=function(e,t,n){"visible"in this.props||this.setState({visible:e}),this.props.onVisibleChange(e,t,n)},b.prototype.handleTriggerClick=function(e){this.state.visible&&!this.props.canCloseByTrigger||this.handleVisibleChange(!this.state.visible,"fromTrigger",e)},b.prototype.handleTriggerKeyDown=function(e){var t=this.props.triggerClickKeycode;(Array.isArray(t)?t:[t]).includes(e.keyCode)&&(e.preventDefault(),this.handleTriggerClick(e))},b.prototype.handleTriggerMouseEnter=function(e){var t=this;this._mouseNotFirstOnMask=!1,this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=null),this._showTimer&&(clearTimeout(this._showTimer),this._showTimer=null),this.state.visible||(this._showTimer=setTimeout(function(){t.handleVisibleChange(!0,"fromTrigger",e)},this.props.delay))},b.prototype.handleTriggerMouseLeave=function(e,t){var n=this;this._showTimer&&(clearTimeout(this._showTimer),this._showTimer=null),this.state.visible&&(this._hideTimer=setTimeout(function(){n.handleVisibleChange(!1,t||"fromTrigger",e)},this.props.delay))},b.prototype.handleTriggerFocus=function(e){this.handleVisibleChange(!0,"fromTrigger",e)},b.prototype.handleTriggerBlur=function(e){this._isForwardContent||this.handleVisibleChange(!1,"fromTrigger",e),this._isForwardContent=!1},b.prototype.handleContentMouseDown=function(){this._isForwardContent=!0},b.prototype.handleContentMouseEnter=function(){clearTimeout(this._hideTimer)},b.prototype.handleContentMouseLeave=function(e){this.handleTriggerMouseLeave(e,"fromContent")},b.prototype.handleMaskMouseEnter=function(){this._mouseNotFirstOnMask||(clearTimeout(this._hideTimer),this._hideTimer=null,this._mouseNotFirstOnMask=!1)},b.prototype.handleMaskMouseLeave=function(){this._mouseNotFirstOnMask=!0},b.prototype.handleRequestClose=function(e,t){this.handleVisibleChange(!1,e,t)},b.prototype.renderTrigger=function(){var e,t,n,a,r,o,i,s=this,l=this.props,u=l.trigger,l=l.disabled,d={key:"trigger","aria-haspopup":!0,"aria-expanded":this.state.visible};return this.state.visible||(d["aria-describedby"]=void 0),l||(l=this.props.triggerType,l=Array.isArray(l)?l:[l],e=u&&u.props||{},t=e.onClick,n=e.onKeyDown,a=e.onMouseEnter,r=e.onMouseLeave,o=e.onFocus,i=e.onBlur,l.forEach(function(e){switch(e){case"click":d.onClick=v(s.handleTriggerClick,t),d.onKeyDown=v(s.handleTriggerKeyDown,n);break;case"hover":d.onMouseEnter=v(s.handleTriggerMouseEnter,a),d.onMouseLeave=v(s.handleTriggerMouseLeave,r);break;case"focus":d.onFocus=v(s.handleTriggerFocus,o),d.onBlur=v(s.handleTriggerBlur,i)}})),u&&f.default.cloneElement(u,d)},b.prototype.renderContent=function(){var t=this,e=this.props,n=e.children,e=e.triggerType,e=Array.isArray(e)?e:[e],n=l.Children.only(n),a=n.props,r=a.onMouseDown,o=a.onMouseEnter,i=a.onMouseLeave,s={key:"portal"};return e.forEach(function(e){switch(e){case"focus":s.onMouseDown=v(t.handleContentMouseDown,r);break;case"hover":s.onMouseEnter=v(t.handleContentMouseEnter,o),s.onMouseLeave=v(t.handleContentMouseLeave,i)}}),f.default.cloneElement(n,s)},b.prototype.renderPortal=function(){function e(){return(0,p.findDOMNode)(t)}var t=this,n=this.props,a=n.target,r=n.safeNode,o=n.followTrigger,i=n.triggerType,s=n.hasMask,l=n.wrapperStyle,n=(0,d.default)(n,["target","safeNode","followTrigger","triggerType","hasMask","wrapperStyle"]),u=this.props.container,r=Array.isArray(r)?[].concat(r):[r],l=(r.unshift(e),l||{});return o&&(u=function(e){return e&&e.parentNode||e},l.position="relative"),"hover"===i&&s&&(n.onMaskMouseEnter=this.handleMaskMouseEnter,n.onMaskMouseLeave=this.handleMaskMouseLeave),f.default.createElement(m.default,(0,c.default)({},n,{key:"overlay",ref:function(e){return t.overlay=e},visible:this.state.visible,target:a||e,container:u,safeNode:r,wrapperStyle:l,triggerType:i,hasMask:s,onRequestClose:this.handleRequestClose}),this.props.children&&this.renderContent())},b.prototype.render=function(){return[this.renderTrigger(),this.renderPortal()]},a=i=b,i.propTypes={children:u.default.node,trigger:u.default.element,triggerType:u.default.oneOfType([u.default.string,u.default.array]),triggerClickKeycode:u.default.oneOfType([u.default.number,u.default.array]),visible:u.default.bool,defaultVisible:u.default.bool,onVisibleChange:u.default.func,disabled:u.default.bool,autoFit:u.default.bool,delay:u.default.number,canCloseByTrigger:u.default.bool,target:u.default.any,safeNode:u.default.any,followTrigger:u.default.bool,container:u.default.any,hasMask:u.default.bool,wrapperStyle:u.default.object,rtl:u.default.bool,v2:u.default.bool,placement:u.default.string,placementOffset:u.default.number,autoAdjust:u.default.bool},i.defaultProps={triggerType:"hover",triggerClickKeycode:[h.KEYCODE.SPACE,h.KEYCODE.ENTER],defaultVisible:!1,onVisibleChange:n,disabled:!1,autoFit:!1,delay:200,canCloseByTrigger:!0,followTrigger:!1,container:function(){return document.body},rtl:!1},a);function b(e){(0,r.default)(this,b);var t=(0,o.default)(this,y.call(this,e));return t.state={visible:void 0===e.visible?e.defaultVisible:e.visible},_(t,["handleTriggerClick","handleTriggerKeyDown","handleTriggerMouseEnter","handleTriggerMouseLeave","handleTriggerFocus","handleTriggerBlur","handleContentMouseEnter","handleContentMouseLeave","handleContentMouseDown","handleRequestClose","handleMaskMouseEnter","handleMaskMouseLeave"]),t}u.displayName="Popup",t.default=(0,s.polyfill)(u),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var L=a(n(2)),O=a(n(12)),D=n(0),N=a(D),P=a(n(17)),j=a(n(194)),Y=a(n(82)),I=n(11);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(r){var e,t,o,n,a,i,s,l,u,d,c,f,p,h,m,g,y,v,_,b,w,M,k,S,E,x,C,T;return D.useState&&D.useRef&&D.useEffect?(e=void 0===(e=r.prefix)?"next-":e,E=r.animation,t=void 0===E?{in:"expandInDown",out:"expandOutUp"}:E,E=r.defaultVisible,x=r.onVisibleChange,o=void 0===x?function(){}:x,x=r.trigger,n=void 0===(n=r.triggerType)?"hover":n,C=r.overlay,a=r.onPosition,T=r.children,i=r.className,s=r.style,l=r.wrapperClassName,u=r.triggerClickKeycode,d=r.align,c=r.beforeOpen,f=r.onOpen,p=r.afterOpen,h=r.beforeClose,m=r.onClose,g=r.afterClose,y=(0,O.default)(r,["prefix","animation","defaultVisible","onVisibleChange","trigger","triggerType","overlay","onPosition","children","className","style","wrapperClassName","triggerClickKeycode","align","beforeOpen","onOpen","afterOpen","beforeClose","onClose","afterClose"]),E=(0,D.useState)(E),v=E[0],_=E[1],E=(0,D.useState)(t),b=E[0],w=E[1],M=(E=(0,D.useState)(!0))[0],k=E[1],S=(0,D.useRef)(null),(0,D.useEffect)(function(){"visible"in r&&_(r.visible)},[r.visible]),(0,D.useEffect)(function(){"animation"in r&&b!==t&&w(t)},[t]),E=C?T:x,x=N.default.createElement(Y.default.OverlayAnimate,{visible:v,animation:b,timeout:200,onEnter:function(){k(!1),"function"==typeof c&&c(S.current)},onEntering:function(){"function"==typeof f&&f(S.current)},onEntered:function(){"function"==typeof p&&p(S.current)},onExit:function(){"function"==typeof h&&h(S.current)},onExiting:function(){"function"==typeof m&&m(S.current)},onExited:function(){k(!0),"function"==typeof g&&g(S.current)},style:s},(x=C||T)?(0,D.cloneElement)(x,{className:(0,P.default)([e+"overlay-inner",i,x&&x.props&&x.props.className])}):N.default.createElement("span",null)),C=(0,P.default)(((s={})[e+"overlay-wrapper v2"]=!0,s[l]=l,s.opened=v,s)),T={},d&&(T.points=d.split(" ")),N.default.createElement(j.default.Popup,(0,L.default)({},y,T,{wrapperClassName:C,overlay:x,visible:v,isAnimationEnd:M,triggerType:n,onVisibleChange:function(e){for(var t=arguments.length,n=Array(1 16.8.0"),null)},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var l=a(n(2)),u=a(n(12)),o=n(0),d=a(o),i=a(n(24)),s=a(n(8)),c=a(n(82)),f=a(n(162)),p=n(11);function a(e){return e&&e.__esModule?e:{default:e}}var h={top:8,maxCount:0,duration:3e3},m=s.default.config(function(e){var t=e.prefix,s=void 0===t?"next-":t,t=e.dataSource,a=void 0===t?[]:t,r=(0,o.useState)()[1];return a.forEach(function(n){n.timer||(n.timer=setTimeout(function(){var e,t=a.indexOf(n);-1a&&y.shift(),i.default.render(d.default.createElement(s.default,s.default.getContext(),d.default.createElement(m,{dataSource:y})),g),{key:n,close:function(){r.timer&&clearTimeout(r.timer);var e=y.indexOf(r);-1 16.8.0")}},e.exports=t.default},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n(562)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var p=l(n(2)),r=l(n(4)),o=l(n(6)),a=l(n(7)),h=l(n(42)),m=l(n(0)),i=l(n(5)),g=l(n(17)),y=n(11),s=l(n(28)),v=l(n(366));function l(e){return e&&e.__esModule?e:{default:e}}function _(e,r){var o=r.size,i=r.device,s=r.labelAlign,l=r.labelTextAlign,u=r.labelCol,d=r.wrapperCol,c=r.responsive,f=r.colon;return m.default.Children.map(e,function(e){var t,n,a;return y.obj.isReactFragment(e)?_(e.props.children,r):e&&-1<["function","object"].indexOf((0,h.default)(e.type))&&"form_item"===e.type._typeMark?(t={labelCol:e.props.labelCol||u,wrapperCol:e.props.wrapperCol||d,labelAlign:e.props.labelAlign||("phone"===i?"top":s),labelTextAlign:e.props.labelTextAlign||l,colon:"colon"in e.props?e.props.colon:f,size:e.props.size||o,responsive:c},m.default.cloneElement(e,(n=t,a={},Object.keys(n).forEach(function(e){void 0!==n[e]&&(a[e]=n[e])}),a))):e})}u=m.default.Component,(0,a.default)(b,u),b.prototype.getChildContext=function(){return{_formField:this.props.field||this._formField,_formSize:this.props.size,_formDisabled:this.props.disabled,_formPreview:this.props.isPreview,_formFullWidth:this.props.fullWidth,_formLabelForErrorMessage:this.props.useLabelForErrorMessage}},b.prototype.componentDidUpdate=function(e){var t=this.props;this._formField&&("value"in t&&t.value!==e.value&&this._formField.setValues(t.value),"error"in t)&&t.error!==e.error&&this._formField.setValues(t.error)},b.prototype.render=function(){var e=this.props,t=e.className,n=e.inline,a=e.size,r=(e.device,e.labelAlign,e.labelTextAlign,e.onSubmit),o=e.children,i=(e.labelCol,e.wrapperCol,e.style),s=e.prefix,l=e.rtl,u=e.isPreview,d=e.component,c=e.responsive,f=e.gap,n=(e.colon,(0,g.default)(((e={})[s+"form"]=!0,e[s+"inline"]=n,e[""+s+a]=a,e[s+"form-responsive-grid"]=c,e[s+"form-preview"]=u,e[t]=!!t,e))),a=_(o,this.props);return m.default.createElement(d,(0,p.default)({role:"grid"},y.obj.pickOthers(b.propTypes,this.props),{className:n,style:i,dir:l?"rtl":void 0,onSubmit:r}),c?m.default.createElement(v.default,{gap:f},a):a)},a=n=b,n.propTypes={prefix:i.default.string,inline:i.default.bool,size:i.default.oneOf(["large","medium","small"]),fullWidth:i.default.bool,labelAlign:i.default.oneOf(["top","left","inset"]),labelTextAlign:i.default.oneOf(["left","right"]),field:i.default.any,saveField:i.default.func,labelCol:i.default.object,wrapperCol:i.default.object,onSubmit:i.default.func,children:i.default.any,className:i.default.string,style:i.default.object,value:i.default.object,onChange:i.default.func,component:i.default.oneOfType([i.default.string,i.default.func]),fieldOptions:i.default.object,rtl:i.default.bool,device:i.default.oneOf(["phone","tablet","desktop"]),responsive:i.default.bool,isPreview:i.default.bool,useLabelForErrorMessage:i.default.bool,colon:i.default.bool,disabled:i.default.bool,gap:i.default.oneOfType([i.default.arrayOf(i.default.number),i.default.number])},n.defaultProps={prefix:"next-",onSubmit:function(e){e.preventDefault()},size:"medium",labelAlign:"left",onChange:y.func.noop,component:"form",saveField:y.func.noop,device:"desktop",colon:!1,disabled:!1},n.childContextTypes={_formField:i.default.object,_formSize:i.default.string,_formDisabled:i.default.bool,_formPreview:i.default.bool,_formFullWidth:i.default.bool,_formLabelForErrorMessage:i.default.bool};var u,n=a;function b(e){(0,r.default)(this,b);var t,n,a=(0,o.default)(this,u.call(this,e));return a.onChange=function(e,t){a.props.onChange(a._formField.getValues(),{name:e,value:t,field:a._formField})},a._formField=null,!1!==e.field&&(t=(0,p.default)({},e.fieldOptions,{onChange:a.onChange}),e.field?(a._formField=e.field,n=a._formField.options.onChange,t.onChange=y.func.makeChain(n,a.onChange),a._formField.setOptions&&a._formField.setOptions(t)):("value"in e&&(t.values=e.value),a._formField=new s.default(a,t)),e.locale&&e.locale.Validate&&a._formField.setOptions({messages:e.locale.Validate}),e.saveField(a._formField)),a}n.displayName="Form",t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(90),m=(Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(n(166))),i=a(n(567)),r=a(n(167)),o=a(n(115)),b=a(n(168)),w=a(n(76)),s=a(n(364)),l=a(n(365)),g=a(n(574)),M=n(583),u={state:"",valueName:"value",trigger:"onChange",inputValues:[]},a=function(){function a(e){var t=this,n=1e.length)&&(t=e.length);for(var n=0,a=new Array(t);n=a.length?n:(o=a[r],n=e(t&&t[o],n,a,r+1),t?Array.isArray(t)?((a=[].concat(t))[o]=n,a):(0,l.default)({},t,(0,i.default)({},o,n)):((r=isNaN(o)?{}:[])[o]=n,r))};t=function(){};void 0!==e&&e.env,n.warning=t}.call(this,r(102))},function(e,t,n){"use strict";t.__esModule=!0,t.cloneAndAddKey=function(e){{var t;if(e&&(0,a.isValidElement)(e))return t=e.key||"error",(0,a.cloneElement)(e,{key:t})}return e},t.scrollToFirstError=function(e){var t=e.errorsGroup,n=e.options,a=e.instance;if(t&&n.scrollToFirstError){var r,o=void 0,i=void 0;for(r in t)if(t.hasOwnProperty(r)){var s=u.default.findDOMNode(a[r]);if(!s)return;var l=s.offsetTop;(void 0===i||l), use instead of.'),S.default.cloneElement(e,{className:t,size:c||C(r)})):(0,k.isValidElement)(e)?e:S.default.createElement("span",{className:a+"btn-helper"},e)}),t=d,_=(0,b.default)({},x.obj.pickOthers(Object.keys(T.propTypes),e),{type:o,disabled:p,onClick:h,className:(0,E.default)(n)});return"button"!==t&&(delete _.type,_.disabled)&&(delete _.onClick,_.href)&&delete _.href,S.default.createElement(t,(0,b.default)({},_,{dir:g?"rtl":void 0,onMouseUp:this.onMouseUp,ref:this.buttonRefHandler}),s,u)},a=n=T,n.propTypes=(0,b.default)({},s.default.propTypes,{prefix:r.default.string,rtl:r.default.bool,type:r.default.oneOf(["primary","secondary","normal"]),size:r.default.oneOf(["small","medium","large"]),icons:r.default.shape({loading:r.default.node}),iconSize:r.default.oneOfType([r.default.oneOf(["xxs","xs","small","medium","large","xl","xxl","xxxl","inherit"]),r.default.number]),htmlType:r.default.oneOf(["submit","reset","button"]),component:r.default.oneOf(["button","a","div","span"]),loading:r.default.bool,ghost:r.default.oneOf([!0,!1,"light","dark"]),text:r.default.bool,warning:r.default.bool,disabled:r.default.bool,onClick:r.default.func,className:r.default.string,onMouseUp:r.default.func,children:r.default.node}),n.defaultProps={prefix:"next-",type:"normal",size:"medium",icons:{},htmlType:"button",component:"button",loading:!1,ghost:!1,text:!1,warning:!1,disabled:!1,onClick:function(){}};var u,s=a;function T(){var e,t;(0,o.default)(this,T);for(var n=arguments.length,a=Array(n),r=0;ra[r])return!0;if(n[r] 0, or `null`');if(U(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var t=i.numericSeparator;if(void 0===n)return"undefined";if(null===n)return"null";if("boolean"==typeof n)return n?"true":"false";if("string"==typeof n)return function e(t,n){if(t.length>n.maxStringLength)return a=t.length-n.maxStringLength,a="... "+a+" more character"+(1"}if(z(n))return 0===n.length?"[]":(l=$(n,m),h&&!function(e){for(var t=0;t "+m(e,n))}),ne("Map",_.call(n),u,h)):function(e){if(w&&e&&"object"==typeof e)try{w.call(e);try{_.call(e)}catch(e){return 1}return e instanceof Set}catch(e){}return}(n)?(d=[],M&&M.call(n,function(e){d.push(m(e,n))}),ne("Set",w.call(n),d,h)):function(e){if(k&&e&&"object"==typeof e)try{k.call(e,k);try{S.call(e,S)}catch(e){return 1}return e instanceof WeakMap}catch(e){}return}(n)?q("WeakMap"):function(e){if(S&&e&&"object"==typeof e)try{S.call(e,S);try{k.call(e,k)}catch(e){return 1}return e instanceof WeakSet}catch(e){}return}(n)?q("WeakSet"):function(e){if(E&&e&&"object"==typeof e)try{return E.call(e),1}catch(e){}return}(n)?q("WeakRef"):"[object Number]"!==V(c=n)||j&&"object"==typeof c&&j in c?function(e){if(e&&"object"==typeof e&&D)try{return D.call(e),1}catch(e){}return}(n)?K(m(D.call(n))):"[object Boolean]"!==V(t=n)||j&&"object"==typeof t&&j in t?"[object String]"!==V(e=n)||j&&"object"==typeof e&&j in e?("[object Date]"!==V(t=n)||j&&"object"==typeof t&&j in t)&&!W(n)?(e=$(n,m),t=I?I(n)===Object.prototype:n instanceof Object||n.constructor===Object,f=n instanceof Object?"":"null prototype",p=!t&&j&&Object(n)===n&&j in n?x.call(V(n),8,-1):f?"Object":"",t=(!t&&"function"==typeof n.constructor&&n.constructor.name?n.constructor.name+" ":"")+(p||f?"["+O.call(L.call([],p||[],f||[]),": ")+"] ":""),0===e.length?t+"{}":h?t+"{"+G(e,h)+"}":t+"{ "+O.call(e,", ")+" }"):String(n):K(m(String(n))):K(J.call(n)):K(m(Number(n)))};var l=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return l.call(e,t)}function V(e){return i.call(e)}function ee(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,a=e.length;n, as child."),a.push(t),e.props.children)&&(t.children=n(e.props.children))}),a}(e.children):t},N.prototype.fetchInfoFromBinaryChildren=function(e){function r(e,t){return t=t||0,e.forEach(function(e){e.children?t=r(e.children,t):t+=1}),t}var a=!1,o=[],i=[],e=(function t(){var e=0r.tRight&&(e=r.tRight,r.changedPageX=r.tRight-r.startLeft),e-r.cellLefto.clientHeight,o.scrollWidth,o.clientWidth,o={},e||(o[r]=0,o[a]=0),+i&&(o.marginBottom=-i,o.paddingBottom=i,e)&&(o[a]=i),h.dom.setStyle(this.headerNode,o)),n&&!this.props.lockType&&this.headerNode&&(r=this.headerNode.querySelector("."+t+"table-header-fixer"),e=h.dom.getStyle(this.headerNode,"height"),a=h.dom.getStyle(this.headerNode,"paddingBottom"),h.dom.setStyle(r,{width:i,height:e-a}))},o.prototype.render=function(){var e=this.props,t=e.components,n=e.className,a=e.prefix,r=e.fixedHeader,o=e.lockType,i=e.dataSource,e=(e.maxBodyHeight,(0,u.default)(e,["components","className","prefix","fixedHeader","lockType","dataSource","maxBodyHeight"]));return r&&((t=(0,l.default)({},t)).Header||(t.Header=m.default),t.Body||(t.Body=g.default),t.Wrapper||(t.Wrapper=y.default),n=(0,p.default)(((r={})[a+"table-fixed"]=!0,r[a+"table-wrap-empty"]=!i.length,r[n]=n,r))),c.default.createElement(s,(0,l.default)({},e,{dataSource:i,lockType:o,components:t,className:n,prefix:a}))},o}(c.default.Component),n.FixedHeader=m.default,n.FixedBody=g.default,n.FixedWrapper=y.default,n.propTypes=(0,l.default)({hasHeader:r.default.bool,fixedHeader:r.default.bool,maxBodyHeight:r.default.oneOfType([r.default.number,r.default.string])},s.propTypes),n.defaultProps=(0,l.default)({},s.defaultProps,{hasHeader:!0,fixedHeader:!1,maxBodyHeight:200,components:{},refs:{},prefix:"next-"}),n.childContextTypes={fixedHeader:r.default.bool,getNode:r.default.func,onFixedScrollSync:r.default.func,getTableInstanceForFixed:r.default.func,maxBodyHeight:r.default.oneOfType([r.default.number,r.default.string])};var t,n=t;return n.displayName="FixedTable",(0,o.statics)(n,s),n};var c=s(n(0)),r=s(n(5)),f=n(24),p=s(n(17)),h=n(11),m=s(n(134)),g=s(n(402)),y=s(n(135)),o=n(70);function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var i=o(n(12)),f=o(n(2)),r=o(n(4)),s=o(n(6)),l=o(n(7)),u=(t.default=function(o){e=t=function(n){function a(e,t){(0,r.default)(this,a);var c=(0,s.default)(this,n.call(this,e,t));return c.addSelection=function(e){var t=c.props,n=t.prefix,a=t.rowSelection,t=t.size,a=a.columnProps&&a.columnProps()||{};e.find(function(e){return"selection"===e.key})||e.unshift((0,f.default)({key:"selection",title:c.renderSelectionHeader.bind(c),cell:c.renderSelectionBody.bind(c),width:"small"===t?34:50,className:n+"table-selection "+n+"table-prerow",__normalized:!0},a))},c.renderSelectionHeader=function(){var e=c.selectAllRow,t={},n=c.props,a=n.rowSelection,r=n.primaryKey,o=n.dataSource,i=n.entireDataSource,n=n.locale,s=c.state.selectedRowKeys,l=a.mode||"multiple",u=!!s.length,d=!1,i=(c.flatDataSource(i||o).filter(function(e,t){return!a.getProps||!(a.getProps(e,t)||{}).disabled}).map(function(e){return e[r]}).forEach(function(e){-1===s.indexOf(e)?u=!1:d=!0}),t.onClick=b(function(e){e.stopPropagation()},t.onClick),a.titleProps&&a.titleProps()||{});return u&&(d=!1),["multiple"===l?p.default.createElement(h.default,(0,f.default)({key:"_total",indeterminate:d,"aria-label":n.selectAll,checked:u,onChange:e},t,i)):null,a.titleAddons&&a.titleAddons()]},c.renderSelectionBody=function(e,t,n){var a=c.props,r=a.rowSelection,a=a.primaryKey,o=c.state.selectedRowKeys,i=r.mode||"multiple",o=-1l.length&&(u=o),w(u.filter(function(e){return-1=Math.max(a-y,0)&&oc.clientHeight;this.isLock()?(e=this.bodyLeftNode,t=this.bodyRightNode,n=this.getWrapperNode("right"),a=f?d:0,c=c.offsetHeight-d,f||(r[l]=0,r[u]=0),+d?(r.marginBottom=-d,r.paddingBottom=d):(r.marginBottom=-20,r.paddingBottom=20),c={"max-height":c},o||+d||(c[u]=0),+d&&(c[u]=-d),e&&g.dom.setStyle(e,c),t&&g.dom.setStyle(t,c),n&&+d&&g.dom.setStyle(n,i?"left":"right",a+"px")):(r.marginBottom=-d,r.paddingBottom=d,r[u]=0,f||(r[l]=0)),s&&g.dom.setStyle(s,r)},a.prototype.adjustHeaderSize=function(){var o=this;this.isLock()&&this.tableInc.groupChildren.forEach(function(e,t){var n=o.tableInc.groupChildren[t].length-1,n=o.getHeaderCellNode(t,n),a=o.getHeaderCellNode(t,0),r=o.getHeaderCellNode(t,0,"right"),t=o.getHeaderCellNode(t,0,"left");n&&r&&(n=n.offsetHeight,g.dom.setStyle(r,"height",n),setTimeout(function(){var e=o.tableRightInc.affixRef;return e&&e.getInstance()&&e.getInstance().updatePosition()})),a&&t&&(r=a.offsetHeight,g.dom.setStyle(t,"height",r),setTimeout(function(){var e=o.tableLeftInc.affixRef;return e&&e.getInstance()&&e.getInstance().updatePosition()}))})},a.prototype.adjustRowHeight=function(){var n=this;this.isLock()&&this.tableInc.props.dataSource.forEach(function(e,t){t=""+("object"===(void 0===e?"undefined":(0,r.default)(e))&&"__rowIndex"in e?e.__rowIndex:t)+(e.__expanded?"_expanded":"");n.setRowHeight(t,"left"),n.setRowHeight(t,"right")})},a.prototype.setRowHeight=function(e,t){var t=this.getRowNode(e,t),e=this.getRowNode(e),e=(M?e&&e.offsetHeight:e&&parseFloat(getComputedStyle(e).height))||"auto",n=(M?t&&t.offsetHeight:t&&parseFloat(getComputedStyle(t).height))||"auto";t&&e!==n&&g.dom.setStyle(t,"height",e)},a.prototype.getWrapperNode=function(e){e=e?e.charAt(0).toUpperCase()+e.substr(1):"";try{return(0,u.findDOMNode)(this["lock"+e+"El"])}catch(e){return null}},a.prototype.getRowNode=function(e,t){t=this["table"+(t=t?t.charAt(0).toUpperCase()+t.substr(1):"")+"Inc"];try{return(0,u.findDOMNode)(t.getRowRef(e))}catch(e){return null}},a.prototype.getHeaderCellNode=function(e,t,n){n=this["table"+(n=n?n.charAt(0).toUpperCase()+n.substr(1):"")+"Inc"];try{return(0,u.findDOMNode)(n.getHeaderCellRef(e,t))}catch(e){return null}},a.prototype.getCellNode=function(e,t,n){n=this["table"+(n=n?n.charAt(0).toUpperCase()+n.substr(1):"")+"Inc"];try{return(0,u.findDOMNode)(n.getCellRef(e,t))}catch(e){return null}},a.prototype.render=function(){var e,t=this.props,n=(t.children,t.columns,t.prefix),a=t.components,r=t.className,o=t.dataSource,i=t.tableWidth,t=(0,f.default)(t,["children","columns","prefix","components","className","dataSource","tableWidth"]),s=this.normalizeChildrenState(this.props),l=s.lockLeftChildren,u=s.lockRightChildren,s=s.children,d={left:this.getFlatenChildrenLength(l),right:this.getFlatenChildrenLength(u),origin:this.getFlatenChildrenLength(s)};return this._notNeedAdjustLockLeft&&(l=[]),this._notNeedAdjustLockRight&&(u=[]),this.lockLeftChildren=l,this.lockRightChildren=u,this.isOriginLock()?((a=(0,p.default)({},a)).Body=a.Body||v.default,a.Header=a.Header||_.default,a.Wrapper=a.Wrapper||b.default,a.Row=a.Row||y.default,r=(0,m.default)(((e={})[n+"table-lock"]=!0,e[n+"table-wrap-empty"]=!o.length,e[r]=r,e)),e=[h.default.createElement(c,(0,p.default)({},t,{dataSource:o,key:"lock-left",columns:l,className:n+"table-lock-left",lengths:d,prefix:n,lockType:"left",components:a,ref:this.saveLockLeftRef,loading:!1,"aria-hidden":!0})),h.default.createElement(c,(0,p.default)({},t,{dataSource:o,key:"lock-right",columns:u,className:n+"table-lock-right",lengths:d,prefix:n,lockType:"right",components:a,ref:this.saveLockRightRef,loading:!1,"aria-hidden":!0}))],h.default.createElement(c,(0,p.default)({},t,{tableWidth:i,dataSource:o,columns:s,prefix:n,lengths:d,wrapperContent:e,components:a,className:r}))):h.default.createElement(c,this.props)},a}(h.default.Component),t.LockRow=y.default,t.LockBody=v.default,t.LockHeader=_.default,t.propTypes=(0,p.default)({scrollToCol:a.default.number,scrollToRow:a.default.number},c.propTypes),t.defaultProps=(0,p.default)({},c.defaultProps),t.childContextTypes={getTableInstance:a.default.func,getLockNode:a.default.func,onLockBodyScroll:a.default.func,onRowMouseEnter:a.default.func,onRowMouseLeave:a.default.func};var e,t=e;return t.displayName="LockTable",(0,w.statics)(t,c),t},n(0)),h=c(l),u=n(24),a=c(n(5)),m=c(n(17)),d=c(n(177)),g=n(11),y=c(n(179)),v=c(n(403)),_=c(n(404)),b=c(n(135)),w=n(70);function c(e){return e&&e.__esModule?e:{default:e}}var M=g.env.ieVersion;function k(e){return function n(e){return e.map(function(e){var t=(0,p.default)({},e);return e.children&&(e.children=n(e.children)),t})}(e)}e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var l=s(n(12)),u=s(n(2)),r=s(n(4)),o=s(n(6)),i=s(n(7)),d=(t.default=function(s){e=t=function(n){function a(e,t){(0,r.default)(this,a);var d=(0,o.default)(this,n.call(this,e));return d.state={},d.updateOffsetArr=function(){var e=d.splitChildren||{},t=e.lockLeftChildren,n=e.lockRightChildren,e=e.originChildren,a=d.getFlatenChildren(t).length,r=d.getFlatenChildren(n).length,e=a+r+d.getFlatenChildren(e).length,a=0r.top-e.offset?(t?(l.position="absolute",l.top=a-(r.top-e.offset),u="relative"):(l.position="fixed",l.top=e.offset+n.top),d._setAffixStyle(l,!0),d._setContainerStyle(s)):e.bottom&&a{e=new Date(e);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}},function(e,t,n){"use strict";const a=n(182);class r extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${a(2,this.getUTCMonth()+1)}-`+a(2,this.getUTCDate())+"T"+(`${a(2,this.getUTCHours())}:${a(2,this.getUTCMinutes())}:${a(2,this.getUTCSeconds())}.`+a(3,this.getUTCMilliseconds()))}}e.exports=e=>{e=new r(e);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}},function(a,e,r){"use strict";!function(e){const t=r(182);class n extends e.Date{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${t(2,this.getUTCMonth()+1)}-`+t(2,this.getUTCDate())}}a.exports=e=>{e=new n(e);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}}.call(this,r(65))},function(e,t,n){"use strict";const a=n(182);class r extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${a(2,this.getUTCHours())}:${a(2,this.getUTCMinutes())}:${a(2,this.getUTCSeconds())}.`+a(3,this.getUTCMilliseconds())}}e.exports=e=>{e=new r(e);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}},function(e,t,n){"use strict";!function(s){e.exports=function(r,e){e=e||{};const n=e.blocksize||40960,o=new t;return new Promise((e,t)=>{s(i,0,n,e,t)});function i(e,t,n,a){if(e>=r.length)try{return n(o.finish())}catch(e){return a(l(e,r))}try{o.parse(r.slice(e,e+t)),s(i,e+t,t,n,a)}catch(e){a(l(e,r))}}};const t=n(181),l=n(183)}.call(this,n(408).setImmediate)},function(e,t,n){!function(e,p){!function(n,o){"use strict";var a,i,s,r,l,u,t,e;function d(e){delete i[e]}function c(e){if(s)setTimeout(c,0,e);else{var t=i[e];if(t){s=!0;try{var n=t,a=n.callback,r=n.args;switch(r.length){case 0:a();break;case 1:a(r[0]);break;case 2:a(r[0],r[1]);break;case 3:a(r[0],r[1],r[2]);break;default:a.apply(o,r)}}finally{d(e),s=!1}}}}function f(){function e(e){e.source===n&&"string"==typeof e.data&&0===e.data.indexOf(t)&&c(+e.data.slice(t.length))}var t="setImmediate$"+Math.random()+"$";n.addEventListener?n.addEventListener("message",e,!1):n.attachEvent("onmessage",e),l=function(e){n.postMessage(t+e,"*")}}n.setImmediate||(a=1,s=!(i={}),r=n.document,e=(e=Object.getPrototypeOf&&Object.getPrototypeOf(n))&&e.setTimeout?e:n,"[object process]"==={}.toString.call(n.process)?l=function(e){p.nextTick(function(){c(e)})}:!function(){var e,t;if(n.postMessage&&!n.importScripts)return e=!0,t=n.onmessage,n.onmessage=function(){e=!1},n.postMessage("","*"),n.onmessage=t,e}()?l=n.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):r&&"onreadystatechange"in r.createElement("script")?(u=r.documentElement,function(e){var t=r.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,u.removeChild(t),t=null},u.appendChild(t)}):function(e){setTimeout(c,0,e)}:f(),e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n{let n,a=!1,r=!1;function o(){if(a=!0,!n)try{e(l.finish())}catch(e){t(e)}}function i(e){r=!0,t(e)}s.once("end",o),s.once("error",i),function e(){n=!0;let t;for(;null!==(t=s.read());)try{l.parse(t)}catch(e){return i(e)}n=!1;if(a)return o();if(r)return;s.once("readable",e)}()})}(e):function(){const a=new o;return new r.Transform({objectMode:!0,transform(e,t,n){try{a.parse(e.toString(t))}catch(e){this.emit("error",e)}n()},flush(e){try{this.push(a.finish())}catch(e){this.emit("error",e)}e()}})}()};const r=n(691),o=n(181)},function(e,t,n){e.exports=a;var d=n(184).EventEmitter;function a(){d.call(this)}n(104)(a,d),a.Readable=n(185),a.Writable=n(701),a.Duplex=n(702),a.Transform=n(703),a.PassThrough=n(704),(a.Stream=a).prototype.pipe=function(t,e){var n=this;function a(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function r(){n.readable&&n.resume&&n.resume()}n.on("data",a),t.on("drain",r),t._isStdio||e&&!1===e.end||(n.on("end",i),n.on("close",s));var o=!1;function i(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function l(e){if(u(),0===d.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",a),t.removeListener("drain",r),n.removeListener("end",i),n.removeListener("close",s),n.removeListener("error",l),t.removeListener("error",l),n.removeListener("end",u),n.removeListener("close",u),t.removeListener("close",u)}return n.on("error",l),t.on("error",l),n.on("end",u),n.on("close",u),t.on("close",u),t.emit("pipe",n),t}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";t.byteLength=function(e){var e=d(e),t=e[0],e=e[1];return 3*(t+e)/4-e},t.toByteArray=function(e){var t,n,a=d(e),r=a[0],a=a[1],o=new u(function(e,t){return 3*(e+t)/4-t}(r,a)),i=0,s=0>16&255,o[i++]=t>>8&255,o[i++]=255&t;2===a&&(t=l[e.charCodeAt(n)]<<2|l[e.charCodeAt(n+1)]>>4,o[i++]=255&t);1===a&&(t=l[e.charCodeAt(n)]<<10|l[e.charCodeAt(n+1)]<<4|l[e.charCodeAt(n+2)]>>2,o[i++]=t>>8&255,o[i++]=255&t);return o},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,r=[],o=0,i=n-a;o>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}(a));return r.join("")}(e,o,i>2]+s[t<<4&63]+"==")):2==a&&(t=(e[n-2]<<8)+e[n-1],r.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return r.join("")};for(var s=[],l=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,o=a.length;r=e.length?{value:void 0,done:!0}:(e=a(e,t),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var o=n(150),i=n(149);e.exports=function(r){return function(e,t){var n,e=String(i(e)),t=o(t),a=e.length;return t<0||a<=t?r?"":void 0:(n=e.charCodeAt(t))<55296||56319=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),o.Arguments=o.Array,a("keys"),a("values"),a("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(497),__esModule:!0}},function(e,t,n){n(498),n(503),n(504),n(505),e.exports=n(80).Symbol},function(I,A,e){"use strict";function a(e){var t=T[e]=_(M[E]);return t._k=e,t}function n(e,t){m(e);for(var n,a=B(t=g(t)),r=0,o=a.length;rr;)l(T,t=n[r++])||t==x||t==H||a.push(t);return a}function i(e){for(var t,n=e===O,a=X(n?L:g(e)),r=[],o=0;a.length>o;)!l(T,t=a[o++])||n&&!l(O,t)||r.push(T[t]);return r}var s=e(79),l=e(89),u=e(81),d=e(95),R=e(209),H=e(499).KEY,c=e(112),f=e(152),p=e(158),F=e(128),h=e(99),z=e(159),W=e(160),B=e(500),U=e(501),m=e(111),V=e(97),K=e(155),g=e(98),y=e(148),v=e(125),_=e(157),q=e(502),G=e(211),b=e(154),$=e(88),J=e(126),Q=G.f,w=$.f,X=q.f,M=s.Symbol,k=s.JSON,S=k&&k.stringify,E="prototype",x=h("_hidden"),Z=h("toPrimitive"),ee={}.propertyIsEnumerable,C=f("symbol-registry"),T=f("symbols"),L=f("op-symbols"),O=Object[E],f="function"==typeof M&&!!b.f,D=s.QObject,N=!D||!D[E]||!D[E].findChild,P=u&&c(function(){return 7!=_(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(e,t,n){var a=Q(O,t);a&&delete O[t],w(e,t,n),a&&e!==O&&w(O,t,a)}:w,j=f&&"symbol"==typeof M.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof M},Y=function(e,t,n){return e===O&&Y(L,t,n),m(e),t=y(t,!0),m(n),(l(T,t)?(n.enumerable?(l(e,x)&&e[x][t]&&(e[x][t]=!1),n=_(n,{enumerable:v(0,!1)})):(l(e,x)||w(e,x,v(1,{})),e[x][t]=!0),P):w)(e,t,n)};f||(R((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=F(0ne;)h(te[ne++]);for(var ae=J(h.store),re=0;ae.length>re;)W(ae[re++]);d(d.S+d.F*!f,"Symbol",{for:function(e){return l(C,e+="")?C[e]:C[e]=M(e)},keyFor:function(e){if(!j(e))throw TypeError(e+" is not a symbol!");for(var t in C)if(C[t]===e)return t},useSetter:function(){N=!0},useSimple:function(){N=!1}}),d(d.S+d.F*!f,"Object",{create:function(e,t){return void 0===t?_(e):n(_(e),t)},defineProperty:Y,defineProperties:n,getOwnPropertyDescriptor:r,getOwnPropertyNames:o,getOwnPropertySymbols:i});D=c(function(){b.f(1)});d(d.S+d.F*D,"Object",{getOwnPropertySymbols:function(e){return b.f(K(e))}}),k&&d(d.S+d.F*(!f||c(function(){var e=M();return"[null]"!=S([e])||"{}"!=S({a:e})||"{}"!=S(Object(e))})),"JSON",{stringify:function(e){for(var t,n,a=[e],r=1;ri;)o.call(e,a=r[i++])&&t.push(a);return t}},function(e,t,n){var a=n(207);e.exports=Array.isArray||function(e){return"Array"==a(e)}},function(e,t,n){var a=n(98),r=n(210).f,o={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){if(!i||"[object Window]"!=o.call(e))return r(a(e));try{return r(e)}catch(e){return i.slice()}}},function(e,t){},function(e,t,n){n(160)("asyncIterator")},function(e,t,n){n(160)("observable")},function(e,t,n){e.exports={default:n(507),__esModule:!0}},function(e,t,n){n(508),e.exports=n(80).Object.setPrototypeOf},function(e,t,n){var a=n(95);a(a.S,"Object",{setPrototypeOf:n(509).set})},function(e,t,r){function o(e,t){if(a(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")}var n=r(97),a=r(111);e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,a){try{(a=r(202)(Function.call,r(211).f(Object.prototype,"__proto__").set,2))(e,[]),n=!(e instanceof Array)}catch(e){n=!0}return function(e,t){return o(e,t),n?e.__proto__=t:a(e,t),e}}({},!1):void 0),check:o}},function(e,t,n){e.exports={default:n(511),__esModule:!0}},function(e,t,n){n(512);var a=n(80).Object;e.exports=function(e,t){return a.create(e,t)}},function(e,t,n){var a=n(95);a(a.S,"Object",{create:n(157)})},function(e,t,n){"use strict";var i=n(514);function a(){}function r(){}r.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,r,o){if(o!==i)throw(o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",o}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:a};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function l(e,t,n,a){e.removeEventListener&&e.removeEventListener(t,n,a||!1)}function a(e,t,n,a){return e.addEventListener&&e.addEventListener(t,n,a||!1),{off:function(){return l(e,t,n,a)}}}t.__esModule=!0,t.on=a,t.once=function(r,o,i,s){return a(r,o,function e(){for(var t=arguments.length,n=Array(t),a=0;a68?1900:2e3)},r=function(t){return function(e){this[t]=+e}},o=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],i=function(e){var t=h[e];return t&&(t.indexOf?t:t.s.concat(t.f))},s=function(e,t){var n,a=h.meridiem;if(a){for(var r=1;r<=24;r+=1)if(e.indexOf(a(r,0,t))>-1){n=r>12;break}}else n=e===(t?"pm":"PM");return n},f={A:[n,function(e){this.afternoon=s(e,!1)}],a:[n,function(e){this.afternoon=s(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[e,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[t,r("seconds")],ss:[t,r("seconds")],m:[t,r("minutes")],mm:[t,r("minutes")],H:[t,r("hours")],h:[t,r("hours")],HH:[t,r("hours")],hh:[t,r("hours")],D:[t,r("day")],DD:[e,r("day")],Do:[n,function(e){var t=h.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var a=1;a<=31;a+=1)t(a).replace(/\[|\]/g,"")===e&&(this.day=a)}],M:[t,r("month")],MM:[e,r("month")],MMM:[n,function(e){var t=i("months"),n=(i("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[n,function(e){var t=i("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,r("year")],YY:[e,function(e){this.year=a(e)}],YYYY:[/\d{4}/,r("year")],Z:o,ZZ:o};function b(e){var t,r;t=e,r=h&&h.formats;for(var u=(e=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,t,n){var a=n&&n.toUpperCase();return t||r[n]||l[n]||r[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})).match(c),d=u.length,n=0;n-1)return new Date(("X"===t?1e3:1)*e);var a=b(t)(e),r=a.year,o=a.month,i=a.day,s=a.hours,l=a.minutes,u=a.seconds,d=a.milliseconds,c=a.zone,f=new Date,p=i||(r||o?1:f.getDate()),h=r||f.getFullYear(),m=0;r&&!o||(m=o>0?o-1:f.getMonth());var g=s||0,y=l||0,v=u||0,_=d||0;return c?new Date(Date.UTC(h,m,p,g,y,v,_+60*c.offset*1e3)):n?new Date(Date.UTC(h,m,p,g,y,v,_)):new Date(h,m,p,g,y,v,_)}catch(e){return new Date("")}}(t,r,n),this.init(),l&&!0!==l&&(this.$L=this.locale(l).$L),s&&t!=this.format(r)&&(this.$d=new Date("")),h={}}else if(r instanceof Array)for(var u=r.length,d=1;d<=u;d+=1){a[1]=r[d-1];var c=f.apply(this,a);if(c.isValid()){this.$d=c.$d,this.$L=c.$L,this.init();break}d===u&&(this.$d=new Date(""))}else p.call(this,e)}}}()},function(e,t,n){e.exports=function(){"use strict";return function(e,t,a){a.updateLocale=function(e,t){var n=a.Ls[e];if(n)return(t?Object.keys(t):[]).forEach(function(e){n[e]=t[e]}),n}}}()},function(e,t,n){e.exports=function(e,t,n){function a(e,t,n,a,r){var o,e=e.name?e:e.$locale(),t=s(e[t]),n=s(e[n]),i=t||n.map(function(e){return e.slice(0,a)});return r?(o=e.weekStart,i.map(function(e,t){return i[(t+(o||0))%7]})):i}function r(){return n.Ls[n.locale()]}function o(e,t){return e.formats[t]||e.formats[t.toUpperCase()].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}var t=t.prototype,s=function(e){return e&&(e.indexOf?e:e.s)};t.localeData=function(){return function(){var t=this;return{months:function(e){return e?e.format("MMMM"):a(t,"months")},monthsShort:function(e){return e?e.format("MMM"):a(t,"monthsShort","months",3)},firstDayOfWeek:function(){return t.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):a(t,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):a(t,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):a(t,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return o(t.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}}.bind(this)()},n.localeData=function(){var t=r();return{firstDayOfWeek:function(){return t.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(e){return o(t,e)},meridiem:t.meridiem,ordinal:t.ordinal}},n.months=function(){return a(r(),"months")},n.monthsShort=function(){return a(r(),"monthsShort","months",3)},n.weekdays=function(e){return a(r(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return a(r(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return a(r(),"weekdaysMin","weekdays",2,e)}}},function(e,t,n){e.exports=function(){"use strict";var i="month",s="quarter";return function(e,t){var n=t.prototype;n.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var a=n.add;n.add=function(e,t){return e=Number(e),this.$utils().p(t)===s?this.add(3*e,i):a.bind(this)(e,t)};var o=n.startOf;n.startOf=function(e,t){var n=this.$utils(),a=!!n.u(t)||t;if(n.p(e)===s){var r=this.quarter()-1;return a?this.month(3*r).startOf(i).startOf("day"):this.month(3*r+2).endOf(i).endOf("day")}return o.bind(this)(e,t)}}}()},function(e,t,n){e.exports=function(){"use strict";return function(e,t){var n=t.prototype,o=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return o.bind(this)(e);var a=this.$utils(),r=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return n.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return n.ordinal(t.week(),"W");case"w":case"ww":return a.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return a.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return a.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}});return o.bind(this)(r)}}}()},function(e,t,n){e.exports=function(){"use strict";var s="week",l="year";return function(e,t,i){var n=t.prototype;n.week=function(e){if(void 0===e&&(e=null),null!==e)return this.add(7*(e-this.week()),"day");var t=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var n=i(this).startOf(l).add(1,l).date(t),a=i(this).endOf(s);if(n.isBefore(a))return 1}var r=i(this).startOf(l).date(t).startOf(s).subtract(1,"millisecond"),o=this.diff(r,s,!0);return o<0?i(this).startOf("week").week():Math.ceil(o)},n.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),a={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1100?"上午":n<1300?"中午":n<1800?"下午":"晚上"}};return n.default.locale(a,null,!0),a}(n(217))},function(e,t,n){"use strict";t.__esModule=!0,t.flex=t.transition=t.animation=void 0;var r=n(213),o=n(100);function a(e){var n,a;return!!r.hasDOM&&(n=document.createElement("div"),(a=!1,o.each)(e,function(e,t){if(void 0!==n.style[t])return!(a={end:e})}),a)}var i,s;t.animation=a({WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd",animation:"animationend"}),t.transition=a({WebkitTransition:"webkitTransitionEnd",OTransition:"oTransitionEnd",transition:"transitionend"}),t.flex=(n={display:["flex","-webkit-flex","-moz-flex","-ms-flexbox"]},!!r.hasDOM&&(i=document.createElement("div"),(s=!1,o.each)(n,function(e,t){return(0,o.each)(e,function(e){try{i.style[t]=e,s=s||i.style[t]===e}catch(e){}return!s}),!s}),s))},function(e,t,n){"use strict";t.__esModule=!0,t.getFocusNodeList=i,t.saveLastFocusNode=function(){s=document.activeElement},t.clearLastFocusNode=function(){s=null},t.backLastFocusNode=function(){if(s)try{s.focus()}catch(e){}},t.limitTabRange=function(e,t){{var n,a;t.keyCode===r.default.TAB&&(e=i(e),n=e.length-1,-1<(a=e.indexOf(document.activeElement)))&&(a=a+(t.shiftKey?-1:1),e[a=n<(a=a<0?n:a)?0:a].focus(),t.preventDefault())}};var t=n(218),r=(t=t)&&t.__esModule?t:{default:t},a=n(100);function o(e){var t=e.nodeName.toLowerCase(),n=parseInt(e.getAttribute("tabindex"),10),n=!isNaN(n)&&-1a.height)&&(r[1]=-t.top-("t"===e?t.height:0)),r},this._getParentScrollOffset=function(e){var t=0,n=0;return e&&e.offsetParent&&e.offsetParent!==document.body&&(isNaN(e.offsetParent.scrollTop)||(t+=e.offsetParent.scrollTop),isNaN(e.offsetParent.scrollLeft)||(n+=e.offsetParent.scrollLeft)),{top:t,left:n}}};var p=a;function h(e){(0,o.default)(this,h),r.call(this),this.pinElement=e.pinElement,this.baseElement=e.baseElement,this.pinFollowBaseElementWhenFixed=e.pinFollowBaseElementWhenFixed,this.container=function(e){var t=e.container,e=e.baseElement;if("undefined"==typeof document)return t;for(var n=(n=(0,i.default)(t,e))||document.body;"static"===y.dom.getStyle(n,"position");){if(!n||n===document.body)return document.body;n=n.parentNode}return n}(e),this.autoFit=e.autoFit||!1,this.align=e.align||"tl tl",this.offset=e.offset||[0,0],this.needAdjust=e.needAdjust||!1,this.isRtl=e.isRtl||!1}t.default=p,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var w=a(n(2)),M=a(n(12)),k=n(0),S=a(k),E=a(n(17)),x=a(n(194)),C=a(n(82)),T=n(11);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t,n,a,r,o,i,s,l,u,d,c,f,p,h,m,g,y,v,_,b;return k.useState&&k.useRef&&k.useEffect?(t=void 0===(t=e.prefix)?"next-":t,r=e.animation,n=void 0===r?{in:"expandInDown",out:"expandOutUp"}:r,a=e.visible,r=e.hasMask,o=e.align,o=void 0===(s=e.points)?o?o.split(" "):void 0:s,i=e.onPosition,s=e.children,b=e.className,l=e.style,u=e.wrapperClassName,d=e.beforeOpen,c=e.onOpen,f=e.afterOpen,p=e.beforeClose,h=e.onClose,m=e.afterClose,e=(0,M.default)(e,["prefix","animation","visible","hasMask","align","points","onPosition","children","className","style","wrapperClassName","beforeOpen","onOpen","afterOpen","beforeClose","onClose","afterClose"]),g=(_=(0,k.useState)(!0))[0],y=_[1],v=(0,k.useRef)(null),_=S.default.createElement(C.default.OverlayAnimate,{visible:a,animation:n,onEnter:function(){y(!1),"function"==typeof d&&d(v.current)},onEntering:function(){"function"==typeof c&&c(v.current)},onEntered:function(){"function"==typeof f&&f(v.current)},onExit:function(){"function"==typeof p&&p(v.current)},onExiting:function(){"function"==typeof h&&h(v.current)},onExited:function(){y(!0),"function"==typeof m&&m(v.current)},timeout:300,style:l},s?(0,k.cloneElement)(s,{className:(0,E.default)([t+"overlay-inner",b,s&&s.props&&s.props.className])}):S.default.createElement("span",null)),b=(0,E.default)(((l={})[t+"overlay-wrapper v2"]=!0,l[u]=u,l.opened=a,l)),S.default.createElement(x.default,(0,w.default)({},e,{visible:a,isAnimationEnd:g,hasMask:r,wrapperClassName:b,maskClassName:t+"overlay-backdrop",maskRender:function(e){return S.default.createElement(C.default.OverlayAnimate,{visible:a,animation:!!n&&{in:"fadeIn",out:"fadeOut"},timeout:300,unmountOnExit:!0},e)},points:o,onPosition:function(e){(0,w.default)(e,{align:e.config.points}),"function"==typeof i&&i(e)},ref:v}),_)):(T.log.warning("need react version > 16.8.0"),null)},e.exports=t.default},function(n,e){function a(e,t){return n.exports=a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n.exports.__esModule=!0,n.exports.default=n.exports,a(e,t)}n.exports=a,n.exports.__esModule=!0,n.exports.default=n.exports},function(e,t,n){"use strict";t.__esModule=!0;var a,d=g(n(12)),c=g(n(2)),r=g(n(4)),o=g(n(6)),i=g(n(7)),l=n(0),f=g(l),p=n(24),s=n(30),u=g(n(5)),h=n(11),m=g(n(360));function g(e){return e&&e.__esModule?e:{default:e}}var y,n=h.func.noop,v=h.func.makeChain,_=h.func.bindCtx,u=(y=l.Component,(0,i.default)(b,y),b.getDerivedStateFromProps=function(e,t){return"visible"in e?(0,c.default)({},t,{visible:e.visible}):null},b.prototype.componentWillUnmount=function(){var t=this;["_timer","_hideTimer","_showTimer"].forEach(function(e){t[e]&&clearTimeout(t[e])})},b.prototype.handleVisibleChange=function(e,t,n){"visible"in this.props||this.setState({visible:e}),this.props.onVisibleChange(e,t,n)},b.prototype.handleTriggerClick=function(e){this.state.visible&&!this.props.canCloseByTrigger||this.handleVisibleChange(!this.state.visible,"fromTrigger",e)},b.prototype.handleTriggerKeyDown=function(e){var t=this.props.triggerClickKeycode;(Array.isArray(t)?t:[t]).includes(e.keyCode)&&(e.preventDefault(),this.handleTriggerClick(e))},b.prototype.handleTriggerMouseEnter=function(e){var t=this;this._mouseNotFirstOnMask=!1,this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=null),this._showTimer&&(clearTimeout(this._showTimer),this._showTimer=null),this.state.visible||(this._showTimer=setTimeout(function(){t.handleVisibleChange(!0,"fromTrigger",e)},this.props.delay))},b.prototype.handleTriggerMouseLeave=function(e,t){var n=this;this._showTimer&&(clearTimeout(this._showTimer),this._showTimer=null),this.state.visible&&(this._hideTimer=setTimeout(function(){n.handleVisibleChange(!1,t||"fromTrigger",e)},this.props.delay))},b.prototype.handleTriggerFocus=function(e){this.handleVisibleChange(!0,"fromTrigger",e)},b.prototype.handleTriggerBlur=function(e){this._isForwardContent||this.handleVisibleChange(!1,"fromTrigger",e),this._isForwardContent=!1},b.prototype.handleContentMouseDown=function(){this._isForwardContent=!0},b.prototype.handleContentMouseEnter=function(){clearTimeout(this._hideTimer)},b.prototype.handleContentMouseLeave=function(e){this.handleTriggerMouseLeave(e,"fromContent")},b.prototype.handleMaskMouseEnter=function(){this._mouseNotFirstOnMask||(clearTimeout(this._hideTimer),this._hideTimer=null,this._mouseNotFirstOnMask=!1)},b.prototype.handleMaskMouseLeave=function(){this._mouseNotFirstOnMask=!0},b.prototype.handleRequestClose=function(e,t){this.handleVisibleChange(!1,e,t)},b.prototype.renderTrigger=function(){var e,t,n,a,r,o,i,s=this,l=this.props,u=l.trigger,l=l.disabled,d={key:"trigger","aria-haspopup":!0,"aria-expanded":this.state.visible};return this.state.visible||(d["aria-describedby"]=void 0),l||(l=this.props.triggerType,l=Array.isArray(l)?l:[l],e=u&&u.props||{},t=e.onClick,n=e.onKeyDown,a=e.onMouseEnter,r=e.onMouseLeave,o=e.onFocus,i=e.onBlur,l.forEach(function(e){switch(e){case"click":d.onClick=v(s.handleTriggerClick,t),d.onKeyDown=v(s.handleTriggerKeyDown,n);break;case"hover":d.onMouseEnter=v(s.handleTriggerMouseEnter,a),d.onMouseLeave=v(s.handleTriggerMouseLeave,r);break;case"focus":d.onFocus=v(s.handleTriggerFocus,o),d.onBlur=v(s.handleTriggerBlur,i)}})),u&&f.default.cloneElement(u,d)},b.prototype.renderContent=function(){var t=this,e=this.props,n=e.children,e=e.triggerType,e=Array.isArray(e)?e:[e],n=l.Children.only(n),a=n.props,r=a.onMouseDown,o=a.onMouseEnter,i=a.onMouseLeave,s={key:"portal"};return e.forEach(function(e){switch(e){case"focus":s.onMouseDown=v(t.handleContentMouseDown,r);break;case"hover":s.onMouseEnter=v(t.handleContentMouseEnter,o),s.onMouseLeave=v(t.handleContentMouseLeave,i)}}),f.default.cloneElement(n,s)},b.prototype.renderPortal=function(){function e(){return(0,p.findDOMNode)(t)}var t=this,n=this.props,a=n.target,r=n.safeNode,o=n.followTrigger,i=n.triggerType,s=n.hasMask,l=n.wrapperStyle,n=(0,d.default)(n,["target","safeNode","followTrigger","triggerType","hasMask","wrapperStyle"]),u=this.props.container,r=Array.isArray(r)?[].concat(r):[r],l=(r.unshift(e),l||{});return o&&(u=function(e){return e&&e.parentNode||e},l.position="relative"),"hover"===i&&s&&(n.onMaskMouseEnter=this.handleMaskMouseEnter,n.onMaskMouseLeave=this.handleMaskMouseLeave),f.default.createElement(m.default,(0,c.default)({},n,{key:"overlay",ref:function(e){return t.overlay=e},visible:this.state.visible,target:a||e,container:u,safeNode:r,wrapperStyle:l,triggerType:i,hasMask:s,onRequestClose:this.handleRequestClose}),this.props.children&&this.renderContent())},b.prototype.render=function(){return[this.renderTrigger(),this.renderPortal()]},a=i=b,i.propTypes={children:u.default.node,trigger:u.default.element,triggerType:u.default.oneOfType([u.default.string,u.default.array]),triggerClickKeycode:u.default.oneOfType([u.default.number,u.default.array]),visible:u.default.bool,defaultVisible:u.default.bool,onVisibleChange:u.default.func,disabled:u.default.bool,autoFit:u.default.bool,delay:u.default.number,canCloseByTrigger:u.default.bool,target:u.default.any,safeNode:u.default.any,followTrigger:u.default.bool,container:u.default.any,hasMask:u.default.bool,wrapperStyle:u.default.object,rtl:u.default.bool,v2:u.default.bool,placement:u.default.string,placementOffset:u.default.number,autoAdjust:u.default.bool},i.defaultProps={triggerType:"hover",triggerClickKeycode:[h.KEYCODE.SPACE,h.KEYCODE.ENTER],defaultVisible:!1,onVisibleChange:n,disabled:!1,autoFit:!1,delay:200,canCloseByTrigger:!0,followTrigger:!1,container:function(){return document.body},rtl:!1},a);function b(e){(0,r.default)(this,b);var t=(0,o.default)(this,y.call(this,e));return t.state={visible:void 0===e.visible?e.defaultVisible:e.visible},_(t,["handleTriggerClick","handleTriggerKeyDown","handleTriggerMouseEnter","handleTriggerMouseLeave","handleTriggerFocus","handleTriggerBlur","handleContentMouseEnter","handleContentMouseLeave","handleContentMouseDown","handleRequestClose","handleMaskMouseEnter","handleMaskMouseLeave"]),t}u.displayName="Popup",t.default=(0,s.polyfill)(u),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var L=a(n(2)),O=a(n(12)),D=n(0),N=a(D),P=a(n(17)),j=a(n(194)),Y=a(n(82)),I=n(11);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(r){var e,t,o,n,a,i,s,l,u,d,c,f,p,h,m,g,y,v,_,b,w,M,k,S,E,x,C,T;return D.useState&&D.useRef&&D.useEffect?(e=void 0===(e=r.prefix)?"next-":e,E=r.animation,t=void 0===E?{in:"expandInDown",out:"expandOutUp"}:E,E=r.defaultVisible,x=r.onVisibleChange,o=void 0===x?function(){}:x,x=r.trigger,n=void 0===(n=r.triggerType)?"hover":n,C=r.overlay,a=r.onPosition,T=r.children,i=r.className,s=r.style,l=r.wrapperClassName,u=r.triggerClickKeycode,d=r.align,c=r.beforeOpen,f=r.onOpen,p=r.afterOpen,h=r.beforeClose,m=r.onClose,g=r.afterClose,y=(0,O.default)(r,["prefix","animation","defaultVisible","onVisibleChange","trigger","triggerType","overlay","onPosition","children","className","style","wrapperClassName","triggerClickKeycode","align","beforeOpen","onOpen","afterOpen","beforeClose","onClose","afterClose"]),E=(0,D.useState)(E),v=E[0],_=E[1],E=(0,D.useState)(t),b=E[0],w=E[1],M=(E=(0,D.useState)(!0))[0],k=E[1],S=(0,D.useRef)(null),(0,D.useEffect)(function(){"visible"in r&&_(r.visible)},[r.visible]),(0,D.useEffect)(function(){"animation"in r&&b!==t&&w(t)},[t]),E=C?T:x,x=N.default.createElement(Y.default.OverlayAnimate,{visible:v,animation:b,timeout:200,onEnter:function(){k(!1),"function"==typeof c&&c(S.current)},onEntering:function(){"function"==typeof f&&f(S.current)},onEntered:function(){"function"==typeof p&&p(S.current)},onExit:function(){"function"==typeof h&&h(S.current)},onExiting:function(){"function"==typeof m&&m(S.current)},onExited:function(){k(!0),"function"==typeof g&&g(S.current)},style:s},(x=C||T)?(0,D.cloneElement)(x,{className:(0,P.default)([e+"overlay-inner",i,x&&x.props&&x.props.className])}):N.default.createElement("span",null)),C=(0,P.default)(((s={})[e+"overlay-wrapper v2"]=!0,s[l]=l,s.opened=v,s)),T={},d&&(T.points=d.split(" ")),N.default.createElement(j.default.Popup,(0,L.default)({},y,T,{wrapperClassName:C,overlay:x,visible:v,isAnimationEnd:M,triggerType:n,onVisibleChange:function(e){for(var t=arguments.length,n=Array(1 16.8.0"),null)},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var l=a(n(2)),u=a(n(12)),o=n(0),d=a(o),i=a(n(24)),s=a(n(8)),c=a(n(82)),f=a(n(162)),p=n(11);function a(e){return e&&e.__esModule?e:{default:e}}var h={top:8,maxCount:0,duration:3e3},m=s.default.config(function(e){var t=e.prefix,s=void 0===t?"next-":t,t=e.dataSource,a=void 0===t?[]:t,r=(0,o.useState)()[1];return a.forEach(function(n){n.timer||(n.timer=setTimeout(function(){var e,t=a.indexOf(n);-1a&&y.shift(),i.default.render(d.default.createElement(s.default,s.default.getContext(),d.default.createElement(m,{dataSource:y})),g),{key:n,close:function(){r.timer&&clearTimeout(r.timer);var e=y.indexOf(r);-1 16.8.0")}},e.exports=t.default},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n(562)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var p=l(n(2)),r=l(n(4)),o=l(n(6)),a=l(n(7)),h=l(n(42)),m=l(n(0)),i=l(n(5)),g=l(n(17)),y=n(11),s=l(n(28)),v=l(n(366));function l(e){return e&&e.__esModule?e:{default:e}}function _(e,r){var o=r.size,i=r.device,s=r.labelAlign,l=r.labelTextAlign,u=r.labelCol,d=r.wrapperCol,c=r.responsive,f=r.colon;return m.default.Children.map(e,function(e){var t,n,a;return y.obj.isReactFragment(e)?_(e.props.children,r):e&&-1<["function","object"].indexOf((0,h.default)(e.type))&&"form_item"===e.type._typeMark?(t={labelCol:e.props.labelCol||u,wrapperCol:e.props.wrapperCol||d,labelAlign:e.props.labelAlign||("phone"===i?"top":s),labelTextAlign:e.props.labelTextAlign||l,colon:"colon"in e.props?e.props.colon:f,size:e.props.size||o,responsive:c},m.default.cloneElement(e,(n=t,a={},Object.keys(n).forEach(function(e){void 0!==n[e]&&(a[e]=n[e])}),a))):e})}u=m.default.Component,(0,a.default)(b,u),b.prototype.getChildContext=function(){return{_formField:this.props.field||this._formField,_formSize:this.props.size,_formDisabled:this.props.disabled,_formPreview:this.props.isPreview,_formFullWidth:this.props.fullWidth,_formLabelForErrorMessage:this.props.useLabelForErrorMessage}},b.prototype.componentDidUpdate=function(e){var t=this.props;this._formField&&("value"in t&&t.value!==e.value&&this._formField.setValues(t.value),"error"in t)&&t.error!==e.error&&this._formField.setValues(t.error)},b.prototype.render=function(){var e=this.props,t=e.className,n=e.inline,a=e.size,r=(e.device,e.labelAlign,e.labelTextAlign,e.onSubmit),o=e.children,i=(e.labelCol,e.wrapperCol,e.style),s=e.prefix,l=e.rtl,u=e.isPreview,d=e.component,c=e.responsive,f=e.gap,n=(e.colon,(0,g.default)(((e={})[s+"form"]=!0,e[s+"inline"]=n,e[""+s+a]=a,e[s+"form-responsive-grid"]=c,e[s+"form-preview"]=u,e[t]=!!t,e))),a=_(o,this.props);return m.default.createElement(d,(0,p.default)({role:"grid"},y.obj.pickOthers(b.propTypes,this.props),{className:n,style:i,dir:l?"rtl":void 0,onSubmit:r}),c?m.default.createElement(v.default,{gap:f},a):a)},a=n=b,n.propTypes={prefix:i.default.string,inline:i.default.bool,size:i.default.oneOf(["large","medium","small"]),fullWidth:i.default.bool,labelAlign:i.default.oneOf(["top","left","inset"]),labelTextAlign:i.default.oneOf(["left","right"]),field:i.default.any,saveField:i.default.func,labelCol:i.default.object,wrapperCol:i.default.object,onSubmit:i.default.func,children:i.default.any,className:i.default.string,style:i.default.object,value:i.default.object,onChange:i.default.func,component:i.default.oneOfType([i.default.string,i.default.func]),fieldOptions:i.default.object,rtl:i.default.bool,device:i.default.oneOf(["phone","tablet","desktop"]),responsive:i.default.bool,isPreview:i.default.bool,useLabelForErrorMessage:i.default.bool,colon:i.default.bool,disabled:i.default.bool,gap:i.default.oneOfType([i.default.arrayOf(i.default.number),i.default.number])},n.defaultProps={prefix:"next-",onSubmit:function(e){e.preventDefault()},size:"medium",labelAlign:"left",onChange:y.func.noop,component:"form",saveField:y.func.noop,device:"desktop",colon:!1,disabled:!1},n.childContextTypes={_formField:i.default.object,_formSize:i.default.string,_formDisabled:i.default.bool,_formPreview:i.default.bool,_formFullWidth:i.default.bool,_formLabelForErrorMessage:i.default.bool};var u,n=a;function b(e){(0,r.default)(this,b);var t,n,a=(0,o.default)(this,u.call(this,e));return a.onChange=function(e,t){a.props.onChange(a._formField.getValues(),{name:e,value:t,field:a._formField})},a._formField=null,!1!==e.field&&(t=(0,p.default)({},e.fieldOptions,{onChange:a.onChange}),e.field?(a._formField=e.field,n=a._formField.options.onChange,t.onChange=y.func.makeChain(n,a.onChange),a._formField.setOptions&&a._formField.setOptions(t)):("value"in e&&(t.values=e.value),a._formField=new s.default(a,t)),e.locale&&e.locale.Validate&&a._formField.setOptions({messages:e.locale.Validate}),e.saveField(a._formField)),a}n.displayName="Form",t.default=n,e.exports=t.default},function(e,t,n){"use strict";var a=n(90),m=(Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(n(166))),i=a(n(567)),r=a(n(167)),o=a(n(115)),b=a(n(168)),w=a(n(76)),s=a(n(364)),l=a(n(365)),g=a(n(574)),M=n(583),u={state:"",valueName:"value",trigger:"onChange",inputValues:[]},a=function(){function a(e){var t=this,n=1e.length)&&(t=e.length);for(var n=0,a=new Array(t);n=a.length?n:(o=a[r],n=e(t&&t[o],n,a,r+1),t?Array.isArray(t)?((a=[].concat(t))[o]=n,a):(0,l.default)({},t,(0,i.default)({},o,n)):((r=isNaN(o)?{}:[])[o]=n,r))};t=function(){};void 0!==e&&e.env,n.warning=t}.call(this,r(102))},function(e,t,n){"use strict";t.__esModule=!0,t.cloneAndAddKey=function(e){{var t;if(e&&(0,a.isValidElement)(e))return t=e.key||"error",(0,a.cloneElement)(e,{key:t})}return e},t.scrollToFirstError=function(e){var t=e.errorsGroup,n=e.options,a=e.instance;if(t&&n.scrollToFirstError){var r,o=void 0,i=void 0;for(r in t)if(t.hasOwnProperty(r)){var s=u.default.findDOMNode(a[r]);if(!s)return;var l=s.offsetTop;(void 0===i||l), use instead of.'),S.default.cloneElement(e,{className:t,size:c||C(r)})):(0,k.isValidElement)(e)?e:S.default.createElement("span",{className:a+"btn-helper"},e)}),t=d,_=(0,b.default)({},x.obj.pickOthers(Object.keys(T.propTypes),e),{type:o,disabled:p,onClick:h,className:(0,E.default)(n)});return"button"!==t&&(delete _.type,_.disabled)&&(delete _.onClick,_.href)&&delete _.href,S.default.createElement(t,(0,b.default)({},_,{dir:g?"rtl":void 0,onMouseUp:this.onMouseUp,ref:this.buttonRefHandler}),s,u)},a=n=T,n.propTypes=(0,b.default)({},s.default.propTypes,{prefix:r.default.string,rtl:r.default.bool,type:r.default.oneOf(["primary","secondary","normal"]),size:r.default.oneOf(["small","medium","large"]),icons:r.default.shape({loading:r.default.node}),iconSize:r.default.oneOfType([r.default.oneOf(["xxs","xs","small","medium","large","xl","xxl","xxxl","inherit"]),r.default.number]),htmlType:r.default.oneOf(["submit","reset","button"]),component:r.default.oneOf(["button","a","div","span"]),loading:r.default.bool,ghost:r.default.oneOf([!0,!1,"light","dark"]),text:r.default.bool,warning:r.default.bool,disabled:r.default.bool,onClick:r.default.func,className:r.default.string,onMouseUp:r.default.func,children:r.default.node}),n.defaultProps={prefix:"next-",type:"normal",size:"medium",icons:{},htmlType:"button",component:"button",loading:!1,ghost:!1,text:!1,warning:!1,disabled:!1,onClick:function(){}};var u,s=a;function T(){var e,t;(0,o.default)(this,T);for(var n=arguments.length,a=Array(n),r=0;ra[r])return!0;if(n[r] 0, or `null`');if(U(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var t=i.numericSeparator;if(void 0===n)return"undefined";if(null===n)return"null";if("boolean"==typeof n)return n?"true":"false";if("string"==typeof n)return function e(t,n){if(t.length>n.maxStringLength)return a=t.length-n.maxStringLength,a="... "+a+" more character"+(1"}if(z(n))return 0===n.length?"[]":(l=$(n,m),h&&!function(e){for(var t=0;t "+m(e,n))}),ne("Map",_.call(n),u,h)):function(e){if(w&&e&&"object"==typeof e)try{w.call(e);try{_.call(e)}catch(e){return 1}return e instanceof Set}catch(e){}return}(n)?(d=[],M&&M.call(n,function(e){d.push(m(e,n))}),ne("Set",w.call(n),d,h)):function(e){if(k&&e&&"object"==typeof e)try{k.call(e,k);try{S.call(e,S)}catch(e){return 1}return e instanceof WeakMap}catch(e){}return}(n)?q("WeakMap"):function(e){if(S&&e&&"object"==typeof e)try{S.call(e,S);try{k.call(e,k)}catch(e){return 1}return e instanceof WeakSet}catch(e){}return}(n)?q("WeakSet"):function(e){if(E&&e&&"object"==typeof e)try{return E.call(e),1}catch(e){}return}(n)?q("WeakRef"):"[object Number]"!==V(c=n)||j&&"object"==typeof c&&j in c?function(e){if(e&&"object"==typeof e&&D)try{return D.call(e),1}catch(e){}return}(n)?K(m(D.call(n))):"[object Boolean]"!==V(t=n)||j&&"object"==typeof t&&j in t?"[object String]"!==V(e=n)||j&&"object"==typeof e&&j in e?("[object Date]"!==V(t=n)||j&&"object"==typeof t&&j in t)&&!W(n)?(e=$(n,m),t=I?I(n)===Object.prototype:n instanceof Object||n.constructor===Object,f=n instanceof Object?"":"null prototype",p=!t&&j&&Object(n)===n&&j in n?x.call(V(n),8,-1):f?"Object":"",t=(!t&&"function"==typeof n.constructor&&n.constructor.name?n.constructor.name+" ":"")+(p||f?"["+O.call(L.call([],p||[],f||[]),": ")+"] ":""),0===e.length?t+"{}":h?t+"{"+G(e,h)+"}":t+"{ "+O.call(e,", ")+" }"):String(n):K(m(String(n))):K(J.call(n)):K(m(Number(n)))};var l=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return l.call(e,t)}function V(e){return i.call(e)}function ee(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,a=e.length;n, as child."),a.push(t),e.props.children)&&(t.children=n(e.props.children))}),a}(e.children):t},N.prototype.fetchInfoFromBinaryChildren=function(e){function r(e,t){return t=t||0,e.forEach(function(e){e.children?t=r(e.children,t):t+=1}),t}var a=!1,o=[],i=[],e=(function t(){var e=0r.tRight&&(e=r.tRight,r.changedPageX=r.tRight-r.startLeft),e-r.cellLefto.clientHeight,o.scrollWidth,o.clientWidth,o={},e||(o[r]=0,o[a]=0),+i&&(o.marginBottom=-i,o.paddingBottom=i,e)&&(o[a]=i),h.dom.setStyle(this.headerNode,o)),n&&!this.props.lockType&&this.headerNode&&(r=this.headerNode.querySelector("."+t+"table-header-fixer"),e=h.dom.getStyle(this.headerNode,"height"),a=h.dom.getStyle(this.headerNode,"paddingBottom"),h.dom.setStyle(r,{width:i,height:e-a}))},o.prototype.render=function(){var e=this.props,t=e.components,n=e.className,a=e.prefix,r=e.fixedHeader,o=e.lockType,i=e.dataSource,e=(e.maxBodyHeight,(0,u.default)(e,["components","className","prefix","fixedHeader","lockType","dataSource","maxBodyHeight"]));return r&&((t=(0,l.default)({},t)).Header||(t.Header=m.default),t.Body||(t.Body=g.default),t.Wrapper||(t.Wrapper=y.default),n=(0,p.default)(((r={})[a+"table-fixed"]=!0,r[a+"table-wrap-empty"]=!i.length,r[n]=n,r))),c.default.createElement(s,(0,l.default)({},e,{dataSource:i,lockType:o,components:t,className:n,prefix:a}))},o}(c.default.Component),n.FixedHeader=m.default,n.FixedBody=g.default,n.FixedWrapper=y.default,n.propTypes=(0,l.default)({hasHeader:r.default.bool,fixedHeader:r.default.bool,maxBodyHeight:r.default.oneOfType([r.default.number,r.default.string])},s.propTypes),n.defaultProps=(0,l.default)({},s.defaultProps,{hasHeader:!0,fixedHeader:!1,maxBodyHeight:200,components:{},refs:{},prefix:"next-"}),n.childContextTypes={fixedHeader:r.default.bool,getNode:r.default.func,onFixedScrollSync:r.default.func,getTableInstanceForFixed:r.default.func,maxBodyHeight:r.default.oneOfType([r.default.number,r.default.string])};var t,n=t;return n.displayName="FixedTable",(0,o.statics)(n,s),n};var c=s(n(0)),r=s(n(5)),f=n(24),p=s(n(17)),h=n(11),m=s(n(134)),g=s(n(402)),y=s(n(135)),o=n(70);function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var i=o(n(12)),f=o(n(2)),r=o(n(4)),s=o(n(6)),l=o(n(7)),u=(t.default=function(o){e=t=function(n){function a(e,t){(0,r.default)(this,a);var c=(0,s.default)(this,n.call(this,e,t));return c.addSelection=function(e){var t=c.props,n=t.prefix,a=t.rowSelection,t=t.size,a=a.columnProps&&a.columnProps()||{};e.find(function(e){return"selection"===e.key})||e.unshift((0,f.default)({key:"selection",title:c.renderSelectionHeader.bind(c),cell:c.renderSelectionBody.bind(c),width:"small"===t?34:50,className:n+"table-selection "+n+"table-prerow",__normalized:!0},a))},c.renderSelectionHeader=function(){var e=c.selectAllRow,t={},n=c.props,a=n.rowSelection,r=n.primaryKey,o=n.dataSource,i=n.entireDataSource,n=n.locale,s=c.state.selectedRowKeys,l=a.mode||"multiple",u=!!s.length,d=!1,i=(c.flatDataSource(i||o).filter(function(e,t){return!a.getProps||!(a.getProps(e,t)||{}).disabled}).map(function(e){return e[r]}).forEach(function(e){-1===s.indexOf(e)?u=!1:d=!0}),t.onClick=b(function(e){e.stopPropagation()},t.onClick),a.titleProps&&a.titleProps()||{});return u&&(d=!1),["multiple"===l?p.default.createElement(h.default,(0,f.default)({key:"_total",indeterminate:d,"aria-label":n.selectAll,checked:u,onChange:e},t,i)):null,a.titleAddons&&a.titleAddons()]},c.renderSelectionBody=function(e,t,n){var a=c.props,r=a.rowSelection,a=a.primaryKey,o=c.state.selectedRowKeys,i=r.mode||"multiple",o=-1l.length&&(u=o),w(u.filter(function(e){return-1=Math.max(a-y,0)&&oc.clientHeight;this.isLock()?(e=this.bodyLeftNode,t=this.bodyRightNode,n=this.getWrapperNode("right"),a=f?d:0,c=c.offsetHeight-d,f||(r[l]=0,r[u]=0),+d?(r.marginBottom=-d,r.paddingBottom=d):(r.marginBottom=-20,r.paddingBottom=20),c={"max-height":c},o||+d||(c[u]=0),+d&&(c[u]=-d),e&&g.dom.setStyle(e,c),t&&g.dom.setStyle(t,c),n&&+d&&g.dom.setStyle(n,i?"left":"right",a+"px")):(r.marginBottom=-d,r.paddingBottom=d,r[u]=0,f||(r[l]=0)),s&&g.dom.setStyle(s,r)},a.prototype.adjustHeaderSize=function(){var o=this;this.isLock()&&this.tableInc.groupChildren.forEach(function(e,t){var n=o.tableInc.groupChildren[t].length-1,n=o.getHeaderCellNode(t,n),a=o.getHeaderCellNode(t,0),r=o.getHeaderCellNode(t,0,"right"),t=o.getHeaderCellNode(t,0,"left");n&&r&&(n=n.offsetHeight,g.dom.setStyle(r,"height",n),setTimeout(function(){var e=o.tableRightInc.affixRef;return e&&e.getInstance()&&e.getInstance().updatePosition()})),a&&t&&(r=a.offsetHeight,g.dom.setStyle(t,"height",r),setTimeout(function(){var e=o.tableLeftInc.affixRef;return e&&e.getInstance()&&e.getInstance().updatePosition()}))})},a.prototype.adjustRowHeight=function(){var n=this;this.isLock()&&this.tableInc.props.dataSource.forEach(function(e,t){t=""+("object"===(void 0===e?"undefined":(0,r.default)(e))&&"__rowIndex"in e?e.__rowIndex:t)+(e.__expanded?"_expanded":"");n.setRowHeight(t,"left"),n.setRowHeight(t,"right")})},a.prototype.setRowHeight=function(e,t){var t=this.getRowNode(e,t),e=this.getRowNode(e),e=(M?e&&e.offsetHeight:e&&parseFloat(getComputedStyle(e).height))||"auto",n=(M?t&&t.offsetHeight:t&&parseFloat(getComputedStyle(t).height))||"auto";t&&e!==n&&g.dom.setStyle(t,"height",e)},a.prototype.getWrapperNode=function(e){e=e?e.charAt(0).toUpperCase()+e.substr(1):"";try{return(0,u.findDOMNode)(this["lock"+e+"El"])}catch(e){return null}},a.prototype.getRowNode=function(e,t){t=this["table"+(t=t?t.charAt(0).toUpperCase()+t.substr(1):"")+"Inc"];try{return(0,u.findDOMNode)(t.getRowRef(e))}catch(e){return null}},a.prototype.getHeaderCellNode=function(e,t,n){n=this["table"+(n=n?n.charAt(0).toUpperCase()+n.substr(1):"")+"Inc"];try{return(0,u.findDOMNode)(n.getHeaderCellRef(e,t))}catch(e){return null}},a.prototype.getCellNode=function(e,t,n){n=this["table"+(n=n?n.charAt(0).toUpperCase()+n.substr(1):"")+"Inc"];try{return(0,u.findDOMNode)(n.getCellRef(e,t))}catch(e){return null}},a.prototype.render=function(){var e,t=this.props,n=(t.children,t.columns,t.prefix),a=t.components,r=t.className,o=t.dataSource,i=t.tableWidth,t=(0,f.default)(t,["children","columns","prefix","components","className","dataSource","tableWidth"]),s=this.normalizeChildrenState(this.props),l=s.lockLeftChildren,u=s.lockRightChildren,s=s.children,d={left:this.getFlatenChildrenLength(l),right:this.getFlatenChildrenLength(u),origin:this.getFlatenChildrenLength(s)};return this._notNeedAdjustLockLeft&&(l=[]),this._notNeedAdjustLockRight&&(u=[]),this.lockLeftChildren=l,this.lockRightChildren=u,this.isOriginLock()?((a=(0,p.default)({},a)).Body=a.Body||v.default,a.Header=a.Header||_.default,a.Wrapper=a.Wrapper||b.default,a.Row=a.Row||y.default,r=(0,m.default)(((e={})[n+"table-lock"]=!0,e[n+"table-wrap-empty"]=!o.length,e[r]=r,e)),e=[h.default.createElement(c,(0,p.default)({},t,{dataSource:o,key:"lock-left",columns:l,className:n+"table-lock-left",lengths:d,prefix:n,lockType:"left",components:a,ref:this.saveLockLeftRef,loading:!1,"aria-hidden":!0})),h.default.createElement(c,(0,p.default)({},t,{dataSource:o,key:"lock-right",columns:u,className:n+"table-lock-right",lengths:d,prefix:n,lockType:"right",components:a,ref:this.saveLockRightRef,loading:!1,"aria-hidden":!0}))],h.default.createElement(c,(0,p.default)({},t,{tableWidth:i,dataSource:o,columns:s,prefix:n,lengths:d,wrapperContent:e,components:a,className:r}))):h.default.createElement(c,this.props)},a}(h.default.Component),t.LockRow=y.default,t.LockBody=v.default,t.LockHeader=_.default,t.propTypes=(0,p.default)({scrollToCol:a.default.number,scrollToRow:a.default.number},c.propTypes),t.defaultProps=(0,p.default)({},c.defaultProps),t.childContextTypes={getTableInstance:a.default.func,getLockNode:a.default.func,onLockBodyScroll:a.default.func,onRowMouseEnter:a.default.func,onRowMouseLeave:a.default.func};var e,t=e;return t.displayName="LockTable",(0,w.statics)(t,c),t},n(0)),h=c(l),u=n(24),a=c(n(5)),m=c(n(17)),d=c(n(177)),g=n(11),y=c(n(179)),v=c(n(403)),_=c(n(404)),b=c(n(135)),w=n(70);function c(e){return e&&e.__esModule?e:{default:e}}var M=g.env.ieVersion;function k(e){return function n(e){return e.map(function(e){var t=(0,p.default)({},e);return e.children&&(e.children=n(e.children)),t})}(e)}e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var l=s(n(12)),u=s(n(2)),r=s(n(4)),o=s(n(6)),i=s(n(7)),d=(t.default=function(s){e=t=function(n){function a(e,t){(0,r.default)(this,a);var d=(0,o.default)(this,n.call(this,e));return d.state={},d.updateOffsetArr=function(){var e=d.splitChildren||{},t=e.lockLeftChildren,n=e.lockRightChildren,e=e.originChildren,a=d.getFlatenChildren(t).length,r=d.getFlatenChildren(n).length,e=a+r+d.getFlatenChildren(e).length,a=0r.top-e.offset?(t?(l.position="absolute",l.top=a-(r.top-e.offset),u="relative"):(l.position="fixed",l.top=e.offset+n.top),d._setAffixStyle(l,!0),d._setContainerStyle(s)):e.bottom&&a{e=new Date(e);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}},function(e,t,n){"use strict";const a=n(182);class r extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${a(2,this.getUTCMonth()+1)}-`+a(2,this.getUTCDate())+"T"+(`${a(2,this.getUTCHours())}:${a(2,this.getUTCMinutes())}:${a(2,this.getUTCSeconds())}.`+a(3,this.getUTCMilliseconds()))}}e.exports=e=>{e=new r(e);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}},function(a,e,r){"use strict";!function(e){const t=r(182);class n extends e.Date{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${t(2,this.getUTCMonth()+1)}-`+t(2,this.getUTCDate())}}a.exports=e=>{e=new n(e);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}}.call(this,r(65))},function(e,t,n){"use strict";const a=n(182);class r extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${a(2,this.getUTCHours())}:${a(2,this.getUTCMinutes())}:${a(2,this.getUTCSeconds())}.`+a(3,this.getUTCMilliseconds())}}e.exports=e=>{e=new r(e);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}},function(e,t,n){"use strict";!function(s){e.exports=function(r,e){e=e||{};const n=e.blocksize||40960,o=new t;return new Promise((e,t)=>{s(i,0,n,e,t)});function i(e,t,n,a){if(e>=r.length)try{return n(o.finish())}catch(e){return a(l(e,r))}try{o.parse(r.slice(e,e+t)),s(i,e+t,t,n,a)}catch(e){a(l(e,r))}}};const t=n(181),l=n(183)}.call(this,n(408).setImmediate)},function(e,t,n){!function(e,p){!function(n,o){"use strict";var a,i,s,r,l,u,t,e;function d(e){delete i[e]}function c(e){if(s)setTimeout(c,0,e);else{var t=i[e];if(t){s=!0;try{var n=t,a=n.callback,r=n.args;switch(r.length){case 0:a();break;case 1:a(r[0]);break;case 2:a(r[0],r[1]);break;case 3:a(r[0],r[1],r[2]);break;default:a.apply(o,r)}}finally{d(e),s=!1}}}}function f(){function e(e){e.source===n&&"string"==typeof e.data&&0===e.data.indexOf(t)&&c(+e.data.slice(t.length))}var t="setImmediate$"+Math.random()+"$";n.addEventListener?n.addEventListener("message",e,!1):n.attachEvent("onmessage",e),l=function(e){n.postMessage(t+e,"*")}}n.setImmediate||(a=1,s=!(i={}),r=n.document,e=(e=Object.getPrototypeOf&&Object.getPrototypeOf(n))&&e.setTimeout?e:n,"[object process]"==={}.toString.call(n.process)?l=function(e){p.nextTick(function(){c(e)})}:!function(){var e,t;if(n.postMessage&&!n.importScripts)return e=!0,t=n.onmessage,n.onmessage=function(){e=!1},n.postMessage("","*"),n.onmessage=t,e}()?l=n.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):r&&"onreadystatechange"in r.createElement("script")?(u=r.documentElement,function(e){var t=r.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,u.removeChild(t),t=null},u.appendChild(t)}):function(e){setTimeout(c,0,e)}:f(),e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n{let n,a=!1,r=!1;function o(){if(a=!0,!n)try{e(l.finish())}catch(e){t(e)}}function i(e){r=!0,t(e)}s.once("end",o),s.once("error",i),function e(){n=!0;let t;for(;null!==(t=s.read());)try{l.parse(t)}catch(e){return i(e)}n=!1;if(a)return o();if(r)return;s.once("readable",e)}()})}(e):function(){const a=new o;return new r.Transform({objectMode:!0,transform(e,t,n){try{a.parse(e.toString(t))}catch(e){this.emit("error",e)}n()},flush(e){try{this.push(a.finish())}catch(e){this.emit("error",e)}e()}})}()};const r=n(691),o=n(181)},function(e,t,n){e.exports=a;var d=n(184).EventEmitter;function a(){d.call(this)}n(104)(a,d),a.Readable=n(185),a.Writable=n(701),a.Duplex=n(702),a.Transform=n(703),a.PassThrough=n(704),(a.Stream=a).prototype.pipe=function(t,e){var n=this;function a(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function r(){n.readable&&n.resume&&n.resume()}n.on("data",a),t.on("drain",r),t._isStdio||e&&!1===e.end||(n.on("end",i),n.on("close",s));var o=!1;function i(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function l(e){if(u(),0===d.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",a),t.removeListener("drain",r),n.removeListener("end",i),n.removeListener("close",s),n.removeListener("error",l),t.removeListener("error",l),n.removeListener("end",u),n.removeListener("close",u),t.removeListener("close",u)}return n.on("error",l),t.on("error",l),n.on("end",u),n.on("close",u),t.on("close",u),t.emit("pipe",n),t}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";t.byteLength=function(e){var e=d(e),t=e[0],e=e[1];return 3*(t+e)/4-e},t.toByteArray=function(e){var t,n,a=d(e),r=a[0],a=a[1],o=new u(function(e,t){return 3*(e+t)/4-t}(r,a)),i=0,s=0>16&255,o[i++]=t>>8&255,o[i++]=255&t;2===a&&(t=l[e.charCodeAt(n)]<<2|l[e.charCodeAt(n+1)]>>4,o[i++]=255&t);1===a&&(t=l[e.charCodeAt(n)]<<10|l[e.charCodeAt(n+1)]<<4|l[e.charCodeAt(n+2)]>>2,o[i++]=t>>8&255,o[i++]=255&t);return o},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,r=[],o=0,i=n-a;o>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}(a));return r.join("")}(e,o,i>2]+s[t<<4&63]+"==")):2==a&&(t=(e[n-2]<<8)+e[n-1],r.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return r.join("")};for(var s=[],l=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,o=a.length;r */ t.read=function(e,t,n,a,r){var o,i,s=8*r-a-1,l=(1<>1,d=-7,c=n?r-1:0,f=n?-1:1,r=e[t+c];for(c+=f,o=r&(1<<-d)-1,r>>=-d,d+=s;0>=-d,d+=a;0>1,c=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=a?0:o-1,p=a?1:-1,o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=u):(i=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-i))<1&&(i--,a*=2),2<=(t+=1<=i+d?c/a:c*Math.pow(2,1-d))*a&&(i++,a/=2),u<=i+d?(s=0,i=u):1<=i+d?(s=(t*a-1)*Math.pow(2,r),i+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),i=0));8<=r;e[n+f]=255&s,f+=p,s/=256,r-=8);for(i=i<>>0),r=this.head,o=0;r;)t=r.data,n=o,t.copy(a,n),o+=r.data.length,r=r.next;return a},r),a&&a.inspect&&a.inspect.custom&&(e.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){!function(t){function a(e){try{if(!t.localStorage)return}catch(e){return}e=t.localStorage[e];return null!=e&&"true"===String(e).toLowerCase()}e.exports=function(e,t){if(a("noDeprecation"))return e;var n=!1;return function(){if(!n){if(a("throwDeprecation"))throw new Error(t);a("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}.call(this,n(65))},function(e,t,n){"use strict";e.exports=r;var a=n(414),e=Object.create(n(117));function r(e){if(!(this instanceof r))return new r(e);a.call(this,e)}e.inherits=n(104),e.inherits(r,a),r.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(186)},function(e,t,n){e.exports=n(91)},function(e,t,n){e.exports=n(185).Transform},function(e,t,n){e.exports=n(185).PassThrough},function(e,t,n){"use strict";function u(e){return new Error("Can only stringify objects, not "+e)}function d(t){return Object.keys(t).filter(e=>p(t[e]))}function c(e){var t,n=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(t of Object.keys(e))!e[t]||"function"!=typeof e[t].toJSON||"toISOString"in e[t]?n[t]=e[t]:n[t]=e[t].toJSON();return n}function f(t,e,n){var a,r,o=d(n=c(n));r=n,a=Object.keys(r).filter(e=>!p(r[e]));const i=[],s=e||"",l=(o.forEach(e=>{var t=h(n[e]);"undefined"!==t&&"null"!==t&&i.push(s+m(e)+" = "+g(n[e],!0))}),0{i.push(function(e,t,n,a){var r=h(a);{if("array"===r)return function(e,t,n,a){var r=h((a=c(a))[0]);if("table"!==r)throw u(r);const o=e+m(n);let i="";return a.forEach(e=>{0"\\u"+function(e,t){for(;t.lengths(e).replace(/"(?="")/g,'\\"')).join("\n");return'"'===e.slice(-1)&&(e+="\\\n"),'"""\n'+e+'"""';return}case"string":return i(t);case"string-literal":return"'"+t+"'";case"integer":return y(t);case"float":n=t;return n===1/0?"inf":n===-1/0?"-inf":Object.is(n,NaN)?"nan":Object.is(n,-0)?"-0.0":([n,a]=String(n).split("."),y(n)+"."+a);case"boolean":return String(t);case"datetime":return t.toISOString();case"array":{var a=t.filter(e=>"null"!==h(e)&&"undefined"!==h(e)&&"nan"!==h(e));a=c(a);let e="[";a=a.map(e=>l(e));60{o.push(m(e)+" = "+g(r[e],!1))}),"{ "+o.join(", ")+(0u&&!c&&(o=o.slice(0,u),e=C.default.createElement(m.default,{key:"_count",type:"primary",size:p,animation:!1},d(a,t))),0=P.KEYCODE.LEFT&&t<=P.KEYCODE.DOWN&&e.preventDefault(),e=void 0,t===P.KEYCODE.RIGHT||t===P.KEYCODE.DOWN?(e=o.getNextActiveKey(!0),o.handleTriggerEvent(o.props.triggerType,e)):t!==P.KEYCODE.LEFT&&t!==P.KEYCODE.UP||(e=o.getNextActiveKey(!1),o.handleTriggerEvent(o.props.triggerType,e)))},o.state={activeKey:o.getDefaultActiveKey(e)},o}s.displayName="Tab",t.default=(0,l.polyfill)(s),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var _=c(n(2)),a=c(n(4)),r=c(n(6)),o=c(n(7)),b=c(n(0)),i=n(24),s=c(n(5)),w=c(n(17)),M=c(n(26)),l=c(n(64)),u=c(n(50)),k=(c(n(19)),c(n(82))),h=n(11),d=n(418);function c(e){return e&&e.__esModule?e:{default:e}}var f,S={float:"right",zIndex:1},E={float:"left",zIndex:1},p={dropdown:"arrow-down",prev:"arrow-left",next:"arrow-right"},m=l.default.Popup,l=(f=b.default.Component,(0,o.default)(g,f),g.prototype.componentDidMount=function(){this.props.animation||this.initialSettings(),h.events.on(window,"resize",this.onWindowResized)},g.prototype.componentDidUpdate=function(e){var t=this;clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(function(){t.scrollToActiveTab()},410),clearTimeout(this.slideTimer),this.slideTimer=setTimeout(function(){t.setSlideBtn()},410),"dropdown"!==this.props.excessMode||(0,d.tabsArrayShallowEqual)(this.props.tabs,e.tabs)||this.getDropdownItems(this.props)},g.prototype.componentWillUnmount=function(){h.events.off(window,"resize",this.onWindowResized)},g.prototype.initialSettings=function(){this.setSlideBtn(),this.getDropdownItems(this.props)},g.prototype.setOffset=function(e){var t=!(1n&&(t.current=n),this.setState(t),this.props.onPageSizeChange(e)},I.prototype.renderPageTotal=function(){var e=this.props,t=e.prefix,n=e.total,e=e.totalRender,a=this.state,r=a.currentPageSize,a=a.current;return N.default.createElement("div",{className:t+"pagination-total"},e(n,[(a-1)*r+1,a*r]))},I.prototype.renderPageItem=function(e){var t=this.props,n=t.prefix,a=t.size,r=t.link,o=t.pageNumberRender,i=t.total,s=t.pageSize,t=t.locale,l=this.state.current,i=Y(i,s),s=parseInt(e,10)===l,a={size:a,className:(0,P.default)(((l={})[n+"pagination-item"]=!0,l[n+"current"]=s,l)),onClick:s?m:this.onPageItemClick.bind(this,e)};return r&&(a.component="a",a.href=r.replace("{page}",e)),N.default.createElement(c.default,(0,D.default)({"aria-label":j.str.template(t.total,{current:e,total:i})},a,{key:e}),o(e))},I.prototype.renderPageFirst=function(e){var t=this.props,n=t.prefix,a=t.size,r=t.shape,t=t.locale,a={disabled:e<=1,size:a,className:(0,P.default)(((a={})[n+"pagination-item"]=!0,a[n+"prev"]=!0,a)),onClick:this.onPageItemClick.bind(this,e-1)},n=N.default.createElement(d.default,{type:"arrow-left",className:n+"pagination-icon-prev"});return N.default.createElement(c.default,(0,D.default)({},a,{"aria-label":j.str.template(t.labelPrev,{current:e})}),n,"arrow-only"===r||"arrow-prev-only"===r||"no-border"===r?"":t.prev)},I.prototype.renderPageLast=function(e,t){var n=this.props,a=n.prefix,r=n.size,o=n.shape,n=n.locale,r={disabled:t<=e,size:r,className:(0,P.default)(((t={})[a+"pagination-item"]=!0,t[a+"next"]=!0,t)),onClick:this.onPageItemClick.bind(this,e+1)},t=N.default.createElement(d.default,{type:"arrow-right",className:a+"pagination-icon-next"});return N.default.createElement(c.default,(0,D.default)({},r,{"aria-label":j.str.template(n.labelNext,{current:e})}),"arrow-only"===o||"no-border"===o?"":n.next,t)},I.prototype.renderPageEllipsis=function(e){var t=this.props.prefix;return N.default.createElement(d.default,{className:t+"pagination-ellipsis "+t+"pagination-icon-ellipsis",type:"ellipsis",key:"ellipsis-"+e})},I.prototype.renderPageJump=function(){var t=this,e=this.props,n=e.prefix,a=e.size,e=e.locale,r=this.state.inputValue;return[N.default.createElement("span",{className:n+"pagination-jump-text"},e.goTo),N.default.createElement(f.default,{className:n+"pagination-jump-input",type:"text","aria-label":e.inputAriaLabel,size:a,value:r,onChange:this.onInputChange.bind(this),onKeyDown:function(e){e.keyCode===j.KEYCODE.ENTER&&t.handleJump(e)}}),N.default.createElement("span",{className:n+"pagination-jump-text"},e.page),N.default.createElement(c.default,{className:n+"pagination-jump-go",size:a,onClick:this.handleJump},e.go)]},I.prototype.renderPageDisplay=function(e,t){var n=this.props,a=n.prefix,n=n.pageNumberRender;return N.default.createElement("span",{className:a+"pagination-display"},N.default.createElement("em",null,n(e)),"/",n(t))},I.prototype.renderPageList=function(e,t){var n=this.props,a=n.prefix,n=n.pageShowCount,r=[];if(t<=n)for(var o=1;o<=t;o++)r.push(this.renderPageItem(o));else{var n=n-3,i=parseInt(n/2,10),s=void 0,l=void 0;r.push(this.renderPageItem(1)),l=e+i,(s=e-i)<=1&&(l=(s=2)+n),2=e.length&&-1=this.props.children.length?(this.update(this.props),this.changeSlide({message:"index",index:this.props.children.length-this.props.slidesToShow,currentSlide:this.state.currentSlide})):(n=[],Object.keys(t).forEach(function(e){e in a.props&&t[e]!==a.props[e]&&n.push(e)}),1===n.length&&"children"===n[0]||l.obj.shallowEqual(t,this.props)||this.update(this.props)),this.adaptHeight()},p.prototype.componentWillUnmount=function(){this.animationEndCallback&&clearTimeout(this.animationEndCallback),l.events.off(window,"resize",this.onWindowResized),this.state.autoPlayTimer&&clearInterval(this.state.autoPlayTimer)},p.prototype.onWindowResized=function(){this.update(this.props),this.setState({animating:!1}),clearTimeout(this.animationEndCallback),delete this.animationEndCallback},p.prototype.slickGoTo=function(e){"number"==typeof e&&this.changeSlide({message:"index",index:e,currentSlide:this.state.currentSlide})},p.prototype.onEnterArrow=function(e){this.arrowHoverHandler(e)},p.prototype.onLeaveArrow=function(){this.arrowHoverHandler()},p.prototype._instanceRefHandler=function(e,t){this[e]=t},p.prototype.render=function(){var e=this.props,t=e.prefix,n=e.animation,a=e.arrows,r=e.arrowSize,o=e.arrowPosition,i=e.arrowDirection,s=e.dots,l=e.dotsClass,u=e.cssEase,d=e.speed,c=e.infinite,f=e.centerMode,p=e.centerPadding,h=e.lazyLoad,m=e.dotsDirection,g=e.rtl,y=e.slidesToShow,v=e.slidesToScroll,_=e.variableWidth,b=e.vertical,w=e.verticalSwiping,M=e.focusOnSelect,k=e.children,S=e.dotsRender,e=e.triggerType,E=this.state,x=E.currentSlide,C=E.lazyLoadedList,T=E.slideCount,L=E.slideWidth,O=E.slideHeight,D=E.trackStyle,N=E.listHeight,E=E.dragging,u={prefix:t,animation:n,cssEase:u,speed:d,infinite:c,centerMode:f,focusOnSelect:M?this.selectHandler:null,currentSlide:x,lazyLoad:h,lazyLoadedList:C,rtl:g,slideWidth:L,slideHeight:O,slidesToShow:y,slidesToScroll:v,slideCount:T,trackStyle:D,variableWidth:_,vertical:b,verticalSwiping:w,triggerType:e},d=void 0,h=(!0===s&&yt.startX?1:-1),!0===this.props.verticalSwiping&&(t.swipeLength=Math.round(Math.sqrt(Math.pow(t.curY-t.startY,2))),a=t.curY>t.startY?1:-1),r=this.state.currentSlide,s=Math.ceil(this.state.slideCount/this.props.slidesToScroll),o=this.swipeDirection(this.state.touchObject),i=t.swipeLength,!1===this.props.infinite&&(0===r&&"right"===o||s<=r+1&&"left"===o)&&(i=t.swipeLength*this.props.edgeFriction,!1===this.state.edgeDragged)&&this.props.edgeEvent&&(this.props.edgeEvent(o),this.setState({edgeDragged:!0})),!1===this.state.swiped&&this.props.swipeEvent&&(this.props.swipeEvent(o),this.setState({swiped:!0})),this.setState({touchObject:t,swipeLeft:s=n+i*a,trackStyle:(0,u.getTrackCSS)((0,l.default)({left:s},this.props,this.state))}),Math.abs(t.curX-t.startX)<.8*Math.abs(t.curY-t.startY))||4t[t.length-1])e=t[t.length-1];else for(var a in t){if(e-1*n.state.swipeLeft)return t=e,!1}else if(e.offsetLeft-a+(n.getWidth(e)||0)/2>-1*n.state.swipeLeft)return t=e,!1;return!0}),Math.abs(t.dataset.index-this.state.currentSlide)||1):this.props.slidesToScroll},swipeEnd:function(e){if(this.state.dragging){var t=this.state.touchObject,n=this.state.listWidth/this.props.touchThreshold,a=this.swipeDirection(t);if(this.props.verticalSwiping&&(n=this.state.listHeight/this.props.touchThreshold),this.setState({dragging:!1,edgeDragged:!1,swiped:!1,swipeLeft:null,touchObject:{}}),t.swipeLength)if(t.swipeLength>n){e.preventDefault();var r=void 0,o=void 0;switch(a){case"left":case"down":o=this.state.currentSlide+this.getSlideCount(),r=this.props.swipeToSlide?this.checkNavigable(o):o,this.setState({currentDirection:0});break;case"right":case"up":o=this.state.currentSlide-this.getSlideCount(),r=this.props.swipeToSlide?this.checkNavigable(o):o,this.setState({currentDirection:1});break;default:r=this.state.currentSlide}this.slideHandler(r)}else{t=(0,u.getTrackLeft)((0,l.default)({slideIndex:this.state.currentSlide,trackRef:this.track},this.props,this.state));this.setState({trackStyle:(0,u.getTrackAnimateCSS)((0,l.default)({left:t},this.props,this.state))})}}else this.props.swipe&&e.preventDefault()},onInnerSliderEnter:function(){this.props.autoplay&&this.props.pauseOnHover&&this.pause()},onInnerSliderLeave:function(){this.props.autoplay&&this.props.pauseOnHover&&this.autoPlay()}},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var g=a(n(2)),d=a(n(0)),c=a(n(24)),y=n(421);function a(e){return e&&e.__esModule?e:{default:e}}t.default={initialize:function(t){var n=this,e=c.default.findDOMNode(this.list),a=d.default.Children.count(t.children),r=this.getWidth(e)||0,o=this.getWidth(c.default.findDOMNode(this.track))||0,i=void 0,e=(i=t.vertical?r:(r-(t.centerMode&&2*parseInt(t.centerPadding)))/t.slidesToShow,this.getHeight(e.querySelector('[data-index="0"]'))||0),s=e*t.slidesToShow,l=t.slidesToShow||1,u="activeIndex"in t?t.activeIndex:t.defaultActiveIndex,l=t.rtl?a-1-(l-1)-u:u;this.setState({slideCount:a,slideWidth:i,listWidth:r,trackWidth:o,currentSlide:l,slideHeight:e,listHeight:s},function(){var e=(0,y.getTrackLeft)((0,g.default)({slideIndex:n.state.currentSlide,trackRef:n.track},t,n.state)),e=(0,y.getTrackCSS)((0,g.default)({left:e},t,n.state));n.setState({trackStyle:e}),n.autoPlay()})},update:function(e){this.initialize(e)},getWidth:function(e){return"clientWidth"in e?e.clientWidth:e&&e.getBoundingClientRect().width},getHeight:function(e){return"clientHeight"in e?e.clientHeight:e&&e.getBoundingClientRect().height},adaptHeight:function(){var e,t;this.props.adaptiveHeight&&(t='[data-index="'+this.state.currentSlide+'"]',this.list)&&(t=(e=c.default.findDOMNode(this.list)).querySelector(t).offsetHeight,e.style.height=t+"px")},canGoNext:function(e){var t=!0;return e.infinite||(e.centerMode?e.currentSlide>=e.slideCount-1&&(t=!1):(e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1)),t},slideHandler:function(e){var t=this,n=this.props.rtl,a=void 0,r=void 0,o=void 0;if(!this.props.waitForAnimate||!this.state.animating){if("fade"===this.props.animation)return r=this.state.currentSlide,!1===this.props.infinite&&(e<0||e>=this.state.slideCount)?void 0:(a=e<0?e+this.state.slideCount:e>=this.state.slideCount?e-this.state.slideCount:e,this.props.lazyLoad&&this.state.lazyLoadedList.indexOf(a)<0&&this.setState({lazyLoadedList:this.state.lazyLoadedList.concat(a)}),o=function(){t.setState({animating:!1}),t.props.onChange(a),delete t.animationEndCallback},this.props.onBeforeChange(this.state.currentSlide,a),this.setState({animating:!0,currentSlide:a},function(){this.animationEndCallback=setTimeout(o,this.props.speed+20)}),void this.autoPlay());a=e,n?a<0?!1===this.props.infinite?r=0:this.state.slideCount%this.props.slidesToScroll!=0?a+this.props.slidesToScroll<=0?(r=this.state.slideCount+a,a=this.state.slideCount-this.props.slidesToScroll):r=a=0:r=this.state.slideCount+a:r=a>=this.state.slideCount?!1===this.props.infinite?this.state.slideCount-this.props.slidesToShow:this.state.slideCount%this.props.slidesToScroll!=0?0:a-this.state.slideCount:a:r=a<0?!1===this.props.infinite?0:this.state.slideCount%this.props.slidesToScroll!=0?this.state.slideCount-this.state.slideCount%this.props.slidesToScroll:this.state.slideCount+a:a>=this.state.slideCount?!1===this.props.infinite?this.state.slideCount-this.props.slidesToShow:this.state.slideCount%this.props.slidesToScroll!=0?0:a-this.state.slideCount:a;var i,e=(0,y.getTrackLeft)((0,g.default)({slideIndex:a,trackRef:this.track},this.props,this.state)),s=(0,y.getTrackLeft)((0,g.default)({slideIndex:r,trackRef:this.track},this.props,this.state));if(!1===this.props.infinite&&(e=s),this.props.lazyLoad){for(var l=!0,u=[],d=this.state.slideCount,c=a<0?d+a:r,f=c;f=l.activeIndex?"visible":"hidden",d.transition="opacity "+l.speed+"ms "+l.cssEase,d.WebkitTransition="opacity "+l.speed+"ms "+l.cssEase,l.vertical?d.top=-l.activeIndex*l.slideHeight:d.left=-l.activeIndex*l.slideWidth),l.vertical&&(d.width="100%"),d),u=(d=(0,v.default)({activeIndex:e},c),a=d.prefix,u=r=i=void 0,o=(u=d.rtl?d.slideCount-1-d.activeIndex:d.activeIndex)<0||u>=d.slideCount,d.centerMode?(n=Math.floor(d.slidesToShow/2),r=(u-d.currentSlide)%d.slideCount==0,u>d.currentSlide-n-1&&u<=d.currentSlide+n&&(i=!0)):i=d.currentSlide<=u&&u=u,u=(0,k.default)(((v={})[o+"upload-list-item"]=!0,v[o+"hidden"]=u,v)),v=this.props.children||i.card.addPhoto,c=r?S.func.prevent:c,_=S.obj.pickOthers(C.propTypes,this.props),b=S.obj.pickOthers(E.default.propTypes,_);if(h&&"function"==typeof m)return e=(0,k.default)(((e={})[o+"form-preview"]=!0,e[s]=!!s,e)),M.default.createElement("div",{style:l,className:e},m(this.state.value,this.props));return M.default.createElement(E.default,(0,w.default)({className:s,style:l,listType:"card",closable:!0,locale:i,value:this.state.value,onRemove:c,onCancel:f,onPreview:d,itemRender:g,isPreview:h,uploader:this.uploaderRef,reUpload:y,showDownload:n},_),M.default.createElement(x.default,(0,w.default)({},b,{shape:"card",prefix:o,disabled:r,action:a,timeout:p,isPreview:h,value:this.state.value,onProgress:this.onProgress,onChange:this.onChange,ref:function(e){return t.saveRef(e)},className:u}),v))},d=n=C,n.displayName="Card",n.propTypes={prefix:s.default.string,locale:s.default.object,children:s.default.object,value:s.default.oneOfType([s.default.array,s.default.object]),defaultValue:s.default.oneOfType([s.default.array,s.default.object]),onPreview:s.default.func,onChange:s.default.func,onRemove:s.default.func,onCancel:s.default.func,itemRender:s.default.func,reUpload:s.default.bool,showDownload:s.default.bool,onProgress:s.default.func,isPreview:s.default.bool,renderPreview:s.default.func},n.defaultProps={prefix:"next-",locale:u.default.Upload,showDownload:!0,onChange:S.func.noop,onPreview:S.func.noop,onProgress:S.func.noop},a=function(){var n=this;this.onProgress=function(e,t){n.setState({value:e}),n.props.onProgress(e,t)},this.onChange=function(e,t){"value"in n.props||n.setState({value:e}),n.props.onChange(e,t)}};var f,i=d;function C(e){(0,r.default)(this,C);var t=(0,o.default)(this,f.call(this,e)),n=(a.call(t),void 0),n="value"in e?e.value:e.defaultValue;return t.state={value:Array.isArray(n)?n:[],uploaderRef:t.uploaderRef},t}t.default=(0,l.polyfill)(i),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var u=m(n(2)),d=m(n(12)),o=m(n(4)),i=m(n(6)),a=m(n(7)),c=m(n(0)),r=m(n(5)),f=m(n(17)),p=m(n(26)),s=n(11),l=m(n(44)),h=m(n(191));function m(e){return e&&e.__esModule?e:{default:e}}g=c.default.Component,(0,a.default)(y,g),y.prototype.abort=function(e){this.uploaderRef.abort(e)},y.prototype.startUpload=function(){this.uploaderRef.startUpload()},y.prototype.render=function(){var e=this.props,t=e.className,n=e.style,a=e.shape,r=e.locale,o=e.prefix,i=e.listType,e=(0,d.default)(e,["className","style","shape","locale","prefix","listType"]),s=o+"upload-drag",t=(0,f.default)(((l={})[s]=!0,l[s+"-over"]=this.state.dragOver,l[t]=!!t,l)),l=this.props.children||c.default.createElement("div",{className:t},c.default.createElement("p",{className:s+"-icon"},c.default.createElement(p.default,{size:"large",className:s+"-upload-icon"})),c.default.createElement("p",{className:s+"-text"},r.drag.text),c.default.createElement("p",{className:s+"-hint"},r.drag.hint));return c.default.createElement(h.default,(0,u.default)({},e,{prefix:o,shape:a,listType:i,dragable:!0,style:n,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDrop:this.onDrop,ref:this.saveUploaderRef}),l)},a=n=y,n.propTypes={prefix:r.default.string,locale:r.default.object,shape:r.default.string,onDragOver:r.default.func,onDragLeave:r.default.func,onDrop:r.default.func,limit:r.default.number,className:r.default.string,style:r.default.object,defaultValue:r.default.array,children:r.default.node,listType:r.default.string,timeout:r.default.number},n.defaultProps={prefix:"next-",onDragOver:s.func.noop,onDragLeave:s.func.noop,onDrop:s.func.noop,locale:l.default.Upload};var g,r=a;function y(){var e,t;(0,o.default)(this,y);for(var n=arguments.length,a=Array(n),r=0;r Date: Sat, 11 May 2024 13:38:45 +0800 Subject: [PATCH 010/110] [issue 12062]bugfix (#12086) --- .../repository/embedded/EmbeddedConfigDumpApplyHook.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigDumpApplyHook.java b/config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigDumpApplyHook.java index b6e042af9a8..65f0c16265f 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigDumpApplyHook.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigDumpApplyHook.java @@ -58,7 +58,7 @@ private void handleExtendInfo(Map extendInfo) { return; } if (extendInfo.containsKey(Constants.EXTEND_INFOS_CONFIG_DUMP_EVENT)) { - String jsonVal = extendInfo.get(Constants.EXTEND_INFO_CONFIG_DUMP_EVENT); + String jsonVal = extendInfo.get(Constants.EXTEND_INFOS_CONFIG_DUMP_EVENT); if (StringUtils.isNotBlank(jsonVal)) { List list = JacksonUtils.toObj(jsonVal, new GenericType>() { }.getType()); From 47dd0785455354f49edd10110b0950588d2f1be3 Mon Sep 17 00:00:00 2001 From: JianweiWang <786594722@qq.com> Date: Tue, 14 May 2024 13:37:08 +0800 Subject: [PATCH 011/110] fix #11984 (#12091) --- .../com/alibaba/nacos/common/remote/client/RpcClient.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClient.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClient.java index 53e36174fe7..b9065ef5391 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClient.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClient.java @@ -529,8 +529,9 @@ protected void reconnect(final ServerInfo recommendServerInfo, boolean onRequest lastException = null; - } catch (Exception e) { - lastException = e; + } catch (Throwable throwable) { + LoggerUtils.printIfErrorEnabled(LOGGER, "Fail to connect server, error = {}", throwable.getMessage()); + lastException = new Exception(throwable); } finally { recommendServer.set(null); } From 4e2bcb9277e72828848f54376d68cf614d23824d Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Wed, 15 May 2024 10:37:53 +0800 Subject: [PATCH 012/110] module address upgrade junit4 to junit5 (#12084) --- .../AddressServerGeneratorManagerTest.java | 54 +++++++++-------- .../component/AddressServerManagerTests.java | 22 +++---- .../AddressServerClusterControllerTest.java | 58 +++++++++---------- .../controller/ServerListControllerTest.java | 38 ++++++------ 4 files changed, 88 insertions(+), 84 deletions(-) diff --git a/address/src/test/java/com/alibaba/nacos/address/component/AddressServerGeneratorManagerTest.java b/address/src/test/java/com/alibaba/nacos/address/component/AddressServerGeneratorManagerTest.java index 497c94dea2a..95e15e3c97a 100644 --- a/address/src/test/java/com/alibaba/nacos/address/component/AddressServerGeneratorManagerTest.java +++ b/address/src/test/java/com/alibaba/nacos/address/component/AddressServerGeneratorManagerTest.java @@ -18,55 +18,59 @@ import com.alibaba.nacos.address.constant.AddressServerConstants; import com.alibaba.nacos.api.naming.pojo.Instance; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; -public class AddressServerGeneratorManagerTest { - +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class AddressServerGeneratorManagerTest { + @Test - public void testGenerateProductName() { + void testGenerateProductName() { AddressServerGeneratorManager manager = new AddressServerGeneratorManager(); final String blankName = manager.generateProductName(""); - Assert.assertEquals(AddressServerConstants.ALIWARE_NACOS_DEFAULT_PRODUCT_NAME, blankName); + assertEquals(AddressServerConstants.ALIWARE_NACOS_DEFAULT_PRODUCT_NAME, blankName); final String defaultName = manager.generateProductName(AddressServerConstants.DEFAULT_PRODUCT); - Assert.assertEquals(AddressServerConstants.ALIWARE_NACOS_DEFAULT_PRODUCT_NAME, defaultName); + assertEquals(AddressServerConstants.ALIWARE_NACOS_DEFAULT_PRODUCT_NAME, defaultName); final String testName = manager.generateProductName("test"); - Assert.assertEquals("nacos.as.test", testName); + assertEquals("nacos.as.test", testName); } - + @Test - public void testGenerateInstancesByIps() { + void testGenerateInstancesByIps() { AddressServerGeneratorManager manager = new AddressServerGeneratorManager(); final List empty = manager.generateInstancesByIps(null, null, null, null); - Assert.assertNotNull(empty); - Assert.assertTrue(empty.isEmpty()); + assertNotNull(empty); + assertTrue(empty.isEmpty()); String[] ipArray = new String[]{"192.168.3.1:8848", "192.168.3.2:8848", "192.168.3.3:8848"}; final List instanceList = manager.generateInstancesByIps("DEFAULT_GROUP@@nacos.as.test", "test", "test", ipArray); - Assert.assertNotNull(instanceList); - Assert.assertFalse(instanceList.isEmpty()); - Assert.assertEquals(3, instanceList.size()); + assertNotNull(instanceList); + assertFalse(instanceList.isEmpty()); + assertEquals(3, instanceList.size()); final Instance instance1 = instanceList.get(0); - Assert.assertEquals("192.168.3.1", instance1.getIp()); + assertEquals("192.168.3.1", instance1.getIp()); final Instance instance2 = instanceList.get(1); - Assert.assertEquals("192.168.3.2", instance2.getIp()); + assertEquals("192.168.3.2", instance2.getIp()); final Instance instance3 = instanceList.get(2); - Assert.assertEquals("192.168.3.3", instance3.getIp()); + assertEquals("192.168.3.3", instance3.getIp()); } - + @Test - public void testGenerateResponseIps() { + void testGenerateResponseIps() { final List instanceList = new ArrayList<>(); Instance instance1 = new Instance(); instance1.setIp("192.168.3.1"); @@ -92,19 +96,19 @@ public void testGenerateResponseIps() { .append("192.168.3.1:8848").append('\n') .append("192.168.3.2:8848").append('\n') .append("192.168.3.3:8848").append('\n'); - Assert.assertEquals(ret.toString(), ipListStr); + assertEquals(ret.toString(), ipListStr); } - + @Test - public void testGenerateNacosServiceName() { + void testGenerateNacosServiceName() { AddressServerGeneratorManager manager = new AddressServerGeneratorManager(); final String containDefault = manager.generateNacosServiceName("DEFAULT_GROUP@@test"); - Assert.assertEquals("DEFAULT_GROUP@@test", containDefault); + assertEquals("DEFAULT_GROUP@@test", containDefault); final String product = manager.generateNacosServiceName("product"); - Assert.assertEquals("DEFAULT_GROUP@@product", product); + assertEquals("DEFAULT_GROUP@@product", product); } } diff --git a/address/src/test/java/com/alibaba/nacos/address/component/AddressServerManagerTests.java b/address/src/test/java/com/alibaba/nacos/address/component/AddressServerManagerTests.java index 25c6441dbb2..af22fd03d39 100644 --- a/address/src/test/java/com/alibaba/nacos/address/component/AddressServerManagerTests.java +++ b/address/src/test/java/com/alibaba/nacos/address/component/AddressServerManagerTests.java @@ -17,38 +17,38 @@ package com.alibaba.nacos.address.component; import com.alibaba.nacos.address.constant.AddressServerConstants; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class AddressServerManagerTests { +class AddressServerManagerTests { private static final AddressServerManager ADDRESS_SERVER_MANAGER = new AddressServerManager(); - + @Test - public void getRawProductName() { + void getRawProductName() { assertEquals(AddressServerConstants.DEFAULT_PRODUCT, ADDRESS_SERVER_MANAGER.getRawProductName("")); assertEquals(AddressServerConstants.DEFAULT_PRODUCT, ADDRESS_SERVER_MANAGER.getRawProductName(AddressServerConstants.DEFAULT_PRODUCT)); assertEquals("otherProduct", ADDRESS_SERVER_MANAGER.getRawProductName("otherProduct")); } - + @Test - public void getDefaultClusterNameIfEmpty() { + void getDefaultClusterNameIfEmpty() { assertEquals(AddressServerConstants.DEFAULT_GET_CLUSTER, ADDRESS_SERVER_MANAGER.getDefaultClusterNameIfEmpty("")); assertEquals(AddressServerConstants.DEFAULT_GET_CLUSTER, ADDRESS_SERVER_MANAGER.getDefaultClusterNameIfEmpty(AddressServerConstants.DEFAULT_GET_CLUSTER)); assertEquals("otherServerList", ADDRESS_SERVER_MANAGER.getDefaultClusterNameIfEmpty("otherServerList")); } - + @Test - public void testGetRawClusterName() { + void testGetRawClusterName() { assertEquals("serverList", ADDRESS_SERVER_MANAGER.getRawClusterName("serverList")); assertEquals(AddressServerConstants.DEFAULT_GET_CLUSTER, ADDRESS_SERVER_MANAGER.getRawClusterName("")); } - + @Test - public void testSplitIps() { + void testSplitIps() { final String[] emptyArr = ADDRESS_SERVER_MANAGER.splitIps(""); assertEquals(0, emptyArr.length); final String[] one = ADDRESS_SERVER_MANAGER.splitIps("192.168.1.12:8848"); diff --git a/address/src/test/java/com/alibaba/nacos/address/controller/AddressServerClusterControllerTest.java b/address/src/test/java/com/alibaba/nacos/address/controller/AddressServerClusterControllerTest.java index aa7f8eddba0..132f56c98a6 100644 --- a/address/src/test/java/com/alibaba/nacos/address/controller/AddressServerClusterControllerTest.java +++ b/address/src/test/java/com/alibaba/nacos/address/controller/AddressServerClusterControllerTest.java @@ -26,13 +26,13 @@ import com.alibaba.nacos.naming.core.v2.ServiceManager; import com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataManager; import com.alibaba.nacos.naming.core.v2.pojo.Service; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -40,8 +40,8 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@RunWith(MockitoJUnitRunner.class) -public class AddressServerClusterControllerTest { +@ExtendWith(MockitoExtension.class) +class AddressServerClusterControllerTest { @Mock private InstanceOperator instanceOperator; @@ -53,9 +53,9 @@ public class AddressServerClusterControllerTest { private ClusterOperator clusterOperator; private MockMvc mockMvc; - - @Before - public void before() { + + @BeforeEach + void before() { mockMvc = MockMvcBuilders.standaloneSetup( new AddressServerClusterController(instanceOperator, metadataManager, clusterOperator, new AddressServerManager(), new AddressServerGeneratorManager())).build(); @@ -63,30 +63,30 @@ public void before() { .newService(Constants.DEFAULT_NAMESPACE_ID, Constants.DEFAULT_GROUP, "nacos.as.default", false); ServiceManager.getInstance().getSingleton(service); } - - @After - public void tearDown() { + + @AfterEach + void tearDown() { Service service = Service .newService(Constants.DEFAULT_NAMESPACE_ID, Constants.DEFAULT_GROUP, "nacos.as.default", false); ServiceManager.getInstance().removeSingleton(service); } - + @Test - public void testPostCluster() throws Exception { + void testPostCluster() throws Exception { mockMvc.perform(post("/nacos/v1/as/nodes").param("product", "default").param("cluster", "serverList") .param("ips", "192.168.3.1,192.168.3.2")).andExpect(status().isOk()); } - + @Test - public void testPostClusterWithErrorIps() throws Exception { + void testPostClusterWithErrorIps() throws Exception { mockMvc.perform(post("/nacos/v1/as/nodes").param("product", "default").param("cluster", "serverList") .param("ips", "192.168.1")).andExpect(status().isBadRequest()); } - + @Test - public void testPostClusterThrowException() throws Exception { + void testPostClusterThrowException() throws Exception { Mockito.doThrow(new NacosException(500, "create service error")).when(clusterOperator) .updateClusterMetadata(Mockito.eq(Constants.DEFAULT_NAMESPACE_ID), Mockito.eq( @@ -97,34 +97,34 @@ public void testPostClusterThrowException() throws Exception { .param("ips", "192.168.1")).andExpect(status().isInternalServerError()); } - + @Test - public void testDeleteCluster() throws Exception { + void testDeleteCluster() throws Exception { mockMvc.perform(delete("/nacos/v1/as/nodes").param("product", "default").param("cluster", "serverList") .param("ips", "192.168.3.1,192.168.3.2")).andExpect(status().isOk()); } - + @Test - public void testDeleteClusterCannotFindService() throws Exception { + void testDeleteClusterCannotFindService() throws Exception { tearDown(); mockMvc.perform(delete("/nacos/v1/as/nodes").param("product", "default").param("cluster", "serverList") .param("ips", "192.168.3.1,192.168.3.2")).andExpect(status().isNotFound()); } - + @Test - public void testDeleteClusterEmptyIps() throws Exception { + void testDeleteClusterEmptyIps() throws Exception { mockMvc.perform(delete("/nacos/v1/as/nodes").param("product", "default").param("cluster", "serverList") .param("ips", "")).andExpect(status().isBadRequest()); } - + @Test - public void testDeleteClusterErrorIps() throws Exception { + void testDeleteClusterErrorIps() throws Exception { mockMvc.perform(delete("/nacos/v1/as/nodes").param("product", "default").param("cluster", "serverList") .param("ips", "192.168.1")).andExpect(status().isBadRequest()); } - + @Test - public void testDeleteClusterThrowException() throws Exception { + void testDeleteClusterThrowException() throws Exception { Mockito.doThrow(new NacosException(500, "remove service error")).when(instanceOperator) .removeInstance(Mockito.eq(Constants.DEFAULT_NAMESPACE_ID), Mockito.eq( Constants.DEFAULT_GROUP + AddressServerConstants.GROUP_SERVICE_NAME_SEP + "nacos.as.default"), diff --git a/address/src/test/java/com/alibaba/nacos/address/controller/ServerListControllerTest.java b/address/src/test/java/com/alibaba/nacos/address/controller/ServerListControllerTest.java index 44c27b3db40..70250483276 100644 --- a/address/src/test/java/com/alibaba/nacos/address/controller/ServerListControllerTest.java +++ b/address/src/test/java/com/alibaba/nacos/address/controller/ServerListControllerTest.java @@ -26,12 +26,12 @@ import com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataManager; import com.alibaba.nacos.naming.core.v2.metadata.ServiceMetadata; import com.alibaba.nacos.naming.core.v2.pojo.Service; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -43,8 +43,8 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@RunWith(MockitoJUnitRunner.class) -public class ServerListControllerTest { +@ExtendWith(MockitoExtension.class) +class ServerListControllerTest { @Mock private NamingMetadataManager metadataManager; @@ -55,23 +55,23 @@ public class ServerListControllerTest { private Service service; private MockMvc mockMvc; - - @Before - public void before() { + + @BeforeEach + void before() { this.mockMvc = MockMvcBuilders.standaloneSetup( new ServerListController(new AddressServerGeneratorManager(), metadataManager, serviceStorage)).build(); service = Service .newService(Constants.DEFAULT_NAMESPACE_ID, Constants.DEFAULT_GROUP, "nacos.as.default", false); ServiceManager.getInstance().getSingleton(service); } - - @After - public void tearDown() { + + @AfterEach + void tearDown() { ServiceManager.getInstance().removeSingleton(service); } - + @Test - public void testGetCluster() throws Exception { + void testGetCluster() throws Exception { final Service service = Service .newService(Constants.DEFAULT_NAMESPACE_ID, Constants.DEFAULT_GROUP, "nacos.as.default", false); @@ -86,16 +86,16 @@ public void testGetCluster() throws Exception { when(serviceStorage.getData(service)).thenReturn(serviceInfo); mockMvc.perform(get("/nacos/serverList")).andExpect(status().isOk()); } - + @Test - public void testGetClusterCannotFindService() throws Exception { + void testGetClusterCannotFindService() throws Exception { tearDown(); mockMvc.perform(get("/default/serverList")).andExpect(status().isNotFound()); } - + @Test - public void testGetClusterCannotFindCluster() throws Exception { + void testGetClusterCannotFindCluster() throws Exception { mockMvc.perform(get("/nacos/serverList")).andExpect(status().isNotFound()); } From 15c9663d31e8b6da64c065610e6a7f255b7ba6a2 Mon Sep 17 00:00:00 2001 From: Happy-26 <64505849+Happy-26@users.noreply.github.com> Date: Wed, 15 May 2024 10:39:26 +0800 Subject: [PATCH 013/110] [ISSUE #12072] Add logic that does not impose any limit when totalCountLimit is less than 0. (#12073) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed an issue where the maximum number of anti-fragile plug-ins implemented by default in Nacos is one more than the actual number of connections. * bug fix : 修改删除空服务实例时,服务名和分组名没有正确解析的问题 * Update ConfigChangeAspect.java 修改configChangeRequest.setArg()的key为serviceType * Update ConfigChangeAspect.java * Update ConfigChangeRequest.java * Update NacosConnectionControlManager.java Add logic to not impose any limit when totalCountLimit equals -1. * Update NacosConnectionControlManager.java * Update NacosConnectionControlManagerTest.java Add unit test cases when LimitCount is less than 0 * Update NacosConnectionControlManager.java Modify comment --- .../control/impl/NacosConnectionControlManager.java | 5 +++++ .../impl/NacosConnectionControlManagerTest.java | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/plugin-default-impl/nacos-default-control-plugin/src/main/java/com/alibaba/nacos/plugin/control/impl/NacosConnectionControlManager.java b/plugin-default-impl/nacos-default-control-plugin/src/main/java/com/alibaba/nacos/plugin/control/impl/NacosConnectionControlManager.java index d6d975c3f0e..f52c3e283bc 100644 --- a/plugin-default-impl/nacos-default-control-plugin/src/main/java/com/alibaba/nacos/plugin/control/impl/NacosConnectionControlManager.java +++ b/plugin-default-impl/nacos-default-control-plugin/src/main/java/com/alibaba/nacos/plugin/control/impl/NacosConnectionControlManager.java @@ -58,6 +58,11 @@ public ConnectionCheckResponse check(ConnectionCheckRequest connectionCheckReque connectionCheckResponse.setSuccess(true); connectionCheckResponse.setCode(ConnectionCheckCode.PASS_BY_TOTAL); int totalCountLimit = connectionControlRule.getCountLimit(); + // If totalCountLimit less than 0, no limit is applied. + if (totalCountLimit < 0) { + return connectionCheckResponse; + } + // Get total connection from metrics Map metricsTotalCount = metricsCollectorList.stream().collect( Collectors.toMap(ConnectionMetricsCollector::getName, ConnectionMetricsCollector::getTotalCount)); diff --git a/plugin-default-impl/nacos-default-control-plugin/src/test/java/com/alibaba/nacos/plugin/control/impl/NacosConnectionControlManagerTest.java b/plugin-default-impl/nacos-default-control-plugin/src/test/java/com/alibaba/nacos/plugin/control/impl/NacosConnectionControlManagerTest.java index c3cb4f5c24b..138685df002 100644 --- a/plugin-default-impl/nacos-default-control-plugin/src/test/java/com/alibaba/nacos/plugin/control/impl/NacosConnectionControlManagerTest.java +++ b/plugin-default-impl/nacos-default-control-plugin/src/test/java/com/alibaba/nacos/plugin/control/impl/NacosConnectionControlManagerTest.java @@ -55,4 +55,15 @@ public void testCheckUnLimit() { ConnectionCheckResponse connectionCheckResponse = nacosConnectionControlManager.check(connectionCheckRequest); Assert.assertTrue(connectionCheckResponse.isSuccess()); } + + @Test + public void testCheckLimitCountLessThanZero() { + NacosConnectionControlManager nacosConnectionControlManager = new NacosConnectionControlManager(); + ConnectionControlRule connectionControlRule = new ConnectionControlRule(); + connectionControlRule.setCountLimit(-1); + nacosConnectionControlManager.applyConnectionLimitRule(connectionControlRule); + ConnectionCheckRequest connectionCheckRequest = new ConnectionCheckRequest("127.0.0.1", "test", "test"); + ConnectionCheckResponse connectionCheckResponse = nacosConnectionControlManager.check(connectionCheckRequest); + Assert.assertTrue(connectionCheckResponse.isSuccess()); + } } From 9a6ec0ca3d993c65ee64a945d34a92b784a7120b Mon Sep 17 00:00:00 2001 From: mikolls <41845795+mikolls@users.noreply.github.com> Date: Wed, 15 May 2024 10:56:54 +0800 Subject: [PATCH 014/110] =?UTF-8?q?[ISSUE#12022]=20Fix=20nacos=20datasourc?= =?UTF-8?q?e=20plugin=20ClassCastException=20bug=20(#12=E2=80=A6=20(#12031?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [ISSUE#12022] Fix nacos datasource plugin ClassCastException bug (#12022) * [ISSUE#12022] Fix nacos datasource plugin ClassCastException bug (#12022) * [ISSUE#12022] Fix nacos datasource plugin ClassCastException bug (#12022) * [ISSUE#12022] Fix nacos datasource plugin ClassCastException bug (#12022) * [ISSUE#12022] Fix MapperManagerTest test (#12022) * [ISSUE#12022] Fix MapperManagerTest test (#12022) --- .../plugin/datasource/proxy/MapperProxy.java | 19 ++++++++- .../plugin/datasource/MapperManagerTest.java | 11 ++++++ .../plugin/datasource/impl/TestInterface.java | 24 ++++++++++++ .../plugin/datasource/mapper/TestMapper.java | 39 +++++++++++++++++++ 4 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/impl/TestInterface.java create mode 100644 plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/mapper/TestMapper.java diff --git a/plugin/datasource/src/main/java/com/alibaba/nacos/plugin/datasource/proxy/MapperProxy.java b/plugin/datasource/src/main/java/com/alibaba/nacos/plugin/datasource/proxy/MapperProxy.java index 2a5a4fbede2..b8d2a77adaf 100644 --- a/plugin/datasource/src/main/java/com/alibaba/nacos/plugin/datasource/proxy/MapperProxy.java +++ b/plugin/datasource/src/main/java/com/alibaba/nacos/plugin/datasource/proxy/MapperProxy.java @@ -25,8 +25,12 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; +import java.util.Arrays; +import java.util.HashSet; import java.util.Map; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import java.util.stream.Collectors; /** * DataSource plugin Mapper sql proxy. @@ -40,10 +44,21 @@ public class MapperProxy implements InvocationHandler { private Mapper mapper; private static final Map SINGLE_MAPPER_PROXY_MAP = new ConcurrentHashMap<>(16); - + + /** + * Creates a proxy instance for the sub-interfaces of Mapper.class implemented by the given object. + */ public R createProxy(Mapper mapper) { this.mapper = mapper; - return (R) Proxy.newProxyInstance(MapperProxy.class.getClassLoader(), mapper.getClass().getInterfaces(), this); + Class clazz = mapper.getClass(); + Set> interfacesSet = new HashSet<>(); + while (!clazz.equals(Object.class)) { + interfacesSet.addAll(Arrays.stream(clazz.getInterfaces()) + .filter(Mapper.class::isAssignableFrom) + .collect(Collectors.toSet())); + clazz = clazz.getSuperclass(); + } + return (R) Proxy.newProxyInstance(MapperProxy.class.getClassLoader(), interfacesSet.toArray(new Class[interfacesSet.size()]), this); } /** diff --git a/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/MapperManagerTest.java b/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/MapperManagerTest.java index 8bca4765686..7130947cb64 100644 --- a/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/MapperManagerTest.java +++ b/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/MapperManagerTest.java @@ -18,7 +18,9 @@ import com.alibaba.nacos.plugin.datasource.constants.DataSourceConstant; import com.alibaba.nacos.plugin.datasource.mapper.AbstractMapper; +import com.alibaba.nacos.plugin.datasource.mapper.ConfigInfoAggrMapper; import com.alibaba.nacos.plugin.datasource.mapper.Mapper; +import com.alibaba.nacos.plugin.datasource.mapper.TestMapper; import org.junit.Assert; import org.junit.Test; @@ -69,4 +71,13 @@ public void testFindMapper() { Mapper mapper = instance.findMapper(DataSourceConstant.MYSQL, "test"); Assert.assertNotNull(mapper); } + + @Test + public void testEnableDataSourceLogJoin() { + MapperManager.join(new TestMapper()); + MapperManager instance = MapperManager.instance(true); + ConfigInfoAggrMapper mapper = instance.findMapper(DataSourceConstant.MYSQL, "enable_data_source_log_test"); + Assert.assertNotNull(mapper); + } + } \ No newline at end of file diff --git a/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/impl/TestInterface.java b/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/impl/TestInterface.java new file mode 100644 index 00000000000..91587723aee --- /dev/null +++ b/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/impl/TestInterface.java @@ -0,0 +1,24 @@ +/* + * Copyright 1999-2022 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.plugin.datasource.impl; + +/** + * A custom interface. just for test + * @author mikolls + **/ +public interface TestInterface { +} \ No newline at end of file diff --git a/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/mapper/TestMapper.java b/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/mapper/TestMapper.java new file mode 100644 index 00000000000..d8f7a4c902e --- /dev/null +++ b/plugin/datasource/src/test/java/com/alibaba/nacos/plugin/datasource/mapper/TestMapper.java @@ -0,0 +1,39 @@ +/* + * Copyright 1999-2022 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.plugin.datasource.mapper; + +import com.alibaba.nacos.plugin.datasource.constants.DataSourceConstant; +import com.alibaba.nacos.plugin.datasource.impl.TestInterface; +import com.alibaba.nacos.plugin.datasource.impl.mysql.ConfigInfoAggrMapperByMySql; + +/** + * Implement interfaces other than Mapper. just for test + * @author mikolls + **/ +public class TestMapper extends ConfigInfoAggrMapperByMySql implements TestInterface { + + @Override + public String getTableName() { + return "enable_data_source_log_test"; + } + + @Override + public String getDataSource() { + return DataSourceConstant.MYSQL; + } + +} From 6fe43637c0f5a44d7472f1ed60204d672542f600 Mon Sep 17 00:00:00 2001 From: shenyao Date: Tue, 14 May 2024 20:04:32 -0700 Subject: [PATCH 015/110] [ISSUE #11967] Can not aquire the specific config (#12025) * [ISSUE #11967] Can not aquire the specific config * [ISSUE #11967] Can not aquire the specific config * [ISSUE #11967] Can not aquire the specific config * [ISSUE #11967] Can not aquire the specific config * [ISSUE #11967] Can not aquire the specific config --- .../dump/disk/ConfigRawDiskService.java | 13 +++ .../dump/disk/ConfigRawDiskServiceTest.java | 107 ++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskServiceTest.java diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskService.java index 099efeaebe9..a9e34250710 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskService.java @@ -17,6 +17,7 @@ package com.alibaba.nacos.config.server.service.dump.disk; import com.alibaba.nacos.api.utils.StringUtils; +import com.alibaba.nacos.common.pathencoder.PathEncoderManager; import com.alibaba.nacos.common.utils.IoUtils; import com.alibaba.nacos.config.server.utils.LogUtil; import com.alibaba.nacos.sys.env.EnvUtil; @@ -65,6 +66,10 @@ public void saveToDisk(String dataId, String group, String tenant, String conten * Returns the path of the server cache file. */ private static File targetFile(String dataId, String group, String tenant) { + // fix https://github.com/alibaba/nacos/issues/10067 + dataId = PathEncoderManager.getInstance().encode(dataId); + group = PathEncoderManager.getInstance().encode(group); + tenant = PathEncoderManager.getInstance().encode(tenant); File file = null; if (StringUtils.isBlank(tenant)) { file = new File(EnvUtil.getNacosHome(), BASE_DIR); @@ -81,6 +86,10 @@ private static File targetFile(String dataId, String group, String tenant) { * Returns the path of cache file in server. */ private static File targetBetaFile(String dataId, String group, String tenant) { + // fix https://github.com/alibaba/nacos/issues/10067 + dataId = PathEncoderManager.getInstance().encode(dataId); + group = PathEncoderManager.getInstance().encode(group); + tenant = PathEncoderManager.getInstance().encode(tenant); File file = null; if (StringUtils.isBlank(tenant)) { file = new File(EnvUtil.getNacosHome(), BETA_DIR); @@ -97,6 +106,10 @@ private static File targetBetaFile(String dataId, String group, String tenant) { * Returns the path of the tag cache file in server. */ private static File targetTagFile(String dataId, String group, String tenant, String tag) { + // fix https://github.com/alibaba/nacos/issues/10067 + dataId = PathEncoderManager.getInstance().encode(dataId); + group = PathEncoderManager.getInstance().encode(group); + tenant = PathEncoderManager.getInstance().encode(tenant); File file = null; if (StringUtils.isBlank(tenant)) { file = new File(EnvUtil.getNacosHome(), TAG_DIR); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskServiceTest.java new file mode 100644 index 00000000000..e3b64a9e066 --- /dev/null +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskServiceTest.java @@ -0,0 +1,107 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.config.server.service.dump.disk; + +import junit.framework.TestCase; +import org.junit.Before; + +import java.io.File; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.nio.file.Path; +import java.nio.file.Paths; + +public class ConfigRawDiskServiceTest extends TestCase { + + private String cachedOsName; + + @Before + public void setUp() throws Exception { + cachedOsName = System.getProperty("os.name"); + } + + private boolean isWindows() { + return cachedOsName.toLowerCase().startsWith("win"); + } + + /** + * 测试获取文件路径. + */ + public void testTargetFile() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { + Method method = ConfigRawDiskService.class.getDeclaredMethod("targetFile", String.class, String.class, String.class); + method.setAccessible(true); + File result = (File) method.invoke(null, "aaaa?dsaknkf", "aaaa*dsaknkf", "aaaa:dsaknkf"); + // 分解路径 + Path path = Paths.get(result.getPath()); + Path parent = path.getParent(); + Path grandParent = parent.getParent(); + // 获取最后三段路径 + String lastSegment = path.getFileName().toString(); + String secondLastSegment = parent.getFileName().toString(); + String thirdLastSegment = grandParent.getFileName().toString(); + assertEquals(isWindows() ? "aaaa%A3%dsaknkf" : thirdLastSegment, thirdLastSegment); + assertEquals(isWindows() ? "aaaa%A4%dsaknkf" : secondLastSegment, secondLastSegment); + assertEquals(isWindows() ? "aaaa%A5%dsaknkf" : lastSegment, lastSegment); + } + + /** + * 测试获取beta文件路径. + */ + public void testTargetBetaFile() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { + Method method = ConfigRawDiskService.class.getDeclaredMethod("targetBetaFile", String.class, String.class, String.class); + method.setAccessible(true); + File result = (File) method.invoke(null, "aaaa?dsaknkf", "aaaa*dsaknkf", "aaaa:dsaknkf"); + // 分解路径 + Path path = Paths.get(result.getPath()); + Path parent = path.getParent(); + Path grandParent = parent.getParent(); + // 获取最后三段路径 + String lastSegment = path.getFileName().toString(); + String secondLastSegment = parent.getFileName().toString(); + String thirdLastSegment = grandParent.getFileName().toString(); + assertEquals(isWindows() ? "aaaa%A3%dsaknkf" : thirdLastSegment, thirdLastSegment); + assertEquals(isWindows() ? "aaaa%A4%dsaknkf" : secondLastSegment, secondLastSegment); + assertEquals(isWindows() ? "aaaa%A5%dsaknkf" : lastSegment, lastSegment); + + } + + /** + * 测试获取tag文件路径. + * @throws NoSuchMethodException 方法不存在异常 + * @throws IllegalAccessException 非法访问异常 + * @throws InvocationTargetException 目标异常 + */ + public void testTargetTagFile() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { + Method method = ConfigRawDiskService.class.getDeclaredMethod("targetTagFile", String.class, String.class, String.class, String.class); + method.setAccessible(true); + File result = (File) method.invoke(null, "aaaa?dsaknkf", "aaaa*dsaknkf", "aaaa:dsaknkf", "aaaadsaknkf"); + // 分解路径 + Path path = Paths.get(result.getPath()); + Path parent = path.getParent(); + Path grandParent = parent.getParent(); + Path greatGrandParent = grandParent.getParent(); + // 获取最后四段路径 + String secondLastSegment = parent.getFileName().toString(); + String thirdLastSegment = grandParent.getFileName().toString(); + String fourthLastSegment = greatGrandParent.getFileName().toString(); + assertEquals(isWindows() ? "aaaa%A3%dsaknkf" : fourthLastSegment, fourthLastSegment); + assertEquals(isWindows() ? "aaaa%A4%dsaknkf" : thirdLastSegment, thirdLastSegment); + assertEquals(isWindows() ? "aaaa%A5%dsaknkf" : secondLastSegment, secondLastSegment); + String lastSegment = path.getFileName().toString(); + assertEquals("aaaadsaknkf", lastSegment); + } +} From 5169f06654a57db4f01cde83406bbc1ba07d4a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E9=AD=81?= <670569467@qq.com> Date: Wed, 15 May 2024 11:13:29 +0800 Subject: [PATCH 016/110] Support TLS Grpc communication between clusters. (#11549) * Fix exception code error.(#10925) * [ISSUE #11456]Add RpcClusterClientTlsConfig.java. * [ISSUE #11456]Add cluster rpc tls config. * [ISSUE #11456]Add RpcClusterClientTlsConfig UT. * [ISSUE #11456]Add cluster server tls. * [ISSUE #11456]Remove supportCommunicationTypes. * [ISSUE #11456]Fix unit testing and indentation handling * [ISSUE #11456]Indentation handling * [ISSUE #11456]Fix unit test and rpc constants. * [ISSUE #11456]Fix unit test. * [ISSUE #11456]Optimize code. * [ISSUE #11456]Fix check style. * [ISSUE #11456]Add unit test. * [ISSUE #11456]Fix check style. * [ISSUE #11456]Update unit test. * [ISSUE #11456]Fix unit test. * [ISSUE #11456]Add License. * [ISSUE #11456]Fix unit test. * [ISSUE #11456]Fix unit test. * [ISSUE #11456]Rename class. * [ISSUE #11456]Optimize code. * [ISSUE #11456]Handling indentation issues. * [ISSUE #11456]Handling indentation issues. * [ISSUE #11456]Handling indentation issues. * [ISSUE #11456]Optimize code. * [ISSUE #11456]Fix unit test. * [ISSUE #11456]Fix unit testing and compatibility handling. * [ISSUE #11456]Support TLS GRPC communication between clusters. * [ISSUE #11456] Fix bugs. * [ISSUE #11456]Fix bugs. * [ISSUE #11456]Adjusting parameter names (compatibility considerations). * [ISSUE #11456]Resolve conflict. * [ISSUE #11456]Remove ProtocolNegotiatorBuilderManager and abstract ProtocolNegotiatorBuilderSingleton. * [ISSUE #11456]Remove CommunicationType.java. * [ISSUE #11456]Optimize code. * [ISSUE #11456]Revert author. * Splitting RpcTlsConfigFactory. * Split RpcConstants. * Divided RpcTlsConfigFactory, adjusted cluster parameters to "nacos.remote.peer.rpc.tls". * check style. * check style. * unit test. --- .../api/remote/RpcScheduledExecutorTest.java | 19 +- .../client/config/impl/ClientWorker.java | 12 +- .../remote/gprc/NamingGrpcClientProxy.java | 4 +- .../client/config/impl/ClientWorkerTest.java | 42 ++--- .../remote/client/RpcClientFactory.java | 32 ++-- .../remote/client/RpcClientTlsConfig.java | 58 ------ .../client/RpcClientTlsConfigFactory.java | 97 ++++++++++ .../common/remote/client/RpcConstants.java | 169 +++++++++++++++--- .../remote/client/RpcTlsConfigFactory.java | 62 +++++++ .../client/grpc/DefaultGrpcClientConfig.java | 98 +++++----- .../common/remote/client/grpc/GrpcClient.java | 103 +++++------ .../remote/client/grpc/GrpcClientConfig.java | 15 +- .../remote/client/grpc/GrpcClusterClient.java | 22 +-- .../remote/client/grpc/GrpcSdkClient.java | 23 +-- .../remote/client/RpcClientFactoryTest.java | 15 +- .../remote/client/RpcClientTlsConfigTest.java | 22 +-- .../client/RpcClusterClientTlsConfigTest.java | 128 +++++++++++++ .../remote/client/RpcConstantsTest.java | 3 +- .../grpc/DefaultGrpcClientConfigTest.java | 2 +- .../remote/client/grpc/GrpcClientTest.java | 21 ++- .../client/grpc/GrpcClusterClientTest.java | 4 +- .../remote/client/grpc/GrpcSdkClientTest.java | 3 +- .../cluster/remote/ClusterRpcClientProxy.java | 11 +- .../nacos/core/remote/BaseRpcServer.java | 12 +- .../core/remote/grpc/BaseGrpcServer.java | 37 ++-- .../core/remote/grpc/GrpcClusterServer.java | 29 +-- .../nacos/core/remote/grpc/GrpcSdkServer.java | 34 +--- ...actProtocolNegotiatorBuilderSingleton.java | 96 ++++++++++ ...terProtocolNegotiatorBuilderSingleton.java | 81 +++++++++ .../ProtocolNegotiatorBuilderSingleton.java | 82 --------- ...SdkProtocolNegotiatorBuilderSingleton.java | 81 +++++++++ ...erDefaultTlsProtocolNegotiatorBuilder.java | 93 ++++++++++ .../DefaultTlsProtocolNegotiatorBuilder.java | 47 ----- .../tls/OptionalTlsProtocolNegotiator.java | 32 ++-- ...dkDefaultTlsProtocolNegotiatorBuilder.java | 91 ++++++++++ .../RpcServerSslContextRefresherHolder.java | 115 ++++++++---- .../core/remote/tls/RpcServerTlsConfig.java | 61 ++++--- .../remote/tls/RpcServerTlsConfigFactory.java | 103 +++++++++++ ....grpc.negotiator.ProtocolNegotiatorBuilder | 3 +- ...rotocolNegotiatorBuilderSingletonTest.java | 71 ++++++++ ...rotocolNegotiatorBuilderSingletonTest.java | 71 ++++++++ ...faultTlsProtocolNegotiatorBuilderTest.java | 84 +++++++++ .../tls/DefaultTlsContextBuilderTest.java | 120 ------------- ...pcServerSslContextRefresherHolderTest.java | 53 ++++++ .../tls/SdkDefaultTlsContextBuilderTest.java | 110 ++++++++++++ ...aultTlsProtocolNegotiatorBuilderTest.java} | 52 +++--- ...cClusterServerSslContextRefresherTest.java | 48 +++++ .../RpcSdkServerSslContextRefresherTest.java | 48 +++++ ...re.remote.tls.RpcServerSslContextRefresher | 18 ++ .../com/alibaba/nacos/sys/env/EnvUtil.java | 20 +++ ...ConfigServiceComTlsGrpcClient_CITCase.java | 35 ++-- ...nfigServiceNoComTlsGrpcClient_CITCase.java | 29 ++- .../NacosConfigV2MutualAuth_CITCase.java | 52 +++--- ...ationV1ServerNonCompatibility_CITCase.java | 58 +++--- ...ConfigIntegrationV2MutualAuth_CITCase.java | 71 ++++---- .../client/ConfigIntegrationV3_CITCase.java | 58 +++--- .../NamingCompatibilityServiceTls_ITCase.java | 54 +++--- .../NamingTlsServiceAndMutualAuth_ITCase.java | 79 ++++---- .../naming/NamingTlsServiceTls_ITCase.java | 50 +++--- 59 files changed, 2174 insertions(+), 969 deletions(-) create mode 100644 common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigFactory.java create mode 100644 common/src/main/java/com/alibaba/nacos/common/remote/client/RpcTlsConfigFactory.java create mode 100644 common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClusterClientTlsConfigTest.java create mode 100644 core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/AbstractProtocolNegotiatorBuilderSingleton.java create mode 100644 core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/ClusterProtocolNegotiatorBuilderSingleton.java delete mode 100644 core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/ProtocolNegotiatorBuilderSingleton.java create mode 100644 core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/SdkProtocolNegotiatorBuilderSingleton.java create mode 100644 core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/ClusterDefaultTlsProtocolNegotiatorBuilder.java delete mode 100644 core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsProtocolNegotiatorBuilder.java create mode 100644 core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsProtocolNegotiatorBuilder.java create mode 100644 core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerTlsConfigFactory.java create mode 100644 core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/ClusterProtocolNegotiatorBuilderSingletonTest.java create mode 100644 core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/SdkProtocolNegotiatorBuilderSingletonTest.java create mode 100644 core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/ClusterDefaultTlsProtocolNegotiatorBuilderTest.java delete mode 100644 core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsContextBuilderTest.java create mode 100644 core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/RpcServerSslContextRefresherHolderTest.java create mode 100644 core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsContextBuilderTest.java rename core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/{DefaultTlsProtocolNegotiatorBuilderTest.java => SdkDefaultTlsProtocolNegotiatorBuilderTest.java} (58%) create mode 100644 core/src/test/java/com/alibaba/nacos/core/remote/tls/RpcClusterServerSslContextRefresherTest.java create mode 100644 core/src/test/java/com/alibaba/nacos/core/remote/tls/RpcSdkServerSslContextRefresherTest.java create mode 100644 core/src/test/resources/META-INF/services/com.alibaba.nacos.core.remote.tls.RpcServerSslContextRefresher diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/RpcScheduledExecutorTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/RpcScheduledExecutorTest.java index 695c74b5e99..097bd116fff 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/RpcScheduledExecutorTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/RpcScheduledExecutorTest.java @@ -18,18 +18,19 @@ import org.junit.Test; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class RpcScheduledExecutorTest { private static final String NAME = "test.rpc.thread"; - Map threadNameMap = new HashMap<>(); + Map threadNameMap = new ConcurrentHashMap<>(); @Test public void testRpcScheduledExecutor() throws InterruptedException { @@ -37,10 +38,9 @@ public void testRpcScheduledExecutor() throws InterruptedException { CountDownLatch latch = new CountDownLatch(2); executor.submit(new TestRunner(1, latch)); executor.submit(new TestRunner(2, latch)); - latch.await(1, TimeUnit.SECONDS); + boolean await = latch.await(1, TimeUnit.SECONDS); + assertTrue(await); assertEquals(2, threadNameMap.size()); - assertEquals(NAME + ".0", threadNameMap.get("1")); - assertEquals(NAME + ".1", threadNameMap.get("2")); } private class TestRunner implements Runnable { @@ -56,13 +56,8 @@ public TestRunner(int id, CountDownLatch latch) { @Override public void run() { - try { - threadNameMap.put(String.valueOf(id), Thread.currentThread().getName()); - TimeUnit.MILLISECONDS.sleep(500); - } catch (InterruptedException ignored) { - } finally { - latch.countDown(); - } + threadNameMap.put(String.valueOf(id), Thread.currentThread().getName()); + latch.countDown(); } } } \ No newline at end of file diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java index 17e43f7d132..61b05615716 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java @@ -61,6 +61,7 @@ import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.remote.client.RpcClientFactory; import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; +import com.alibaba.nacos.common.remote.client.RpcClientTlsConfigFactory; import com.alibaba.nacos.common.remote.client.ServerListFactory; import com.alibaba.nacos.common.utils.ConnLabelsUtils; import com.alibaba.nacos.common.utils.ConvertUtils; @@ -128,6 +129,8 @@ public class ClientWorker implements Closeable { */ private final AtomicReference> cacheMap = new AtomicReference<>(new HashMap<>()); + private final DefaultLabelsCollectorManager defaultLabelsCollectorManager = new DefaultLabelsCollectorManager(); + private Map appLables = new HashMap<>(); private final ConfigFilterChainManager configFilterChainManager; @@ -579,8 +582,6 @@ public boolean isHealthServer() { return agent.isHealthServer(); } - private static DefaultLabelsCollectorManager defaultLabelsCollectorManager = new DefaultLabelsCollectorManager(); - public class ConfigRpcTransportClient extends ConfigTransportClient { Map multiTaskExecutor = new HashMap<>(); @@ -1088,18 +1089,19 @@ private boolean checkListenCache(Map> listenCachesMap) t private RpcClient ensureRpcClient(String taskId) throws NacosException { synchronized (ClientWorker.this) { - Map labels = getLabels(); Map newLabels = new HashMap<>(labels); newLabels.put("taskId", taskId); + RpcClientTlsConfig clientTlsConfig = RpcClientTlsConfigFactory.getInstance() + .createSdkConfig(properties); RpcClient rpcClient = RpcClientFactory.createClient(uuid + "_config-" + taskId, getConnectionType(), - newLabels, this.properties, RpcClientTlsConfig.properties(this.properties)); + newLabels, clientTlsConfig); if (rpcClient.isWaitInitiated()) { initRpcClientHandler(rpcClient); rpcClient.setTenant(getTenant()); rpcClient.start(); } - + return rpcClient; } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxy.java b/client/src/main/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxy.java index f02379dbb97..a240d5d747d 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxy.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxy.java @@ -58,7 +58,7 @@ import com.alibaba.nacos.common.remote.ConnectionType; import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.remote.client.RpcClientFactory; -import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; +import com.alibaba.nacos.common.remote.client.RpcClientTlsConfigFactory; import com.alibaba.nacos.common.remote.client.ServerListFactory; import com.alibaba.nacos.common.utils.CollectionUtils; import com.alibaba.nacos.common.utils.JacksonUtils; @@ -104,7 +104,7 @@ public NamingGrpcClientProxy(String namespaceId, SecurityProxy securityProxy, Se labels.put(RemoteConstants.LABEL_MODULE, RemoteConstants.LABEL_MODULE_NAMING); labels.put(Constants.APPNAME, AppNameUtils.getAppName()); this.rpcClient = RpcClientFactory.createClient(uuid, ConnectionType.GRPC, labels, - RpcClientTlsConfig.properties(properties.asProperties())); + RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties.asProperties())); this.redoService = new NamingGrpcRedoService(this, properties); NAMING_LOGGER.info("Create naming rpc client for uuid->{}", uuid); start(serverListFactory, serviceInfoHolder); diff --git a/client/src/test/java/com/alibaba/nacos/client/config/impl/ClientWorkerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/impl/ClientWorkerTest.java index 4e0632351a3..5c780ebbc9d 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/impl/ClientWorkerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/impl/ClientWorkerTest.java @@ -101,7 +101,7 @@ public void before() { any(RpcClientTlsConfig.class))).thenReturn(rpcClient); rpcClientFactoryMockedStatic.when( () -> RpcClientFactory.createClient(anyString(), any(ConnectionType.class), any(Map.class), - any(Properties.class), any(RpcClientTlsConfig.class))).thenReturn(rpcClient); + any(RpcClientTlsConfig.class))).thenReturn(rpcClient); localConfigInfoProcessorMockedStatic = Mockito.mockStatic(LocalConfigInfoProcessor.class); Properties properties = new Properties(); properties.put(PropertyKeyConst.NAMESPACE, TEST_NAMESPACE); @@ -149,8 +149,8 @@ public void testAddListenerWithoutTenant() throws NacosException { public void receiveConfigInfo(String configInfo) { } }; - - clientWorker.addListeners(dataId, group, Arrays.asList(listener)); + + clientWorker.addListeners(dataId, group, Collections.singletonList(listener)); List listeners = clientWorker.getCache(dataId, group).getListeners(); Assert.assertEquals(1, listeners.size()); Assert.assertEquals(listener, listeners.get(0)); @@ -180,8 +180,8 @@ public void receiveConfigInfo(String configInfo) { String dataId = "a"; String group = "b"; - - clientWorker.addTenantListeners(dataId, group, Arrays.asList(listener)); + + clientWorker.addTenantListeners(dataId, group, Collections.singletonList(listener)); List listeners = clientWorker.getCache(dataId, group).getListeners(); Assert.assertEquals(1, listeners.size()); Assert.assertEquals(listener, listeners.get(0)); @@ -191,7 +191,7 @@ public void receiveConfigInfo(String configInfo) { Assert.assertEquals(0, listeners.size()); String content = "d"; - clientWorker.addTenantListenersWithContent(dataId, group, content, null, Arrays.asList(listener)); + clientWorker.addTenantListenersWithContent(dataId, group, content, null, Collections.singletonList(listener)); listeners = clientWorker.getCache(dataId, group).getListeners(); Assert.assertEquals(1, listeners.size()); Assert.assertEquals(listener, listeners.get(0)); @@ -418,10 +418,10 @@ public void testHandleClientMetricsReqeust() throws Exception { String metricValues = jsonNode.get("metricValues") .get(ClientConfigMetricRequest.MetricsKey.build(ClientConfigMetricRequest.MetricsKey.CACHE_DATA, GroupKey.getKeyTenant(dataId, group, tenant)).toString()).textValue(); - - int colonIndex = metricValues.toString().lastIndexOf(":"); + + int colonIndex = metricValues.lastIndexOf(":"); Assert.assertEquals(content, metricValues.substring(0, colonIndex)); - Assert.assertEquals(md5, metricValues.substring(colonIndex + 1, metricValues.toString().length())); + Assert.assertEquals(md5, metricValues.substring(colonIndex + 1, metricValues.length())); } @@ -441,7 +441,7 @@ public void testGeConfigConfigNotFound() throws NacosException { Mockito.when(rpcClient.request(any(ConfigQueryRequest.class), anyLong())).thenReturn(configQueryResponse); ConfigResponse configResponse = clientWorker.getServerConfig(dataId, group, tenant, 100, true); - Assert.assertEquals(null, configResponse.getContent()); + Assert.assertNull(configResponse.getContent()); localConfigInfoProcessorMockedStatic.verify( () -> LocalConfigInfoProcessor.saveSnapshot(eq(clientWorker.getAgentName()), eq(dataId), eq(group), eq(tenant), eq(null)), times(1)); @@ -476,7 +476,7 @@ public void testShutdown() throws NacosException, NoSuchFieldException, IllegalA Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); - + final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(prop); ClientWorker clientWorker = new ClientWorker(filter, agent, nacosClientProperties); clientWorker.shutdown(); @@ -485,8 +485,8 @@ public void testShutdown() throws NacosException, NoSuchFieldException, IllegalA ConfigTransportClient o = (ConfigTransportClient) agent1.get(clientWorker); Assert.assertTrue(o.executor.isShutdown()); agent1.setAccessible(false); - - Assert.assertEquals(null, clientWorker.getAgentName()); + + Assert.assertNull(clientWorker.getAgentName()); } @Test @@ -552,13 +552,13 @@ public void receiveConfigInfo(String configInfo) { configContext.setGroup(group); configContext.setTenant(tenant); ConfigChangeBatchListenResponse response = new ConfigChangeBatchListenResponse(); - response.setChangedConfigs(Arrays.asList(configContext)); + response.setChangedConfigs(Collections.singletonList(configContext)); RpcClient rpcClientInner = Mockito.mock(RpcClient.class); Mockito.when(rpcClientInner.isWaitInitiated()).thenReturn(true, false); rpcClientFactoryMockedStatic.when( () -> RpcClientFactory.createClient(anyString(), any(ConnectionType.class), any(Map.class), - any(Properties.class), any(RpcClientTlsConfig.class))).thenReturn(rpcClientInner); + any(RpcClientTlsConfig.class))).thenReturn(rpcClientInner); // mock listen and remove listen request Mockito.when(rpcClientInner.request(any(ConfigBatchListenRequest.class), anyLong())) .thenReturn(response, response); @@ -620,20 +620,20 @@ public void testIsHealthServer() throws NacosException, NoSuchFieldException, Il Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); - + final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(prop); ClientWorker clientWorker = new ClientWorker(filter, agent, nacosClientProperties); ClientWorker.ConfigRpcTransportClient client = Mockito.mock(ClientWorker.ConfigRpcTransportClient.class); Mockito.when(client.isHealthServer()).thenReturn(Boolean.TRUE); - + Field declaredField = ClientWorker.class.getDeclaredField("agent"); declaredField.setAccessible(true); declaredField.set(clientWorker, client); - - Assert.assertEquals(true, clientWorker.isHealthServer()); - + + Assert.assertTrue(clientWorker.isHealthServer()); + Mockito.when(client.isHealthServer()).thenReturn(Boolean.FALSE); - Assert.assertEquals(false, clientWorker.isHealthServer()); + assertFalse(clientWorker.isHealthServer()); } @Test diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientFactory.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientFactory.java index dec351ba387..92f02ef3af5 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientFactory.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientFactory.java @@ -121,30 +121,41 @@ public static RpcClient createClient(String clientName, ConnectionType connectio } /** - * create a rpc client. + * Creates an RPC client for cluster communication with default thread pool settings. * - * @param clientName client name. - * @param connectionType client type. - * @return rpc client. + * @param clientName The name of the client. + * @param connectionType The type of client connection. + * @param labels Additional labels for RPC-related attributes. + * @return An RPC client for cluster communication. */ public static RpcClient createClusterClient(String clientName, ConnectionType connectionType, Map labels) { return createClusterClient(clientName, connectionType, null, null, labels); } + /** + * Creates an RPC client for cluster communication with TLS configuration. + * + * @param clientName The name of the client. + * @param connectionType The type of client connection. + * @param labels Additional labels for RPC-related attributes. + * @param tlsConfig TLS configuration for secure communication. + * @return An RPC client for cluster communication with TLS configuration. + */ public static RpcClient createClusterClient(String clientName, ConnectionType connectionType, Map labels, RpcClientTlsConfig tlsConfig) { return createClusterClient(clientName, connectionType, null, null, labels, tlsConfig); } /** - * create a rpc client. + * Creates an RPC client for cluster communication with custom thread pool settings. * - * @param clientName client name. - * @param connectionType client type. - * @param threadPoolCoreSize grpc thread pool core size - * @param threadPoolMaxSize grpc thread pool max size - * @return rpc client. + * @param clientName The name of the client. + * @param connectionType The type of client connection. + * @param threadPoolCoreSize The core size of the gRPC thread pool. + * @param threadPoolMaxSize The maximum size of the gRPC thread pool. + * @param labels Additional labels for RPC-related attributes. + * @return An RPC client for cluster communication with custom thread pool settings. */ public static RpcClient createClusterClient(String clientName, ConnectionType connectionType, Integer threadPoolCoreSize, Integer threadPoolMaxSize, Map labels) { @@ -162,7 +173,6 @@ public static RpcClient createClusterClient(String clientName, ConnectionType co * @param tlsConfig tlsConfig. * @return */ - public static RpcClient createClusterClient(String clientName, ConnectionType connectionType, Integer threadPoolCoreSize, Integer threadPoolMaxSize, Map labels, RpcClientTlsConfig tlsConfig) { diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfig.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfig.java index 61b847e98ac..de5c2e5cdb2 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfig.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfig.java @@ -18,68 +18,10 @@ import com.alibaba.nacos.common.remote.TlsConfig; -import java.util.Properties; - /** * gRPC config for sdk. * * @author githubcheng2978 */ public class RpcClientTlsConfig extends TlsConfig { - - /** - * get tls config from properties. - * @param properties Properties. - * @return tls of config. - */ - public static RpcClientTlsConfig properties(Properties properties) { - RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_ENABLE)) { - tlsConfig.setEnableTls(Boolean.parseBoolean( - properties.getProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE))); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_PROVIDER)) { - tlsConfig.setSslProvider(properties.getProperty(RpcConstants.RPC_CLIENT_TLS_PROVIDER)); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_MUTUAL_AUTH)) { - tlsConfig.setMutualAuthEnable(Boolean.parseBoolean( - properties.getProperty(RpcConstants.RPC_CLIENT_MUTUAL_AUTH))); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_PROTOCOLS)) { - tlsConfig.setProtocols(properties.getProperty(RpcConstants.RPC_CLIENT_TLS_PROTOCOLS)); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_CIPHERS)) { - tlsConfig.setCiphers(properties.getProperty(RpcConstants.RPC_CLIENT_TLS_CIPHERS)); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH)) { - tlsConfig.setTrustCollectionCertFile(properties.getProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH)); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH)) { - tlsConfig.setCertChainFile(properties.getProperty(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH)); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_CERT_KEY)) { - tlsConfig.setCertPrivateKey(properties.getProperty(RpcConstants.RPC_CLIENT_TLS_CERT_KEY)); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_TRUST_ALL)) { - tlsConfig.setTrustAll(Boolean.parseBoolean(properties.getProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_ALL))); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_TRUST_PWD)) { - tlsConfig.setCertPrivateKeyPassword(properties.getProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_PWD)); - } - - if (properties.containsKey(RpcConstants.RPC_CLIENT_TLS_PROVIDER)) { - tlsConfig.setSslProvider(properties.getProperty(RpcConstants.RPC_CLIENT_TLS_PROVIDER)); - } - return tlsConfig; - } - } diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigFactory.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigFactory.java new file mode 100644 index 00000000000..0c12d5e393d --- /dev/null +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigFactory.java @@ -0,0 +1,97 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.common.remote.client; + +import java.util.Properties; + +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.MUTUAL_AUTH; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.TLS_CERT_CHAIN_PATH; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.TLS_CERT_KEY; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.TLS_CIPHERS; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.TLS_ENABLE; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.TLS_PROTOCOLS; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.TLS_PROVIDER; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.TLS_TRUST_ALL; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.TLS_TRUST_COLLECTION_CHAIN_PATH; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ClientSuffix.TLS_TRUST_PWD; +import static com.alibaba.nacos.common.remote.client.RpcConstants.NACOS_CLIENT_RPC; +import static com.alibaba.nacos.common.remote.client.RpcConstants.NACOS_PEER_RPC; + +/** + * TlsConfigFactory. + * + * @author stone-98 + */ +public class RpcClientTlsConfigFactory implements RpcTlsConfigFactory { + + private static RpcClientTlsConfigFactory instance; + + private RpcClientTlsConfigFactory() { + } + + public static synchronized RpcClientTlsConfigFactory getInstance() { + if (instance == null) { + instance = new RpcClientTlsConfigFactory(); + } + return instance; + } + + /** + * Create SDK client TLS config. + * + * @param properties Properties containing TLS configuration + * @return RpcClientTlsConfig object representing the TLS configuration + */ + @Override + public RpcClientTlsConfig createSdkConfig(Properties properties) { + RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); + tlsConfig.setEnableTls(getBooleanProperty(properties, NACOS_CLIENT_RPC + TLS_ENABLE, false)); + tlsConfig.setMutualAuthEnable(getBooleanProperty(properties, NACOS_CLIENT_RPC + MUTUAL_AUTH, false)); + tlsConfig.setProtocols(properties.getProperty(NACOS_CLIENT_RPC + TLS_PROTOCOLS)); + tlsConfig.setCiphers(properties.getProperty(NACOS_CLIENT_RPC + TLS_CIPHERS)); + tlsConfig.setTrustCollectionCertFile(properties.getProperty(NACOS_CLIENT_RPC + TLS_TRUST_COLLECTION_CHAIN_PATH)); + tlsConfig.setCertChainFile(properties.getProperty(NACOS_CLIENT_RPC + TLS_CERT_CHAIN_PATH)); + tlsConfig.setCertPrivateKey(properties.getProperty(NACOS_CLIENT_RPC + TLS_CERT_KEY)); + tlsConfig.setTrustAll(getBooleanProperty(properties, NACOS_CLIENT_RPC + TLS_TRUST_ALL, true)); + tlsConfig.setCertPrivateKeyPassword(properties.getProperty(NACOS_CLIENT_RPC + TLS_TRUST_PWD)); + tlsConfig.setSslProvider(properties.getProperty(NACOS_CLIENT_RPC + TLS_PROVIDER)); + return tlsConfig; + } + + /** + * Create cluster client TLS config. + * + * @param properties Properties containing TLS configuration + * @return RpcClientTlsConfig object representing the TLS configuration + */ + @Override + public RpcClientTlsConfig createClusterConfig(Properties properties) { + RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); + tlsConfig.setEnableTls(getBooleanProperty(properties, NACOS_PEER_RPC + RpcConstants.ServerSuffix.TLS_ENABLE, false)); + tlsConfig.setMutualAuthEnable(getBooleanProperty(properties, NACOS_PEER_RPC + RpcConstants.ServerSuffix.MUTUAL_AUTH, false)); + tlsConfig.setProtocols(properties.getProperty(NACOS_PEER_RPC + RpcConstants.ServerSuffix.TLS_PROTOCOLS)); + tlsConfig.setCiphers(properties.getProperty(NACOS_PEER_RPC + RpcConstants.ServerSuffix.TLS_CIPHERS)); + tlsConfig.setTrustCollectionCertFile(properties.getProperty(NACOS_PEER_RPC + RpcConstants.ServerSuffix.TLS_TRUST_COLLECTION_CHAIN_PATH)); + tlsConfig.setCertChainFile(properties.getProperty(NACOS_PEER_RPC + RpcConstants.ServerSuffix.TLS_CERT_CHAIN_PATH)); + tlsConfig.setCertPrivateKey(properties.getProperty(NACOS_PEER_RPC + RpcConstants.ServerSuffix.TLS_CERT_KEY)); + tlsConfig.setTrustAll(getBooleanProperty(properties, NACOS_PEER_RPC + RpcConstants.ServerSuffix.TLS_TRUST_ALL, true)); + tlsConfig.setCertPrivateKeyPassword(properties.getProperty(NACOS_PEER_RPC + RpcConstants.ServerSuffix.TLS_TRUST_PWD)); + tlsConfig.setSslProvider(properties.getProperty(NACOS_PEER_RPC + RpcConstants.ServerSuffix.TLS_PROVIDER)); + return tlsConfig; + } + +} diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcConstants.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcConstants.java index 0b0f40762b6..92ee198bcc7 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcConstants.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcConstants.java @@ -34,54 +34,51 @@ public class RpcConstants { public static final String NACOS_CLIENT_RPC = "nacos.remote.client.rpc"; - + + public static final String NACOS_SERVER_RPC = "nacos.remote.server.rpc.tls"; + + public static final String NACOS_PEER_RPC = "nacos.remote.peer.rpc.tls"; + @RpcConfigLabel - public static final String RPC_CLIENT_TLS_ENABLE = NACOS_CLIENT_RPC + ".tls.enable"; + public static final String RPC_CLIENT_TLS_ENABLE = NACOS_CLIENT_RPC + ClientSuffix.TLS_ENABLE; @RpcConfigLabel - public static final String RPC_CLIENT_TLS_PROVIDER = NACOS_CLIENT_RPC + ".tls.provider"; + public static final String RPC_CLIENT_TLS_PROVIDER = NACOS_CLIENT_RPC + ClientSuffix.TLS_PROVIDER; @RpcConfigLabel - public static final String RPC_CLIENT_MUTUAL_AUTH = NACOS_CLIENT_RPC + ".tls.mutualAuth"; + public static final String RPC_CLIENT_MUTUAL_AUTH = NACOS_CLIENT_RPC + ClientSuffix.MUTUAL_AUTH; @RpcConfigLabel - public static final String RPC_CLIENT_TLS_PROTOCOLS = NACOS_CLIENT_RPC + ".tls.protocols"; + public static final String RPC_CLIENT_TLS_PROTOCOLS = NACOS_CLIENT_RPC + ClientSuffix.TLS_PROTOCOLS; @RpcConfigLabel - public static final String RPC_CLIENT_TLS_CIPHERS = NACOS_CLIENT_RPC + ".tls.ciphers"; + public static final String RPC_CLIENT_TLS_CIPHERS = NACOS_CLIENT_RPC + ClientSuffix.TLS_CIPHERS; @RpcConfigLabel - public static final String RPC_CLIENT_TLS_CERT_CHAIN_PATH = NACOS_CLIENT_RPC + ".tls.certChainFile"; + public static final String RPC_CLIENT_TLS_CERT_CHAIN_PATH = NACOS_CLIENT_RPC + ClientSuffix.TLS_CERT_CHAIN_PATH; @RpcConfigLabel - public static final String RPC_CLIENT_TLS_CERT_KEY = NACOS_CLIENT_RPC + ".tls.certPrivateKey"; + public static final String RPC_CLIENT_TLS_CERT_KEY = NACOS_CLIENT_RPC + ClientSuffix.TLS_CERT_KEY; @RpcConfigLabel - public static final String RPC_CLIENT_TLS_TRUST_PWD = NACOS_CLIENT_RPC + ".tls.certPrivateKeyPassword"; + public static final String RPC_CLIENT_TLS_TRUST_PWD = NACOS_CLIENT_RPC + ClientSuffix.TLS_TRUST_PWD; @RpcConfigLabel public static final String RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH = - NACOS_CLIENT_RPC + ".tls.trustCollectionChainPath"; + NACOS_CLIENT_RPC + ClientSuffix.TLS_TRUST_COLLECTION_CHAIN_PATH; @RpcConfigLabel - public static final String RPC_CLIENT_TLS_TRUST_ALL = NACOS_CLIENT_RPC + ".tls.trustAll"; + public static final String RPC_CLIENT_TLS_TRUST_ALL = NACOS_CLIENT_RPC + ClientSuffix.TLS_TRUST_ALL; private static final Set CONFIG_NAMES = new HashSet<>(); - @Documented - @Target(ElementType.FIELD) - @Retention(RetentionPolicy.RUNTIME) - protected @interface RpcConfigLabel { - - } - static { Class clazz = RpcConstants.class; Field[] declaredFields = clazz.getDeclaredFields(); for (Field declaredField : declaredFields) { declaredField.setAccessible(true); - if (declaredField.getType().equals(String.class) && null != declaredField - .getAnnotation(RpcConfigLabel.class)) { + if (declaredField.getType().equals(String.class) && null != declaredField.getAnnotation( + RpcConfigLabel.class)) { try { CONFIG_NAMES.add((String) declaredField.get(null)); } catch (IllegalAccessException ignored) { @@ -90,7 +87,139 @@ public class RpcConstants { } } + /** + * Enumeration of common suffixes for RPC configuration properties. Each enum constant represents a specific + * configuration attribute suffix. This allows for the construction of complete configuration property keys. + */ + public class ClientSuffix { + + /** + * Suffix for 'tls.enable' configuration property. + */ + public static final String TLS_ENABLE = ".tls.enable"; + + /** + * Suffix for 'tls.provider' configuration property. + */ + public static final String TLS_PROVIDER = ".tls.provider"; + + /** + * Suffix for 'tls.mutualAuth' configuration property. + */ + public static final String MUTUAL_AUTH = ".tls.mutualAuth"; + + /** + * Suffix for 'tls.protocols' configuration property. + */ + public static final String TLS_PROTOCOLS = ".tls.protocols"; + + /** + * Suffix for 'tls.ciphers' configuration property. + */ + public static final String TLS_CIPHERS = ".tls.ciphers"; + + /** + * Suffix for 'tls.certChainFile' configuration property. + */ + public static final String TLS_CERT_CHAIN_PATH = ".tls.certChainFile"; + + /** + * Suffix for 'tls.certPrivateKey' configuration property. + */ + public static final String TLS_CERT_KEY = ".tls.certPrivateKey"; + + /** + * Suffix for 'tls.certPrivateKeyPassword' configuration property. + */ + public static final String TLS_TRUST_PWD = ".tls.certPrivateKeyPassword"; + + /** + * Suffix for 'tls.trustCollectionChainPath' configuration property. + */ + public static final String TLS_TRUST_COLLECTION_CHAIN_PATH = ".tls.trustCollectionChainPath"; + + /** + * Suffix for 'tls.trustAll' configuration property. + */ + public static final String TLS_TRUST_ALL = ".tls.trustAll"; + } + + /** + * Enumeration of common suffixes for RPC configuration properties. Each enum constant represents a specific + * configuration attribute suffix. This allows for the construction of complete configuration property keys. + */ + public class ServerSuffix { + + /** + * Suffix for 'tls.enable' configuration property. + */ + public static final String TLS_ENABLE = ".enableTls"; + + /** + * Suffix for 'tls.provider' configuration property. + */ + public static final String TLS_PROVIDER = ".sslProvider"; + + /** + * Suffix for 'tls.mutualAuth' configuration property. + */ + public static final String MUTUAL_AUTH = ".mutualAuthEnable"; + + /** + * Suffix for 'tls.protocols' configuration property. + */ + public static final String TLS_PROTOCOLS = ".protocols"; + + /** + * Suffix for 'tls.ciphers' configuration property. + */ + public static final String TLS_CIPHERS = ".ciphers"; + + /** + * Suffix for 'tls.certChainFile' configuration property. + */ + public static final String TLS_CERT_CHAIN_PATH = ".certChainFile"; + + /** + * Suffix for 'tls.certPrivateKey' configuration property. + */ + public static final String TLS_CERT_KEY = ".certPrivateKey"; + + /** + * Suffix for 'tls.certPrivateKeyPassword' configuration property. + */ + public static final String TLS_TRUST_PWD = ".certPrivateKeyPassword"; + + /** + * Suffix for 'tls.trustCollectionChainPath' configuration property. + */ + public static final String TLS_TRUST_COLLECTION_CHAIN_PATH = ".trustCollectionCertFile"; + + /** + * Suffix for 'tls.trustAll' configuration property. + */ + public static final String TLS_TRUST_ALL = ".trustAll"; + + /** + * Suffix for '.sslContextRefresher' configuration property. + */ + public static final String SSL_CONTEXT_REFRESHER = ".sslContextRefresher"; + + /** + * Suffix for '.compatibility' configuration property. + */ + public static final String COMPATIBILITY = ".compatibility"; + } + + @Documented + @Target(ElementType.FIELD) + @Retention(RetentionPolicy.RUNTIME) + protected @interface RpcConfigLabel { + + } + public static Set getRpcParams() { return Collections.unmodifiableSet(CONFIG_NAMES); } + } diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcTlsConfigFactory.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcTlsConfigFactory.java new file mode 100644 index 00000000000..eded7fdd78b --- /dev/null +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/RpcTlsConfigFactory.java @@ -0,0 +1,62 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.common.remote.client; + +import com.alibaba.nacos.common.remote.TlsConfig; + +import java.util.Properties; + +/** + * RpcTlsConfigFactory. + * + * @author stone-98 + * @date 2024/4/8 + */ +public interface RpcTlsConfigFactory { + + /** + * Create a TlsConfig for SDK connections based on the provided properties. + * + * @param properties Properties containing configuration + * @return TlsConfig instance for SDK connections + */ + TlsConfig createSdkConfig(Properties properties); + + /** + * Create a TlsConfig for cluster connections based on the provided properties. + * + * @param properties Properties containing configuration + * @return TlsConfig instance for cluster connections + */ + TlsConfig createClusterConfig(Properties properties); + + /** + * Get boolean property from properties. + * + * @param properties Properties containing configuration + * @param key Key of the property + * @param defaultValue Default value to return if the property is not found or is invalid + * @return Boolean value of the property, or the provided defaultValue if not found or invalid + */ + default Boolean getBooleanProperty(Properties properties, String key, Boolean defaultValue) { + String value = properties.getProperty(key); + if (value != null) { + return Boolean.parseBoolean(value); + } + return defaultValue; + } +} \ No newline at end of file diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfig.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfig.java index cf6ac4787e5..05fbb825b9d 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfig.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfig.java @@ -16,7 +16,9 @@ package com.alibaba.nacos.common.remote.client.grpc; +import com.alibaba.nacos.common.remote.TlsConfig; import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; +import com.alibaba.nacos.common.remote.client.RpcClientTlsConfigFactory; import com.alibaba.nacos.common.utils.ThreadUtils; import java.util.HashMap; @@ -32,37 +34,37 @@ */ public class DefaultGrpcClientConfig implements GrpcClientConfig { - private String name; + private final String name; - private int retryTimes; + private final int retryTimes; - private long timeOutMills; + private final long timeOutMills; - private long connectionKeepAlive; + private final long connectionKeepAlive; - private long channelKeepAliveTimeout; + private final long channelKeepAliveTimeout; - private long threadPoolKeepAlive; + private final long threadPoolKeepAlive; - private int threadPoolCoreSize; + private final int threadPoolCoreSize; - private int threadPoolMaxSize; + private final int threadPoolMaxSize; - private long serverCheckTimeOut; + private final long serverCheckTimeOut; - private int threadPoolQueueSize; + private final int threadPoolQueueSize; - private int maxInboundMessageSize; + private final int maxInboundMessageSize; - private int channelKeepAlive; + private final int channelKeepAlive; - private int healthCheckRetryTimes; + private final int healthCheckRetryTimes; - private long healthCheckTimeOut; + private final long healthCheckTimeOut; - private long capabilityNegotiationTimeout; + private final long capabilityNegotiationTimeout; - private Map labels; + private final Map labels; private RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); @@ -98,7 +100,7 @@ private DefaultGrpcClientConfig(Builder builder) { this.labels.put("tls.enable", "false"); if (Objects.nonNull(builder.tlsConfig)) { this.tlsConfig = builder.tlsConfig; - if (builder.tlsConfig.getEnableTls()) { + if (Objects.nonNull(builder.tlsConfig.getEnableTls()) && builder.tlsConfig.getEnableTls()) { this.labels.put("tls.enable", "true"); } } @@ -173,7 +175,7 @@ public long channelKeepAliveTimeout() { } @Override - public RpcClientTlsConfig tlsConfig() { + public TlsConfig tlsConfig() { return tlsConfig; } @@ -237,12 +239,22 @@ public static class Builder { private long capabilityNegotiationTimeout = 5000L; - private Map labels = new HashMap<>(); + private final Map labels = new HashMap<>(); private RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); private Builder() { } + + public Builder buildSdkFromProperties(Properties properties) { + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); + return fromProperties(properties, tlsConfig); + } + + public Builder buildClusterFromProperties(Properties properties) { + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + return fromProperties(properties, tlsConfig); + } /** * Set config from properties. @@ -250,7 +262,7 @@ private Builder() { * @param properties properties * @return Builder */ - public Builder fromProperties(Properties properties) { + public Builder fromProperties(Properties properties, RpcClientTlsConfig tlsConfig) { if (properties.containsKey(GrpcConstants.GRPC_NAME)) { this.name = properties.getProperty(GrpcConstants.GRPC_NAME); } @@ -261,53 +273,53 @@ public Builder fromProperties(Properties properties) { this.timeOutMills = Long.parseLong(properties.getProperty(GrpcConstants.GRPC_TIMEOUT_MILLS)); } if (properties.containsKey(GrpcConstants.GRPC_CONNECT_KEEP_ALIVE_TIME)) { - this.connectionKeepAlive = Long - .parseLong(properties.getProperty(GrpcConstants.GRPC_CONNECT_KEEP_ALIVE_TIME)); + this.connectionKeepAlive = Long.parseLong( + properties.getProperty(GrpcConstants.GRPC_CONNECT_KEEP_ALIVE_TIME)); } if (properties.containsKey(GrpcConstants.GRPC_THREADPOOL_KEEPALIVETIME)) { - this.threadPoolKeepAlive = Long - .parseLong(properties.getProperty(GrpcConstants.GRPC_THREADPOOL_KEEPALIVETIME)); + this.threadPoolKeepAlive = Long.parseLong( + properties.getProperty(GrpcConstants.GRPC_THREADPOOL_KEEPALIVETIME)); } if (properties.containsKey(GrpcConstants.GRPC_THREADPOOL_CORE_SIZE)) { - this.threadPoolCoreSize = Integer - .parseInt(properties.getProperty(GrpcConstants.GRPC_THREADPOOL_CORE_SIZE)); + this.threadPoolCoreSize = Integer.parseInt( + properties.getProperty(GrpcConstants.GRPC_THREADPOOL_CORE_SIZE)); } if (properties.containsKey(GrpcConstants.GRPC_THREADPOOL_MAX_SIZE)) { - this.threadPoolMaxSize = Integer - .parseInt(properties.getProperty(GrpcConstants.GRPC_THREADPOOL_MAX_SIZE)); + this.threadPoolMaxSize = Integer.parseInt( + properties.getProperty(GrpcConstants.GRPC_THREADPOOL_MAX_SIZE)); } if (properties.containsKey(GrpcConstants.GRPC_SERVER_CHECK_TIMEOUT)) { - this.serverCheckTimeOut = Long - .parseLong(properties.getProperty(GrpcConstants.GRPC_SERVER_CHECK_TIMEOUT)); + this.serverCheckTimeOut = Long.parseLong( + properties.getProperty(GrpcConstants.GRPC_SERVER_CHECK_TIMEOUT)); } if (properties.containsKey(GrpcConstants.GRPC_QUEUESIZE)) { this.threadPoolQueueSize = Integer.parseInt(properties.getProperty(GrpcConstants.GRPC_QUEUESIZE)); } if (properties.containsKey(GrpcConstants.GRPC_MAX_INBOUND_MESSAGE_SIZE)) { - this.maxInboundMessageSize = Integer - .parseInt(properties.getProperty(GrpcConstants.GRPC_MAX_INBOUND_MESSAGE_SIZE)); + this.maxInboundMessageSize = Integer.parseInt( + properties.getProperty(GrpcConstants.GRPC_MAX_INBOUND_MESSAGE_SIZE)); } if (properties.containsKey(GrpcConstants.GRPC_CHANNEL_KEEP_ALIVE_TIME)) { - this.channelKeepAlive = Integer - .parseInt(properties.getProperty(GrpcConstants.GRPC_CHANNEL_KEEP_ALIVE_TIME)); + this.channelKeepAlive = Integer.parseInt( + properties.getProperty(GrpcConstants.GRPC_CHANNEL_KEEP_ALIVE_TIME)); } if (properties.containsKey(GrpcConstants.GRPC_CHANNEL_CAPABILITY_NEGOTIATION_TIMEOUT)) { - this.capabilityNegotiationTimeout = Integer - .parseInt(properties.getProperty(GrpcConstants.GRPC_CHANNEL_CAPABILITY_NEGOTIATION_TIMEOUT)); + this.capabilityNegotiationTimeout = Integer.parseInt( + properties.getProperty(GrpcConstants.GRPC_CHANNEL_CAPABILITY_NEGOTIATION_TIMEOUT)); } if (properties.containsKey(GrpcConstants.GRPC_HEALTHCHECK_RETRY_TIMES)) { - this.healthCheckRetryTimes = Integer - .parseInt(properties.getProperty(GrpcConstants.GRPC_HEALTHCHECK_RETRY_TIMES)); + this.healthCheckRetryTimes = Integer.parseInt( + properties.getProperty(GrpcConstants.GRPC_HEALTHCHECK_RETRY_TIMES)); } if (properties.containsKey(GrpcConstants.GRPC_HEALTHCHECK_TIMEOUT)) { - this.healthCheckTimeOut = Long - .parseLong(properties.getProperty(GrpcConstants.GRPC_HEALTHCHECK_TIMEOUT)); + this.healthCheckTimeOut = Long.parseLong( + properties.getProperty(GrpcConstants.GRPC_HEALTHCHECK_TIMEOUT)); } if (properties.containsKey(GrpcConstants.GRPC_CHANNEL_KEEP_ALIVE_TIMEOUT)) { - this.channelKeepAliveTimeout = Integer - .parseInt(properties.getProperty(GrpcConstants.GRPC_CHANNEL_KEEP_ALIVE_TIMEOUT)); + this.channelKeepAliveTimeout = Integer.parseInt( + properties.getProperty(GrpcConstants.GRPC_CHANNEL_KEEP_ALIVE_TIMEOUT)); } - this.tlsConfig = RpcClientTlsConfig.properties(properties); + this.tlsConfig = tlsConfig; return this; } diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClient.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClient.java index 25d213cb951..3cde9d830fa 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClient.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClient.java @@ -33,6 +33,7 @@ import com.alibaba.nacos.common.ability.discover.NacosAbilityManagerHolder; import com.alibaba.nacos.common.packagescan.resource.Resource; import com.alibaba.nacos.common.remote.ConnectionType; +import com.alibaba.nacos.common.remote.TlsConfig; import com.alibaba.nacos.common.remote.client.Connection; import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.remote.client.RpcClientStatus; @@ -64,7 +65,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; -import java.util.Properties; import java.util.concurrent.CountDownLatch; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; @@ -109,15 +109,6 @@ public GrpcClient(String name) { this(DefaultGrpcClientConfig.newBuilder().setName(name).build()); } - /** - * constructor. - * - * @param properties . - */ - public GrpcClient(Properties properties) { - this(DefaultGrpcClientConfig.newBuilder().fromProperties(properties).build()); - } - /** * constructor. * @@ -209,8 +200,8 @@ protected RequestGrpc.RequestFutureStub createNewChannelStub(ManagedChannel mana private ManagedChannel createNewManagedChannel(String serverIp, int serverPort) { LOGGER.info("grpc client connection server:{} ip,serverPort:{},grpcTslConfig:{}", serverIp, serverPort, JacksonUtils.toJson(clientConfig.tlsConfig())); - ManagedChannelBuilder managedChannelBuilder = buildChannel(serverIp, serverPort, buildSslContext()) - .executor(grpcExecutor).compressorRegistry(CompressorRegistry.getDefaultInstance()) + ManagedChannelBuilder managedChannelBuilder = buildChannel(serverIp, serverPort, buildSslContext()).executor( + grpcExecutor).compressorRegistry(CompressorRegistry.getDefaultInstance()) .decompressorRegistry(DecompressorRegistry.getDefaultInstance()) .maxInboundMessageSize(clientConfig.maxInboundMessageSize()) .keepAliveTime(clientConfig.channelKeepAlive(), TimeUnit.MILLISECONDS) @@ -288,8 +279,8 @@ public void onNext(Payload payload) { } catch (Exception e) { LoggerUtils.printIfErrorEnabled(LOGGER, "[{}]Handle server request exception: {}", grpcConn.getConnectionId(), payload.toString(), e.getMessage()); - Response errResponse = ErrorResponse - .build(NacosException.CLIENT_ERROR, "Handle server request error"); + Response errResponse = ErrorResponse.build(NacosException.CLIENT_ERROR, + "Handle server request error"); errResponse.setRequestId(request.getRequestId()); sendResponse(errResponse); } @@ -374,8 +365,8 @@ public Connection connectToServer(ServerInfo serverInfo) { ServerCheckResponse serverCheckResponse = (ServerCheckResponse) response; connectionId = serverCheckResponse.getConnectionId(); - BiRequestStreamGrpc.BiRequestStreamStub biRequestStreamStub = BiRequestStreamGrpc - .newStub(newChannelStubTemp.getChannel()); + BiRequestStreamGrpc.BiRequestStreamStub biRequestStreamStub = BiRequestStreamGrpc.newStub( + newChannelStubTemp.getChannel()); GrpcConnection grpcConn = new GrpcConnection(serverInfo, grpcExecutor); grpcConn.setConnectionId(connectionId); // if not supported, it will be false @@ -398,8 +389,8 @@ public Connection connectToServer(ServerInfo serverInfo) { conSetupRequest.setClientVersion(VersionUtils.getFullClientVersion()); conSetupRequest.setLabels(super.getLabels()); // set ability table - conSetupRequest - .setAbilityTable(NacosAbilityManagerHolder.getInstance().getCurrentNodeAbilities(abilityMode())); + conSetupRequest.setAbilityTable( + NacosAbilityManagerHolder.getInstance().getCurrentNodeAbilities(abilityMode())); conSetupRequest.setTenant(super.getTenant()); grpcConn.sendRequest(conSetupRequest); // wait for response @@ -531,44 +522,9 @@ public boolean check(Connection connection) { } } - /** - * Setup response handler. - */ - class SetupRequestHandler implements ServerRequestHandler { - - private final RecAbilityContext abilityContext; - - public SetupRequestHandler(RecAbilityContext abilityContext) { - this.abilityContext = abilityContext; - } - - @Override - public Response requestReply(Request request, Connection connection) { - // if finish setup - if (request instanceof SetupAckRequest) { - SetupAckRequest setupAckRequest = (SetupAckRequest) request; - // remove and count down - recAbilityContext - .release(Optional.ofNullable(setupAckRequest.getAbilityTable()).orElse(new HashMap<>(0))); - return new SetupAckResponse(); - } - return null; - } - } - - private ManagedChannelBuilder buildChannel(String serverIp, int port, Optional sslContext) { - if (sslContext.isPresent()) { - return NettyChannelBuilder.forAddress(serverIp, port).negotiationType(NegotiationType.TLS) - .sslContext(sslContext.get()); - - } else { - return ManagedChannelBuilder.forAddress(serverIp, port).usePlaintext(); - } - } - private Optional buildSslContext() { - RpcClientTlsConfig tlsConfig = clientConfig.tlsConfig(); + TlsConfig tlsConfig = clientConfig.tlsConfig(); if (!tlsConfig.getEnableTls()) { return Optional.empty(); } @@ -595,8 +551,8 @@ private Optional buildSslContext() { } if (tlsConfig.getMutualAuthEnable()) { - if (StringUtils.isBlank(tlsConfig.getCertChainFile()) || StringUtils - .isBlank(tlsConfig.getCertPrivateKey())) { + if (StringUtils.isBlank(tlsConfig.getCertChainFile()) || StringUtils.isBlank( + tlsConfig.getCertPrivateKey())) { throw new IllegalArgumentException("client certChainFile or certPrivateKey must be not null"); } Resource certChainFile = resourceLoader.getResource(tlsConfig.getCertChainFile()); @@ -609,6 +565,41 @@ private Optional buildSslContext() { throw new RuntimeException("Unable to build SslContext", e); } } + + private ManagedChannelBuilder buildChannel(String serverIp, int port, Optional sslContext) { + if (sslContext.isPresent()) { + return NettyChannelBuilder.forAddress(serverIp, port).negotiationType(NegotiationType.TLS) + .sslContext(sslContext.get()); + + } else { + return ManagedChannelBuilder.forAddress(serverIp, port).usePlaintext(); + } + } + + /** + * Setup response handler. + */ + class SetupRequestHandler implements ServerRequestHandler { + + private final RecAbilityContext abilityContext; + + public SetupRequestHandler(RecAbilityContext abilityContext) { + this.abilityContext = abilityContext; + } + + @Override + public Response requestReply(Request request, Connection connection) { + // if finish setup + if (request instanceof SetupAckRequest) { + SetupAckRequest setupAckRequest = (SetupAckRequest) request; + // remove and count down + recAbilityContext.release( + Optional.ofNullable(setupAckRequest.getAbilityTable()).orElse(new HashMap<>(0))); + return new SetupAckResponse(); + } + return null; + } + } } diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientConfig.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientConfig.java index 1c1b4003bad..d16ebcc9dc9 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientConfig.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientConfig.java @@ -16,6 +16,7 @@ package com.alibaba.nacos.common.remote.client.grpc; +import com.alibaba.nacos.common.remote.TlsConfig; import com.alibaba.nacos.common.remote.client.RpcClientConfig; import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; @@ -81,26 +82,26 @@ public interface GrpcClientConfig extends RpcClientConfig { * @return channelKeepAliveTimeout. */ long channelKeepAliveTimeout(); - + /** - * getTlsConfig. + * getTlsConfig. * * @return TlsConfig. */ - RpcClientTlsConfig tlsConfig(); - + TlsConfig tlsConfig(); + /** - *Set TlsConfig. + * Set TlsConfig. * * @param tlsConfig tlsConfig of client. */ void setTlsConfig(RpcClientTlsConfig tlsConfig); - + /** * get timeout of connection setup(TimeUnit.MILLISECONDS). * * @return timeout of connection setup */ long capabilityNegotiationTimeout(); - + } diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClient.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClient.java index 7749f69b6f6..69530afd833 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClient.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClient.java @@ -21,7 +21,6 @@ import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; import java.util.Map; -import java.util.Properties; /** * gRPC client for cluster. @@ -48,16 +47,7 @@ public GrpcClusterClient(String name) { public GrpcClusterClient(GrpcClientConfig config) { super(config); } - - /** - * Constructor. - * - * @param properties . - */ - public GrpcClusterClient(Properties properties) { - super(properties); - } - + /** * Constructor. * @@ -67,20 +57,20 @@ public GrpcClusterClient(Properties properties) { * @param labels . */ public GrpcClusterClient(String name, Integer threadPoolCoreSize, Integer threadPoolMaxSize, - Map labels) { + Map labels) { this(name, threadPoolCoreSize, threadPoolMaxSize, labels, null); } - + public GrpcClusterClient(String name, Integer threadPoolCoreSize, Integer threadPoolMaxSize, - Map labels, RpcClientTlsConfig tlsConfig) { + Map labels, RpcClientTlsConfig tlsConfig) { super(name, threadPoolCoreSize, threadPoolMaxSize, labels, tlsConfig); } - + @Override protected AbilityMode abilityMode() { return AbilityMode.CLUSTER_CLIENT; } - + @Override public int rpcPortOffset() { return Integer.parseInt(System.getProperty(GrpcConstants.NACOS_SERVER_GRPC_PORT_OFFSET_KEY, diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClient.java b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClient.java index 0ede2af6de6..cf973416cca 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClient.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClient.java @@ -21,7 +21,6 @@ import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; import java.util.Map; -import java.util.Properties; /** * gRPC client for sdk. @@ -40,15 +39,6 @@ public GrpcSdkClient(String name) { super(name); } - /** - * Constructor. - * - * @param properties . - */ - public GrpcSdkClient(Properties properties) { - super(properties); - } - /** * Constructor. * @@ -57,20 +47,21 @@ public GrpcSdkClient(Properties properties) { * @param threadPoolMaxSize . * @param labels . */ - public GrpcSdkClient(String name, Integer threadPoolCoreSize, Integer threadPoolMaxSize, Map labels) { + public GrpcSdkClient(String name, Integer threadPoolCoreSize, Integer threadPoolMaxSize, + Map labels) { this(name, threadPoolCoreSize, threadPoolMaxSize, labels, null); } - + public GrpcSdkClient(String name, Integer threadPoolCoreSize, Integer threadPoolMaxSize, Map labels, - RpcClientTlsConfig tlsConfig) { + RpcClientTlsConfig tlsConfig) { super(name, threadPoolCoreSize, threadPoolMaxSize, labels, tlsConfig); } - + @Override protected AbilityMode abilityMode() { return AbilityMode.SDK_CLIENT; } - + /** * constructor. * @@ -86,4 +77,4 @@ public int rpcPortOffset() { String.valueOf(Constants.SDK_GRPC_PORT_DEFAULT_OFFSET))); } -} \ No newline at end of file +} diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientFactoryTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientFactoryTest.java index 1857a707c6e..4b81a36de3d 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientFactoryTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientFactoryTest.java @@ -48,7 +48,10 @@ public class RpcClientFactoryTest { RpcClient rpcClient; @Mock(lenient = true) - RpcClientTlsConfig tlsConfig; + RpcClientTlsConfig clusterClientTlsConfig; + + @Mock(lenient = true) + RpcClientTlsConfig rpcClientTlsConfig; @BeforeClass public static void setUpBeforeClass() throws NoSuchFieldException, IllegalAccessException { @@ -166,9 +169,9 @@ public void testCreatedClusterClientWhenConnectionTypeNotMappingThenThrowExcepti @Test public void testCreateClusterClientTsl() { - Mockito.when(tlsConfig.getEnableTls()).thenReturn(true); + Mockito.when(clusterClientTlsConfig.getEnableTls()).thenReturn(true); RpcClient client = RpcClientFactory.createClusterClient("testClient", ConnectionType.GRPC, - Collections.singletonMap("labelKey", "labelValue"), tlsConfig); + Collections.singletonMap("labelKey", "labelValue"), clusterClientTlsConfig); Map labesMap = new HashMap<>(); labesMap.put("labelKey", "labelValue"); labesMap.put("tls.enable", "true"); @@ -180,9 +183,9 @@ public void testCreateClusterClientTsl() { @Test public void testCreateClientTsl() { - Mockito.when(tlsConfig.getEnableTls()).thenReturn(true); + Mockito.when(rpcClientTlsConfig.getEnableTls()).thenReturn(true); RpcClient client = RpcClientFactory.createClient("testClient", ConnectionType.GRPC, - Collections.singletonMap("labelKey", "labelValue"), tlsConfig); + Collections.singletonMap("labelKey", "labelValue"), rpcClientTlsConfig); Map labesMap = new HashMap<>(); labesMap.put("labelKey", "labelValue"); labesMap.put("tls.enable", "true"); @@ -191,4 +194,4 @@ public void testCreateClientTsl() { Assert.assertEquals("testClient", CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()).getKey()); } -} \ No newline at end of file +} diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigTest.java index f0e6b59ba02..31aba66baef 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigTest.java @@ -29,7 +29,7 @@ public class RpcClientTlsConfigTest { public void testEnableTls() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE, "true"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertTrue(tlsConfig.getEnableTls()); } @@ -37,7 +37,7 @@ public void testEnableTls() { public void testSslProvider() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_PROVIDER, "provider"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertEquals("provider", tlsConfig.getSslProvider()); } @@ -45,7 +45,7 @@ public void testSslProvider() { public void testMutualAuthEnable() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_MUTUAL_AUTH, "true"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertTrue(tlsConfig.getMutualAuthEnable()); } @@ -53,7 +53,7 @@ public void testMutualAuthEnable() { public void testProtocols() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_PROTOCOLS, "protocols"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertEquals("protocols", tlsConfig.getProtocols()); } @@ -61,7 +61,7 @@ public void testProtocols() { public void testCiphers() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_CIPHERS, "ciphers"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertEquals("ciphers", tlsConfig.getCiphers()); } @@ -69,7 +69,7 @@ public void testCiphers() { public void testTrustCollectionCertFile() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH, "trustCollectionCertFile"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertEquals("trustCollectionCertFile", tlsConfig.getTrustCollectionCertFile()); } @@ -77,7 +77,7 @@ public void testTrustCollectionCertFile() { public void testCertChainFile() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH, "certChainFile"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertEquals("certChainFile", tlsConfig.getCertChainFile()); } @@ -85,7 +85,7 @@ public void testCertChainFile() { public void testCertPrivateKey() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_KEY, "certPrivateKey"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertEquals("certPrivateKey", tlsConfig.getCertPrivateKey()); } @@ -93,7 +93,7 @@ public void testCertPrivateKey() { public void testTrustAll() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_ALL, "true"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertTrue(tlsConfig.getTrustAll()); } @@ -101,7 +101,7 @@ public void testTrustAll() { public void testCertPrivateKeyPassword() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_PWD, "trustPwd"); - RpcClientTlsConfig tlsConfig = RpcClientTlsConfig.properties(properties); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); assertEquals("trustPwd", tlsConfig.getCertPrivateKeyPassword()); } -} \ No newline at end of file +} diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClusterClientTlsConfigTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClusterClientTlsConfigTest.java new file mode 100644 index 00000000000..4f211428f89 --- /dev/null +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClusterClientTlsConfigTest.java @@ -0,0 +1,128 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.common.remote.client; + +import org.junit.Test; + +import java.util.Properties; + +import static com.alibaba.nacos.common.remote.client.RpcConstants.NACOS_PEER_RPC; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.MUTUAL_AUTH; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_CERT_CHAIN_PATH; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_CERT_KEY; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_CIPHERS; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_ENABLE; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_PROTOCOLS; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_PROVIDER; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_TRUST_ALL; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_TRUST_COLLECTION_CHAIN_PATH; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_TRUST_PWD; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class RpcClusterClientTlsConfigTest { + + @Test + public void testEnableTls() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertTrue(tlsConfig.getEnableTls()); + } + + @Test + public void testSslProvider() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + properties.setProperty(NACOS_PEER_RPC + TLS_PROVIDER, "provider"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertEquals("provider", tlsConfig.getSslProvider()); + } + + @Test + public void testMutualAuthEnable() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + properties.setProperty(NACOS_PEER_RPC + MUTUAL_AUTH, "true"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertTrue(tlsConfig.getMutualAuthEnable()); + } + + @Test + public void testProtocols() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + properties.setProperty(NACOS_PEER_RPC + TLS_PROTOCOLS, "protocols"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertEquals("protocols", tlsConfig.getProtocols()); + } + + @Test + public void testCiphers() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + properties.setProperty(NACOS_PEER_RPC + TLS_CIPHERS, "ciphers"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertEquals("ciphers", tlsConfig.getCiphers()); + } + + @Test + public void testTrustCollectionCertFile() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + properties.setProperty(NACOS_PEER_RPC + TLS_TRUST_COLLECTION_CHAIN_PATH, "trustCollectionCertFile"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertEquals("trustCollectionCertFile", tlsConfig.getTrustCollectionCertFile()); + } + + @Test + public void testCertChainFile() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + properties.setProperty(NACOS_PEER_RPC + TLS_CERT_CHAIN_PATH, "certChainFile"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertEquals("certChainFile", tlsConfig.getCertChainFile()); + } + + @Test + public void testCertPrivateKey() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + properties.setProperty(NACOS_PEER_RPC + TLS_CERT_KEY, "certPrivateKey"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertEquals("certPrivateKey", tlsConfig.getCertPrivateKey()); + } + + @Test + public void testTrustAll() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + properties.setProperty(NACOS_PEER_RPC + TLS_TRUST_ALL, "true"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertTrue(tlsConfig.getTrustAll()); + } + + @Test + public void testCertPrivateKeyPassword() { + Properties properties = new Properties(); + properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); + properties.setProperty(NACOS_PEER_RPC + TLS_TRUST_PWD, "trustPwd"); + RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + assertEquals("trustPwd", tlsConfig.getCertPrivateKeyPassword()); + } +} + diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcConstantsTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcConstantsTest.java index 6d4a88400f5..c5565393cd6 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcConstantsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcConstantsTest.java @@ -26,8 +26,7 @@ public class RpcConstantsTest { @Test public void testGetRpcParams() { - Class clazz = RpcConstants.class; - Field[] declaredFields = clazz.getDeclaredFields(); + Field[] declaredFields = RpcConstants.class.getDeclaredFields(); int i = 0; for (Field declaredField : declaredFields) { declaredField.setAccessible(true); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfigTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfigTest.java index 718bab454e5..1e1a88af4b2 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfigTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfigTest.java @@ -84,7 +84,7 @@ public void testFromProperties() { properties.setProperty(GrpcConstants.GRPC_CHANNEL_CAPABILITY_NEGOTIATION_TIMEOUT, "5000"); DefaultGrpcClientConfig config = (DefaultGrpcClientConfig) DefaultGrpcClientConfig.newBuilder() - .fromProperties(properties).build(); + .fromProperties(properties, null).build(); assertEquals("test", config.name()); assertEquals(3, config.retryTimes()); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTest.java index 28b89e8c4f8..726a3e0c48f 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTest.java @@ -176,8 +176,8 @@ public void testBindRequestStreamOnNextSetupAckRequest() BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); when(stub.requestBiStream(any())).thenAnswer((Answer>) invocationOnMock -> { - ((StreamObserver) invocationOnMock.getArgument(0)) - .onNext(GrpcUtils.convert(new SetupAckRequest())); + ((StreamObserver) invocationOnMock.getArgument(0)).onNext( + GrpcUtils.convert(new SetupAckRequest())); return null; }); setCurrentConnection(grpcConnection, grpcClient); @@ -191,8 +191,8 @@ public void testBindRequestStreamOnNextOtherRequest() BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); when(stub.requestBiStream(any())).thenAnswer((Answer>) invocationOnMock -> { - ((StreamObserver) invocationOnMock.getArgument(0)) - .onNext(GrpcUtils.convert(new ConnectResetRequest())); + ((StreamObserver) invocationOnMock.getArgument(0)).onNext( + GrpcUtils.convert(new ConnectResetRequest())); return null; }); grpcClient.registerServerRequestHandler((request, connection) -> { @@ -212,8 +212,8 @@ public void testBindRequestStreamOnNextNoRequest() BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); when(stub.requestBiStream(any())).thenAnswer((Answer>) invocationOnMock -> { - ((StreamObserver) invocationOnMock.getArgument(0)) - .onNext(GrpcUtils.convert(new ConnectResetRequest())); + ((StreamObserver) invocationOnMock.getArgument(0)).onNext( + GrpcUtils.convert(new ConnectResetRequest())); return null; }); grpcClient.registerServerRequestHandler((request, connection) -> null); @@ -228,8 +228,8 @@ public void testBindRequestStreamOnNextHandleException() BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); when(stub.requestBiStream(any())).thenAnswer((Answer>) invocationOnMock -> { - ((StreamObserver) invocationOnMock.getArgument(0)) - .onNext(GrpcUtils.convert(new ConnectResetRequest())); + ((StreamObserver) invocationOnMock.getArgument(0)).onNext( + GrpcUtils.convert(new ConnectResetRequest())); return null; }); grpcClient.registerServerRequestHandler((request, connection) -> { @@ -325,9 +325,8 @@ public void testBindRequestStreamOnCompletedFromNotRunning() private void invokeBindRequestStream(GrpcClient grpcClient, BiRequestStreamGrpc.BiRequestStreamStub stub, GrpcConnection grpcConnection) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { - Method bindRequestStreamMethod = GrpcClient.class - .getDeclaredMethod("bindRequestStream", BiRequestStreamGrpc.BiRequestStreamStub.class, - GrpcConnection.class); + Method bindRequestStreamMethod = GrpcClient.class.getDeclaredMethod("bindRequestStream", + BiRequestStreamGrpc.BiRequestStreamStub.class, GrpcConnection.class); bindRequestStreamMethod.setAccessible(true); bindRequestStreamMethod.invoke(grpcClient, stub, grpcConnection); } diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClientTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClientTest.java index d50b3bfe2a2..7bd2c8d6538 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClientTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClientTest.java @@ -46,7 +46,9 @@ public void testAbilityMode() { @Test public void testRpcPortOffsetDefault() { - grpcClusterClient = new GrpcClusterClient(new Properties()); + DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder() + .buildClusterFromProperties(new Properties()); + grpcClusterClient = new GrpcClusterClient(builder.build()); assertEquals(1001, grpcClusterClient.rpcPortOffset()); } diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClientTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClientTest.java index 30b812ba862..1f518230b90 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClientTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClientTest.java @@ -22,7 +22,6 @@ import org.junit.Test; import java.util.Collections; -import java.util.Properties; import static org.junit.Assert.assertEquals; @@ -46,7 +45,7 @@ public void testAbilityMode() { @Test public void testRpcPortOffsetDefault() { - grpcSdkClient = new GrpcSdkClient(new Properties()); + grpcSdkClient = new GrpcSdkClient("test"); assertEquals(1000, grpcSdkClient.rpcPortOffset()); } diff --git a/core/src/main/java/com/alibaba/nacos/core/cluster/remote/ClusterRpcClientProxy.java b/core/src/main/java/com/alibaba/nacos/core/cluster/remote/ClusterRpcClientProxy.java index ac6f8b9af3d..8294bfd0c9a 100644 --- a/core/src/main/java/com/alibaba/nacos/core/cluster/remote/ClusterRpcClientProxy.java +++ b/core/src/main/java/com/alibaba/nacos/core/cluster/remote/ClusterRpcClientProxy.java @@ -25,7 +25,9 @@ import com.alibaba.nacos.common.remote.ConnectionType; import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.remote.client.RpcClientFactory; +import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; import com.alibaba.nacos.common.remote.client.ServerListFactory; +import com.alibaba.nacos.common.remote.client.RpcClientTlsConfigFactory; import com.alibaba.nacos.common.utils.CollectionUtils; import com.alibaba.nacos.core.cluster.Member; import com.alibaba.nacos.core.cluster.MemberChangeListener; @@ -41,6 +43,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Properties; import java.util.Set; import java.util.stream.Collectors; @@ -152,10 +155,10 @@ public List getServerList() { * Using {@link EnvUtil#getAvailableProcessors(int)} to build cluster clients' grpc thread pool. */ private RpcClient buildRpcClient(ConnectionType type, Map labels, String memberClientKey) { - RpcClient clusterClient = RpcClientFactory - .createClusterClient(memberClientKey, type, EnvUtil.getAvailableProcessors(2), - EnvUtil.getAvailableProcessors(8), labels); - return clusterClient; + Properties properties = EnvUtil.getProperties(); + RpcClientTlsConfig config = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); + return RpcClientFactory.createClusterClient(memberClientKey, type, EnvUtil.getAvailableProcessors(2), + EnvUtil.getAvailableProcessors(8), labels, config); } /** diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/BaseRpcServer.java b/core/src/main/java/com/alibaba/nacos/core/remote/BaseRpcServer.java index 3b5fe849a8f..3ec0fe28674 100644 --- a/core/src/main/java/com/alibaba/nacos/core/remote/BaseRpcServer.java +++ b/core/src/main/java/com/alibaba/nacos/core/remote/BaseRpcServer.java @@ -47,8 +47,12 @@ public void start() throws Exception { startServer(); - if (RpcServerSslContextRefresherHolder.getInstance() != null) { - RpcServerSslContextRefresherHolder.getInstance().refresh(this); + if (RpcServerSslContextRefresherHolder.getSdkInstance() != null) { + RpcServerSslContextRefresherHolder.getSdkInstance().refresh(this); + } + + if (RpcServerSslContextRefresherHolder.getClusterInstance() != null) { + RpcServerSslContextRefresherHolder.getClusterInstance().refresh(this); } Loggers.REMOTE.info("Nacos {} Rpc server started at port {}", serverName, getServicePort()); @@ -75,8 +79,8 @@ public void start() throws Exception { * Reload protocol context if necessary. * *

- * protocol like: - *

  • Tls
  • + * protocol like: + *
  • Tls
  • *

    */ public abstract void reloadProtocolContext(); diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/BaseGrpcServer.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/BaseGrpcServer.java index 5749a52d8cb..837924191ea 100644 --- a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/BaseGrpcServer.java +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/BaseGrpcServer.java @@ -20,6 +20,7 @@ import com.alibaba.nacos.common.remote.ConnectionType; import com.alibaba.nacos.core.remote.BaseRpcServer; import com.alibaba.nacos.core.remote.ConnectionManager; +import com.alibaba.nacos.core.remote.grpc.negotiator.NacosGrpcProtocolNegotiator; import com.alibaba.nacos.core.utils.Loggers; import com.alibaba.nacos.sys.env.EnvUtil; import io.grpc.CompressorRegistry; @@ -53,6 +54,11 @@ */ public abstract class BaseGrpcServer extends BaseRpcServer { + /** + * The ProtocolNegotiator instance used for communication. + */ + protected NacosGrpcProtocolNegotiator protocolNegotiator; + private Server server; @Autowired @@ -115,6 +121,15 @@ protected Optional newProtocolNeg * reload protocol negotiator If necessary. */ public void reloadProtocolNegotiator() { + if (protocolNegotiator != null) { + try { + protocolNegotiator.reloadNegotiator(); + } catch (Throwable throwable) { + Loggers.REMOTE.info("Nacos {} Rpc server reload negotiator fail at port {}.", + this.getClass().getSimpleName(), getServicePort()); + throw throwable; + } + } } protected long getPermitKeepAliveTime() { @@ -130,8 +145,8 @@ protected long getKeepAliveTimeout() { } protected int getMaxInboundMessageSize() { - Integer property = EnvUtil - .getProperty(GrpcServerConstants.GrpcConfig.MAX_INBOUND_MSG_SIZE_PROPERTY, Integer.class); + Integer property = EnvUtil.getProperty(GrpcServerConstants.GrpcConfig.MAX_INBOUND_MSG_SIZE_PROPERTY, + Integer.class); if (property != null) { return property; } @@ -152,8 +167,8 @@ private void addServices(MutableHandlerRegistry handlerRegistry, ServerIntercept // unary common call register. final MethodDescriptor unaryPayloadMethod = MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY).setFullMethodName(MethodDescriptor - .generateFullMethodName(GrpcServerConstants.REQUEST_SERVICE_NAME, + .setType(MethodDescriptor.MethodType.UNARY).setFullMethodName( + MethodDescriptor.generateFullMethodName(GrpcServerConstants.REQUEST_SERVICE_NAME, GrpcServerConstants.REQUEST_METHOD_NAME)) .setRequestMarshaller(ProtoUtils.marshaller(Payload.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Payload.getDefaultInstance())).build(); @@ -161,9 +176,8 @@ private void addServices(MutableHandlerRegistry handlerRegistry, ServerIntercept final ServerCallHandler payloadHandler = ServerCalls.asyncUnaryCall( (request, responseObserver) -> grpcCommonRequestAcceptor.request(request, responseObserver)); - final ServerServiceDefinition serviceDefOfUnaryPayload = ServerServiceDefinition - .builder(GrpcServerConstants.REQUEST_SERVICE_NAME).addMethod(unaryPayloadMethod, payloadHandler) - .build(); + final ServerServiceDefinition serviceDefOfUnaryPayload = ServerServiceDefinition.builder( + GrpcServerConstants.REQUEST_SERVICE_NAME).addMethod(unaryPayloadMethod, payloadHandler).build(); handlerRegistry.addService(ServerInterceptors.intercept(serviceDefOfUnaryPayload, serverInterceptor)); // bi stream register. @@ -171,15 +185,14 @@ private void addServices(MutableHandlerRegistry handlerRegistry, ServerIntercept (responseObserver) -> grpcBiStreamRequestAcceptor.requestBiStream(responseObserver)); final MethodDescriptor biStreamMethod = MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.BIDI_STREAMING).setFullMethodName(MethodDescriptor - .generateFullMethodName(GrpcServerConstants.REQUEST_BI_STREAM_SERVICE_NAME, + .setType(MethodDescriptor.MethodType.BIDI_STREAMING).setFullMethodName( + MethodDescriptor.generateFullMethodName(GrpcServerConstants.REQUEST_BI_STREAM_SERVICE_NAME, GrpcServerConstants.REQUEST_BI_STREAM_METHOD_NAME)) .setRequestMarshaller(ProtoUtils.marshaller(Payload.newBuilder().build())) .setResponseMarshaller(ProtoUtils.marshaller(Payload.getDefaultInstance())).build(); - final ServerServiceDefinition serviceDefOfBiStream = ServerServiceDefinition - .builder(GrpcServerConstants.REQUEST_BI_STREAM_SERVICE_NAME).addMethod(biStreamMethod, biStreamHandler) - .build(); + final ServerServiceDefinition serviceDefOfBiStream = ServerServiceDefinition.builder( + GrpcServerConstants.REQUEST_BI_STREAM_SERVICE_NAME).addMethod(biStreamMethod, biStreamHandler).build(); handlerRegistry.addService(ServerInterceptors.intercept(serviceDefOfBiStream, serverInterceptor)); } diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcClusterServer.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcClusterServer.java index f37c4c46b37..df50375a61a 100644 --- a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcClusterServer.java +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcClusterServer.java @@ -21,15 +21,18 @@ import com.alibaba.nacos.core.remote.grpc.filter.NacosGrpcServerTransportFilterServiceLoader; import com.alibaba.nacos.core.remote.grpc.interceptor.NacosGrpcServerInterceptor; import com.alibaba.nacos.core.remote.grpc.interceptor.NacosGrpcServerInterceptorServiceLoader; +import com.alibaba.nacos.core.remote.grpc.negotiator.ClusterProtocolNegotiatorBuilderSingleton; import com.alibaba.nacos.core.utils.GlobalExecutor; import com.alibaba.nacos.core.utils.Loggers; import com.alibaba.nacos.sys.env.EnvUtil; import io.grpc.ServerInterceptor; import io.grpc.ServerTransportFilter; +import io.grpc.netty.shaded.io.grpc.netty.InternalProtocolNegotiator; import org.springframework.stereotype.Service; import java.util.LinkedList; import java.util.List; +import java.util.Optional; import java.util.concurrent.ThreadPoolExecutor; /** @@ -56,8 +59,8 @@ public ThreadPoolExecutor getRpcExecutor() { @Override protected long getKeepAliveTime() { - Long property = EnvUtil - .getProperty(GrpcServerConstants.GrpcConfig.CLUSTER_KEEP_ALIVE_TIME_PROPERTY, Long.class); + Long property = EnvUtil.getProperty(GrpcServerConstants.GrpcConfig.CLUSTER_KEEP_ALIVE_TIME_PROPERTY, + Long.class); if (property != null) { return property; } @@ -66,14 +69,20 @@ protected long getKeepAliveTime() { @Override protected long getKeepAliveTimeout() { - Long property = EnvUtil - .getProperty(GrpcServerConstants.GrpcConfig.CLUSTER_KEEP_ALIVE_TIMEOUT_PROPERTY, Long.class); + Long property = EnvUtil.getProperty(GrpcServerConstants.GrpcConfig.CLUSTER_KEEP_ALIVE_TIMEOUT_PROPERTY, + Long.class); if (property != null) { return property; } return super.getKeepAliveTimeout(); } + @Override + protected Optional newProtocolNegotiator() { + protocolNegotiator = ClusterProtocolNegotiatorBuilderSingleton.getSingleton().build(); + return Optional.ofNullable(protocolNegotiator); + } + @Override protected long getPermitKeepAliveTime() { Long property = EnvUtil.getProperty(GrpcServerConstants.GrpcConfig.CLUSTER_PERMIT_KEEP_ALIVE_TIME, Long.class); @@ -85,8 +94,8 @@ protected long getPermitKeepAliveTime() { @Override protected int getMaxInboundMessageSize() { - Integer property = EnvUtil - .getProperty(GrpcServerConstants.GrpcConfig.CLUSTER_MAX_INBOUND_MSG_SIZE_PROPERTY, Integer.class); + Integer property = EnvUtil.getProperty(GrpcServerConstants.GrpcConfig.CLUSTER_MAX_INBOUND_MSG_SIZE_PROPERTY, + Integer.class); if (property != null) { return property; } @@ -104,8 +113,8 @@ protected int getMaxInboundMessageSize() { protected List getSeverInterceptors() { List result = new LinkedList<>(); result.addAll(super.getSeverInterceptors()); - result.addAll(NacosGrpcServerInterceptorServiceLoader - .loadServerInterceptors(NacosGrpcServerInterceptor.CLUSTER_INTERCEPTOR)); + result.addAll(NacosGrpcServerInterceptorServiceLoader.loadServerInterceptors( + NacosGrpcServerInterceptor.CLUSTER_INTERCEPTOR)); return result; } @@ -113,8 +122,8 @@ protected List getSeverInterceptors() { protected List getServerTransportFilters() { List result = new LinkedList<>(); result.addAll(super.getServerTransportFilters()); - result.addAll(NacosGrpcServerTransportFilterServiceLoader - .loadServerTransportFilters(NacosGrpcServerTransportFilter.CLUSTER_FILTER)); + result.addAll(NacosGrpcServerTransportFilterServiceLoader.loadServerTransportFilters( + NacosGrpcServerTransportFilter.CLUSTER_FILTER)); return result; } } diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcSdkServer.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcSdkServer.java index 6e9e58fb8ab..b99364e4c87 100644 --- a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcSdkServer.java +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcSdkServer.java @@ -21,8 +21,7 @@ import com.alibaba.nacos.core.remote.grpc.filter.NacosGrpcServerTransportFilterServiceLoader; import com.alibaba.nacos.core.remote.grpc.interceptor.NacosGrpcServerInterceptor; import com.alibaba.nacos.core.remote.grpc.interceptor.NacosGrpcServerInterceptorServiceLoader; -import com.alibaba.nacos.core.remote.grpc.negotiator.NacosGrpcProtocolNegotiator; -import com.alibaba.nacos.core.remote.grpc.negotiator.ProtocolNegotiatorBuilderSingleton; +import com.alibaba.nacos.core.remote.grpc.negotiator.SdkProtocolNegotiatorBuilderSingleton; import com.alibaba.nacos.core.utils.GlobalExecutor; import com.alibaba.nacos.core.utils.Loggers; import com.alibaba.nacos.sys.env.EnvUtil; @@ -45,8 +44,6 @@ @Service public class GrpcSdkServer extends BaseGrpcServer { - private NacosGrpcProtocolNegotiator protocolNegotiator; - @Override public int rpcPortOffset() { return Constants.SDK_GRPC_PORT_DEFAULT_OFFSET; @@ -78,8 +75,8 @@ protected long getKeepAliveTimeout() { @Override protected int getMaxInboundMessageSize() { - Integer property = EnvUtil - .getProperty(GrpcServerConstants.GrpcConfig.SDK_MAX_INBOUND_MSG_SIZE_PROPERTY, Integer.class); + Integer property = EnvUtil.getProperty(GrpcServerConstants.GrpcConfig.SDK_MAX_INBOUND_MSG_SIZE_PROPERTY, + Integer.class); if (property != null) { return property; } @@ -106,7 +103,7 @@ protected long getPermitKeepAliveTime() { @Override protected Optional newProtocolNegotiator() { - protocolNegotiator = ProtocolNegotiatorBuilderSingleton.getSingleton().build(); + protocolNegotiator = SdkProtocolNegotiatorBuilderSingleton.getSingleton().build(); return Optional.ofNullable(protocolNegotiator); } @@ -114,8 +111,8 @@ protected Optional newProtocolNeg protected List getSeverInterceptors() { List result = new LinkedList<>(); result.addAll(super.getSeverInterceptors()); - result.addAll(NacosGrpcServerInterceptorServiceLoader - .loadServerInterceptors(NacosGrpcServerInterceptor.SDK_INTERCEPTOR)); + result.addAll(NacosGrpcServerInterceptorServiceLoader.loadServerInterceptors( + NacosGrpcServerInterceptor.SDK_INTERCEPTOR)); return result; } @@ -123,24 +120,9 @@ protected List getSeverInterceptors() { protected List getServerTransportFilters() { List result = new LinkedList<>(); result.addAll(super.getServerTransportFilters()); - result.addAll(NacosGrpcServerTransportFilterServiceLoader - .loadServerTransportFilters(NacosGrpcServerTransportFilter.SDK_FILTER)); + result.addAll(NacosGrpcServerTransportFilterServiceLoader.loadServerTransportFilters( + NacosGrpcServerTransportFilter.SDK_FILTER)); return result; } - /** - * reload ssl context. - */ - public void reloadProtocolNegotiator() { - if (protocolNegotiator != null) { - try { - protocolNegotiator.reloadNegotiator(); - } catch (Throwable throwable) { - Loggers.REMOTE - .info("Nacos {} Rpc server reload negotiator fail at port {}.", this.getClass().getSimpleName(), - getServicePort()); - throw throwable; - } - } - } } diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/AbstractProtocolNegotiatorBuilderSingleton.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/AbstractProtocolNegotiatorBuilderSingleton.java new file mode 100644 index 00000000000..d8a5413cb76 --- /dev/null +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/AbstractProtocolNegotiatorBuilderSingleton.java @@ -0,0 +1,96 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator; + +import com.alibaba.nacos.common.spi.NacosServiceLoader; +import com.alibaba.nacos.common.utils.Pair; +import com.alibaba.nacos.core.utils.Loggers; +import com.alibaba.nacos.sys.env.EnvUtil; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Abstract base class for ProtocolNegotiatorBuilder singletons. This class provides a common implementation for + * building ProtocolNegotiator instances based on a given type. Subclasses should provide implementations for loading + * ProtocolNegotiatorBuilder instances via SPI and defining default builders. + * + * @author stone-98 + * @date 2024/2/21 + */ +public abstract class AbstractProtocolNegotiatorBuilderSingleton implements ProtocolNegotiatorBuilder { + + /** + * Map to store ProtocolNegotiatorBuilders based on their types. + */ + protected static final Map BUILDER_MAP = new ConcurrentHashMap<>(); + + static { + try { + for (ProtocolNegotiatorBuilder each : NacosServiceLoader.load(ProtocolNegotiatorBuilder.class)) { + BUILDER_MAP.put(each.type(), each); + Loggers.REMOTE.info("Load ProtocolNegotiatorBuilder {} for type {}", each.getClass().getCanonicalName(), + each.type()); + } + } catch (Exception e) { + Loggers.REMOTE.warn("Load ProtocolNegotiatorBuilder failed.", e); + } + } + + /** + * The property key to retrieve the actual type of ProtocolNegotiatorBuilder. + */ + protected final String typePropertyKey; + + /** + * The actual type of ProtocolNegotiatorBuilder, retrieved from system properties. + */ + protected String actualType; + + /** + * Constructs an instance of AbstractProtocolNegotiatorBuilderSingleton with the specified type property key. + * + * @param typePropertyKey the property key to retrieve the actual type + */ + public AbstractProtocolNegotiatorBuilderSingleton(String typePropertyKey) { + this.typePropertyKey = typePropertyKey; + this.actualType = EnvUtil.getProperty(typePropertyKey, defaultBuilderPair().getFirst()); + } + + /** + * Builds a ProtocolNegotiator instance based on the actual type. + * + * @return a ProtocolNegotiator instance + */ + @Override + public NacosGrpcProtocolNegotiator build() { + ProtocolNegotiatorBuilder actualBuilder = BUILDER_MAP.get(actualType); + if (null == actualBuilder) { + Loggers.REMOTE.warn("Not found ProtocolNegotiatorBuilder for type {}, will use default type {}", actualType, + defaultBuilderPair().getFirst()); + return defaultBuilderPair().getSecond().build(); + } + return actualBuilder.build(); + } + + /** + * Declare default ProtocolNegotiatorBuilders in case loading from SPI fails. + * + * @return a Pair of String and ProtocolNegotiatorBuilder representing the default builder + */ + protected abstract Pair defaultBuilderPair(); +} diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/ClusterProtocolNegotiatorBuilderSingleton.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/ClusterProtocolNegotiatorBuilderSingleton.java new file mode 100644 index 00000000000..d790a84558c --- /dev/null +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/ClusterProtocolNegotiatorBuilderSingleton.java @@ -0,0 +1,81 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator; + +import com.alibaba.nacos.common.utils.Pair; +import com.alibaba.nacos.core.remote.grpc.negotiator.tls.ClusterDefaultTlsProtocolNegotiatorBuilder; + +/** + * Manages ProtocolNegotiatorBuilders for cluster communication. Provides a singleton instance of + * ProtocolNegotiatorBuilder configured for this purpose. Defaults to TLS protocol negotiation but can be overridden via + * system properties. + * + * + *

    Property key for configuring the ProtocolNegotiator type for cluster communication. + * + * @author stone-98 + * @date 2024/2/21 + */ +public class ClusterProtocolNegotiatorBuilderSingleton extends AbstractProtocolNegotiatorBuilderSingleton { + + /** + * Property key for configuring the ProtocolNegotiator type for cluster communication. + */ + public static final String TYPE_PROPERTY_KEY = "nacos.remote.cluster.server.rpc.protocol.negotiator.type"; + + /** + * Singleton instance of ClusterProtocolNegotiatorBuilderSingleton. + */ + private static final ClusterProtocolNegotiatorBuilderSingleton SINGLETON = new ClusterProtocolNegotiatorBuilderSingleton(); + + /** + * Constructs a new instance of ClusterProtocolNegotiatorBuilderSingleton. Sets up the type property key for + * ProtocolNegotiatorBuilder. + */ + public ClusterProtocolNegotiatorBuilderSingleton() { + super(TYPE_PROPERTY_KEY); + } + + /** + * Retrieves the singleton instance of ClusterProtocolNegotiatorBuilderSingleton. + * + * @return the singleton instance + */ + public static AbstractProtocolNegotiatorBuilderSingleton getSingleton() { + return SINGLETON; + } + + /** + * Provides the default ProtocolNegotiatorBuilder pair. + * + * @return a Pair containing the default type and builder instance + */ + @Override + protected Pair defaultBuilderPair() { + return Pair.with(TYPE_PROPERTY_KEY, new ClusterDefaultTlsProtocolNegotiatorBuilder()); + } + + /** + * Retrieves the type of ProtocolNegotiatorBuilder configured for cluster communication. + * + * @return the type of ProtocolNegotiatorBuilder + */ + @Override + public String type() { + return super.actualType; + } +} diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/ProtocolNegotiatorBuilderSingleton.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/ProtocolNegotiatorBuilderSingleton.java deleted file mode 100644 index 9d30d3676ca..00000000000 --- a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/ProtocolNegotiatorBuilderSingleton.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 1999-2023 Alibaba Group Holding Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.alibaba.nacos.core.remote.grpc.negotiator; - -import com.alibaba.nacos.common.spi.NacosServiceLoader; -import com.alibaba.nacos.core.remote.grpc.negotiator.tls.DefaultTlsProtocolNegotiatorBuilder; -import com.alibaba.nacos.core.utils.Loggers; -import com.alibaba.nacos.sys.env.EnvUtil; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import static com.alibaba.nacos.core.remote.grpc.negotiator.tls.DefaultTlsProtocolNegotiatorBuilder.TYPE_DEFAULT_TLS; - -/** - * Protocol Negotiator Builder Singleton. - * - * @author xiweng.yy - */ -public class ProtocolNegotiatorBuilderSingleton implements ProtocolNegotiatorBuilder { - - private static final String TYPE_PROPERTY_KEY = "nacos.remote.server.rpc.protocol.negotiator.type"; - - private static final ProtocolNegotiatorBuilderSingleton SINGLETON = new ProtocolNegotiatorBuilderSingleton(); - - private final Map builderMap; - - private String actualType; - - private ProtocolNegotiatorBuilderSingleton() { - actualType = EnvUtil.getProperty(TYPE_PROPERTY_KEY, TYPE_DEFAULT_TLS); - builderMap = new ConcurrentHashMap<>(); - loadAllBuilders(); - } - - private void loadAllBuilders() { - try { - for (ProtocolNegotiatorBuilder each : NacosServiceLoader.load(ProtocolNegotiatorBuilder.class)) { - builderMap.put(each.type(), each); - Loggers.REMOTE.info("Load ProtocolNegotiatorBuilder {} for type {}", each.getClass().getCanonicalName(), - each.type()); - } - } catch (Exception e) { - Loggers.REMOTE.warn("Load ProtocolNegotiatorBuilder failed, use default ProtocolNegotiatorBuilder", e); - builderMap.put(TYPE_DEFAULT_TLS, new DefaultTlsProtocolNegotiatorBuilder()); - actualType = TYPE_DEFAULT_TLS; - } - } - - public static ProtocolNegotiatorBuilderSingleton getSingleton() { - return SINGLETON; - } - - @Override - public NacosGrpcProtocolNegotiator build() { - ProtocolNegotiatorBuilder actualBuilder = builderMap.get(actualType); - if (null == actualBuilder) { - Loggers.REMOTE.warn("Not found ProtocolNegotiatorBuilder for type {}, will use default", actualType); - return builderMap.get(TYPE_DEFAULT_TLS).build(); - } - return actualBuilder.build(); - } - - @Override - public String type() { - return actualType; - } -} diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/SdkProtocolNegotiatorBuilderSingleton.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/SdkProtocolNegotiatorBuilderSingleton.java new file mode 100644 index 00000000000..82f150c8c4d --- /dev/null +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/SdkProtocolNegotiatorBuilderSingleton.java @@ -0,0 +1,81 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator; + +import com.alibaba.nacos.common.utils.Pair; +import com.alibaba.nacos.core.remote.grpc.negotiator.tls.SdkDefaultTlsProtocolNegotiatorBuilder; + +/** + * Manages ProtocolNegotiatorBuilders for the interaction between Nacos and SDK. Provides a singleton instance of + * ProtocolNegotiatorBuilder configured for this interaction. Defaults to TLS protocol negotiation but can be overridden + * via system properties. + * + * + *

    Property key for configuring the ProtocolNegotiator type for Nacos and SDK interaction. + * + * @author stone-98 + * @date 2024/2/21 + */ +public class SdkProtocolNegotiatorBuilderSingleton extends AbstractProtocolNegotiatorBuilderSingleton { + + /** + * Property key to retrieve the type of ProtocolNegotiatorBuilder. + */ + public static final String TYPE_PROPERTY_KEY = "nacos.remote.server.rpc.protocol.negotiator.type"; + + /** + * Singleton instance of SdkProtocolNegotiatorBuilderSingleton. + */ + private static final SdkProtocolNegotiatorBuilderSingleton SINGLETON = new SdkProtocolNegotiatorBuilderSingleton(); + + /** + * Constructs a new instance of SdkProtocolNegotiatorBuilderSingleton. Sets up the type property key for + * ProtocolNegotiatorBuilder. + */ + public SdkProtocolNegotiatorBuilderSingleton() { + super(TYPE_PROPERTY_KEY); + } + + /** + * Retrieves the singleton instance of SdkProtocolNegotiatorBuilderSingleton. + * + * @return the singleton instance + */ + public static AbstractProtocolNegotiatorBuilderSingleton getSingleton() { + return SINGLETON; + } + + /** + * Provides the default ProtocolNegotiatorBuilder pair. + * + * @return a Pair containing the default type and builder instance + */ + @Override + protected Pair defaultBuilderPair() { + return Pair.with(TYPE_PROPERTY_KEY, new SdkDefaultTlsProtocolNegotiatorBuilder()); + } + + /** + * Retrieves the type of ProtocolNegotiatorBuilder configured for the SDK. + * + * @return the type of ProtocolNegotiatorBuilder + */ + @Override + public String type() { + return super.actualType; + } +} diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/ClusterDefaultTlsProtocolNegotiatorBuilder.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/ClusterDefaultTlsProtocolNegotiatorBuilder.java new file mode 100644 index 00000000000..d9250f335a5 --- /dev/null +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/ClusterDefaultTlsProtocolNegotiatorBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator.tls; + +import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; +import com.alibaba.nacos.core.remote.grpc.negotiator.NacosGrpcProtocolNegotiator; +import com.alibaba.nacos.core.remote.grpc.negotiator.ProtocolNegotiatorBuilder; +import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfigFactory; +import com.alibaba.nacos.sys.env.EnvUtil; +import io.grpc.netty.shaded.io.netty.handler.ssl.SslContext; + +import java.util.Properties; + +/** + * The {@code ClusterDefaultTlsProtocolNegotiatorBuilder} class is an implementation of the + * {@link ProtocolNegotiatorBuilder} interface for constructing a ProtocolNegotiator specifically for cluster-to-cluster + * communication with TLS encryption. + * + *

    It defines the type as {@code CLUSTER_DEFAULT_TLS} and supports communication types for clusters. + *

    + * + *

    The {@code build()} method constructs and returns a {@link NacosGrpcProtocolNegotiator} instance based on the + * configuration provided by the {@link RpcServerTlsConfig} class. If TLS encryption is enabled, it creates an + * {@link OptionalTlsProtocolNegotiator} with the corresponding SSL context and configuration; otherwise, it returns + * null. + *

    + * + *

    The {@code type()} method returns the unique identifier {@code CLUSTER_TYPE_DEFAULT_TLS} for this negotiator + * builder. + *

    + * + *

    Example Usage: + *

    {@code
    + * ProtocolNegotiatorBuilder builder = new ClusterDefaultTlsProtocolNegotiatorBuilder();
    + * NacosGrpcProtocolNegotiator negotiator = builder.build();
    + * }
    + *

    + * + * @author stone-98 + * @date 2023/12/23 + * @see ProtocolNegotiatorBuilder + * @see NacosGrpcProtocolNegotiator + * @see RpcServerTlsConfig + * @see OptionalTlsProtocolNegotiator + */ +public class ClusterDefaultTlsProtocolNegotiatorBuilder implements ProtocolNegotiatorBuilder { + + /** + * The unique identifier for this negotiator builder. + */ + public static final String CLUSTER_TYPE_DEFAULT_TLS = "CLUSTER_DEFAULT_TLS"; + + /** + * Constructs and returns a ProtocolNegotiator for cluster-to-cluster communication with TLS encryption. + * + * @return ProtocolNegotiator, or null if TLS is not enabled. + */ + @Override + public NacosGrpcProtocolNegotiator build() { + Properties properties = EnvUtil.getProperties(); + RpcServerTlsConfig config = RpcServerTlsConfigFactory.getInstance().createClusterConfig(properties); + if (config.getEnableTls()) { + SslContext sslContext = DefaultTlsContextBuilder.getSslContext(config); + return new OptionalTlsProtocolNegotiator(sslContext, config); + } + return null; + } + + /** + * Returns the unique identifier {@code CLUSTER_TYPE_DEFAULT_TLS} for this negotiator builder. + * + * @return The type identifier. + */ + @Override + public String type() { + return CLUSTER_TYPE_DEFAULT_TLS; + } +} + diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsProtocolNegotiatorBuilder.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsProtocolNegotiatorBuilder.java deleted file mode 100644 index aa64cf91d04..00000000000 --- a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsProtocolNegotiatorBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 1999-2023 Alibaba Group Holding Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.alibaba.nacos.core.remote.grpc.negotiator.tls; - -import com.alibaba.nacos.core.remote.grpc.negotiator.NacosGrpcProtocolNegotiator; -import com.alibaba.nacos.core.remote.grpc.negotiator.ProtocolNegotiatorBuilder; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; -import io.grpc.netty.shaded.io.netty.handler.ssl.SslContext; - -/** - * Default optional tls protocol negotiator builder. - * - * @author xiweng.yy - */ -public class DefaultTlsProtocolNegotiatorBuilder implements ProtocolNegotiatorBuilder { - - public static final String TYPE_DEFAULT_TLS = "DEFAULT_TLS"; - - @Override - public NacosGrpcProtocolNegotiator build() { - RpcServerTlsConfig rpcServerTlsConfig = RpcServerTlsConfig.getInstance(); - if (rpcServerTlsConfig.getEnableTls()) { - SslContext sslContext = DefaultTlsContextBuilder.getSslContext(rpcServerTlsConfig); - return new OptionalTlsProtocolNegotiator(sslContext, rpcServerTlsConfig.getCompatibility()); - } - return null; - } - - @Override - public String type() { - return TYPE_DEFAULT_TLS; - } -} diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/OptionalTlsProtocolNegotiator.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/OptionalTlsProtocolNegotiator.java index c73f51250dc..a41ee4244fb 100644 --- a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/OptionalTlsProtocolNegotiator.java +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/OptionalTlsProtocolNegotiator.java @@ -43,11 +43,14 @@ public class OptionalTlsProtocolNegotiator implements NacosGrpcProtocolNegotiato private final boolean supportPlainText; + private final RpcServerTlsConfig config; + private SslContext sslContext; - public OptionalTlsProtocolNegotiator(SslContext sslContext, boolean supportPlainText) { + public OptionalTlsProtocolNegotiator(SslContext sslContext, RpcServerTlsConfig config) { this.sslContext = sslContext; - this.supportPlainText = supportPlainText; + this.config = config; + this.supportPlainText = config.getCompatibility(); } void setSslContext(SslContext sslContext) { @@ -63,8 +66,7 @@ public AsciiString scheme() { public ChannelHandler newHandler(GrpcHttp2ConnectionHandler grpcHttp2ConnectionHandler) { ChannelHandler plaintext = InternalProtocolNegotiators.serverPlaintext().newHandler(grpcHttp2ConnectionHandler); ChannelHandler ssl = InternalProtocolNegotiators.serverTls(sslContext).newHandler(grpcHttp2ConnectionHandler); - ChannelHandler decoder = new PortUnificationServerHandler(ssl, plaintext); - return decoder; + return new PortUnificationServerHandler(ssl, plaintext); } @Override @@ -74,27 +76,25 @@ public void close() { @Override public void reloadNegotiator() { - RpcServerTlsConfig rpcServerTlsConfig = RpcServerTlsConfig.getInstance(); - if (rpcServerTlsConfig.getEnableTls()) { - sslContext = DefaultTlsContextBuilder.getSslContext(rpcServerTlsConfig); + if (config.getEnableTls()) { + sslContext = DefaultTlsContextBuilder.getSslContext(config); } } private ProtocolNegotiationEvent getDefPne() { - ProtocolNegotiationEvent protocolNegotiationEvent = null; try { Field aDefault = ProtocolNegotiationEvent.class.getDeclaredField("DEFAULT"); aDefault.setAccessible(true); - return (ProtocolNegotiationEvent) aDefault.get(protocolNegotiationEvent); + return (ProtocolNegotiationEvent) aDefault.get(null); } catch (Exception e) { e.printStackTrace(); } - return protocolNegotiationEvent; + return null; } public class PortUnificationServerHandler extends ByteToMessageDecoder { - private ProtocolNegotiationEvent pne; + private final ProtocolNegotiationEvent pne; private final ChannelHandler ssl; @@ -116,14 +116,12 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf in, List out) t return; } if (isSsl(in) || !supportPlainText) { - ctx.pipeline().addAfter(ctx.name(), (String) null, this.ssl); - ctx.fireUserEventTriggered(pne); - ctx.pipeline().remove(this); + ctx.pipeline().addAfter(ctx.name(), null, this.ssl); } else { - ctx.pipeline().addAfter(ctx.name(), (String) null, this.plaintext); - ctx.fireUserEventTriggered(pne); - ctx.pipeline().remove(this); + ctx.pipeline().addAfter(ctx.name(), null, this.plaintext); } + ctx.fireUserEventTriggered(pne); + ctx.pipeline().remove(this); } } diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsProtocolNegotiatorBuilder.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsProtocolNegotiatorBuilder.java new file mode 100644 index 00000000000..f9bc7303ad5 --- /dev/null +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsProtocolNegotiatorBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator.tls; + +import com.alibaba.nacos.core.remote.grpc.negotiator.NacosGrpcProtocolNegotiator; +import com.alibaba.nacos.core.remote.grpc.negotiator.ProtocolNegotiatorBuilder; +import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; +import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfigFactory; +import com.alibaba.nacos.sys.env.EnvUtil; +import io.grpc.netty.shaded.io.netty.handler.ssl.SslContext; + +import java.util.Properties; + +/** + * The {@code SdkDefaultTlsProtocolNegotiatorBuilder} class is an implementation of the + * {@link ProtocolNegotiatorBuilder} interface for constructing a ProtocolNegotiator specifically for SDK-to-Server + * communication with optional TLS encryption. + * + *

    It defines the type as {@code SDK_DEFAULT_TLS} and supports communication types for SDKs. + *

    + * + *

    The {@code build()} method constructs and returns a {@link NacosGrpcProtocolNegotiator} instance based on the + * configuration provided by the {@link RpcServerTlsConfig} class. If TLS encryption is enabled, it creates an + * {@link OptionalTlsProtocolNegotiator} with the corresponding SSL context and configuration; otherwise, it returns + * null. + *

    + * + *

    The {@code type()} method returns the unique identifier {@code SDK_TYPE_DEFAULT_TLS} for this negotiator builder. + *

    + * + *

    Example Usage: + *

    {@code
    + * ProtocolNegotiatorBuilder builder = new SdkDefaultTlsProtocolNegotiatorBuilder();
    + * NacosGrpcProtocolNegotiator negotiator = builder.build();
    + * }
    + *

    + * + * @author xiweng.yy + * @date 2023/12/23 + * @see ProtocolNegotiatorBuilder + * @see NacosGrpcProtocolNegotiator + * @see RpcServerTlsConfig + * @see OptionalTlsProtocolNegotiator + */ +public class SdkDefaultTlsProtocolNegotiatorBuilder implements ProtocolNegotiatorBuilder { + + /** + * The unique identifier for this negotiator builder. + */ + public static final String TYPE_DEFAULT_TLS = "DEFAULT_TLS"; + + /** + * Constructs and returns a ProtocolNegotiator for SDK-to-Server communication with optional TLS encryption. + * + * @return ProtocolNegotiator, or null if TLS is not enabled. + */ + @Override + public NacosGrpcProtocolNegotiator build() { + Properties properties = EnvUtil.getProperties(); + RpcServerTlsConfig config = RpcServerTlsConfigFactory.getInstance().createSdkConfig(properties); + if (config.getEnableTls()) { + SslContext sslContext = DefaultTlsContextBuilder.getSslContext(config); + return new OptionalTlsProtocolNegotiator(sslContext, config); + } + return null; + } + + /** + * Returns the unique identifier {@code SDK_TYPE_DEFAULT_TLS} for this negotiator builder. + * + * @return The type identifier. + */ + @Override + public String type() { + return TYPE_DEFAULT_TLS; + } +} diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerSslContextRefresherHolder.java b/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerSslContextRefresherHolder.java index b423442319c..c4b212ac225 100644 --- a/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerSslContextRefresherHolder.java +++ b/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerSslContextRefresherHolder.java @@ -19,56 +19,95 @@ import com.alibaba.nacos.common.spi.NacosServiceLoader; import com.alibaba.nacos.common.utils.StringUtils; import com.alibaba.nacos.core.utils.Loggers; +import com.alibaba.nacos.sys.env.EnvUtil; import java.util.Collection; +import java.util.Properties; /** - * ssl context refresher spi holder. + * Holder for managing instances of {@link RpcServerSslContextRefresher}. This class is responsible for initializing and + * providing instances of the SSL context refresher based on the communication type (SDK or Cluster). * * @author liuzunfei - * @version $Id: RequestFilters.java, v 0.1 2023年03月17日 12:00 PM liuzunfei Exp $ + * @version $Id: RpcServerSslContextRefresherHolder.java, v 0.1 2023年03月17日 12:00 PM liuzunfei Exp $ */ public class RpcServerSslContextRefresherHolder { - - private static RpcServerSslContextRefresher instance; - - private static volatile boolean init = false; - - public static RpcServerSslContextRefresher getInstance() { - if (init) { - return instance; - } + + /** + * The instance of {@link RpcServerSslContextRefresher} for SDK communication. + */ + private static RpcServerSslContextRefresher sdkInstance; + + /** + * The instance of {@link RpcServerSslContextRefresher} for Cluster communication. + */ + private static RpcServerSslContextRefresher clusterInstance; + + static { + init(); + } + + /** + * Gets the instance of {@link RpcServerSslContextRefresher} for SDK communication. + * + * @return The instance of {@link RpcServerSslContextRefresher} for SDK communication. + */ + public static RpcServerSslContextRefresher getSdkInstance() { + return sdkInstance; + } + + /** + * Gets the instance of {@link RpcServerSslContextRefresher} for Cluster communication. + * + * @return The instance of {@link RpcServerSslContextRefresher} for Cluster communication. + */ + public static RpcServerSslContextRefresher getClusterInstance() { + return clusterInstance; + } + + /** + * Initializes the holder by loading SSL context refreshers and matching them with the configured types (SDK and + * Cluster). + */ + private static void init() { synchronized (RpcServerSslContextRefresherHolder.class) { - if (init) { - return instance; - } - RpcServerTlsConfig rpcServerTlsConfig = RpcServerTlsConfig.getInstance(); - String sslContextRefresher = rpcServerTlsConfig.getSslContextRefresher(); - if (StringUtils.isNotBlank(sslContextRefresher)) { - Collection load = NacosServiceLoader - .load(RpcServerSslContextRefresher.class); - for (RpcServerSslContextRefresher contextRefresher : load) { - if (sslContextRefresher.equals(contextRefresher.getName())) { - instance = contextRefresher; - Loggers.REMOTE.info("RpcServerSslContextRefresher of Name {} Founded->{}", sslContextRefresher, - contextRefresher.getClass().getSimpleName()); - break; - } - } - if (instance == null) { - Loggers.REMOTE.info("RpcServerSslContextRefresher of Name {} not found", sslContextRefresher); + Properties properties = EnvUtil.getProperties(); + RpcServerTlsConfig clusterServerTlsConfig = RpcServerTlsConfigFactory.getInstance().createClusterConfig(properties); + RpcServerTlsConfig sdkServerTlsConfig = RpcServerTlsConfigFactory.getInstance().createSdkConfig(properties); + Collection refreshers = NacosServiceLoader.load( + RpcServerSslContextRefresher.class); + sdkInstance = getSslContextRefresher(refreshers, sdkServerTlsConfig); + clusterInstance = getSslContextRefresher(refreshers, clusterServerTlsConfig); + Loggers.REMOTE.info("RpcServerSslContextRefresher initialization completed."); + } + } + + /** + * Initializes the SSL context refresher instance based on the specified configuration. + * + * @param refreshers Collection of SSL context refreshers to choose from. + * @param serverTlsConfig Configuration instance for the SSL context refresher. + * @return The instance of {@link RpcServerSslContextRefresher}. + */ + private static RpcServerSslContextRefresher getSslContextRefresher( + Collection refreshers, RpcServerTlsConfig serverTlsConfig) { + String refresherName = serverTlsConfig.getSslContextRefresher(); + RpcServerSslContextRefresher instance = null; + if (StringUtils.isNotBlank(refresherName)) { + for (RpcServerSslContextRefresher contextRefresher : refreshers) { + if (refresherName.equals(contextRefresher.getName())) { + instance = contextRefresher; + Loggers.REMOTE.info("RpcServerSslContextRefresher initialized using {}.", + contextRefresher.getClass().getSimpleName()); + break; } - - } else { - Loggers.REMOTE - .info("No RpcServerSslContextRefresher specified,Ssl Context auto refresh not supported."); } - - Loggers.REMOTE.info("RpcServerSslContextRefresher init end"); - init = true; + if (instance == null) { + Loggers.REMOTE.warn("Failed to find RpcServerSslContextRefresher with name {}.", refresherName); + } + } else { + Loggers.REMOTE.info("Ssl Context auto refresh is not supported."); } - return instance; } - } diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerTlsConfig.java b/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerTlsConfig.java index e0b0068462e..3cf71ffab41 100644 --- a/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerTlsConfig.java +++ b/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerTlsConfig.java @@ -17,50 +17,57 @@ package com.alibaba.nacos.core.remote.tls; import com.alibaba.nacos.common.remote.TlsConfig; -import com.alibaba.nacos.common.utils.JacksonUtils; -import com.alibaba.nacos.core.utils.Loggers; -import com.alibaba.nacos.sys.env.EnvUtil; -import com.alibaba.nacos.sys.utils.PropertiesUtil; /** - * Grpc config. + * Represents the TLS configuration for an RPC server. + * This class extends TlsConfig to inherit common TLS configuration properties. * * @author githubcheng2978. */ public class RpcServerTlsConfig extends TlsConfig { - - public static final String PREFIX = "nacos.remote.server.rpc.tls"; - - private static RpcServerTlsConfig instance; - + + /** + * The class representing the configuration for SSL context refreshing in the RPC server. + */ private String sslContextRefresher = ""; - + + /** + * Indicates whether compatibility mode is enabled. + */ private Boolean compatibility = true; - - public static synchronized RpcServerTlsConfig getInstance() { - if (null == instance) { - instance = PropertiesUtil.handleSpringBinder(EnvUtil.getEnvironment(), PREFIX, RpcServerTlsConfig.class); - if (instance == null) { - Loggers.REMOTE.debug("TLS configuration is empty, use default value"); - instance = new RpcServerTlsConfig(); - } - } - Loggers.REMOTE.info("Nacos Rpc server tls config:{}", JacksonUtils.toJson(instance)); - return instance; - } - + + /** + * Gets the compatibility mode status. + * + * @return true if compatibility mode is enabled, false otherwise. + */ public Boolean getCompatibility() { return compatibility; } - + + /** + * Sets the compatibility mode status. + * + * @param compatibility true to enable compatibility mode, false otherwise. + */ public void setCompatibility(Boolean compatibility) { this.compatibility = compatibility; } - + + /** + * Gets the SSL context refresher. + * + * @return the SSL context refresher. + */ public String getSslContextRefresher() { return sslContextRefresher; } - + + /** + * Sets the SSL context refresher. + * + * @param sslContextRefresher the SSL context refresher to set. + */ public void setSslContextRefresher(String sslContextRefresher) { this.sslContextRefresher = sslContextRefresher; } diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerTlsConfigFactory.java b/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerTlsConfigFactory.java new file mode 100644 index 00000000000..e109d6be27b --- /dev/null +++ b/core/src/main/java/com/alibaba/nacos/core/remote/tls/RpcServerTlsConfigFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.tls; + +import com.alibaba.nacos.common.remote.client.RpcTlsConfigFactory; +import com.alibaba.nacos.common.remote.client.RpcConstants; + +import java.util.Properties; + +import static com.alibaba.nacos.common.remote.client.RpcConstants.NACOS_SERVER_RPC; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.COMPATIBILITY; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.MUTUAL_AUTH; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.SSL_CONTEXT_REFRESHER; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_CERT_CHAIN_PATH; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_CERT_KEY; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_CIPHERS; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_ENABLE; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_PROTOCOLS; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_PROVIDER; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_TRUST_ALL; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_TRUST_COLLECTION_CHAIN_PATH; +import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_TRUST_PWD; + +/** + * RpcServerTlsConfigFactory. + * + * @author stone-98 + * @date 2024/4/8 + */ +public class RpcServerTlsConfigFactory implements RpcTlsConfigFactory { + + private static RpcServerTlsConfigFactory instance; + + private RpcServerTlsConfigFactory() { + } + + public static synchronized RpcServerTlsConfigFactory getInstance() { + if (instance == null) { + instance = new RpcServerTlsConfigFactory(); + } + return instance; + } + + /** + * Create SDK client TLS config. + * + * @param properties Properties containing TLS configuration + * @return RpcClientTlsConfig object representing the TLS configuration + */ + @Override + public RpcServerTlsConfig createSdkConfig(Properties properties) { + return createServerTlsConfig(properties, NACOS_SERVER_RPC); + } + + /** + * Create cluster client TLS config. + * + * @param properties Properties containing TLS configuration + * @return RpcClientTlsConfig object representing the TLS configuration + */ + @Override + public RpcServerTlsConfig createClusterConfig(Properties properties) { + return createServerTlsConfig(properties, RpcConstants.NACOS_PEER_RPC); + } + + /** + * create sdk server tls config. + * + * @param properties properties + * @param prefix prefix + * @return + */ + public RpcServerTlsConfig createServerTlsConfig(Properties properties, String prefix) { + RpcServerTlsConfig tlsConfig = new RpcServerTlsConfig(); + tlsConfig.setEnableTls(getBooleanProperty(properties, prefix + TLS_ENABLE, false)); + tlsConfig.setMutualAuthEnable(getBooleanProperty(properties, prefix + MUTUAL_AUTH, false)); + tlsConfig.setProtocols(properties.getProperty(prefix + TLS_PROTOCOLS)); + tlsConfig.setCiphers(properties.getProperty(prefix + TLS_CIPHERS)); + tlsConfig.setTrustCollectionCertFile(properties.getProperty(prefix + TLS_TRUST_COLLECTION_CHAIN_PATH)); + tlsConfig.setCertChainFile(properties.getProperty(prefix + TLS_CERT_CHAIN_PATH)); + tlsConfig.setCertPrivateKey(properties.getProperty(prefix + TLS_CERT_KEY)); + tlsConfig.setTrustAll(getBooleanProperty(properties, prefix + TLS_TRUST_ALL, true)); + tlsConfig.setCertPrivateKeyPassword(properties.getProperty(prefix + TLS_TRUST_PWD)); + tlsConfig.setSslProvider(properties.getProperty(prefix + TLS_PROVIDER)); + tlsConfig.setSslContextRefresher(properties.getProperty(prefix + SSL_CONTEXT_REFRESHER)); + tlsConfig.setCompatibility(getBooleanProperty(properties, prefix + COMPATIBILITY, true)); + return tlsConfig; + } +} diff --git a/core/src/main/resources/META-INF/services/com.alibaba.nacos.core.remote.grpc.negotiator.ProtocolNegotiatorBuilder b/core/src/main/resources/META-INF/services/com.alibaba.nacos.core.remote.grpc.negotiator.ProtocolNegotiatorBuilder index 1ea83c1f0b2..e0065225026 100644 --- a/core/src/main/resources/META-INF/services/com.alibaba.nacos.core.remote.grpc.negotiator.ProtocolNegotiatorBuilder +++ b/core/src/main/resources/META-INF/services/com.alibaba.nacos.core.remote.grpc.negotiator.ProtocolNegotiatorBuilder @@ -14,4 +14,5 @@ # limitations under the License. # -com.alibaba.nacos.core.remote.grpc.negotiator.tls.DefaultTlsProtocolNegotiatorBuilder \ No newline at end of file +com.alibaba.nacos.core.remote.grpc.negotiator.tls.SdkDefaultTlsProtocolNegotiatorBuilder +com.alibaba.nacos.core.remote.grpc.negotiator.tls.ClusterDefaultTlsProtocolNegotiatorBuilder diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/ClusterProtocolNegotiatorBuilderSingletonTest.java b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/ClusterProtocolNegotiatorBuilderSingletonTest.java new file mode 100644 index 00000000000..f3086d96f1b --- /dev/null +++ b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/ClusterProtocolNegotiatorBuilderSingletonTest.java @@ -0,0 +1,71 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator; + +import com.alibaba.nacos.common.utils.Pair; +import com.alibaba.nacos.sys.env.EnvUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.mock.env.MockEnvironment; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; + +/** + * Test ClusterProtocolNegotiatorBuilderSingleton. + * + * @author stone-98 + * @date 2024/2/21 + */ +public class ClusterProtocolNegotiatorBuilderSingletonTest { + + @Before + public void setUp() throws Exception { + ConfigurableEnvironment environment = new MockEnvironment(); + EnvUtil.setEnvironment(environment); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testSingletonInstance() { + AbstractProtocolNegotiatorBuilderSingleton singleton1 = ClusterProtocolNegotiatorBuilderSingleton.getSingleton(); + AbstractProtocolNegotiatorBuilderSingleton singleton2 = ClusterProtocolNegotiatorBuilderSingleton.getSingleton(); + assertSame(singleton1, singleton2); + } + + @Test + public void testDefaultBuilderPair() { + Pair defaultPair = ClusterProtocolNegotiatorBuilderSingleton.getSingleton() + .defaultBuilderPair(); + assertNotNull(defaultPair); + assertEquals(ClusterProtocolNegotiatorBuilderSingleton.TYPE_PROPERTY_KEY, defaultPair.getFirst()); + assertNotNull(defaultPair.getSecond()); + } + + @Test + public void testType() { + String type = ClusterProtocolNegotiatorBuilderSingleton.getSingleton().type(); + assertNotNull(type); + assertEquals(ClusterProtocolNegotiatorBuilderSingleton.TYPE_PROPERTY_KEY, type); + } +} diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/SdkProtocolNegotiatorBuilderSingletonTest.java b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/SdkProtocolNegotiatorBuilderSingletonTest.java new file mode 100644 index 00000000000..b7a08527d09 --- /dev/null +++ b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/SdkProtocolNegotiatorBuilderSingletonTest.java @@ -0,0 +1,71 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator; + +import com.alibaba.nacos.common.utils.Pair; +import com.alibaba.nacos.sys.env.EnvUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.mock.env.MockEnvironment; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; + +/** + * Test SdkProtocolNegotiatorBuilderSingleton. + * + * @author stone-98 + * @date 2024/2/21 + */ +public class SdkProtocolNegotiatorBuilderSingletonTest { + + @Before + public void setUp() throws Exception { + ConfigurableEnvironment environment = new MockEnvironment(); + EnvUtil.setEnvironment(environment); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void testSingletonInstance() { + AbstractProtocolNegotiatorBuilderSingleton singleton1 = SdkProtocolNegotiatorBuilderSingleton.getSingleton(); + AbstractProtocolNegotiatorBuilderSingleton singleton2 = SdkProtocolNegotiatorBuilderSingleton.getSingleton(); + assertSame(singleton1, singleton2); + } + + @Test + public void testDefaultBuilderPair() { + Pair defaultPair = SdkProtocolNegotiatorBuilderSingleton.getSingleton() + .defaultBuilderPair(); + assertNotNull(defaultPair); + assertEquals(SdkProtocolNegotiatorBuilderSingleton.TYPE_PROPERTY_KEY, defaultPair.getFirst()); + assertNotNull(defaultPair.getSecond()); + } + + @Test + public void testType() { + String type = SdkProtocolNegotiatorBuilderSingleton.getSingleton().type(); + assertNotNull(type); + assertEquals(SdkProtocolNegotiatorBuilderSingleton.TYPE_PROPERTY_KEY, type); + } +} diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/ClusterDefaultTlsProtocolNegotiatorBuilderTest.java b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/ClusterDefaultTlsProtocolNegotiatorBuilderTest.java new file mode 100644 index 00000000000..c0afcfd8f38 --- /dev/null +++ b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/ClusterDefaultTlsProtocolNegotiatorBuilderTest.java @@ -0,0 +1,84 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator.tls; + +import com.alibaba.nacos.common.remote.client.RpcConstants; +import com.alibaba.nacos.core.remote.grpc.negotiator.NacosGrpcProtocolNegotiator; +import com.alibaba.nacos.sys.env.EnvUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.core.env.MutablePropertySources; +import org.springframework.core.env.PropertiesPropertySource; +import org.springframework.mock.env.MockEnvironment; + +import java.util.Properties; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +/** + * Test ClusterDefaultTlsProtocolNegotiatorBuilder. + * + * @author stone-98 + * @date 2023/12/25 + */ +public class ClusterDefaultTlsProtocolNegotiatorBuilderTest { + + private ConfigurableEnvironment environment; + + private ClusterDefaultTlsProtocolNegotiatorBuilder builder; + + @Before + public void setUp() { + environment = new MockEnvironment(); + EnvUtil.setEnvironment(environment); + builder = new ClusterDefaultTlsProtocolNegotiatorBuilder(); + } + + @After + public void tearDown() throws NoSuchFieldException, IllegalAccessException { + } + + @Test + public void testBuildTlsDisabled() { + assertNull(builder.build()); + } + + @Test + public void testBuildTlsEnabled() { + Properties properties = new Properties(); + properties.setProperty(RpcConstants.NACOS_PEER_RPC + ".enableTls", "true"); + properties.setProperty(RpcConstants.NACOS_PEER_RPC + ".compatibility", "false"); + properties.setProperty(RpcConstants.NACOS_PEER_RPC + ".ciphers", + "ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); + properties.setProperty(RpcConstants.NACOS_PEER_RPC + ".protocols", "TLSv1.2,TLSv1.3"); + properties.setProperty(RpcConstants.NACOS_PEER_RPC + ".certPrivateKey", "test-server-key.pem"); + properties.setProperty(RpcConstants.NACOS_PEER_RPC + ".certChainFile", "test-server-cert.pem"); + properties.setProperty(RpcConstants.NACOS_PEER_RPC + ".trustCollectionCertFile", + "test-ca-cert.pem"); + + PropertiesPropertySource propertySource = new PropertiesPropertySource("myPropertySource", properties); + MutablePropertySources propertySources = environment.getPropertySources(); + propertySources.addLast(propertySource); + + NacosGrpcProtocolNegotiator negotiator = builder.build(); + assertNotNull(negotiator); + } + +} diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsContextBuilderTest.java b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsContextBuilderTest.java deleted file mode 100644 index f947a367a83..00000000000 --- a/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsContextBuilderTest.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 1999-2023 Alibaba Group Holding Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.alibaba.nacos.core.remote.grpc.negotiator.tls; - -import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; -import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.mock.env.MockEnvironment; - -import java.lang.reflect.Field; - -public class DefaultTlsContextBuilderTest { - - private ConfigurableEnvironment environment; - - @Before - public void setUp() throws Exception { - environment = new MockEnvironment(); - EnvUtil.setEnvironment(environment); - RpcServerTlsConfig.getInstance().setEnableTls(true); - } - - @After - public void tearDown() throws Exception { - RpcServerTlsConfig.getInstance().setEnableTls(false); - RpcServerTlsConfig.getInstance().setTrustAll(false); - RpcServerTlsConfig.getInstance().setMutualAuthEnable(false); - RpcServerTlsConfig.getInstance().setCertChainFile(null); - RpcServerTlsConfig.getInstance().setCertPrivateKey(null); - RpcServerTlsConfig.getInstance().setCiphers(null); - RpcServerTlsConfig.getInstance().setProtocols(null); - RpcServerTlsConfig.getInstance().setTrustCollectionCertFile(null); - RpcServerTlsConfig.getInstance().setSslProvider(""); - clearRpcServerTlsConfigInstance(); - } - - @Test(expected = IllegalArgumentException.class) - public void testGetSslContextIllegal() { - DefaultTlsContextBuilder.getSslContext(RpcServerTlsConfig.getInstance()); - } - - @Test - public void testGetSslContextWithoutMutual() { - RpcServerTlsConfig grpcServerConfig = RpcServerTlsConfig.getInstance(); - grpcServerConfig.setCiphers("ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); - grpcServerConfig.setProtocols("TLSv1.2,TLSv1.3"); - grpcServerConfig.setCertPrivateKey("test-server-key.pem"); - grpcServerConfig.setCertChainFile("test-server-cert.pem"); - DefaultTlsContextBuilder.getSslContext(RpcServerTlsConfig.getInstance()); - } - - @Test - public void testGetSslContextWithMutual() { - RpcServerTlsConfig grpcServerConfig = RpcServerTlsConfig.getInstance(); - grpcServerConfig.setTrustAll(true); - grpcServerConfig.setMutualAuthEnable(true); - grpcServerConfig.setCiphers("ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); - grpcServerConfig.setProtocols("TLSv1.2,TLSv1.3"); - grpcServerConfig.setCertPrivateKey("test-server-key.pem"); - grpcServerConfig.setCertChainFile("test-server-cert.pem"); - DefaultTlsContextBuilder.getSslContext(RpcServerTlsConfig.getInstance()); - } - - @Test - public void testGetSslContextWithMutualAndPart() { - RpcServerTlsConfig grpcServerConfig = RpcServerTlsConfig.getInstance(); - grpcServerConfig.setMutualAuthEnable(true); - grpcServerConfig.setCiphers("ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); - grpcServerConfig.setProtocols("TLSv1.2,TLSv1.3"); - grpcServerConfig.setCertPrivateKey("test-server-key.pem"); - grpcServerConfig.setCertChainFile("test-server-cert.pem"); - grpcServerConfig.setTrustCollectionCertFile("test-ca-cert.pem"); - DefaultTlsContextBuilder.getSslContext(RpcServerTlsConfig.getInstance()); - } - - @Test(expected = IllegalArgumentException.class) - public void testGetSslContextWithMutualAndPartIllegal() { - RpcServerTlsConfig grpcServerConfig = RpcServerTlsConfig.getInstance(); - grpcServerConfig.setMutualAuthEnable(true); - grpcServerConfig.setCiphers("ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); - grpcServerConfig.setProtocols("TLSv1.2,TLSv1.3"); - grpcServerConfig.setCertPrivateKey("test-server-key.pem"); - grpcServerConfig.setCertChainFile("test-server-cert.pem"); - DefaultTlsContextBuilder.getSslContext(RpcServerTlsConfig.getInstance()); - } - - @Test(expected = NacosRuntimeException.class) - public void testGetSslContextForNonExistFile() { - RpcServerTlsConfig grpcServerConfig = RpcServerTlsConfig.getInstance(); - grpcServerConfig.setCiphers("ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); - grpcServerConfig.setProtocols("TLSv1.2,TLSv1.3"); - grpcServerConfig.setCertPrivateKey("non-exist-server-key.pem"); - grpcServerConfig.setCertChainFile("non-exist-cert.pem"); - DefaultTlsContextBuilder.getSslContext(RpcServerTlsConfig.getInstance()); - } - - private static void clearRpcServerTlsConfigInstance() throws Exception { - Field instanceField = RpcServerTlsConfig.class.getDeclaredField("instance"); - instanceField.setAccessible(true); - instanceField.set(null, null); - } -} \ No newline at end of file diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/RpcServerSslContextRefresherHolderTest.java b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/RpcServerSslContextRefresherHolderTest.java new file mode 100644 index 00000000000..3d426d18f3c --- /dev/null +++ b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/RpcServerSslContextRefresherHolderTest.java @@ -0,0 +1,53 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator.tls; + +import com.alibaba.nacos.sys.env.EnvUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.core.env.ConfigurableEnvironment; + + +/** + * Test RpcServerSslContextRefresherHolder. + * + * @author stone-98 + */ +@RunWith(MockitoJUnitRunner.class) +public class RpcServerSslContextRefresherHolderTest { + + @Mock + private ConfigurableEnvironment environment; + + @Before + public void setUp() { + EnvUtil.setEnvironment(environment); + } + + @After + public void tearDown() { + } + + @Test + public void testInit() { + } + +} diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsContextBuilderTest.java b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsContextBuilderTest.java new file mode 100644 index 00000000000..3b413ffdec3 --- /dev/null +++ b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsContextBuilderTest.java @@ -0,0 +1,110 @@ +/* + * Copyright 1999-2023 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.alibaba.nacos.core.remote.grpc.negotiator.tls; + +import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; +import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; +import com.alibaba.nacos.sys.env.EnvUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.mock.env.MockEnvironment; + +import static org.mockito.Mockito.when; + +/** + * {@link DefaultTlsContextBuilder} unit test. + * + * @author stone-98 + * @date 2024-03-11 17:11 + */ +@RunWith(MockitoJUnitRunner.class) +public class SdkDefaultTlsContextBuilderTest { + + private ConfigurableEnvironment environment; + + @Mock + private RpcServerTlsConfig rpcServerTlsConfig; + + @Before + public void setUp() throws Exception { + environment = new MockEnvironment(); + EnvUtil.setEnvironment(environment); + } + + @After + public void tearDown() throws Exception { + } + + @Test(expected = IllegalArgumentException.class) + public void testGetSslContextIllegal() { + DefaultTlsContextBuilder.getSslContext(rpcServerTlsConfig); + } + + @Test + public void testGetSslContextWithoutMutual() { + when(rpcServerTlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); + when(rpcServerTlsConfig.getProtocols()).thenReturn("TLSv1.2,TLSv1.3"); + when(rpcServerTlsConfig.getCertPrivateKey()).thenReturn("test-server-key.pem"); + when(rpcServerTlsConfig.getCertChainFile()).thenReturn("test-server-cert.pem"); + DefaultTlsContextBuilder.getSslContext(rpcServerTlsConfig); + } + + @Test + public void testGetSslContextWithMutual() { + when(rpcServerTlsConfig.getTrustAll()).thenReturn(true); + when(rpcServerTlsConfig.getMutualAuthEnable()).thenReturn(true); + when(rpcServerTlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); + when(rpcServerTlsConfig.getProtocols()).thenReturn("TLSv1.2,TLSv1.3"); + when(rpcServerTlsConfig.getCertPrivateKey()).thenReturn("test-server-key.pem"); + when(rpcServerTlsConfig.getCertChainFile()).thenReturn("test-server-cert.pem"); + DefaultTlsContextBuilder.getSslContext(rpcServerTlsConfig); + } + + @Test + public void testGetSslContextWithMutualAndPart() { + when(rpcServerTlsConfig.getMutualAuthEnable()).thenReturn(true); + when(rpcServerTlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); + when(rpcServerTlsConfig.getProtocols()).thenReturn("TLSv1.2,TLSv1.3"); + when(rpcServerTlsConfig.getCertPrivateKey()).thenReturn("test-server-key.pem"); + when(rpcServerTlsConfig.getCertChainFile()).thenReturn("test-server-cert.pem"); + when(rpcServerTlsConfig.getTrustCollectionCertFile()).thenReturn("test-ca-cert.pem"); + DefaultTlsContextBuilder.getSslContext(rpcServerTlsConfig); + } + + @Test(expected = IllegalArgumentException.class) + public void testGetSslContextWithMutualAndPartIllegal() { + when(rpcServerTlsConfig.getMutualAuthEnable()).thenReturn(true); + when(rpcServerTlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256,ECDHE-RSA-AES256-GCM-SHA384"); + when(rpcServerTlsConfig.getProtocols()).thenReturn("TLSv1.2,TLSv1.3"); + when(rpcServerTlsConfig.getCertPrivateKey()).thenReturn("test-server-key.pem"); + when(rpcServerTlsConfig.getCertChainFile()).thenReturn("test-server-cert.pem"); + DefaultTlsContextBuilder.getSslContext(rpcServerTlsConfig); + } + + @Test(expected = NacosRuntimeException.class) + public void testGetSslContextForNonExistFile() { + when(rpcServerTlsConfig.getCertPrivateKey()).thenReturn("non-exist-server-key.pem"); + when(rpcServerTlsConfig.getCertChainFile()).thenReturn("non-exist-cert.pem"); + DefaultTlsContextBuilder.getSslContext(rpcServerTlsConfig); + } + +} diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsProtocolNegotiatorBuilderTest.java b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsProtocolNegotiatorBuilderTest.java similarity index 58% rename from core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsProtocolNegotiatorBuilderTest.java rename to core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsProtocolNegotiatorBuilderTest.java index 24e0a6fd782..95d83dba865 100644 --- a/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/DefaultTlsProtocolNegotiatorBuilderTest.java +++ b/core/src/test/java/com/alibaba/nacos/core/remote/grpc/negotiator/tls/SdkDefaultTlsProtocolNegotiatorBuilderTest.java @@ -16,56 +16,58 @@ package com.alibaba.nacos.core.remote.grpc.negotiator.tls; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; import com.alibaba.nacos.sys.env.EnvUtil; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.MockedStatic; +import org.mockito.Mockito; +import org.mockito.junit.MockitoJUnitRunner; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.mock.env.MockEnvironment; -import java.lang.reflect.Field; +import java.util.Properties; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import static org.mockito.Mockito.when; + +@RunWith(MockitoJUnitRunner.class) +public class SdkDefaultTlsProtocolNegotiatorBuilderTest { -public class DefaultTlsProtocolNegotiatorBuilderTest { - private ConfigurableEnvironment environment; - - private DefaultTlsProtocolNegotiatorBuilder builder; - + + private SdkDefaultTlsProtocolNegotiatorBuilder builder; + + @Mock + private Properties properties; + @Before public void setUp() throws Exception { environment = new MockEnvironment(); EnvUtil.setEnvironment(environment); - builder = new DefaultTlsProtocolNegotiatorBuilder(); + builder = new SdkDefaultTlsProtocolNegotiatorBuilder(); } - + @After public void tearDown() throws Exception { - RpcServerTlsConfig.getInstance().setEnableTls(false); - RpcServerTlsConfig.getInstance().setCertChainFile(null); - RpcServerTlsConfig.getInstance().setCertPrivateKey(null); - clearRpcServerTlsConfigInstance(); } - + @Test public void testBuildDisabled() { assertNull(builder.build()); } - + @Test public void testBuildEnabled() { - RpcServerTlsConfig.getInstance().setEnableTls(true); - RpcServerTlsConfig.getInstance().setCertPrivateKey("test-server-key.pem"); - RpcServerTlsConfig.getInstance().setCertChainFile("test-server-cert.pem"); + final MockedStatic envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); + when(EnvUtil.getProperties()).thenReturn(properties); + when(properties.getProperty("nacos.remote.server.rpc.tls.enableTls")).thenReturn("true"); + when(properties.getProperty("nacos.remote.server.rpc.tls.certPrivateKey")).thenReturn("test-server-key.pem"); + when(properties.getProperty("nacos.remote.server.rpc.tls.certChainFile")).thenReturn("test-server-cert.pem"); assertNotNull(builder.build()); + envUtilMockedStatic.close(); } - - private static void clearRpcServerTlsConfigInstance() throws Exception { - Field instanceField = RpcServerTlsConfig.class.getDeclaredField("instance"); - instanceField.setAccessible(true); - instanceField.set(null, null); - } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/tls/RpcClusterServerSslContextRefresherTest.java b/core/src/test/java/com/alibaba/nacos/core/remote/tls/RpcClusterServerSslContextRefresherTest.java new file mode 100644 index 00000000000..f9b4fda663c --- /dev/null +++ b/core/src/test/java/com/alibaba/nacos/core/remote/tls/RpcClusterServerSslContextRefresherTest.java @@ -0,0 +1,48 @@ +/* + * Copyright 1999-2021 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package com.alibaba.nacos.core.remote.tls; + +import com.alibaba.nacos.core.remote.BaseRpcServer; + +public class RpcClusterServerSslContextRefresherTest implements RpcServerSslContextRefresher { + + @Override + public SslContextChangeAware refresh(BaseRpcServer baseRpcServer) { + return new SslContextChangeAware() { + @Override + public void init(BaseRpcServer baseRpcServer) { + + } + + @Override + public void onSslContextChange() { + + } + + @Override + public void shutdown() { + + } + }; + } + + @Override + public String getName() { + return "cluster-refresher-test"; + } +} diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/tls/RpcSdkServerSslContextRefresherTest.java b/core/src/test/java/com/alibaba/nacos/core/remote/tls/RpcSdkServerSslContextRefresherTest.java new file mode 100644 index 00000000000..3a39b7830c7 --- /dev/null +++ b/core/src/test/java/com/alibaba/nacos/core/remote/tls/RpcSdkServerSslContextRefresherTest.java @@ -0,0 +1,48 @@ +/* + * Copyright 1999-2021 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package com.alibaba.nacos.core.remote.tls; + +import com.alibaba.nacos.core.remote.BaseRpcServer; + +public class RpcSdkServerSslContextRefresherTest implements RpcServerSslContextRefresher { + + @Override + public SslContextChangeAware refresh(BaseRpcServer baseRpcServer) { + return new SslContextChangeAware() { + @Override + public void init(BaseRpcServer baseRpcServer) { + + } + + @Override + public void onSslContextChange() { + + } + + @Override + public void shutdown() { + + } + }; + } + + @Override + public String getName() { + return "sdk-refresher-test"; + } +} diff --git a/core/src/test/resources/META-INF/services/com.alibaba.nacos.core.remote.tls.RpcServerSslContextRefresher b/core/src/test/resources/META-INF/services/com.alibaba.nacos.core.remote.tls.RpcServerSslContextRefresher new file mode 100644 index 00000000000..0c84c41b275 --- /dev/null +++ b/core/src/test/resources/META-INF/services/com.alibaba.nacos.core.remote.tls.RpcServerSslContextRefresher @@ -0,0 +1,18 @@ +# +# Copyright 1999-2021 Alibaba Group Holding Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +com.alibaba.nacos.core.remote.tls.RpcSdkServerSslContextRefresherTest +com.alibaba.nacos.core.remote.tls.RpcClusterServerSslContextRefresherTest diff --git a/sys/src/main/java/com/alibaba/nacos/sys/env/EnvUtil.java b/sys/src/main/java/com/alibaba/nacos/sys/env/EnvUtil.java index 84a85825be9..c56ab34bfdb 100644 --- a/sys/src/main/java/com/alibaba/nacos/sys/env/EnvUtil.java +++ b/sys/src/main/java/com/alibaba/nacos/sys/env/EnvUtil.java @@ -24,8 +24,10 @@ import com.alibaba.nacos.sys.utils.DiskUtils; import com.alibaba.nacos.sys.utils.InetUtils; import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.core.env.EnumerablePropertySource; import org.springframework.core.env.MapPropertySource; import org.springframework.core.env.MutablePropertySources; +import org.springframework.core.env.PropertySource; import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.Resource; @@ -43,6 +45,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.Properties; import java.util.Set; import java.util.HashMap; @@ -169,6 +172,23 @@ public static String getRequiredProperty(String key) throws IllegalStateExceptio public static T getRequiredProperty(String key, Class targetType) throws IllegalStateException { return environment.getRequiredProperty(key, targetType); } + + public static Properties getProperties() { + Properties properties = new Properties(); + for (PropertySource propertySource : environment.getPropertySources()) { + if (propertySource instanceof EnumerablePropertySource) { + EnumerablePropertySource enumerablePropertySource = (EnumerablePropertySource) propertySource; + String[] propertyNames = enumerablePropertySource.getPropertyNames(); + for (String propertyName : propertyNames) { + Object propertyValue = enumerablePropertySource.getProperty(propertyName); + if (propertyValue != null) { + properties.put(propertyName, propertyValue.toString()); + } + } + } + } + return properties; + } public static String resolvePlaceholders(String text) { return environment.resolvePlaceholders(text); diff --git a/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigServiceComTlsGrpcClient_CITCase.java b/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigServiceComTlsGrpcClient_CITCase.java index b15c1e05f22..4982a1b9502 100644 --- a/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigServiceComTlsGrpcClient_CITCase.java +++ b/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigServiceComTlsGrpcClient_CITCase.java @@ -23,13 +23,15 @@ import com.alibaba.nacos.client.config.NacosConfigService; import com.alibaba.nacos.client.config.listener.impl.AbstractConfigChangeListener; import com.alibaba.nacos.common.remote.client.RpcConstants; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; import com.alibaba.nacos.test.base.ConfigCleanUtils; -import org.junit.*; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.FixMethodOrder; +import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; import org.springframework.test.context.junit4.SpringRunner; import java.io.IOException; @@ -46,36 +48,27 @@ */ @RunWith(SpringRunner.class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) -@SpringBootTest(classes = {Nacos.class}, - properties = { - "nacos.standalone=true", - RpcServerTlsConfig.PREFIX+".enableTls=true", - RpcServerTlsConfig.PREFIX+".compatibility=true", - RpcServerTlsConfig.PREFIX+".certChainFile=test-server-cert.pem", - RpcServerTlsConfig.PREFIX+".certPrivateKey=test-server-key.pem"}, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = {Nacos.class}, properties = {"nacos.standalone=true", + RpcConstants.NACOS_SERVER_RPC + ".enableTls=true", RpcConstants.NACOS_SERVER_RPC + ".compatibility=true", + RpcConstants.NACOS_SERVER_RPC + ".certChainFile=test-server-cert.pem", RpcConstants.NACOS_SERVER_RPC + + ".certPrivateKey=test-server-key.pem"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class NacosConfigServiceComTlsGrpcClient_CITCase { - + public static AtomicInteger increment = new AtomicInteger(100); - - @LocalServerPort - private int port; - + @BeforeClass public static void beforeClass() throws IOException { ConfigCleanUtils.changeToNewTestNacosHome(NacosConfigServiceComTlsGrpcClient_CITCase.class.getSimpleName()); - } - + @BeforeClass @AfterClass public static void cleanClientCache() throws Exception { ConfigCleanUtils.cleanClientCache(); } - - + @Test - public void test_e_TlsServerAndPlainClient() throws Exception { + public void test_e_TlsServerAndPlainClient() throws Exception { Properties propertiesfalse = new Properties(); propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_ENABLE, "false"); propertiesfalse.put("serverAddr", "127.0.0.1"); diff --git a/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigServiceNoComTlsGrpcClient_CITCase.java b/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigServiceNoComTlsGrpcClient_CITCase.java index da5ee0a6b05..f88b4f59268 100644 --- a/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigServiceNoComTlsGrpcClient_CITCase.java +++ b/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigServiceNoComTlsGrpcClient_CITCase.java @@ -23,7 +23,6 @@ import com.alibaba.nacos.client.config.NacosConfigService; import com.alibaba.nacos.client.config.listener.impl.AbstractConfigChangeListener; import com.alibaba.nacos.common.remote.client.RpcConstants; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; import com.alibaba.nacos.test.base.ConfigCleanUtils; import org.junit.AfterClass; import org.junit.Assert; @@ -47,30 +46,25 @@ * @author githubcheng2978. */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = {Nacos.class}, - properties = { - "nacos.standalone=true", - RpcServerTlsConfig.PREFIX+".enableTls=true", - RpcServerTlsConfig.PREFIX+".compatibility=false", - RpcServerTlsConfig.PREFIX+".certChainFile=test-server-cert.pem", - RpcServerTlsConfig.PREFIX+".certPrivateKey=test-server-key.pem"}, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = {Nacos.class}, properties = {"nacos.standalone=true", + RpcConstants.NACOS_SERVER_RPC + ".enableTls=true", RpcConstants.NACOS_SERVER_RPC + ".compatibility=false", + RpcConstants.NACOS_SERVER_RPC + ".certChainFile=test-server-cert.pem", RpcConstants.NACOS_SERVER_RPC + + ".certPrivateKey=test-server-key.pem"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class NacosConfigServiceNoComTlsGrpcClient_CITCase { - + public static AtomicInteger increment = new AtomicInteger(100); - + @BeforeClass public static void beforeClass() throws IOException { ConfigCleanUtils.changeToNewTestNacosHome(NacosConfigServiceNoComTlsGrpcClient_CITCase.class.getSimpleName()); - } - + @BeforeClass @AfterClass public static void cleanClientCache() throws Exception { ConfigCleanUtils.cleanClientCache(); } - + @Test @Ignore("TODO, Fix cert expired problem") public void test_e_TlsServerAndTlsClient() throws Exception { @@ -83,7 +77,8 @@ public void test_e_TlsServerAndTlsClient() throws Exception { String content = UUID.randomUUID().toString(); String dataId = "test-group" + increment.getAndIncrement(); String groupId = "test-data" + increment.getAndIncrement(); - boolean b = configService.publishConfig("test-group" + increment.getAndIncrement(), "test-data" + increment.getAndIncrement(), content); + boolean b = configService.publishConfig("test-group" + increment.getAndIncrement(), + "test-data" + increment.getAndIncrement(), content); CountDownLatch latch = new CountDownLatch(1); configService.addListener(dataId, groupId, new AbstractConfigChangeListener() { @Override @@ -99,9 +94,9 @@ public void receiveConfigChange(ConfigChangeEvent event) { latch.await(5, TimeUnit.SECONDS); Assert.assertTrue(b); } - + @Test - public void test_e_TlsServerAndPlainClient() throws Exception { + public void test_e_TlsServerAndPlainClient() throws Exception { Properties propertiesfalse = new Properties(); propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_ENABLE, "false"); propertiesfalse.put("serverAddr", "127.0.0.1"); diff --git a/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigV2MutualAuth_CITCase.java b/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigV2MutualAuth_CITCase.java index b06c6d62095..7174de8d67d 100644 --- a/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigV2MutualAuth_CITCase.java +++ b/test/config-test/src/test/java/com/alibaba/nacos/test/config/NacosConfigV2MutualAuth_CITCase.java @@ -14,7 +14,6 @@ * limitations under the License. */ - package com.alibaba.nacos.test.config; import com.alibaba.nacos.Nacos; @@ -24,7 +23,6 @@ import com.alibaba.nacos.client.config.NacosConfigService; import com.alibaba.nacos.client.config.listener.impl.AbstractConfigChangeListener; import com.alibaba.nacos.common.remote.client.RpcConstants; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; import com.alibaba.nacos.test.base.ConfigCleanUtils; import org.junit.After; import org.junit.Assert; @@ -48,43 +46,37 @@ * @author githubcheng2978. */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = {Nacos.class}, - properties = { - "nacos.standalone=true", - RpcServerTlsConfig.PREFIX+".enableTls=true", - RpcServerTlsConfig.PREFIX+".mutualAuthEnable=true", - RpcServerTlsConfig.PREFIX+".compatibility=false", - RpcServerTlsConfig.PREFIX+".certChainFile=test-server-cert.pem", - RpcServerTlsConfig.PREFIX+".certPrivateKey=test-server-key.pem", - RpcServerTlsConfig.PREFIX+".trustCollectionCertFile=test-ca-cert.pem", - - }, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = {Nacos.class}, properties = {"nacos.standalone=true", + RpcConstants.NACOS_SERVER_RPC + ".enableTls=true", RpcConstants.NACOS_SERVER_RPC + ".mutualAuthEnable=true", + RpcConstants.NACOS_SERVER_RPC + ".compatibility=false", + RpcConstants.NACOS_SERVER_RPC + ".certChainFile=test-server-cert.pem", + RpcConstants.NACOS_SERVER_RPC + ".certPrivateKey=test-server-key.pem", RpcConstants.NACOS_SERVER_RPC + + ".trustCollectionCertFile=test-ca-cert.pem"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class NacosConfigV2MutualAuth_CITCase { - - + + public static AtomicInteger increment = new AtomicInteger(100); - + @BeforeClass - public static void beforeClass() throws IOException { + public static void beforeClass() throws IOException { ConfigCleanUtils.changeToNewTestNacosHome(NacosConfigV2MutualAuth_CITCase.class.getSimpleName()); - + } - + @After - public void cleanClientCache() throws Exception { + public void cleanClientCache() throws Exception { ConfigCleanUtils.cleanClientCache(); } - + @Test @Ignore("TODO, Fix cert expired problem") public void test_d_MutualAuth() throws Exception { Properties propertiesfalse = new Properties(); propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_ENABLE, "true"); - propertiesfalse.put(RpcConstants.RPC_CLIENT_MUTUAL_AUTH,"true"); - propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_CERT_KEY,"test-client-key.pem"); - propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH,"test-ca-cert.pem"); - propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH,"test-client-cert.pem"); + propertiesfalse.put(RpcConstants.RPC_CLIENT_MUTUAL_AUTH, "true"); + propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_CERT_KEY, "test-client-key.pem"); + propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH, "test-ca-cert.pem"); + propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH, "test-client-cert.pem"); propertiesfalse.put("serverAddr", "127.0.0.1"); ConfigService configServiceFalse = new NacosConfigService(propertiesfalse); String dataId = "test-group" + increment.getAndIncrement(); @@ -106,14 +98,14 @@ public void receiveConfigChange(ConfigChangeEvent event) { latch2.await(5, TimeUnit.SECONDS); Assert.assertTrue(res); } - + @Test public void test_d_MutualAuthButClientNot() throws Exception { - + Properties propertiesfalse = new Properties(); propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_ENABLE, "true"); - propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH,"test-client-cert.pem"); - + propertiesfalse.put(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH, "test-client-cert.pem"); + propertiesfalse.put("serverAddr", "127.0.0.1"); ConfigService configServiceFalse = new NacosConfigService(propertiesfalse); String dataId = "test-group" + increment.getAndIncrement(); diff --git a/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV1ServerNonCompatibility_CITCase.java b/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV1ServerNonCompatibility_CITCase.java index 74a4d18b423..c1039830cde 100644 --- a/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV1ServerNonCompatibility_CITCase.java +++ b/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV1ServerNonCompatibility_CITCase.java @@ -14,7 +14,6 @@ * limitations under the License. */ - package com.alibaba.nacos.test.client; import com.alibaba.nacos.Nacos; @@ -25,7 +24,7 @@ import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.remote.client.RpcClientFactory; import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; +import com.alibaba.nacos.common.remote.client.RpcConstants; import com.alibaba.nacos.test.ConfigCleanUtils; import org.junit.AfterClass; import org.junit.Assert; @@ -45,89 +44,88 @@ import java.util.concurrent.atomic.AtomicInteger; /** - * use configPublishRequest for communication verification between client and server + * use configPublishRequest for communication verification between client and server. * * @author githubcheng2978 */ @RunWith(SpringRunner.class) @TestConfiguration -@SpringBootTest(classes = {Nacos.class}, - properties = { - "server.servlet.context-path=/nacos", - RpcServerTlsConfig.PREFIX+".compatibility=false", - RpcServerTlsConfig.PREFIX+".enableTls=true", - RpcServerTlsConfig.PREFIX+".certChainFile=test-server-cert.pem", - RpcServerTlsConfig.PREFIX+".certPrivateKey=test-server-key.pem", - }, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = {Nacos.class}, properties = {"server.servlet.context-path=/nacos", + RpcConstants.NACOS_SERVER_RPC + ".compatibility=false", + RpcConstants.NACOS_SERVER_RPC + ".enableTls=true", + RpcConstants.NACOS_SERVER_RPC + ".certChainFile=test-server-cert.pem", RpcConstants.NACOS_SERVER_RPC + + ".certPrivateKey=test-server-key.pem"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) @Ignore("TODO, Fix cert expired problem") public class ConfigIntegrationV1ServerNonCompatibility_CITCase { - + public static AtomicInteger increment = new AtomicInteger(100); + @LocalServerPort private int port; - + @BeforeClass public static void beforeClass() throws IOException { - ConfigCleanUtils.changeToNewTestNacosHome(ConfigIntegrationV1ServerNonCompatibility_CITCase.class.getSimpleName()); + ConfigCleanUtils.changeToNewTestNacosHome( + ConfigIntegrationV1ServerNonCompatibility_CITCase.class.getSimpleName()); } - + @BeforeClass @AfterClass public static void cleanClientCache() throws Exception { ConfigCleanUtils.cleanClientCache(); } - + @Test public void test_a_TlsServer() throws Exception { - RpcClient client = RpcClientFactory.createClient("testTlsServer", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), null); + RpcClient client = RpcClientFactory.createClient("testTlsServer", ConnectionType.GRPC, + Collections.singletonMap("labelKey", "labelValue"), null); RpcClient.ServerInfo serverInfo = new RpcClient.ServerInfo(); serverInfo.setServerIp("127.0.0.1"); serverInfo.setServerPort(port); - + Connection connection = client.connectToServer(serverInfo); Assert.assertNull(connection); } - - + @Test public void test_b_ServerTlsTrustAll() throws Exception { - RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); tlsConfig.setEnableTls(true); tlsConfig.setTrustAll(true); RpcClient.ServerInfo serverInfo = new RpcClient.ServerInfo(); serverInfo.setServerIp("127.0.0.1"); serverInfo.setServerPort(port); - - RpcClient clientTrustCa = RpcClientFactory.createClient("testServerTlsTrustCa", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), tlsConfig); + + RpcClient clientTrustCa = RpcClientFactory.createClient("testServerTlsTrustCa", ConnectionType.GRPC, + Collections.singletonMap("labelKey", "labelValue"), tlsConfig); Connection connectionTrustCa = clientTrustCa.connectToServer(serverInfo); ConfigPublishRequest configPublishRequest = new ConfigPublishRequest(); String content = UUID.randomUUID().toString(); configPublishRequest.setContent(content); configPublishRequest.setGroup("test-group" + increment.getAndIncrement()); configPublishRequest.setDataId("test-data" + increment.getAndIncrement()); - + Response response = connectionTrustCa.request(configPublishRequest, TimeUnit.SECONDS.toMillis(3)); Assert.assertTrue(response.isSuccess()); connectionTrustCa.close(); } - + @Test public void test_c_ServerTlsTrustCa() throws Exception { - + RpcClient.ServerInfo serverInfo = new RpcClient.ServerInfo(); serverInfo.setServerIp("127.0.0.1"); serverInfo.setServerPort(port); - + RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); tlsConfig.setEnableTls(true); tlsConfig.setTrustCollectionCertFile("test-ca-cert.pem"); - RpcClient clientTrustCa = RpcClientFactory.createClient("testServerTlsTrustCa", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), tlsConfig); + RpcClient clientTrustCa = RpcClientFactory.createClient("testServerTlsTrustCa", ConnectionType.GRPC, + Collections.singletonMap("labelKey", "labelValue"), tlsConfig); Connection connectionTrustCa = clientTrustCa.connectToServer(serverInfo); ConfigPublishRequest configPublishRequestCa = new ConfigPublishRequest(); String contentCa = UUID.randomUUID().toString(); - + configPublishRequestCa.setContent(contentCa); configPublishRequestCa.setGroup("test-group" + increment.getAndIncrement()); configPublishRequestCa.setDataId("test-data" + increment.getAndIncrement()); diff --git a/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV2MutualAuth_CITCase.java b/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV2MutualAuth_CITCase.java index 2d28d0621e5..f39b1d6d4e0 100644 --- a/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV2MutualAuth_CITCase.java +++ b/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV2MutualAuth_CITCase.java @@ -25,9 +25,13 @@ import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.remote.client.RpcClientFactory; import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; +import com.alibaba.nacos.common.remote.client.RpcConstants; import com.alibaba.nacos.test.ConfigCleanUtils; -import org.junit.*; +import org.junit.After; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; @@ -40,79 +44,76 @@ import java.util.concurrent.atomic.AtomicInteger; /** - * use configPublishRequest for communication verification between client and server + * use configPublishRequest for communication verification between client and server. * * @author githubcheng2978 */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = {Nacos.class}, - properties = { - "nacos.standalone=true", - RpcServerTlsConfig.PREFIX+".mutualAuthEnable=true", - RpcServerTlsConfig.PREFIX+".compatibility=false", - RpcServerTlsConfig.PREFIX+".enableTls=true", - RpcServerTlsConfig.PREFIX+".certChainFile=test-server-cert.pem", - RpcServerTlsConfig.PREFIX+".certPrivateKey=test-server-key.pem", - RpcServerTlsConfig.PREFIX+".trustCollectionCertFile=test-ca-cert.pem", - - }, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = {Nacos.class}, properties = {"nacos.standalone=true", + RpcConstants.NACOS_SERVER_RPC + ".mutualAuthEnable=true", + RpcConstants.NACOS_SERVER_RPC + ".compatibility=false", + RpcConstants.NACOS_SERVER_RPC + ".enableTls=true", + RpcConstants.NACOS_SERVER_RPC + ".certChainFile=test-server-cert.pem", + RpcConstants.NACOS_SERVER_RPC + ".certPrivateKey=test-server-key.pem", + RpcConstants.NACOS_SERVER_RPC + ".trustCollectionCertFile=test-ca-cert.pem"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class ConfigIntegrationV2MutualAuth_CITCase { - + @LocalServerPort private int port; - + public static AtomicInteger increment = new AtomicInteger(100); - + @BeforeClass - public static void beforeClass() throws IOException { + public static void beforeClass() throws IOException { ConfigCleanUtils.changeToNewTestNacosHome(ConfigIntegrationV2MutualAuth_CITCase.class.getSimpleName()); - + } - + @After - public void cleanClientCache() throws Exception { + public void cleanClientCache() throws Exception { ConfigCleanUtils.cleanClientCache(); } - + @Test @Ignore("TODO, fix the cert expired problem") public void test_d_MutualAuth() throws Exception { - + RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); tlsConfig.setEnableTls(true); tlsConfig.setMutualAuthEnable(true); tlsConfig.setCertChainFile("test-client-cert.pem"); tlsConfig.setCertPrivateKey("test-client-key.pem"); tlsConfig.setTrustCollectionCertFile("test-ca-cert.pem"); - RpcClient client = RpcClientFactory.createClient("testMutualAuth", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), tlsConfig); - + RpcClient client = RpcClientFactory.createClient("testMutualAuth", ConnectionType.GRPC, + Collections.singletonMap("labelKey", "labelValue"), tlsConfig); + RpcClient.ServerInfo serverInfo = new RpcClient.ServerInfo(); serverInfo.setServerIp("127.0.0.1"); serverInfo.setServerPort(port); - + Connection connection = client.connectToServer(serverInfo); ConfigPublishRequest configPublishRequest = new ConfigPublishRequest(); - + String content = UUID.randomUUID().toString(); - + configPublishRequest.setContent(content); - configPublishRequest.setGroup("test-group"+increment.getAndIncrement()); - configPublishRequest.setDataId("test-data"+increment.getAndIncrement()); + configPublishRequest.setGroup("test-group" + increment.getAndIncrement()); + configPublishRequest.setDataId("test-data" + increment.getAndIncrement()); configPublishRequest.setRequestId(content); Response response = connection.request(configPublishRequest, TimeUnit.SECONDS.toMillis(5)); Assert.assertTrue(response.isSuccess()); connection.close(); } - + @Test public void test_e_ServerMutualAuthOnly() throws Exception { - + RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); tlsConfig.setEnableTls(true); tlsConfig.setTrustCollectionCertFile("test-ca-cert.pem"); - RpcClient client = RpcClientFactory.createClient("testServerMutualAuthNoly", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), tlsConfig); - + RpcClient client = RpcClientFactory.createClient("testServerMutualAuthNoly", ConnectionType.GRPC, + Collections.singletonMap("labelKey", "labelValue"), tlsConfig); + RpcClient.ServerInfo serverInfo = new RpcClient.ServerInfo(); serverInfo.setServerIp("127.0.0.1"); serverInfo.setServerPort(port); diff --git a/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV3_CITCase.java b/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV3_CITCase.java index 17e93a6e560..269fb7b0a36 100644 --- a/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV3_CITCase.java +++ b/test/core-test/src/test/java/com/alibaba/nacos/test/client/ConfigIntegrationV3_CITCase.java @@ -25,10 +25,14 @@ import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.remote.client.RpcClientFactory; import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; +import com.alibaba.nacos.common.remote.client.RpcConstants; import com.alibaba.nacos.sys.env.EnvUtil; import com.alibaba.nacos.test.ConfigCleanUtils; -import org.junit.*; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; @@ -46,44 +50,40 @@ * @author githubcheng2978 */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = {Nacos.class}, - properties = { - "nacos.standalone=true", - RpcServerTlsConfig.PREFIX+".enableTls=true", - RpcServerTlsConfig.PREFIX+".certChainFile=test-server-cert.pem", - RpcServerTlsConfig.PREFIX+".certPrivateKey=test-server-key.pem" - }, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = {Nacos.class}, properties = {"nacos.standalone=true", + RpcConstants.NACOS_SERVER_RPC + ".enableTls=true", + RpcConstants.NACOS_SERVER_RPC + ".certChainFile=test-server-cert.pem", + RpcConstants.NACOS_SERVER_RPC + ".certPrivateKey=test-server-key.pem"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class ConfigIntegrationV3_CITCase { - + @LocalServerPort private int port; - + public static AtomicInteger increment = new AtomicInteger(100); - + @BeforeClass public static void beforeClass() throws IOException { ConfigCleanUtils.changeToNewTestNacosHome(ConfigIntegrationV3_CITCase.class.getSimpleName()); - } - + @BeforeClass @AfterClass public static void cleanClientCache() throws Exception { ConfigCleanUtils.cleanClientCache(); } - + @Test public void test_e_TlsServerAndPlainClient() throws Exception { - RpcClient client = RpcClientFactory.createClient("testTlsServerAndPlainClient", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), null); + RpcClient client = RpcClientFactory.createClient("testTlsServerAndPlainClient", ConnectionType.GRPC, + Collections.singletonMap("labelKey", "labelValue"), null); RpcClient.ServerInfo serverInfo = new RpcClient.ServerInfo(); serverInfo.setServerIp("127.0.0.1"); serverInfo.setServerPort(port); Connection connection = client.connectToServer(serverInfo); ConfigPublishRequest configPublishRequest = new ConfigPublishRequest(); - + String content = UUID.randomUUID().toString(); - + configPublishRequest.setContent(content); configPublishRequest.setGroup("test-group" + increment.getAndIncrement()); configPublishRequest.setDataId("test-data" + increment.getAndIncrement()); @@ -91,19 +91,18 @@ public void test_e_TlsServerAndPlainClient() throws Exception { Response response = connection.request(configPublishRequest, TimeUnit.SECONDS.toMillis(3)); Assert.assertTrue(response.isSuccess()); connection.close(); - } - + @Test public void test_f_ServerTlsTrustAll() throws Exception { - RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); tlsConfig.setEnableTls(true); tlsConfig.setTrustAll(true); RpcClient.ServerInfo serverInfo = new RpcClient.ServerInfo(); serverInfo.setServerIp("127.0.0.1"); serverInfo.setServerPort(port); - RpcClient clientTrustAll = RpcClientFactory.createClient("testServerTlsTrustAll", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), tlsConfig); + RpcClient clientTrustAll = RpcClientFactory.createClient("testServerTlsTrustAll", ConnectionType.GRPC, + Collections.singletonMap("labelKey", "labelValue"), tlsConfig); Connection connectionTrustAll = clientTrustAll.connectToServer(serverInfo); ConfigPublishRequest configPublishRequest = new ConfigPublishRequest(); String content = UUID.randomUUID().toString(); @@ -113,25 +112,26 @@ public void test_f_ServerTlsTrustAll() throws Exception { Response response = connectionTrustAll.request(configPublishRequest, TimeUnit.SECONDS.toMillis(3)); Assert.assertTrue(response.isSuccess()); connectionTrustAll.close(); - + } - + @Test @Ignore("TODO, Fix cert expired problem") public void test_g_ServerTlsTrustCa() throws Exception { - + RpcClient.ServerInfo serverInfo = new RpcClient.ServerInfo(); serverInfo.setServerIp("127.0.0.1"); - + serverInfo.setServerPort(EnvUtil.getPort()); RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); tlsConfig.setEnableTls(true); tlsConfig.setTrustCollectionCertFile("test-ca-cert.pem"); - RpcClient clientTrustCa = RpcClientFactory.createClient("testServerTlsTrustCa", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), tlsConfig); + RpcClient clientTrustCa = RpcClientFactory.createClient("testServerTlsTrustCa", ConnectionType.GRPC, + Collections.singletonMap("labelKey", "labelValue"), tlsConfig); Connection connectionTrustCa = clientTrustCa.connectToServer(serverInfo); ConfigPublishRequest configPublishRequestCa = new ConfigPublishRequest(); String contentCa = UUID.randomUUID().toString(); - + configPublishRequestCa.setContent(contentCa); configPublishRequestCa.setGroup("test-group" + increment.getAndIncrement()); configPublishRequestCa.setDataId("test-data" + increment.getAndIncrement()); diff --git a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingCompatibilityServiceTls_ITCase.java b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingCompatibilityServiceTls_ITCase.java index 1379445f621..bb596aa6504 100644 --- a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingCompatibilityServiceTls_ITCase.java +++ b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingCompatibilityServiceTls_ITCase.java @@ -27,7 +27,7 @@ import com.alibaba.nacos.api.naming.pojo.Service; import com.alibaba.nacos.api.selector.ExpressionSelector; import com.alibaba.nacos.api.selector.NoneSelector; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; +import com.alibaba.nacos.common.remote.client.RpcConstants; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -45,43 +45,45 @@ import static com.alibaba.nacos.test.naming.NamingBase.randomDomainName; /** + * NamingCompatibilityServiceTls_ITCase. + * * @author githucheng2978. * @date . **/ @RunWith(SpringRunner.class) -@SpringBootTest(classes = Nacos.class, properties = { - "server.servlet.context-path=/nacos", - RpcServerTlsConfig.PREFIX+".enableTls=true", - RpcServerTlsConfig.PREFIX+".compatibility=true", - RpcServerTlsConfig.PREFIX+".certChainFile=test-server-cert.pem", - RpcServerTlsConfig.PREFIX+".certPrivateKey=test-server-key.pem", -}, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = Nacos.class, properties = {"server.servlet.context-path=/nacos", + RpcConstants.NACOS_SERVER_RPC + ".enableTls=true", + RpcConstants.NACOS_SERVER_RPC + ".compatibility=true", + RpcConstants.NACOS_SERVER_RPC + ".certChainFile=test-server-cert.pem", + RpcConstants.NACOS_SERVER_RPC + ".certPrivateKey=test-server-key.pem"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class NamingCompatibilityServiceTls_ITCase { - + private NamingMaintainService namingMaintainService; + private NamingService namingService; + private Instance instance; + private String serviceName; - + @LocalServerPort private int port; - + @Before public void init() throws Exception { - + NamingBase.prepareServer(port); - + if (namingMaintainService == null) { TimeUnit.SECONDS.sleep(10); namingMaintainService = NamingMaintainFactory.createMaintainService("127.0.0.1" + ":" + port); } - + if (namingService == null) { TimeUnit.SECONDS.sleep(10); namingService = NamingFactory.createNamingService("127.0.0.1" + ":" + port); } - + instance = new Instance(); instance.setIp("127.0.0.1"); instance.setPort(8081); @@ -91,11 +93,11 @@ public void init() throws Exception { map.put("netType", "external"); map.put("version", "1.0"); instance.setMetadata(map); - + serviceName = randomDomainName(); - + } - + @Test public void updateInstance() throws NacosException, InterruptedException { Map map = new HashMap(); @@ -110,7 +112,7 @@ public void updateInstance() throws NacosException, InterruptedException { Assert.assertEquals("2.0", instances.get(0).getMetadata().get("version")); System.out.println(instances.get(0)); } - + @Test public void updateInstanceWithDisable() throws NacosException, InterruptedException { Map map = new HashMap(); @@ -124,7 +126,7 @@ public void updateInstanceWithDisable() throws NacosException, InterruptedExcept List instances = namingService.getAllInstances(serviceName, false); Assert.assertEquals(0, instances.size()); } - + @Test public void createAndUpdateService() throws NacosException { String serviceName = randomDomainName(); @@ -138,13 +140,13 @@ public void createAndUpdateService() throws NacosException { preService.setMetadata(metadata); ExpressionSelector selector = new ExpressionSelector(); selector.setExpression("CONSUMER.label.A=PROVIDER.label.A &CONSUMER.label.B=PROVIDER.label.B"); - + System.out.println("service info : " + preService); namingMaintainService.createService(preService, selector); Service remoteService = namingMaintainService.queryService(serviceName); System.out.println("remote service info : " + remoteService); Assert.assertEquals(preService.toString(), remoteService.toString()); - + // update service Service nowService = new Service(); nowService.setName(serviceName); @@ -153,13 +155,13 @@ public void createAndUpdateService() throws NacosException { metadata.clear(); metadata.put(serviceName, "this is a update metadata"); nowService.setMetadata(metadata); - + namingMaintainService.updateService(nowService, new NoneSelector()); remoteService = namingMaintainService.queryService(serviceName); System.out.println("remote service info : " + remoteService); Assert.assertEquals(nowService.toString(), remoteService.toString()); } - + @Test public void deleteService() throws NacosException { String serviceName = randomDomainName(); @@ -167,7 +169,7 @@ public void deleteService() throws NacosException { preService.setName(serviceName); System.out.println("service info : " + preService); namingMaintainService.createService(preService, new NoneSelector()); - + Assert.assertTrue(namingMaintainService.deleteService(serviceName)); } diff --git a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingTlsServiceAndMutualAuth_ITCase.java b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingTlsServiceAndMutualAuth_ITCase.java index 2b598cdd294..d557fa0b933 100644 --- a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingTlsServiceAndMutualAuth_ITCase.java +++ b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingTlsServiceAndMutualAuth_ITCase.java @@ -23,7 +23,6 @@ import com.alibaba.nacos.api.naming.NamingService; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.common.remote.client.RpcConstants; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; import org.junit.After; import org.junit.Assert; import org.junit.FixMethodOrder; @@ -43,38 +42,36 @@ import static com.alibaba.nacos.test.naming.NamingBase.randomDomainName; /** + * NamingTlsServiceAndMutualAuth_ITCase. + * * @author githucheng2978. * @date . **/ @RunWith(SpringRunner.class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) -@SpringBootTest(classes = Nacos.class, properties = { - "server.servlet.context-path=/nacos", - RpcServerTlsConfig.PREFIX+".enableTls=true", - RpcServerTlsConfig.PREFIX+".mutualAuthEnable=true", - RpcServerTlsConfig.PREFIX+".compatibility=false", - RpcServerTlsConfig.PREFIX+".certChainFile=test-server-cert.pem", - RpcServerTlsConfig.PREFIX+".certPrivateKey=test-server-key.pem", - RpcServerTlsConfig.PREFIX+".trustCollectionCertFile=test-ca-cert.pem", - -}, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = Nacos.class, properties = {"server.servlet.context-path=/nacos", + RpcConstants.NACOS_SERVER_RPC + ".enableTls=true", + RpcConstants.NACOS_SERVER_RPC + ".mutualAuthEnable=true", + RpcConstants.NACOS_SERVER_RPC + ".compatibility=false", + RpcConstants.NACOS_SERVER_RPC + ".certChainFile=test-server-cert.pem", + RpcConstants.NACOS_SERVER_RPC + ".certPrivateKey=test-server-key.pem", RpcConstants.NACOS_SERVER_RPC + + ".trustCollectionCertFile=test-ca-cert.pem"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) @Ignore("TODO, Fix cert expired problem") public class NamingTlsServiceAndMutualAuth_ITCase { - - + + @LocalServerPort private int port; - + @Test public void test_a_MutualAuth() throws NacosException { String serviceName = randomDomainName(); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE,"true"); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH,"test-ca-cert.pem"); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH,"test-client-cert.pem"); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_KEY,"test-client-key.pem"); - System.setProperty(RpcConstants.RPC_CLIENT_MUTUAL_AUTH,"true"); - Instance instance = new Instance(); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE, "true"); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH, "test-ca-cert.pem"); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH, "test-client-cert.pem"); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_KEY, "test-client-key.pem"); + System.setProperty(RpcConstants.RPC_CLIENT_MUTUAL_AUTH, "true"); + Instance instance = new Instance(); instance.setIp("127.0.0.1"); instance.setPort(8081); instance.setWeight(2); @@ -94,19 +91,19 @@ public void test_a_MutualAuth() throws NacosException { Assert.assertEquals(instances.size(), 1); Assert.assertEquals("2.0", instances.get(0).getMetadata().get("version")); namingService.shutDown(); - + } - - + + @Test(expected = NacosException.class) public void test_b_MutualAuthClientTrustCa() throws NacosException { String serviceName = randomDomainName(); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE,"true"); - System.setProperty(RpcConstants.RPC_CLIENT_MUTUAL_AUTH,"true"); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH,""); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_KEY,""); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH,"test-ca-cert.pem"); - Instance instance = new Instance(); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE, "true"); + System.setProperty(RpcConstants.RPC_CLIENT_MUTUAL_AUTH, "true"); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH, ""); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_KEY, ""); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH, "test-ca-cert.pem"); + Instance instance = new Instance(); instance.setIp("127.0.0.1"); instance.setPort(8081); instance.setWeight(2); @@ -118,18 +115,18 @@ public void test_b_MutualAuthClientTrustCa() throws NacosException { instance.setMetadata(map); namingService.registerInstance(serviceName, instance); namingService.shutDown(); - + } - + @Test(expected = NacosException.class) public void test_c_MutualAuthClientTrustALl() throws NacosException { String serviceName = randomDomainName(); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE,"true"); - System.setProperty(RpcConstants.RPC_CLIENT_MUTUAL_AUTH,"true"); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH,""); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_KEY,""); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_ALL,"true"); - Instance instance = new Instance(); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE, "true"); + System.setProperty(RpcConstants.RPC_CLIENT_MUTUAL_AUTH, "true"); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH, ""); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_KEY, ""); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_ALL, "true"); + Instance instance = new Instance(); instance.setIp("127.0.0.1"); instance.setPort(8081); instance.setWeight(2); @@ -142,9 +139,9 @@ public void test_c_MutualAuthClientTrustALl() throws NacosException { namingService.registerInstance(serviceName, instance); namingService.shutDown(); } - + @After - public void after(){ - System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE,""); + public void after() { + System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE, ""); } } diff --git a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingTlsServiceTls_ITCase.java b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingTlsServiceTls_ITCase.java index 8597a1aad2b..94bca1807e5 100644 --- a/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingTlsServiceTls_ITCase.java +++ b/test/naming-test/src/test/java/com/alibaba/nacos/test/naming/NamingTlsServiceTls_ITCase.java @@ -23,7 +23,6 @@ import com.alibaba.nacos.api.naming.NamingService; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.common.remote.client.RpcConstants; -import com.alibaba.nacos.core.remote.tls.RpcServerTlsConfig; import org.junit.Assert; import org.junit.FixMethodOrder; import org.junit.Ignore; @@ -42,30 +41,29 @@ import static com.alibaba.nacos.test.naming.NamingBase.randomDomainName; /** + * NamingTlsServiceTls_ITCase. + * * @author githucheng2978. * @date . **/ @RunWith(SpringRunner.class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) -@SpringBootTest(classes = Nacos.class, properties = { - "server.servlet.context-path=/nacos", - RpcServerTlsConfig.PREFIX+".enableTls=true", - RpcServerTlsConfig.PREFIX+".compatibility=false", - RpcServerTlsConfig.PREFIX+".certChainFile=test-server-cert.pem", - RpcServerTlsConfig.PREFIX+".certPrivateKey=test-server-key.pem", -}, - webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = Nacos.class, properties = {"server.servlet.context-path=/nacos", + RpcConstants.NACOS_SERVER_RPC + ".enableTls=true", + RpcConstants.NACOS_SERVER_RPC + ".compatibility=false", + RpcConstants.NACOS_SERVER_RPC + ".certChainFile=test-server-cert.pem", RpcConstants.NACOS_SERVER_RPC + + ".certPrivateKey=test-server-key.pem"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) @Ignore("TODO, Fix cert expired problem") public class NamingTlsServiceTls_ITCase { - - + + @LocalServerPort private int port; - + @Test(expected = NacosException.class) public void Tls_a_ServerAndPlainClient() throws NacosException { - - Instance instance = new Instance(); + + Instance instance = new Instance(); instance.setIp("127.0.0.1"); instance.setPort(8081); instance.setWeight(2); @@ -76,20 +74,20 @@ public void Tls_a_ServerAndPlainClient() throws NacosException { map.put("version", "2.0"); namingService.registerInstance(randomDomainName(), instance); namingService.shutDown(); - + } - + @Test public void Tls_b_ServerAndTlsClientTrustCa() throws NacosException { String serviceName = randomDomainName(); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE,"true"); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH,"test-ca-cert.pem"); - Instance instance = new Instance(); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE, "true"); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH, "test-ca-cert.pem"); + Instance instance = new Instance(); instance.setIp("127.0.0.1"); instance.setPort(8081); instance.setWeight(2); instance.setClusterName(Constants.DEFAULT_CLUSTER_NAME); - NamingService namingService = NamingFactory.createNamingService("127.0.0.1" + ":" + port); + NamingService namingService = NamingFactory.createNamingService("127.0.0.1" + ":" + port); Map map = new HashMap(); map.put("netType", "external-update"); map.put("version", "2.0"); @@ -105,20 +103,20 @@ public void Tls_b_ServerAndTlsClientTrustCa() throws NacosException { Assert.assertEquals(instances.size(), 1); Assert.assertEquals("2.0", instances.get(0).getMetadata().get("version")); namingService.shutDown(); - + } - + @Test public void Tls_c_ServerAndTlsClientAll() throws NacosException { String serviceName = randomDomainName(); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE,"true"); - System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_ALL,"true"); - Instance instance = new Instance(); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE, "true"); + System.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_ALL, "true"); + Instance instance = new Instance(); instance.setIp("127.0.0.1"); instance.setPort(8081); instance.setWeight(2); instance.setClusterName(Constants.DEFAULT_CLUSTER_NAME); - NamingService namingService = NamingFactory.createNamingService("127.0.0.1" + ":" + port); + NamingService namingService = NamingFactory.createNamingService("127.0.0.1" + ":" + port); Map map = new HashMap(); map.put("netType", "external-update"); map.put("version", "2.0"); From 67b672251e540ee7c7e4b5c6f9b965abe6a04dbd Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Thu, 16 May 2024 09:40:12 +0800 Subject: [PATCH 017/110] upgrade module naocs-sys from junit4 to junit5 (#12107) --- .../sys/env/EnvModuleStateBuilderTest.java | 18 +-- .../nacos/sys/env/EnvUtilWithConfigTest.java | 18 +-- .../sys/env/EnvUtilWithoutConfigTest.java | 18 +-- .../sys/module/ModuleStateHolderTest.java | 36 ++--- .../nacos/sys/utils/DiskUtilsTest.java | 134 +++++++++--------- .../nacos/sys/utils/InetUtilsTest.java | 39 ++--- .../nacos/sys/utils/MethodUtilTest.java | 20 +-- .../nacos/sys/utils/PropertiesUtilTest.java | 12 +- 8 files changed, 152 insertions(+), 143 deletions(-) diff --git a/sys/src/test/java/com/alibaba/nacos/sys/env/EnvModuleStateBuilderTest.java b/sys/src/test/java/com/alibaba/nacos/sys/env/EnvModuleStateBuilderTest.java index 8c0bd3c5856..cd9a43e7a27 100644 --- a/sys/src/test/java/com/alibaba/nacos/sys/env/EnvModuleStateBuilderTest.java +++ b/sys/src/test/java/com/alibaba/nacos/sys/env/EnvModuleStateBuilderTest.java @@ -18,20 +18,20 @@ import com.alibaba.nacos.common.utils.VersionUtils; import com.alibaba.nacos.sys.module.ModuleState; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.mock.env.MockEnvironment; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class EnvModuleStateBuilderTest { +class EnvModuleStateBuilderTest { private static ConfigurableEnvironment environment; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { environment = new MockEnvironment(); EnvUtil.setEnvironment(environment); System.setProperty(Constants.STANDALONE_MODE_PROPERTY_NAME, "true"); @@ -39,11 +39,11 @@ public static void setUp() throws Exception { } @Test - public void testBuild() { + void testBuild() { ModuleState actual = new EnvModuleStateBuilder().build(); assertEquals(Constants.SYS_MODULE, actual.getModuleName()); assertEquals(EnvUtil.STANDALONE_MODE_ALONE, actual.getStates().get(Constants.STARTUP_MODE_STATE)); - assertNull(EnvUtil.FUNCTION_MODE_NAMING, actual.getStates().get(Constants.FUNCTION_MODE_STATE)); + assertNull(actual.getStates().get(Constants.FUNCTION_MODE_STATE), EnvUtil.FUNCTION_MODE_NAMING); assertEquals(VersionUtils.version, actual.getStates().get(Constants.NACOS_VERSION)); } } diff --git a/sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilWithConfigTest.java b/sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilWithConfigTest.java index cdc91b89807..c247773a2ad 100644 --- a/sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilWithConfigTest.java +++ b/sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilWithConfigTest.java @@ -16,8 +16,8 @@ package com.alibaba.nacos.sys.env; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @@ -26,37 +26,37 @@ import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; @RunWith(SpringRunner.class) @ActiveProfiles("test") @SpringBootTest(classes = EnvUtilWithConfigTest.class) -public class EnvUtilWithConfigTest { +class EnvUtilWithConfigTest { private static final int SETTING_PROCESSORS = 10; @Autowired private Environment environment; - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment((ConfigurableEnvironment) environment); } @Test - public void testGetAvailableProcessors() { + void testGetAvailableProcessors() { int actual = EnvUtil.getAvailableProcessors(); assertEquals(SETTING_PROCESSORS, actual); } @Test - public void testGetAvailableProcessorsWithMultiple() { + void testGetAvailableProcessorsWithMultiple() { int actual = EnvUtil.getAvailableProcessors(2); assertEquals(SETTING_PROCESSORS * 2, actual); } @Test - public void testGetAvailableProcessorsWithScale() { + void testGetAvailableProcessorsWithScale() { int actual = EnvUtil.getAvailableProcessors(0.5); assertEquals((int) (SETTING_PROCESSORS * 0.5), actual); } diff --git a/sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilWithoutConfigTest.java b/sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilWithoutConfigTest.java index b0859fc1499..65bbbc18c68 100644 --- a/sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilWithoutConfigTest.java +++ b/sys/src/test/java/com/alibaba/nacos/sys/env/EnvUtilWithoutConfigTest.java @@ -17,8 +17,8 @@ package com.alibaba.nacos.sys.env; import com.alibaba.nacos.common.utils.ThreadUtils; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @@ -27,37 +27,37 @@ import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; @RunWith(SpringRunner.class) @ActiveProfiles("empty") @SpringBootTest(classes = EnvUtilWithConfigTest.class) -public class EnvUtilWithoutConfigTest { +class EnvUtilWithoutConfigTest { @Autowired private Environment environment; - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment((ConfigurableEnvironment) environment); } @Test - public void testGetAvailableProcessors() { + void testGetAvailableProcessors() { int expected = ThreadUtils.getSuitableThreadCount(1); int actual = EnvUtil.getAvailableProcessors(); assertEquals(expected, actual); } @Test - public void testGetAvailableProcessorsWithMultiple() { + void testGetAvailableProcessorsWithMultiple() { int expected = ThreadUtils.getSuitableThreadCount(2); int actual = EnvUtil.getAvailableProcessors(2); assertEquals(expected, actual); } @Test - public void testGetAvailableProcessorsWithScale() { + void testGetAvailableProcessorsWithScale() { int expected = ThreadUtils.getSuitableThreadCount(1); int actual = EnvUtil.getAvailableProcessors(0.5); assertEquals((int) (expected * 0.5), actual); diff --git a/sys/src/test/java/com/alibaba/nacos/sys/module/ModuleStateHolderTest.java b/sys/src/test/java/com/alibaba/nacos/sys/module/ModuleStateHolderTest.java index c7fe2b0c076..eb716ee9442 100644 --- a/sys/src/test/java/com/alibaba/nacos/sys/module/ModuleStateHolderTest.java +++ b/sys/src/test/java/com/alibaba/nacos/sys/module/ModuleStateHolderTest.java @@ -17,66 +17,66 @@ package com.alibaba.nacos.sys.module; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.mock.env.MockEnvironment; import org.springframework.test.util.ReflectionTestUtils; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; -public class ModuleStateHolderTest { +class ModuleStateHolderTest { private Map moduleStateMap; private ConfigurableEnvironment environment; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { environment = new MockEnvironment(); EnvUtil.setEnvironment(environment); - moduleStateMap = (Map) ReflectionTestUtils - .getField(ModuleStateHolder.getInstance(), ModuleStateHolder.class, "moduleStates"); + moduleStateMap = (Map) ReflectionTestUtils.getField(ModuleStateHolder.getInstance(), + ModuleStateHolder.class, "moduleStates"); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { } @Test - public void testGetModuleState() { + void testGetModuleState() { assertNotNull(ModuleStateHolder.getInstance().getModuleState("mock")); } @Test - public void testGetAllModuleStates() { + void testGetAllModuleStates() { assertEquals(2, ModuleStateHolder.getInstance().getAllModuleStates().size()); } @Test - public void testGetStateValueByNameFound() { + void testGetStateValueByNameFound() { assertEquals("test", ModuleStateHolder.getInstance().getStateValueByName("mock", "test")); assertEquals("test", ModuleStateHolder.getInstance().getStateValueByName("mock", "test", "aaa")); } @Test - public void testGetStateValueByNameWithoutModuleState() { + void testGetStateValueByNameWithoutModuleState() { assertEquals("", ModuleStateHolder.getInstance().getStateValueByName("non-exist", "test")); assertEquals("aaa", ModuleStateHolder.getInstance().getStateValueByName("non-exist", "test", "aaa")); } @Test - public void testGetStateValueByNameWithoutStateName() { + void testGetStateValueByNameWithoutStateName() { assertEquals("", ModuleStateHolder.getInstance().getStateValueByName("mock", "non-exist")); assertEquals("aaa", ModuleStateHolder.getInstance().getStateValueByName("mock", "non-exist", "aaa")); } @Test - public void testSearchStateValue() { + void testSearchStateValue() { assertEquals("test", ModuleStateHolder.getInstance().searchStateValue("test", "aaa")); assertEquals("aaa", ModuleStateHolder.getInstance().searchStateValue("non-exist", "aaa")); } diff --git a/sys/src/test/java/com/alibaba/nacos/sys/utils/DiskUtilsTest.java b/sys/src/test/java/com/alibaba/nacos/sys/utils/DiskUtilsTest.java index 882ccf85de3..261049b0993 100644 --- a/sys/src/test/java/com/alibaba/nacos/sys/utils/DiskUtilsTest.java +++ b/sys/src/test/java/com/alibaba/nacos/sys/utils/DiskUtilsTest.java @@ -17,10 +17,9 @@ package com.alibaba.nacos.sys.utils; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import java.io.File; import java.io.FileInputStream; @@ -31,45 +30,50 @@ import java.nio.file.Paths; import java.util.UUID; -public class DiskUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class DiskUtilsTest { private static File testFile; - @BeforeClass - public static void setup() throws IOException { + @BeforeAll + static void setup() throws IOException { testFile = DiskUtils.createTmpFile("nacostmp", ".ut"); } - @AfterClass - public static void tearDown() throws IOException { + @AfterAll + static void tearDown() throws IOException { testFile.deleteOnExit(); } @Test - public void testTouch() throws IOException { + void testTouch() throws IOException { File file = Paths.get(EnvUtil.getNacosTmpDir(), "touch.ut").toFile(); - Assert.assertFalse(file.exists()); + assertFalse(file.exists()); DiskUtils.touch(file); - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); file.deleteOnExit(); } @Test - public void testTouchWithFileName() throws IOException { + void testTouchWithFileName() throws IOException { File file = Paths.get(EnvUtil.getNacosTmpDir(), UUID.randomUUID().toString()).toFile(); - Assert.assertFalse(file.exists()); + assertFalse(file.exists()); DiskUtils.touch(file.getParent(), file.getName()); - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); file.deleteOnExit(); } @Test - public void testCreateTmpFile() throws IOException { + void testCreateTmpFile() throws IOException { File tmpFile = null; try { tmpFile = DiskUtils.createTmpFile("nacos1", ".ut"); - Assert.assertTrue(tmpFile.getName().startsWith("nacos1")); - Assert.assertTrue(tmpFile.getName().endsWith(".ut")); + assertTrue(tmpFile.getName().startsWith("nacos1")); + assertTrue(tmpFile.getName().endsWith(".ut")); } finally { if (tmpFile != null) { tmpFile.deleteOnExit(); @@ -78,13 +82,13 @@ public void testCreateTmpFile() throws IOException { } @Test - public void testCreateTmpFileWithPath() throws IOException { + void testCreateTmpFileWithPath() throws IOException { File tmpFile = null; try { tmpFile = DiskUtils.createTmpFile(EnvUtil.getNacosTmpDir(), "nacos1", ".ut"); - Assert.assertEquals(EnvUtil.getNacosTmpDir(), tmpFile.getParent()); - Assert.assertTrue(tmpFile.getName().startsWith("nacos1")); - Assert.assertTrue(tmpFile.getName().endsWith(".ut")); + assertEquals(EnvUtil.getNacosTmpDir(), tmpFile.getParent()); + assertTrue(tmpFile.getName().startsWith("nacos1")); + assertTrue(tmpFile.getName().endsWith(".ut")); } finally { if (tmpFile != null) { tmpFile.deleteOnExit(); @@ -93,94 +97,94 @@ public void testCreateTmpFileWithPath() throws IOException { } @Test - public void testReadFile() { - Assert.assertNotNull(DiskUtils.readFile(testFile)); + void testReadFile() { + assertNotNull(DiskUtils.readFile(testFile)); } @Test - public void testReadFileWithInputStream() throws FileNotFoundException { - Assert.assertNotNull(DiskUtils.readFile(new FileInputStream(testFile))); + void testReadFileWithInputStream() throws FileNotFoundException { + assertNotNull(DiskUtils.readFile(new FileInputStream(testFile))); } @Test - public void testReadFileWithPath() { - Assert.assertNotNull(DiskUtils.readFile(testFile.getParent(), testFile.getName())); + void testReadFileWithPath() { + assertNotNull(DiskUtils.readFile(testFile.getParent(), testFile.getName())); } @Test - public void testReadFileBytes() { - Assert.assertNotNull(DiskUtils.readFileBytes(testFile)); + void testReadFileBytes() { + assertNotNull(DiskUtils.readFileBytes(testFile)); } @Test - public void testReadFileBytesWithPath() { - Assert.assertNotNull(DiskUtils.readFileBytes(testFile.getParent(), testFile.getName())); + void testReadFileBytesWithPath() { + assertNotNull(DiskUtils.readFileBytes(testFile.getParent(), testFile.getName())); } @Test - public void writeFile() { - Assert.assertTrue(DiskUtils.writeFile(testFile, "unit test".getBytes(StandardCharsets.UTF_8), false)); - Assert.assertEquals("unit test", DiskUtils.readFile(testFile)); + void writeFile() { + assertTrue(DiskUtils.writeFile(testFile, "unit test".getBytes(StandardCharsets.UTF_8), false)); + assertEquals("unit test", DiskUtils.readFile(testFile)); } @Test - public void deleteQuietly() throws IOException { + void deleteQuietly() throws IOException { File tmpFile = DiskUtils.createTmpFile(UUID.randomUUID().toString(), ".ut"); DiskUtils.deleteQuietly(tmpFile); - Assert.assertFalse(tmpFile.exists()); + assertFalse(tmpFile.exists()); } @Test - public void testDeleteQuietlyWithPath() throws IOException { + void testDeleteQuietlyWithPath() throws IOException { String dir = EnvUtil.getNacosTmpDir() + "/" + "diskutils"; DiskUtils.forceMkdir(dir); DiskUtils.createTmpFile(dir, "nacos", ".ut"); Path path = Paths.get(dir); DiskUtils.deleteQuietly(path); - Assert.assertFalse(path.toFile().exists()); + assertFalse(path.toFile().exists()); } @Test - public void testDeleteFile() throws IOException { + void testDeleteFile() throws IOException { File tmpFile = DiskUtils.createTmpFile(UUID.randomUUID().toString(), ".ut"); - Assert.assertTrue(DiskUtils.deleteFile(tmpFile.getParent(), tmpFile.getName())); - Assert.assertFalse(DiskUtils.deleteFile(tmpFile.getParent(), tmpFile.getName())); + assertTrue(DiskUtils.deleteFile(tmpFile.getParent(), tmpFile.getName())); + assertFalse(DiskUtils.deleteFile(tmpFile.getParent(), tmpFile.getName())); } @Test - public void deleteDirectory() throws IOException { + void deleteDirectory() throws IOException { Path diskutils = Paths.get(EnvUtil.getNacosTmpDir(), "diskutils"); File file = diskutils.toFile(); if (!file.exists()) { file.mkdir(); } - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); DiskUtils.deleteDirectory(diskutils.toString()); - Assert.assertFalse(file.exists()); + assertFalse(file.exists()); } @Test - public void testForceMkdir() throws IOException { + void testForceMkdir() throws IOException { File dir = Paths.get(EnvUtil.getNacosTmpDir(), UUID.randomUUID().toString(), UUID.randomUUID().toString()) .toFile(); DiskUtils.forceMkdir(dir); - Assert.assertTrue(dir.exists()); + assertTrue(dir.exists()); dir.deleteOnExit(); } @Test - public void testForceMkdirWithPath() throws IOException { + void testForceMkdirWithPath() throws IOException { Path path = Paths.get(EnvUtil.getNacosTmpDir(), UUID.randomUUID().toString(), UUID.randomUUID().toString()); DiskUtils.forceMkdir(path.toString()); File file = path.toFile(); - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); file.deleteOnExit(); } @Test - public void deleteDirThenMkdir() throws IOException { + void deleteDirThenMkdir() throws IOException { Path path = Paths.get(EnvUtil.getNacosTmpDir(), UUID.randomUUID().toString()); DiskUtils.forceMkdir(path.toString()); @@ -190,15 +194,15 @@ public void deleteDirThenMkdir() throws IOException { DiskUtils.deleteDirThenMkdir(path.toString()); File file = path.toFile(); - Assert.assertTrue(file.exists()); - Assert.assertTrue(file.isDirectory()); - Assert.assertTrue(file.list() == null || file.list().length == 0); + assertTrue(file.exists()); + assertTrue(file.isDirectory()); + assertTrue(file.list() == null || file.list().length == 0); file.deleteOnExit(); } @Test - public void testCopyDirectory() throws IOException { + void testCopyDirectory() throws IOException { Path srcPath = Paths.get(EnvUtil.getNacosTmpDir(), UUID.randomUUID().toString()); DiskUtils.forceMkdir(srcPath.toString()); File nacos = DiskUtils.createTmpFile(srcPath.toString(), "nacos", ".ut"); @@ -207,36 +211,36 @@ public void testCopyDirectory() throws IOException { DiskUtils.copyDirectory(srcPath.toFile(), destPath.toFile()); File file = Paths.get(destPath.toString(), nacos.getName()).toFile(); - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); DiskUtils.deleteDirectory(srcPath.toString()); DiskUtils.deleteDirectory(destPath.toString()); } @Test - public void testCopyFile() throws IOException { + void testCopyFile() throws IOException { File nacos = DiskUtils.createTmpFile("nacos", ".ut"); DiskUtils.copyFile(testFile, nacos); - Assert.assertEquals(DiskUtils.readFile(testFile), DiskUtils.readFile(nacos)); + assertEquals(DiskUtils.readFile(testFile), DiskUtils.readFile(nacos)); nacos.deleteOnExit(); } @Test - public void openFile() { + void openFile() { File file = DiskUtils.openFile(testFile.getParent(), testFile.getName()); - Assert.assertNotNull(file); - Assert.assertEquals(testFile.getPath(), file.getPath()); - Assert.assertEquals(testFile.getName(), file.getName()); + assertNotNull(file); + assertEquals(testFile.getPath(), file.getPath()); + assertEquals(testFile.getName(), file.getName()); } @Test - public void testOpenFileWithPath() { + void testOpenFileWithPath() { File file = DiskUtils.openFile(testFile.getParent(), testFile.getName(), false); - Assert.assertNotNull(file); - Assert.assertEquals(testFile.getPath(), file.getPath()); - Assert.assertEquals(testFile.getName(), file.getName()); + assertNotNull(file); + assertEquals(testFile.getPath(), file.getPath()); + assertEquals(testFile.getName(), file.getName()); } } diff --git a/sys/src/test/java/com/alibaba/nacos/sys/utils/InetUtilsTest.java b/sys/src/test/java/com/alibaba/nacos/sys/utils/InetUtilsTest.java index db1ec145d6c..c07fab52491 100644 --- a/sys/src/test/java/com/alibaba/nacos/sys/utils/InetUtilsTest.java +++ b/sys/src/test/java/com/alibaba/nacos/sys/utils/InetUtilsTest.java @@ -19,53 +19,56 @@ import com.alibaba.nacos.common.utils.StringUtils; import com.alibaba.nacos.sys.env.Constants; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.mock.env.MockEnvironment; import java.net.InetAddress; import java.util.concurrent.TimeUnit; import static com.alibaba.nacos.sys.env.Constants.NACOS_SERVER_IP; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class InetUtilsTest { +class InetUtilsTest { - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new MockEnvironment()); System.setProperty(NACOS_SERVER_IP, "1.1.1.1"); System.setProperty(Constants.AUTO_REFRESH_TIME, "100"); } @Test - public void testRefreshIp() throws InterruptedException { - Assert.assertEquals("1.1.1.1", InetUtils.getSelfIP()); + void testRefreshIp() throws InterruptedException { + assertEquals("1.1.1.1", InetUtils.getSelfIP()); System.setProperty(NACOS_SERVER_IP, "1.1.1.2"); TimeUnit.MILLISECONDS.sleep(300L); - - Assert.assertTrue(StringUtils.equalsIgnoreCase(InetUtils.getSelfIP(), "1.1.1.2")); + + assertTrue(StringUtils.equalsIgnoreCase(InetUtils.getSelfIP(), "1.1.1.2")); } - @After - public void tearDown() { + @AfterEach + void tearDown() { System.clearProperty(NACOS_SERVER_IP); System.clearProperty(Constants.AUTO_REFRESH_TIME); } @Test - public void getSelfIP() { - Assert.assertNotNull(InetUtils.getSelfIP()); + void getSelfIP() { + assertNotNull(InetUtils.getSelfIP()); } @Test - public void findFirstNonLoopbackAddress() { + void findFirstNonLoopbackAddress() { InetAddress address = InetUtils.findFirstNonLoopbackAddress(); - Assert.assertNotNull(address); - Assert.assertFalse(address.isLoopbackAddress()); + assertNotNull(address); + assertFalse(address.isLoopbackAddress()); } } diff --git a/sys/src/test/java/com/alibaba/nacos/sys/utils/MethodUtilTest.java b/sys/src/test/java/com/alibaba/nacos/sys/utils/MethodUtilTest.java index 52cbcbb2127..c851fefeec5 100644 --- a/sys/src/test/java/com/alibaba/nacos/sys/utils/MethodUtilTest.java +++ b/sys/src/test/java/com/alibaba/nacos/sys/utils/MethodUtilTest.java @@ -16,12 +16,14 @@ package com.alibaba.nacos.sys.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.lang.reflect.Method; -public class MethodUtilTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +class MethodUtilTest { private static final Method DOUBLE_METHOD; @@ -37,18 +39,18 @@ public class MethodUtilTest { } @Test - public void invokeAndReturnDouble() { + void invokeAndReturnDouble() { InternalMethod internalMethod = new InternalMethod(); - Assert.assertNotEquals(Double.NaN, MethodUtil.invokeAndReturnDouble(DOUBLE_METHOD, internalMethod), 0.000001d); + assertNotEquals(Double.NaN, MethodUtil.invokeAndReturnDouble(DOUBLE_METHOD, internalMethod), 0.000001d); - Assert.assertEquals(Double.NaN, MethodUtil.invokeAndReturnDouble(LONG_METHOD, internalMethod), 0.000001d); + assertEquals(Double.NaN, MethodUtil.invokeAndReturnDouble(LONG_METHOD, internalMethod), 0.000001d); } @Test - public void invokeAndReturnLong() { + void invokeAndReturnLong() { InternalMethod internalMethod = new InternalMethod(); - Assert.assertEquals(100L, MethodUtil.invokeAndReturnLong(LONG_METHOD, internalMethod)); - Assert.assertNotEquals(100L, MethodUtil.invokeAndReturnLong(DOUBLE_METHOD, internalMethod)); + assertEquals(100L, MethodUtil.invokeAndReturnLong(LONG_METHOD, internalMethod)); + assertNotEquals(100L, MethodUtil.invokeAndReturnLong(DOUBLE_METHOD, internalMethod)); } public static class InternalMethod { diff --git a/sys/src/test/java/com/alibaba/nacos/sys/utils/PropertiesUtilTest.java b/sys/src/test/java/com/alibaba/nacos/sys/utils/PropertiesUtilTest.java index 895e67b9d5e..78be84b5a65 100644 --- a/sys/src/test/java/com/alibaba/nacos/sys/utils/PropertiesUtilTest.java +++ b/sys/src/test/java/com/alibaba/nacos/sys/utils/PropertiesUtilTest.java @@ -16,7 +16,7 @@ package com.alibaba.nacos.sys.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @@ -27,19 +27,19 @@ import java.util.Map; import java.util.Properties; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; @RunWith(SpringRunner.class) @ActiveProfiles("prefix") @SpringBootTest(classes = PropertiesUtilTest.class) -public class PropertiesUtilTest { +class PropertiesUtilTest { @Autowired private ConfigurableEnvironment environment; @Test @SuppressWarnings("unchecked") - public void testGetPropertiesWithPrefixForMap() { + void testGetPropertiesWithPrefixForMap() { Map actual = PropertiesUtil.getPropertiesWithPrefixForMap(environment, "nacos.prefix"); assertEquals(3, actual.size()); for (Map.Entry entry : actual.entrySet()) { @@ -62,13 +62,13 @@ public void testGetPropertiesWithPrefixForMap() { } @Test - public void testGetPropertiesWithPrefix() { + void testGetPropertiesWithPrefix() { Properties actual = PropertiesUtil.getPropertiesWithPrefix(environment, "nacos.prefix"); assertEquals(3, actual.size()); } @Test - public void testHandleSpringBinder() { + void testHandleSpringBinder() { Map properties = PropertiesUtil.handleSpringBinder(environment, "nacos.prefix", Map.class); assertEquals(3, properties.size()); } From dc0e46e9f99f6aff3951365e0a96fbca56d95f87 Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Thu, 16 May 2024 09:41:05 +0800 Subject: [PATCH 018/110] upgrade module naocs-auth from junit4 to junit5 (#12105) --- .../auth/GrpcProtocolAuthServiceTest.java | 58 ++++++++--------- .../auth/HttpProtocolAuthServiceTest.java | 62 +++++++++--------- .../nacos/auth/config/AuthConfigsTest.java | 14 ++-- .../config/AuthModuleStateBuilderTest.java | 28 ++++---- .../GrpcIdentityContextBuilderTest.java | 30 +++++---- .../HtppIdentityContextBuilderTest.java | 32 ++++++---- .../auth/mock/MockAuthPluginService.java | 6 +- .../grpc/ConfigGrpcResourceParserTest.java | 24 +++---- .../grpc/NamingGrpcResourceParserTest.java | 64 +++++++++---------- .../http/ConfigHttpResourceParserTest.java | 33 +++++----- .../http/NamingHttpResourceParserTest.java | 41 ++++++------ 11 files changed, 205 insertions(+), 187 deletions(-) diff --git a/auth/src/test/java/com/alibaba/nacos/auth/GrpcProtocolAuthServiceTest.java b/auth/src/test/java/com/alibaba/nacos/auth/GrpcProtocolAuthServiceTest.java index db48142058c..490fb6132c7 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/GrpcProtocolAuthServiceTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/GrpcProtocolAuthServiceTest.java @@ -19,30 +19,30 @@ import com.alibaba.nacos.api.config.remote.request.ConfigPublishRequest; import com.alibaba.nacos.api.naming.remote.request.AbstractNamingRequest; import com.alibaba.nacos.auth.annotation.Secured; +import com.alibaba.nacos.auth.config.AuthConfigs; +import com.alibaba.nacos.auth.mock.MockAuthPluginService; import com.alibaba.nacos.plugin.auth.api.IdentityContext; import com.alibaba.nacos.plugin.auth.api.Permission; import com.alibaba.nacos.plugin.auth.api.Resource; -import com.alibaba.nacos.auth.config.AuthConfigs; import com.alibaba.nacos.plugin.auth.constant.SignType; import com.alibaba.nacos.plugin.auth.exception.AccessException; -import com.alibaba.nacos.auth.mock.MockAuthPluginService; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Method; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(MockitoJUnitRunner.class) -public class GrpcProtocolAuthServiceTest { +@ExtendWith(MockitoExtension.class) +class GrpcProtocolAuthServiceTest { @Mock private AuthConfigs authConfigs; @@ -53,8 +53,8 @@ public class GrpcProtocolAuthServiceTest { private GrpcProtocolAuthService protocolAuthService; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { protocolAuthService = new GrpcProtocolAuthService(authConfigs); protocolAuthService.initialize(); mockConfigRequest(); @@ -78,7 +78,7 @@ private void mockNamingRequest() { @Test @Secured(resource = "testResource") - public void testParseResourceWithSpecifiedResource() throws NoSuchMethodException { + void testParseResourceWithSpecifiedResource() throws NoSuchMethodException { Secured secured = getMethodSecure("testParseResourceWithSpecifiedResource"); Resource actual = protocolAuthService.parseResource(namingRequest, secured); assertEquals("testResource", actual.getName()); @@ -90,7 +90,7 @@ public void testParseResourceWithSpecifiedResource() throws NoSuchMethodExceptio @Test @Secured(signType = "non-exist") - public void testParseResourceWithNonExistType() throws NoSuchMethodException { + void testParseResourceWithNonExistType() throws NoSuchMethodException { Secured secured = getMethodSecure("testParseResourceWithNonExistType"); Resource actual = protocolAuthService.parseResource(namingRequest, secured); assertEquals(Resource.EMPTY_RESOURCE, actual); @@ -98,7 +98,7 @@ public void testParseResourceWithNonExistType() throws NoSuchMethodException { @Test @Secured() - public void testParseResourceWithNamingType() throws NoSuchMethodException { + void testParseResourceWithNamingType() throws NoSuchMethodException { Secured secured = getMethodSecure("testParseResourceWithNamingType"); Resource actual = protocolAuthService.parseResource(namingRequest, secured); assertEquals(SignType.NAMING, actual.getType()); @@ -110,7 +110,7 @@ public void testParseResourceWithNamingType() throws NoSuchMethodException { @Test @Secured(signType = SignType.CONFIG) - public void testParseResourceWithConfigType() throws NoSuchMethodException { + void testParseResourceWithConfigType() throws NoSuchMethodException { Secured secured = getMethodSecure("testParseResourceWithConfigType"); Resource actual = protocolAuthService.parseResource(configRequest, secured); assertEquals(SignType.CONFIG, actual.getType()); @@ -121,39 +121,39 @@ public void testParseResourceWithConfigType() throws NoSuchMethodException { } @Test - public void testParseIdentity() { + void testParseIdentity() { IdentityContext actual = protocolAuthService.parseIdentity(namingRequest); assertNotNull(actual); } @Test - public void testValidateIdentityWithoutPlugin() throws AccessException { + void testValidateIdentityWithoutPlugin() throws AccessException { IdentityContext identityContext = new IdentityContext(); assertTrue(protocolAuthService.validateIdentity(identityContext, Resource.EMPTY_RESOURCE)); } @Test - public void testValidateIdentityWithPlugin() throws AccessException { + void testValidateIdentityWithPlugin() throws AccessException { Mockito.when(authConfigs.getNacosAuthSystemType()).thenReturn(MockAuthPluginService.TEST_PLUGIN); IdentityContext identityContext = new IdentityContext(); assertFalse(protocolAuthService.validateIdentity(identityContext, Resource.EMPTY_RESOURCE)); } @Test - public void testValidateAuthorityWithoutPlugin() throws AccessException { - assertTrue(protocolAuthService - .validateAuthority(new IdentityContext(), new Permission(Resource.EMPTY_RESOURCE, ""))); + void testValidateAuthorityWithoutPlugin() throws AccessException { + assertTrue(protocolAuthService.validateAuthority(new IdentityContext(), + new Permission(Resource.EMPTY_RESOURCE, ""))); } @Test - public void testValidateAuthorityWithPlugin() throws AccessException { + void testValidateAuthorityWithPlugin() throws AccessException { Mockito.when(authConfigs.getNacosAuthSystemType()).thenReturn(MockAuthPluginService.TEST_PLUGIN); - assertFalse(protocolAuthService - .validateAuthority(new IdentityContext(), new Permission(Resource.EMPTY_RESOURCE, ""))); + assertFalse(protocolAuthService.validateAuthority(new IdentityContext(), + new Permission(Resource.EMPTY_RESOURCE, ""))); } private Secured getMethodSecure(String methodName) throws NoSuchMethodException { - Method method = GrpcProtocolAuthServiceTest.class.getMethod(methodName); + Method method = GrpcProtocolAuthServiceTest.class.getDeclaredMethod(methodName); return method.getAnnotation(Secured.class); } } diff --git a/auth/src/test/java/com/alibaba/nacos/auth/HttpProtocolAuthServiceTest.java b/auth/src/test/java/com/alibaba/nacos/auth/HttpProtocolAuthServiceTest.java index 27bbf613046..a07048e5dc8 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/HttpProtocolAuthServiceTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/HttpProtocolAuthServiceTest.java @@ -19,32 +19,36 @@ import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.naming.CommonParams; import com.alibaba.nacos.auth.annotation.Secured; +import com.alibaba.nacos.auth.config.AuthConfigs; +import com.alibaba.nacos.auth.mock.MockAuthPluginService; import com.alibaba.nacos.plugin.auth.api.IdentityContext; import com.alibaba.nacos.plugin.auth.api.Permission; import com.alibaba.nacos.plugin.auth.api.Resource; -import com.alibaba.nacos.auth.config.AuthConfigs; import com.alibaba.nacos.plugin.auth.constant.SignType; import com.alibaba.nacos.plugin.auth.exception.AccessException; -import com.alibaba.nacos.auth.mock.MockAuthPluginService; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import javax.servlet.http.HttpServletRequest; import java.lang.reflect.Method; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; -@RunWith(MockitoJUnitRunner.class) -public class HttpProtocolAuthServiceTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class HttpProtocolAuthServiceTest { @Mock private AuthConfigs authConfigs; @@ -54,8 +58,8 @@ public class HttpProtocolAuthServiceTest { private HttpProtocolAuthService httpProtocolAuthService; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { httpProtocolAuthService = new HttpProtocolAuthService(authConfigs); httpProtocolAuthService.initialize(); Mockito.when(request.getParameter(eq(CommonParams.NAMESPACE_ID))).thenReturn("testNNs"); @@ -68,7 +72,7 @@ public void setUp() throws Exception { @Test @Secured(resource = "testResource") - public void testParseResourceWithSpecifiedResource() throws NoSuchMethodException { + void testParseResourceWithSpecifiedResource() throws NoSuchMethodException { Secured secured = getMethodSecure("testParseResourceWithSpecifiedResource"); Resource actual = httpProtocolAuthService.parseResource(request, secured); assertEquals("testResource", actual.getName()); @@ -80,7 +84,7 @@ public void testParseResourceWithSpecifiedResource() throws NoSuchMethodExceptio @Test @Secured(signType = "non-exist") - public void testParseResourceWithNonExistType() throws NoSuchMethodException { + void testParseResourceWithNonExistType() throws NoSuchMethodException { Secured secured = getMethodSecure("testParseResourceWithNonExistType"); Resource actual = httpProtocolAuthService.parseResource(request, secured); assertEquals(Resource.EMPTY_RESOURCE, actual); @@ -88,7 +92,7 @@ public void testParseResourceWithNonExistType() throws NoSuchMethodException { @Test @Secured() - public void testParseResourceWithNamingType() throws NoSuchMethodException { + void testParseResourceWithNamingType() throws NoSuchMethodException { Secured secured = getMethodSecure("testParseResourceWithNamingType"); Resource actual = httpProtocolAuthService.parseResource(request, secured); assertEquals(SignType.NAMING, actual.getType()); @@ -100,7 +104,7 @@ public void testParseResourceWithNamingType() throws NoSuchMethodException { @Test @Secured(signType = SignType.CONFIG) - public void testParseResourceWithConfigType() throws NoSuchMethodException { + void testParseResourceWithConfigType() throws NoSuchMethodException { Secured secured = getMethodSecure("testParseResourceWithConfigType"); Resource actual = httpProtocolAuthService.parseResource(request, secured); assertEquals(SignType.CONFIG, actual.getType()); @@ -111,39 +115,39 @@ public void testParseResourceWithConfigType() throws NoSuchMethodException { } @Test - public void testParseIdentity() { + void testParseIdentity() { IdentityContext actual = httpProtocolAuthService.parseIdentity(request); assertNotNull(actual); } @Test - public void testValidateIdentityWithoutPlugin() throws AccessException { + void testValidateIdentityWithoutPlugin() throws AccessException { IdentityContext identityContext = new IdentityContext(); assertTrue(httpProtocolAuthService.validateIdentity(identityContext, Resource.EMPTY_RESOURCE)); } @Test - public void testValidateIdentityWithPlugin() throws AccessException { + void testValidateIdentityWithPlugin() throws AccessException { Mockito.when(authConfigs.getNacosAuthSystemType()).thenReturn(MockAuthPluginService.TEST_PLUGIN); IdentityContext identityContext = new IdentityContext(); assertFalse(httpProtocolAuthService.validateIdentity(identityContext, Resource.EMPTY_RESOURCE)); } @Test - public void testValidateAuthorityWithoutPlugin() throws AccessException { - assertTrue(httpProtocolAuthService - .validateAuthority(new IdentityContext(), new Permission(Resource.EMPTY_RESOURCE, ""))); + void testValidateAuthorityWithoutPlugin() throws AccessException { + assertTrue(httpProtocolAuthService.validateAuthority(new IdentityContext(), + new Permission(Resource.EMPTY_RESOURCE, ""))); } @Test - public void testValidateAuthorityWithPlugin() throws AccessException { + void testValidateAuthorityWithPlugin() throws AccessException { Mockito.when(authConfigs.getNacosAuthSystemType()).thenReturn(MockAuthPluginService.TEST_PLUGIN); - assertFalse(httpProtocolAuthService - .validateAuthority(new IdentityContext(), new Permission(Resource.EMPTY_RESOURCE, ""))); + assertFalse(httpProtocolAuthService.validateAuthority(new IdentityContext(), + new Permission(Resource.EMPTY_RESOURCE, ""))); } private Secured getMethodSecure(String methodName) throws NoSuchMethodException { - Method method = HttpProtocolAuthServiceTest.class.getMethod(methodName); + Method method = HttpProtocolAuthServiceTest.class.getDeclaredMethod(methodName); return method.getAnnotation(Secured.class); } } diff --git a/auth/src/test/java/com/alibaba/nacos/auth/config/AuthConfigsTest.java b/auth/src/test/java/com/alibaba/nacos/auth/config/AuthConfigsTest.java index 94db1a2cebf..b8f59f3693f 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/config/AuthConfigsTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/config/AuthConfigsTest.java @@ -18,13 +18,13 @@ import com.alibaba.nacos.common.event.ServerConfigChangeEvent; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.mock.env.MockEnvironment; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class AuthConfigsTest { +class AuthConfigsTest { private static final boolean TEST_AUTH_ENABLED = true; @@ -40,8 +40,8 @@ public class AuthConfigsTest { private MockEnvironment environment; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { environment = new MockEnvironment(); EnvUtil.setEnvironment(environment); environment.setProperty("nacos.core.auth.plugin.test.key", "test"); @@ -49,7 +49,7 @@ public void setUp() throws Exception { } @Test - public void testUpgradeFromEvent() { + void testUpgradeFromEvent() { environment.setProperty("nacos.core.auth.enabled", String.valueOf(TEST_AUTH_ENABLED)); environment.setProperty("nacos.core.auth.caching.enabled", String.valueOf(TEST_CACHING_ENABLED)); environment.setProperty("nacos.core.auth.server.identity.key", TEST_SERVER_IDENTITY_KEY); diff --git a/auth/src/test/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilderTest.java b/auth/src/test/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilderTest.java index bfed02f61e3..c78fbfebb54 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilderTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilderTest.java @@ -18,21 +18,21 @@ import com.alibaba.nacos.sys.module.ModuleState; import com.alibaba.nacos.sys.utils.ApplicationUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.context.ConfigurableApplicationContext; import static com.alibaba.nacos.auth.config.AuthModuleStateBuilder.AUTH_ENABLED; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class AuthModuleStateBuilderTest { +@ExtendWith(MockitoExtension.class) +class AuthModuleStateBuilderTest { @Mock private ConfigurableApplicationContext context; @@ -40,19 +40,19 @@ public class AuthModuleStateBuilderTest { @Mock private AuthConfigs authConfigs; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { when(context.getBean(AuthConfigs.class)).thenReturn(authConfigs); ApplicationUtils.injectContext(context); when(authConfigs.getNacosAuthSystemType()).thenReturn("nacos"); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { } @Test - public void testBuild() { + void testBuild() { ModuleState actual = new AuthModuleStateBuilder().build(); assertFalse((Boolean) actual.getStates().get(AUTH_ENABLED)); assertFalse((Boolean) actual.getStates().get("login_page_enabled")); diff --git a/auth/src/test/java/com/alibaba/nacos/auth/context/GrpcIdentityContextBuilderTest.java b/auth/src/test/java/com/alibaba/nacos/auth/context/GrpcIdentityContextBuilderTest.java index 08d388dcea1..74001e1cb71 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/context/GrpcIdentityContextBuilderTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/context/GrpcIdentityContextBuilderTest.java @@ -17,24 +17,28 @@ package com.alibaba.nacos.auth.context; import com.alibaba.nacos.api.remote.request.Request; -import com.alibaba.nacos.plugin.auth.api.IdentityContext; import com.alibaba.nacos.auth.config.AuthConfigs; +import com.alibaba.nacos.plugin.auth.api.IdentityContext; import com.alibaba.nacos.plugin.auth.constant.Constants; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class GrpcIdentityContextBuilderTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class GrpcIdentityContextBuilderTest { private static final String TEST_PLUGIN = "test"; @@ -50,8 +54,8 @@ public class GrpcIdentityContextBuilderTest { private GrpcIdentityContextBuilder identityContextBuilder; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { identityContextBuilder = new GrpcIdentityContextBuilder(authConfigs); when(authConfigs.getNacosAuthSystemType()).thenReturn(TEST_PLUGIN); Map headers = new HashMap<>(); @@ -61,14 +65,14 @@ public void setUp() throws Exception { } @Test - public void testBuildWithoutPlugin() { + void testBuildWithoutPlugin() { when(authConfigs.getNacosAuthSystemType()).thenReturn("non-exist"); IdentityContext actual = identityContextBuilder.build(request); assertNull(actual.getParameter(IDENTITY_TEST_KEY)); } @Test - public void testBuild() { + void testBuild() { IdentityContext actual = identityContextBuilder.build(request); assertEquals(IDENTITY_TEST_VALUE, actual.getParameter(IDENTITY_TEST_KEY)); assertEquals("1.1.1.1", actual.getParameter(Constants.Identity.REMOTE_IP)); diff --git a/auth/src/test/java/com/alibaba/nacos/auth/context/HtppIdentityContextBuilderTest.java b/auth/src/test/java/com/alibaba/nacos/auth/context/HtppIdentityContextBuilderTest.java index 602a46436c5..1937ff54eff 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/context/HtppIdentityContextBuilderTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/context/HtppIdentityContextBuilderTest.java @@ -16,24 +16,28 @@ package com.alibaba.nacos.auth.context; -import com.alibaba.nacos.plugin.auth.api.IdentityContext; import com.alibaba.nacos.auth.config.AuthConfigs; +import com.alibaba.nacos.plugin.auth.api.IdentityContext; import com.alibaba.nacos.plugin.auth.constant.Constants; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import javax.servlet.http.HttpServletRequest; import java.util.Enumeration; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class HtppIdentityContextBuilderTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class HtppIdentityContextBuilderTest { private static final String TEST_PLUGIN = "test"; @@ -55,14 +59,14 @@ public class HtppIdentityContextBuilderTest { private HttpIdentityContextBuilder identityContextBuilder; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { identityContextBuilder = new HttpIdentityContextBuilder(authConfigs); when(authConfigs.getNacosAuthSystemType()).thenReturn(TEST_PLUGIN); } @Test - public void testBuildWithoutPlugin() { + void testBuildWithoutPlugin() { mockHeader(true); mockParameter(true); when(authConfigs.getNacosAuthSystemType()).thenReturn("non-exist"); @@ -71,7 +75,7 @@ public void testBuildWithoutPlugin() { } @Test - public void testBuildWithHeader() { + void testBuildWithHeader() { mockHeader(true); mockParameter(false); IdentityContext actual = identityContextBuilder.build(request); @@ -80,7 +84,7 @@ public void testBuildWithHeader() { } @Test - public void testBuildWithParameter() { + void testBuildWithParameter() { mockHeader(false); mockParameter(true); IdentityContext actual = identityContextBuilder.build(request); diff --git a/auth/src/test/java/com/alibaba/nacos/auth/mock/MockAuthPluginService.java b/auth/src/test/java/com/alibaba/nacos/auth/mock/MockAuthPluginService.java index d54b3bc920b..73f74631e8b 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/mock/MockAuthPluginService.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/mock/MockAuthPluginService.java @@ -16,12 +16,12 @@ package com.alibaba.nacos.auth.mock; -import com.alibaba.nacos.plugin.auth.api.Resource; -import com.alibaba.nacos.plugin.auth.constant.ActionTypes; -import com.alibaba.nacos.plugin.auth.spi.server.AuthPluginService; import com.alibaba.nacos.plugin.auth.api.IdentityContext; import com.alibaba.nacos.plugin.auth.api.Permission; +import com.alibaba.nacos.plugin.auth.api.Resource; +import com.alibaba.nacos.plugin.auth.constant.ActionTypes; import com.alibaba.nacos.plugin.auth.exception.AccessException; +import com.alibaba.nacos.plugin.auth.spi.server.AuthPluginService; import java.util.Collection; import java.util.Collections; diff --git a/auth/src/test/java/com/alibaba/nacos/auth/parser/grpc/ConfigGrpcResourceParserTest.java b/auth/src/test/java/com/alibaba/nacos/auth/parser/grpc/ConfigGrpcResourceParserTest.java index 9650f9b7e26..03d0457f574 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/parser/grpc/ConfigGrpcResourceParserTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/parser/grpc/ConfigGrpcResourceParserTest.java @@ -23,25 +23,25 @@ import com.alibaba.nacos.auth.annotation.Secured; import com.alibaba.nacos.common.utils.StringUtils; import com.alibaba.nacos.plugin.auth.api.Resource; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Method; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class ConfigGrpcResourceParserTest { +class ConfigGrpcResourceParserTest { private ConfigGrpcResourceParser resourceParser; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { resourceParser = new ConfigGrpcResourceParser(); } @Test @Secured(signType = Constants.Config.CONFIG_MODULE) - public void testParseWithFullContext() throws NoSuchMethodException { + void testParseWithFullContext() throws NoSuchMethodException { Secured secured = getMethodSecure(); Request request = mockConfigRequest("testNs", "testG", "testD"); Resource actual = resourceParser.parse(request, secured); @@ -53,7 +53,7 @@ public void testParseWithFullContext() throws NoSuchMethodException { @Test @Secured(signType = Constants.Config.CONFIG_MODULE) - public void testParseWithoutNamespace() throws NoSuchMethodException { + void testParseWithoutNamespace() throws NoSuchMethodException { Secured secured = getMethodSecure(); Request request = mockConfigRequest("", "testG", "testD"); Resource actual = resourceParser.parse(request, secured); @@ -65,7 +65,7 @@ public void testParseWithoutNamespace() throws NoSuchMethodException { @Test @Secured(signType = Constants.Config.CONFIG_MODULE) - public void testParseWithoutGroup() throws NoSuchMethodException { + void testParseWithoutGroup() throws NoSuchMethodException { Secured secured = getMethodSecure(); Request request = mockConfigRequest("testNs", "", "testD"); Resource actual = resourceParser.parse(request, secured); @@ -77,7 +77,7 @@ public void testParseWithoutGroup() throws NoSuchMethodException { @Test @Secured(signType = Constants.Config.CONFIG_MODULE) - public void testParseWithoutDataId() throws NoSuchMethodException { + void testParseWithoutDataId() throws NoSuchMethodException { Secured secured = getMethodSecure(); Request request = mockConfigRequest("testNs", "testG", ""); Resource actual = resourceParser.parse(request, secured); @@ -89,7 +89,7 @@ public void testParseWithoutDataId() throws NoSuchMethodException { @Test @Secured(signType = Constants.Config.CONFIG_MODULE) - public void testParseWithConfigBatchListenRequest() throws NoSuchMethodException { + void testParseWithConfigBatchListenRequest() throws NoSuchMethodException { Secured secured = getMethodSecure(); ConfigBatchListenRequest request = new ConfigBatchListenRequest(); request.addConfigListenContext("testG", "testD", "testNs", "111"); @@ -112,7 +112,7 @@ private Secured getMethodSecure() throws NoSuchMethodException { StackTraceElement[] traces = new Exception().getStackTrace(); StackTraceElement callerElement = traces[1]; String methodName = callerElement.getMethodName(); - Method method = this.getClass().getMethod(methodName); + Method method = this.getClass().getDeclaredMethod(methodName); return method.getAnnotation(Secured.class); } } diff --git a/auth/src/test/java/com/alibaba/nacos/auth/parser/grpc/NamingGrpcResourceParserTest.java b/auth/src/test/java/com/alibaba/nacos/auth/parser/grpc/NamingGrpcResourceParserTest.java index a175ba3b365..620ed569875 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/parser/grpc/NamingGrpcResourceParserTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/parser/grpc/NamingGrpcResourceParserTest.java @@ -23,26 +23,26 @@ import com.alibaba.nacos.auth.annotation.Secured; import com.alibaba.nacos.common.utils.StringUtils; import com.alibaba.nacos.plugin.auth.api.Resource; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Method; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class NamingGrpcResourceParserTest { +class NamingGrpcResourceParserTest { private NamingGrpcResourceParser resourceParser; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { resourceParser = new NamingGrpcResourceParser(); } @Test @Secured() - public void testParseWithFullContextForNamingRequest() throws NoSuchMethodException { + void testParseWithFullContextForNamingRequest() throws NoSuchMethodException { Secured secured = getMethodSecure(); AbstractNamingRequest request = mockNamingRequest("testNs", "testG", "testS"); Resource actual = resourceParser.parse(request, secured); @@ -50,13 +50,13 @@ public void testParseWithFullContextForNamingRequest() throws NoSuchMethodExcept assertEquals("testG", actual.getGroup()); assertEquals("testS", actual.getName()); assertEquals(Constants.Naming.NAMING_MODULE, actual.getType()); - assertEquals(MockNamingRequest.class.getSimpleName(), actual.getProperties().getProperty( - com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); + assertEquals(MockNamingRequest.class.getSimpleName(), actual.getProperties() + .getProperty(com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); } @Test @Secured() - public void testParseWithFullContextForOtherRequest() throws NoSuchMethodException { + void testParseWithFullContextForOtherRequest() throws NoSuchMethodException { Secured secured = getMethodSecure(); Request request = mockOtherRequest("testNs", "testG", "testS"); Resource actual = resourceParser.parse(request, secured); @@ -64,13 +64,13 @@ public void testParseWithFullContextForOtherRequest() throws NoSuchMethodExcepti assertEquals("testG", actual.getGroup()); assertEquals("testS", actual.getName()); assertEquals(Constants.Naming.NAMING_MODULE, actual.getType()); - assertEquals(NotifySubscriberRequest.class.getSimpleName(), actual.getProperties().getProperty( - com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); + assertEquals(NotifySubscriberRequest.class.getSimpleName(), actual.getProperties() + .getProperty(com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); } @Test @Secured() - public void testParseWithoutNamespaceForNamingRequest() throws NoSuchMethodException { + void testParseWithoutNamespaceForNamingRequest() throws NoSuchMethodException { Secured secured = getMethodSecure(); AbstractNamingRequest request = mockNamingRequest(null, "testG", "testS"); Resource actual = resourceParser.parse(request, secured); @@ -78,13 +78,13 @@ public void testParseWithoutNamespaceForNamingRequest() throws NoSuchMethodExcep assertEquals("testG", actual.getGroup()); assertEquals("testS", actual.getName()); assertEquals(Constants.Naming.NAMING_MODULE, actual.getType()); - assertEquals(MockNamingRequest.class.getSimpleName(), actual.getProperties().getProperty( - com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); + assertEquals(MockNamingRequest.class.getSimpleName(), actual.getProperties() + .getProperty(com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); } @Test @Secured() - public void testParseWithoutNamespaceForOtherRequest() throws NoSuchMethodException { + void testParseWithoutNamespaceForOtherRequest() throws NoSuchMethodException { Secured secured = getMethodSecure(); Request request = mockOtherRequest(null, "testG", "testS"); Resource actual = resourceParser.parse(request, secured); @@ -92,13 +92,13 @@ public void testParseWithoutNamespaceForOtherRequest() throws NoSuchMethodExcept assertEquals("testG", actual.getGroup()); assertEquals("testS", actual.getName()); assertEquals(Constants.Naming.NAMING_MODULE, actual.getType()); - assertEquals(NotifySubscriberRequest.class.getSimpleName(), actual.getProperties().getProperty( - com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); + assertEquals(NotifySubscriberRequest.class.getSimpleName(), actual.getProperties() + .getProperty(com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); } @Test @Secured() - public void testParseWithoutGroupForNamingRequest() throws NoSuchMethodException { + void testParseWithoutGroupForNamingRequest() throws NoSuchMethodException { Secured secured = getMethodSecure(); AbstractNamingRequest request = mockNamingRequest("testNs", null, "testS"); Resource actual = resourceParser.parse(request, secured); @@ -106,13 +106,13 @@ public void testParseWithoutGroupForNamingRequest() throws NoSuchMethodException assertEquals(StringUtils.EMPTY, actual.getGroup()); assertEquals("testS", actual.getName()); assertEquals(Constants.Naming.NAMING_MODULE, actual.getType()); - assertEquals(MockNamingRequest.class.getSimpleName(), actual.getProperties().getProperty( - com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); + assertEquals(MockNamingRequest.class.getSimpleName(), actual.getProperties() + .getProperty(com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); } @Test @Secured() - public void testParseWithoutGroupForOtherRequest() throws NoSuchMethodException { + void testParseWithoutGroupForOtherRequest() throws NoSuchMethodException { Secured secured = getMethodSecure(); Request request = mockOtherRequest("testNs", null, "testS"); Resource actual = resourceParser.parse(request, secured); @@ -120,13 +120,13 @@ public void testParseWithoutGroupForOtherRequest() throws NoSuchMethodException assertEquals(StringUtils.EMPTY, actual.getGroup()); assertEquals("testS", actual.getName()); assertEquals(Constants.Naming.NAMING_MODULE, actual.getType()); - assertEquals(NotifySubscriberRequest.class.getSimpleName(), actual.getProperties().getProperty( - com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); + assertEquals(NotifySubscriberRequest.class.getSimpleName(), actual.getProperties() + .getProperty(com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); } @Test @Secured() - public void testParseWithoutDataIdForNamingRequest() throws NoSuchMethodException { + void testParseWithoutDataIdForNamingRequest() throws NoSuchMethodException { Secured secured = getMethodSecure(); AbstractNamingRequest request = mockNamingRequest("testNs", "testG", null); Resource actual = resourceParser.parse(request, secured); @@ -134,13 +134,13 @@ public void testParseWithoutDataIdForNamingRequest() throws NoSuchMethodExceptio assertEquals("testG", actual.getGroup()); assertEquals(StringUtils.EMPTY, actual.getName()); assertEquals(Constants.Naming.NAMING_MODULE, actual.getType()); - assertEquals(MockNamingRequest.class.getSimpleName(), actual.getProperties().getProperty( - com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); + assertEquals(MockNamingRequest.class.getSimpleName(), actual.getProperties() + .getProperty(com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); } @Test @Secured() - public void testParseWithoutDataIdForOtherRequest() throws NoSuchMethodException { + void testParseWithoutDataIdForOtherRequest() throws NoSuchMethodException { Secured secured = getMethodSecure(); Request request = mockOtherRequest("testNs", "testG", null); Resource actual = resourceParser.parse(request, secured); @@ -148,8 +148,8 @@ public void testParseWithoutDataIdForOtherRequest() throws NoSuchMethodException assertEquals("testG", actual.getGroup()); assertEquals(StringUtils.EMPTY, actual.getName()); assertEquals(Constants.Naming.NAMING_MODULE, actual.getType()); - assertEquals(NotifySubscriberRequest.class.getSimpleName(), actual.getProperties().getProperty( - com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); + assertEquals(NotifySubscriberRequest.class.getSimpleName(), actual.getProperties() + .getProperty(com.alibaba.nacos.plugin.auth.constant.Constants.Resource.REQUEST_CLASS)); } private AbstractNamingRequest mockNamingRequest(String testNs, String testG, String testS) { @@ -172,7 +172,7 @@ private Secured getMethodSecure() throws NoSuchMethodException { StackTraceElement[] traces = new Exception().getStackTrace(); StackTraceElement callerElement = traces[1]; String methodName = callerElement.getMethodName(); - Method method = this.getClass().getMethod(methodName); + Method method = this.getClass().getDeclaredMethod(methodName); return method.getAnnotation(Secured.class); } diff --git a/auth/src/test/java/com/alibaba/nacos/auth/parser/http/ConfigHttpResourceParserTest.java b/auth/src/test/java/com/alibaba/nacos/auth/parser/http/ConfigHttpResourceParserTest.java index a9297c3c229..382daa6ac41 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/parser/http/ConfigHttpResourceParserTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/parser/http/ConfigHttpResourceParserTest.java @@ -20,36 +20,39 @@ import com.alibaba.nacos.auth.annotation.Secured; import com.alibaba.nacos.common.utils.StringUtils; import com.alibaba.nacos.plugin.auth.api.Resource; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import javax.servlet.http.HttpServletRequest; - import java.lang.reflect.Method; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.eq; -@RunWith(MockitoJUnitRunner.class) -public class ConfigHttpResourceParserTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class ConfigHttpResourceParserTest { @Mock private HttpServletRequest request; private ConfigHttpResourceParser resourceParser; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { resourceParser = new ConfigHttpResourceParser(); } @Test @Secured(signType = Constants.Config.CONFIG_MODULE) - public void testParseWithFullContext() throws NoSuchMethodException { + void testParseWithFullContext() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq("tenant"))).thenReturn("testNs"); Mockito.when(request.getParameter(eq(Constants.GROUP))).thenReturn("testG"); @@ -63,7 +66,7 @@ public void testParseWithFullContext() throws NoSuchMethodException { @Test @Secured(signType = Constants.Config.CONFIG_MODULE) - public void testParseWithoutNamespace() throws NoSuchMethodException { + void testParseWithoutNamespace() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq(Constants.GROUP))).thenReturn("testG"); Mockito.when(request.getParameter(eq(Constants.DATAID))).thenReturn("testD"); @@ -76,7 +79,7 @@ public void testParseWithoutNamespace() throws NoSuchMethodException { @Test @Secured(signType = Constants.Config.CONFIG_MODULE) - public void testParseWithoutGroup() throws NoSuchMethodException { + void testParseWithoutGroup() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq("tenant"))).thenReturn("testNs"); Mockito.when(request.getParameter(eq(Constants.DATAID))).thenReturn("testD"); @@ -89,7 +92,7 @@ public void testParseWithoutGroup() throws NoSuchMethodException { @Test @Secured(signType = Constants.Config.CONFIG_MODULE) - public void testParseWithoutDataId() throws NoSuchMethodException { + void testParseWithoutDataId() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq("tenant"))).thenReturn("testNs"); Mockito.when(request.getParameter(eq(Constants.GROUP))).thenReturn("testG"); @@ -104,7 +107,7 @@ private Secured getMethodSecure() throws NoSuchMethodException { StackTraceElement[] traces = new Exception().getStackTrace(); StackTraceElement callerElement = traces[1]; String methodName = callerElement.getMethodName(); - Method method = this.getClass().getMethod(methodName); + Method method = this.getClass().getDeclaredMethod(methodName); return method.getAnnotation(Secured.class); } } diff --git a/auth/src/test/java/com/alibaba/nacos/auth/parser/http/NamingHttpResourceParserTest.java b/auth/src/test/java/com/alibaba/nacos/auth/parser/http/NamingHttpResourceParserTest.java index d0ca3815c35..c740f7c60c1 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/parser/http/NamingHttpResourceParserTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/parser/http/NamingHttpResourceParserTest.java @@ -21,37 +21,40 @@ import com.alibaba.nacos.auth.annotation.Secured; import com.alibaba.nacos.common.utils.StringUtils; import com.alibaba.nacos.plugin.auth.api.Resource; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import javax.servlet.http.HttpServletRequest; - import java.lang.reflect.Method; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; -@RunWith(MockitoJUnitRunner.class) -public class NamingHttpResourceParserTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class NamingHttpResourceParserTest { @Mock private HttpServletRequest request; private NamingHttpResourceParser resourceParser; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { resourceParser = new NamingHttpResourceParser(); } @Test @Secured() - public void testParseWithFullContext() throws NoSuchMethodException { + void testParseWithFullContext() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq(CommonParams.NAMESPACE_ID))).thenReturn("testNs"); Mockito.when(request.getParameter(eq(CommonParams.GROUP_NAME))).thenReturn("testG"); @@ -65,7 +68,7 @@ public void testParseWithFullContext() throws NoSuchMethodException { @Test @Secured() - public void testParseWithoutNamespace() throws NoSuchMethodException { + void testParseWithoutNamespace() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq(CommonParams.GROUP_NAME))).thenReturn("testG"); Mockito.when(request.getParameter(eq(CommonParams.SERVICE_NAME))).thenReturn("testS"); @@ -78,7 +81,7 @@ public void testParseWithoutNamespace() throws NoSuchMethodException { @Test @Secured() - public void testParseWithoutGroup() throws NoSuchMethodException { + void testParseWithoutGroup() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq(CommonParams.NAMESPACE_ID))).thenReturn("testNs"); Mockito.when(request.getParameter(eq(CommonParams.SERVICE_NAME))).thenReturn("testS"); @@ -91,7 +94,7 @@ public void testParseWithoutGroup() throws NoSuchMethodException { @Test @Secured() - public void testParseWithGroupInService() throws NoSuchMethodException { + void testParseWithGroupInService() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq(CommonParams.NAMESPACE_ID))).thenReturn("testNs"); Mockito.when(request.getParameter(eq(CommonParams.SERVICE_NAME))).thenReturn("testG@@testS"); @@ -104,7 +107,7 @@ public void testParseWithGroupInService() throws NoSuchMethodException { @Test @Secured() - public void testParseWithoutService() throws NoSuchMethodException { + void testParseWithoutService() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq(CommonParams.NAMESPACE_ID))).thenReturn("testNs"); Mockito.when(request.getParameter(eq(CommonParams.GROUP_NAME))).thenReturn("testG"); @@ -117,7 +120,7 @@ public void testParseWithoutService() throws NoSuchMethodException { @Test @Secured() - public void testParseWithoutGroupAndService() throws NoSuchMethodException { + void testParseWithoutGroupAndService() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq(CommonParams.NAMESPACE_ID))).thenReturn("testNs"); Resource actual = resourceParser.parse(request, secured); @@ -129,7 +132,7 @@ public void testParseWithoutGroupAndService() throws NoSuchMethodException { @Test @Secured(tags = {"testTag"}) - public void testParseWithTags() throws NoSuchMethodException { + void testParseWithTags() throws NoSuchMethodException { Secured secured = getMethodSecure(); Mockito.when(request.getParameter(eq(CommonParams.NAMESPACE_ID))).thenReturn("testNs"); Mockito.when(request.getParameter(eq(CommonParams.GROUP_NAME))).thenReturn("testG"); @@ -146,7 +149,7 @@ private Secured getMethodSecure() throws NoSuchMethodException { StackTraceElement[] traces = new Exception().getStackTrace(); StackTraceElement callerElement = traces[1]; String methodName = callerElement.getMethodName(); - Method method = this.getClass().getMethod(methodName); + Method method = this.getClass().getDeclaredMethod(methodName); return method.getAnnotation(Secured.class); } } From 26176ddb3c2fcf56410b6998d82ff6b907a6ebc8 Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Mon, 20 May 2024 10:46:53 +0800 Subject: [PATCH 019/110] upgrade module naocs-consistency from junit4 to junit5 (#12118) --- .../consistency/ProtoMessageUtilTest.java | 33 +++++++++-------- .../consistency/ProtocolMetaDataTest.java | 11 +++--- .../consistency/SerializeFactoryTest.java | 24 +++++++------ .../serialize/HessianSerializerTest.java | 35 ++++++++++--------- .../serialize/JacksonSerializerTest.java | 26 +++++++------- .../snapshot/LocalFileMetaTest.java | 17 ++++----- .../consistency/snapshot/ReaderTest.java | 21 +++++------ .../consistency/snapshot/WriterTest.java | 30 ++++++++-------- 8 files changed, 104 insertions(+), 93 deletions(-) diff --git a/consistency/src/test/java/com/alibaba/nacos/consistency/ProtoMessageUtilTest.java b/consistency/src/test/java/com/alibaba/nacos/consistency/ProtoMessageUtilTest.java index c6a69f009f8..c49d6ed2d03 100644 --- a/consistency/src/test/java/com/alibaba/nacos/consistency/ProtoMessageUtilTest.java +++ b/consistency/src/test/java/com/alibaba/nacos/consistency/ProtoMessageUtilTest.java @@ -21,16 +21,16 @@ import com.alibaba.nacos.consistency.entity.ReadRequest; import com.alibaba.nacos.consistency.entity.WriteRequest; import com.google.protobuf.ByteString; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; +import org.junit.jupiter.api.Test; import java.nio.ByteBuffer; -public class ProtoMessageUtilTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ProtoMessageUtilTest { @Test - public void testProto() throws Exception { + void testProto() throws Exception { WriteRequest request = WriteRequest.newBuilder().setKey("test-proto-new").build(); byte[] bytes = request.toByteArray(); @@ -39,7 +39,7 @@ public void testProto() throws Exception { } @Test - public void testParseReadRequestWithRequestTypeField() { + void testParseReadRequestWithRequestTypeField() { String group = "test"; ByteString data = ByteString.copyFrom("data".getBytes()); ReadRequest testCase = ReadRequest.newBuilder().setGroup(group).setData(data).build(); @@ -49,8 +49,8 @@ public void testParseReadRequestWithRequestTypeField() { requestTypeFieldBytes[1] = ProtoMessageUtil.REQUEST_TYPE_READ; byte[] dataBytes = testCase.toByteArray(); - ByteBuffer byteBuffer = (ByteBuffer) ByteBuffer.allocate(requestTypeFieldBytes.length + dataBytes.length) - .put(requestTypeFieldBytes).put(dataBytes).position(0); + ByteBuffer byteBuffer = (ByteBuffer) ByteBuffer.allocate(requestTypeFieldBytes.length + dataBytes.length).put(requestTypeFieldBytes) + .put(dataBytes).position(0); Object actual = ProtoMessageUtil.parse(byteBuffer.array()); assertEquals(ReadRequest.class, testCase.getClass()); @@ -59,7 +59,7 @@ public void testParseReadRequestWithRequestTypeField() { } @Test - public void testParseWriteRequestWithRequestTypeField() { + void testParseWriteRequestWithRequestTypeField() { String group = "test"; ByteString data = ByteString.copyFrom("data".getBytes()); WriteRequest testCase = WriteRequest.newBuilder().setGroup(group).setData(data).build(); @@ -69,8 +69,8 @@ public void testParseWriteRequestWithRequestTypeField() { requestTypeFieldBytes[1] = ProtoMessageUtil.REQUEST_TYPE_WRITE; byte[] dataBytes = testCase.toByteArray(); - ByteBuffer byteBuffer = (ByteBuffer) ByteBuffer.allocate(requestTypeFieldBytes.length + dataBytes.length) - .put(requestTypeFieldBytes).put(dataBytes).position(0); + ByteBuffer byteBuffer = (ByteBuffer) ByteBuffer.allocate(requestTypeFieldBytes.length + dataBytes.length).put(requestTypeFieldBytes) + .put(dataBytes).position(0); Object actual = ProtoMessageUtil.parse(byteBuffer.array()); assertEquals(WriteRequest.class, testCase.getClass()); @@ -79,7 +79,7 @@ public void testParseWriteRequestWithRequestTypeField() { } @Test - public void testParseReadRequest() { + void testParseReadRequest() { String group = "test"; ByteString data = ByteString.copyFrom("data".getBytes()); ReadRequest testCase = ReadRequest.newBuilder().setGroup(group).setData(data).build(); @@ -90,7 +90,7 @@ public void testParseReadRequest() { } @Test - public void testParseWriteRequest() { + void testParseWriteRequest() { String group = "test"; ByteString data = ByteString.copyFrom("data".getBytes()); WriteRequest testCase = WriteRequest.newBuilder().setGroup(group).setData(data).build(); @@ -101,7 +101,7 @@ public void testParseWriteRequest() { } @Test - public void testConvertToReadRequest() { + void testConvertToReadRequest() { ByteString data = ByteString.copyFrom("data".getBytes()); String group = "test"; @@ -116,10 +116,9 @@ public void testConvertToReadRequest() { } @Test - public void testConvertToWriteRequest() { + void testConvertToWriteRequest() { ByteString data = ByteString.copyFrom("data".getBytes()); - Log log = Log.newBuilder().setKey("key").setGroup("group").setData(data).setOperation("o") - .putExtendInfo("k", "v").build(); + Log log = Log.newBuilder().setKey("key").setGroup("group").setData(data).setOperation("o").putExtendInfo("k", "v").build(); WriteRequest writeRequest = ProtoMessageUtil.convertToWriteRequest(log); assertEquals(1, writeRequest.getExtendInfoCount()); diff --git a/consistency/src/test/java/com/alibaba/nacos/consistency/ProtocolMetaDataTest.java b/consistency/src/test/java/com/alibaba/nacos/consistency/ProtocolMetaDataTest.java index 9c5dc48d9f9..84011e95052 100644 --- a/consistency/src/test/java/com/alibaba/nacos/consistency/ProtocolMetaDataTest.java +++ b/consistency/src/test/java/com/alibaba/nacos/consistency/ProtocolMetaDataTest.java @@ -17,8 +17,7 @@ package com.alibaba.nacos.consistency; import com.alibaba.nacos.common.utils.JacksonUtils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Date; import java.util.HashMap; @@ -27,10 +26,12 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -public class ProtocolMetaDataTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ProtocolMetaDataTest { @Test - public void testProtocolMetaData() throws Exception { + void testProtocolMetaData() throws Exception { Map> map = new HashMap<>(); Map data = new HashMap<>(); data.put("test-1", new Date()); @@ -68,7 +69,7 @@ public void testProtocolMetaData() throws Exception { latch.await(10_000L, TimeUnit.MILLISECONDS); - Assert.assertEquals(2, count.get()); + assertEquals(2, count.get()); } diff --git a/consistency/src/test/java/com/alibaba/nacos/consistency/SerializeFactoryTest.java b/consistency/src/test/java/com/alibaba/nacos/consistency/SerializeFactoryTest.java index d3edc7517b8..0e0025f9293 100644 --- a/consistency/src/test/java/com/alibaba/nacos/consistency/SerializeFactoryTest.java +++ b/consistency/src/test/java/com/alibaba/nacos/consistency/SerializeFactoryTest.java @@ -17,8 +17,7 @@ package com.alibaba.nacos.consistency; import com.alibaba.nacos.consistency.serialize.JacksonSerializer; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -27,10 +26,13 @@ import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; -public class SerializeFactoryTest { +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class SerializeFactoryTest { @Test - public void testListSerialize() { + void testListSerialize() { Serializer serializer = SerializeFactory.getDefault(); List logsList = new ArrayList<>(); @@ -38,27 +40,27 @@ public void testListSerialize() { logsList.add(i); } byte[] data = serializer.serialize(logsList); - Assert.assertNotEquals(0, data.length); + assertNotEquals(0, data.length); ArrayList list = serializer.deserialize(data, ArrayList.class); System.out.println(list); } @Test - public void testMapSerialize() { + void testMapSerialize() { Serializer serializer = SerializeFactory.getDefault(); Map logsMap = new HashMap<>(); for (int i = 0; i < 4; i++) { logsMap.put(i, i); } byte[] data = serializer.serialize(logsMap); - Assert.assertNotEquals(0, data.length); + assertNotEquals(0, data.length); Map result = serializer.deserialize(data, HashMap.class); System.out.println(result); } @Test - public void testSetSerialize() { + void testSetSerialize() { Serializer serializer = SerializeFactory.getDefault(); Set logsMap = new CopyOnWriteArraySet<>(); for (int i = 0; i < 4; i++) { @@ -66,14 +68,14 @@ public void testSetSerialize() { } byte[] data = serializer.serialize(logsMap); - Assert.assertNotEquals(0, data.length); + assertNotEquals(0, data.length); Set result = serializer.deserialize(data, CopyOnWriteArraySet.class); System.out.println(result); } @Test - public void testGetSerializer() { + void testGetSerializer() { Serializer serializer = SerializeFactory.getSerializer("JSON"); - Assert.assertTrue(serializer instanceof JacksonSerializer); + assertTrue(serializer instanceof JacksonSerializer); } } diff --git a/consistency/src/test/java/com/alibaba/nacos/consistency/serialize/HessianSerializerTest.java b/consistency/src/test/java/com/alibaba/nacos/consistency/serialize/HessianSerializerTest.java index 4b224444d8e..f03b3c14663 100644 --- a/consistency/src/test/java/com/alibaba/nacos/consistency/serialize/HessianSerializerTest.java +++ b/consistency/src/test/java/com/alibaba/nacos/consistency/serialize/HessianSerializerTest.java @@ -19,66 +19,69 @@ import com.alibaba.nacos.api.exception.runtime.NacosDeserializationException; import org.apache.http.HttpException; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.io.Serializable; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + /** * {@link HessianSerializer} unit test. * * @author Chenhao26 * @date 2022-08-13 */ -public class HessianSerializerTest { +class HessianSerializerTest { private HessianSerializer hessianSerializer; - @Before - public void setUp() { + @BeforeEach + void setUp() { hessianSerializer = new HessianSerializer(); } @Test - public void testSerializerAndDeserialize() { + void testSerializerAndDeserialize() { String data = "xxx"; byte[] bytes = hessianSerializer.serialize(data); try { hessianSerializer.deserialize(bytes); } catch (Exception e) { - Assert.assertTrue(e instanceof RuntimeException); + assertTrue(e instanceof RuntimeException); } String res1 = hessianSerializer.deserialize(bytes, String.class); - Assert.assertEquals(data, res1); + assertEquals(data, res1); String res2 = hessianSerializer.deserialize(bytes, "java.lang.String"); - Assert.assertEquals(data, res2); + assertEquals(data, res2); } @Test - public void testSerializerAndDeserializeForNotAllowClass() { + void testSerializerAndDeserializeForNotAllowClass() { Serializable data = new HttpException(); byte[] bytes = hessianSerializer.serialize(data); try { HttpException res = hessianSerializer.deserialize(bytes); - Assert.fail("deserialize success which is not expected"); + fail("deserialize success which is not expected"); } catch (Exception e) { - Assert.assertTrue(e instanceof ClassCastException); + assertTrue(e instanceof ClassCastException); } try { HttpException res1 = hessianSerializer.deserialize(bytes, HttpException.class); } catch (Exception e) { - Assert.assertTrue(e instanceof NacosDeserializationException); + assertTrue(e instanceof NacosDeserializationException); } } @Test - public void testName() { - Assert.assertEquals("Hessian", hessianSerializer.name()); + void testName() { + assertEquals("Hessian", hessianSerializer.name()); } } diff --git a/consistency/src/test/java/com/alibaba/nacos/consistency/serialize/JacksonSerializerTest.java b/consistency/src/test/java/com/alibaba/nacos/consistency/serialize/JacksonSerializerTest.java index 2eda593395a..90c9ac15785 100644 --- a/consistency/src/test/java/com/alibaba/nacos/consistency/serialize/JacksonSerializerTest.java +++ b/consistency/src/test/java/com/alibaba/nacos/consistency/serialize/JacksonSerializerTest.java @@ -17,9 +17,11 @@ package com.alibaba.nacos.consistency.serialize; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * {@link JacksonSerializer} unit test. @@ -27,35 +29,35 @@ * @author chenglu * @date 2021-07-27 18:32 */ -public class JacksonSerializerTest { +class JacksonSerializerTest { private JacksonSerializer jacksonSerializer; - @Before - public void setUp() { + @BeforeEach + void setUp() { jacksonSerializer = new JacksonSerializer(); } @Test - public void testSerializerAndDeserialize() { + void testSerializerAndDeserialize() { String data = "xxx"; byte[] bytes = jacksonSerializer.serialize(data); try { jacksonSerializer.deserialize(bytes); } catch (Exception e) { - Assert.assertTrue(e instanceof UnsupportedOperationException); + assertTrue(e instanceof UnsupportedOperationException); } String res1 = jacksonSerializer.deserialize(bytes, String.class); - Assert.assertEquals(data, res1); + assertEquals(data, res1); String res2 = jacksonSerializer.deserialize(bytes, "java.lang.String"); - Assert.assertEquals(data, res2); + assertEquals(data, res2); } @Test - public void testName() { - Assert.assertEquals("JSON", jacksonSerializer.name()); + void testName() { + assertEquals("JSON", jacksonSerializer.name()); } } diff --git a/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/LocalFileMetaTest.java b/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/LocalFileMetaTest.java index 09bb810a91f..50599db409c 100644 --- a/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/LocalFileMetaTest.java +++ b/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/LocalFileMetaTest.java @@ -17,9 +17,10 @@ package com.alibaba.nacos.consistency.snapshot; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; /** * {@link LocalFileMeta} unit test. @@ -27,18 +28,18 @@ * @author chenglu * @date 2021-07-27 18:43 */ -public class LocalFileMetaTest { +class LocalFileMetaTest { private LocalFileMeta fileMeta; - @Before - public void setUp() { + @BeforeEach + void setUp() { fileMeta = new LocalFileMeta(); } @Test - public void testAppendAndGet() { + void testAppendAndGet() { fileMeta.append("key", "value"); - Assert.assertEquals("value", fileMeta.get("key")); + assertEquals("value", fileMeta.get("key")); } } diff --git a/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/ReaderTest.java b/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/ReaderTest.java index acce96d4cba..e5b44333ab4 100644 --- a/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/ReaderTest.java +++ b/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/ReaderTest.java @@ -17,26 +17,27 @@ package com.alibaba.nacos.consistency.snapshot; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * {@link Reader} unit test. * * @author chenglu * @date 2021-07-27 18:46 */ -public class ReaderTest { +class ReaderTest { private Reader reader; - @Before - public void setUp() { + @BeforeEach + void setUp() { Map map = new HashMap<>(2); Properties properties = new Properties(); properties.put("k", "v"); @@ -45,11 +46,11 @@ public void setUp() { } @Test - public void test() { - Assert.assertEquals("test", reader.getPath()); + void test() { + assertEquals("test", reader.getPath()); - Assert.assertEquals(1, reader.listFiles().size()); + assertEquals(1, reader.listFiles().size()); - Assert.assertEquals("v", reader.getFileMeta("a").getFileMeta().getProperty("k")); + assertEquals("v", reader.getFileMeta("a").getFileMeta().getProperty("k")); } } diff --git a/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/WriterTest.java b/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/WriterTest.java index 21cf399628c..0791b78078b 100644 --- a/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/WriterTest.java +++ b/consistency/src/test/java/com/alibaba/nacos/consistency/snapshot/WriterTest.java @@ -17,9 +17,11 @@ package com.alibaba.nacos.consistency.snapshot; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * {@link Writer} unit test. @@ -27,27 +29,27 @@ * @author chenglu * @date 2021-07-28 18:50 */ -public class WriterTest { +class WriterTest { private Writer writer; - @Before - public void setUp() { + @BeforeEach + void setUp() { writer = new Writer("test"); } @Test - public void test() { - Assert.assertEquals("test", writer.getPath()); - - Assert.assertTrue(writer.addFile("a")); + void test() { + assertEquals("test", writer.getPath()); + + assertTrue(writer.addFile("a")); - Assert.assertTrue(writer.addFile("b", new LocalFileMeta())); + assertTrue(writer.addFile("b", new LocalFileMeta())); - Assert.assertEquals(2, writer.listFiles().size()); + assertEquals(2, writer.listFiles().size()); - Assert.assertTrue(writer.removeFile("a")); + assertTrue(writer.removeFile("a")); - Assert.assertEquals(1, writer.listFiles().size()); + assertEquals(1, writer.listFiles().size()); } } From 94bf8661adf5bd17c2b35a7804b447351e9de9d2 Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Mon, 20 May 2024 10:59:47 +0800 Subject: [PATCH 020/110] [ISSUE #12114] upgrade module naocs-config from junit4 to junit5 (#12117) * upgrade module naocs-config from junit4 to junit5 * fix checkstyle --- .../aspect/CapacityManagementAspectTest.java | 87 +-- .../server/aspect/ConfigChangeAspectTest.java | 92 +-- .../ConfigChangeConfigsTest.java | 24 +- .../configuration/ConfigCommonConfigTest.java | 23 +- .../ConfigModuleStateBuilderTest.java | 23 +- .../config/server/constant/ConstantsTest.java | 30 +- .../server/constant/CounterModeTest.java | 13 +- .../controller/CapacityControllerTest.java | 86 ++- .../ClientMetricsControllerTest.java | 43 +- .../CommunicationControllerTest.java | 52 +- .../controller/ConfigControllerTest.java | 253 ++++--- .../controller/ConfigOpsControllerTest.java | 65 +- .../controller/ConfigServletInnerTest.java | 165 +++-- .../controller/HealthControllerTest.java | 52 +- .../controller/HistoryControllerTest.java | 77 +-- .../controller/ListenerControllerTest.java | 28 +- .../controller/v2/ConfigControllerV2Test.java | 161 +++-- .../v2/HistoryControllerV2Test.java | 72 +- .../exception/GlobalExceptionHandlerTest.java | 35 +- .../server/manager/TaskManagerTest.java | 45 +- .../config/server/model/ConfigInfoTest.java | 11 +- .../ConfigListenerHttpParamExtractorTest.java | 21 +- .../server/paramcheck/ParamExtractorTest.java | 47 +- ...igChangeBatchListenRequestHandlerTest.java | 41 +- ...igChangeClusterSyncRequestHandlerTest.java | 30 +- .../remote/ConfigChangeListenContextTest.java | 63 +- .../ConfigPublishRequestHandlerTest.java | 187 +++--- .../remote/ConfigQueryRequestHandlerTest.java | 129 ++-- .../ConfigRemoveRequestHandlerTest.java | 29 +- .../remote/RpcConfigChangeNotifierTest.java | 93 ++- .../server/service/AggrWhitelistTest.java | 10 +- .../service/ClientTrackServiceTest.java | 31 +- .../service/ConfigCacheServiceTest.java | 232 ++++--- .../service/ConfigChangePublisherTest.java | 44 +- .../service/ConfigOperationServiceTest.java | 69 +- .../server/service/ConfigSubServiceTest.java | 100 ++- .../server/service/HistoryServiceTest.java | 68 +- .../service/LongPollingServiceTest.java | 91 ++- .../service/capacity/CapacityServiceTest.java | 110 ++- .../GroupCapacityPersistServiceTest.java | 174 +++-- .../TenantCapacityPersistServiceTest.java | 141 ++-- .../dump/DumpChangeConfigWorkerTest.java | 142 ++-- .../service/dump/DumpProcessorTest.java | 109 ++- .../dump/DumpProcessorUserRwaDiskTest.java | 18 +- .../server/service/dump/DumpServiceTest.java | 100 ++- .../disk/ConfigDiskServiceFactoryTest.java | 37 +- .../dump/disk/ConfigRawDiskServiceTest.java | 29 +- .../dump/processor/DumpAllProcessorTest.java | 134 ++-- .../service/merge/MergeDatumServiceTest.java | 52 +- .../service/merge/MergeTaskProcessorTest.java | 68 +- .../notify/AsyncNotifyServiceTest.java | 78 +-- .../ConfigRowMapperInjectorTest.java | 82 +-- ...dConfigInfoAggrPersistServiceImplTest.java | 112 ++-- ...dConfigInfoBetaPersistServiceImplTest.java | 155 +++-- ...eddedConfigInfoPersistServiceImplTest.java | 509 +++++++------- ...edConfigInfoTagPersistServiceImplTest.java | 141 ++-- ...storyConfigInfoPersistServiceImplTest.java | 104 ++- ...lConfigInfoAggrPersistServiceImplTest.java | 171 +++-- ...lConfigInfoBetaPersistServiceImplTest.java | 235 ++++--- ...ernalConfigInfoPersistServiceImplTest.java | 625 ++++++++---------- ...alConfigInfoTagPersistServiceImplTest.java | 191 +++--- ...storyConfigInfoPersistServiceImplTest.java | 165 +++-- .../server/utils/AccumulateStatCountTest.java | 19 +- .../config/server/utils/AppNameUtilsTest.java | 21 +- .../server/utils/ConfigExecutorTest.java | 40 +- .../config/server/utils/ContentUtilsTest.java | 51 +- .../config/server/utils/GroupKey2Test.java | 104 +-- .../config/server/utils/GroupKeyTest.java | 112 ++-- .../config/server/utils/LogUtilTest.java | 27 +- .../config/server/utils/MD5UtilTest.java | 56 +- .../config/server/utils/ParamUtilsTest.java | 69 +- .../config/server/utils/PropertyUtilTest.java | 52 +- .../config/server/utils/ProtocolTest.java | 23 +- .../config/server/utils/RegexParserTest.java | 24 +- .../config/server/utils/RequestUtilTest.java | 38 +- .../config/server/utils/ResponseUtilTest.java | 13 +- .../config/server/utils/SimpleCacheTest.java | 14 +- .../server/utils/SimpleFlowDataTest.java | 41 +- .../server/utils/SimpleIpFlowDataTest.java | 27 +- .../server/utils/SimpleReadWriteLockTest.java | 26 +- .../config/server/utils/SystemConfigTest.java | 11 +- .../config/server/utils/TimeUtilsTest.java | 15 +- .../config/server/utils/TimeoutUtilsTest.java | 25 +- .../config/server/utils/TraceLogUtilTest.java | 17 +- .../server/utils/UrlAnalysisUtilsTest.java | 18 +- .../server/utils/YamlParserUtilTest.java | 44 +- .../config/server/utils/ZipUtilsTest.java | 22 +- 87 files changed, 3516 insertions(+), 3797 deletions(-) diff --git a/config/src/test/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspectTest.java b/config/src/test/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspectTest.java index 3bc2c1b0ac5..11855300e67 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspectTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/aspect/CapacityManagementAspectTest.java @@ -26,28 +26,38 @@ import com.alibaba.nacos.plugin.datasource.constants.CommonConstant; import com.alibaba.nacos.sys.env.EnvUtil; import org.aspectj.lang.ProceedingJoinPoint; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import static com.alibaba.nacos.config.server.aspect.CapacityManagementAspect.LimitType.OVER_CLUSTER_QUOTA; import static com.alibaba.nacos.config.server.aspect.CapacityManagementAspect.LimitType.OVER_MAX_SIZE; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) -public class CapacityManagementAspectTest { +@ExtendWith(SpringExtension.class) +class CapacityManagementAspectTest { + + final String mockProceedingJoinPointResult = "mock success return"; + + final String mockDataId = "mockDataId"; + + final String mockGroup = "mockGroup"; + + final String mockTenant = "mockTenant"; + + final String mockContent = "mockContent"; @Mock ProceedingJoinPoint proceedingJoinPoint; @@ -69,18 +79,8 @@ public class CapacityManagementAspectTest { MockedStatic envUtilMockedStatic; - final String mockProceedingJoinPointResult = "mock success return"; - - final String mockDataId = "mockDataId"; - - final String mockGroup = "mockGroup"; - - final String mockTenant = "mockTenant"; - - final String mockContent = "mockContent"; - - @Before - public void before() throws Throwable { + @BeforeEach + void before() throws Throwable { //PropertyUtil.isCapacityLimitCheck() propertyUtilMockedStatic = Mockito.mockStatic(PropertyUtil.class); when(PropertyUtil.getCorrectUsageDelay()).thenReturn(10 * 60); @@ -97,14 +97,14 @@ public void before() throws Throwable { when(localMockProceedingJoinPoint.proceed()).thenThrow(mockException); } - @After - public void after() { + @AfterEach + void after() { propertyUtilMockedStatic.close(); envUtilMockedStatic.close(); } @Test - public void testAroundSyncUpdateConfigAllForInsertAspect() throws Throwable { + void testAroundSyncUpdateConfigAllForInsertAspect() throws Throwable { //test with insert //condition: // 1. has tenant: true @@ -121,7 +121,7 @@ public void testAroundSyncUpdateConfigAllForInsertAspect() throws Throwable { } @Test - public void testAroundSyncUpdateConfigAllForInsertAspect1() throws Throwable { + void testAroundSyncUpdateConfigAllForInsertAspect1() throws Throwable { //test with insert //condition: // 1. has tenant: true @@ -141,7 +141,7 @@ public void testAroundSyncUpdateConfigAllForInsertAspect1() throws Throwable { } @Test - public void testAroundSyncUpdateConfigAllForInsertAspect2Tenant() throws Throwable { + void testAroundSyncUpdateConfigAllForInsertAspect2Tenant() throws Throwable { //test with insert //condition: // 1. has tenant: true @@ -167,7 +167,7 @@ public void testAroundSyncUpdateConfigAllForInsertAspect2Tenant() throws Throwab } @Test - public void testAroundSyncUpdateConfigAllForInsertAspect2Group() throws Throwable { + void testAroundSyncUpdateConfigAllForInsertAspect2Group() throws Throwable { //test with insert //condition: // 1. has tenant: false @@ -193,7 +193,7 @@ public void testAroundSyncUpdateConfigAllForInsertAspect2Group() throws Throwabl } @Test - public void testAroundSyncUpdateConfigAllForInsertAspect3Tenant() throws Throwable { + void testAroundSyncUpdateConfigAllForInsertAspect3Tenant() throws Throwable { //test with insert //condition: // 1. has tenant: true @@ -237,7 +237,7 @@ public void testAroundSyncUpdateConfigAllForInsertAspect3Tenant() throws Throwab } @Test - public void testAroundSyncUpdateConfigAllForInsertAspect3Group() throws Throwable { + void testAroundSyncUpdateConfigAllForInsertAspect3Group() throws Throwable { //test with insert //condition: // 1. has tenant: true @@ -281,7 +281,7 @@ public void testAroundSyncUpdateConfigAllForInsertAspect3Group() throws Throwabl } @Test - public void testAroundSyncUpdateConfigAllForUpdateAspectTenant() throws Throwable { + void testAroundSyncUpdateConfigAllForUpdateAspectTenant() throws Throwable { //condition: // 1. has tenant: true // 2. capacity limit check: true @@ -311,7 +311,7 @@ public void testAroundSyncUpdateConfigAllForUpdateAspectTenant() throws Throwabl } @Test - public void testAroundSyncUpdateConfigAllForUpdateAspectGroup() throws Throwable { + void testAroundSyncUpdateConfigAllForUpdateAspectGroup() throws Throwable { //condition: // 1. has tenant: false // 2. capacity limit check: true @@ -341,7 +341,7 @@ public void testAroundSyncUpdateConfigAllForUpdateAspectGroup() throws Throwable } @Test - public void testAroundSyncUpdateConfigAllForInsertRollbackAspect() throws Throwable { + void testAroundSyncUpdateConfigAllForInsertRollbackAspect() throws Throwable { //test with insert //condition: // 1. has tenant: true @@ -365,9 +365,8 @@ public void testAroundSyncUpdateConfigAllForInsertRollbackAspect() throws Throwa MockHttpServletRequest mockHttpServletRequest = new MockHttpServletRequest(); MockHttpServletResponse mockHttpServletResponse = new MockHttpServletResponse(); try { - localMockResult = (String) capacityManagementAspect.aroundSyncUpdateConfigAll( - localMockProceedingJoinPoint, mockHttpServletRequest, mockHttpServletResponse, - mockDataId, mockGroup, mockContent, null, null, mockTenant, null); + localMockResult = (String) capacityManagementAspect.aroundSyncUpdateConfigAll(localMockProceedingJoinPoint, + mockHttpServletRequest, mockHttpServletResponse, mockDataId, mockGroup, mockContent, null, null, mockTenant, null); } catch (Throwable e) { assertEquals(e.getMessage(), mockException.getMessage()); } @@ -381,7 +380,7 @@ public void testAroundSyncUpdateConfigAllForInsertRollbackAspect() throws Throwa } @Test - public void testAroundDeleteConfigForTenant() throws Throwable { + void testAroundDeleteConfigForTenant() throws Throwable { when(PropertyUtil.isManageCapacity()).thenReturn(true); when(configInfoPersistService.findConfigInfo(any(), any(), any())).thenReturn(null); when(capacityService.insertAndUpdateClusterUsage(any(), anyBoolean())).thenReturn(true); @@ -401,26 +400,28 @@ public void testAroundDeleteConfigForTenant() throws Throwable { mockHttpServletResponse, mockDataId, mockGroup, mockTenant); assertEquals(localMockResult, mockProceedingJoinPointResult); Mockito.verify(capacityService, Mockito.times(1)).insertAndUpdateClusterUsage(eq(CounterMode.DECREMENT), anyBoolean()); - Mockito.verify(capacityService, Mockito.times(1)).insertAndUpdateTenantUsage(eq(CounterMode.DECREMENT), eq(mockTenant), anyBoolean()); + Mockito.verify(capacityService, Mockito.times(1)) + .insertAndUpdateTenantUsage(eq(CounterMode.DECREMENT), eq(mockTenant), anyBoolean()); Mockito.verify(proceedingJoinPoint, Mockito.times(2)).proceed(); localMockResult = null; try { - localMockResult = (String) capacityManagementAspect.aroundDeleteConfig(localMockProceedingJoinPoint, - mockHttpServletRequest, mockHttpServletResponse, mockDataId, mockGroup, mockTenant); + localMockResult = (String) capacityManagementAspect.aroundDeleteConfig(localMockProceedingJoinPoint, mockHttpServletRequest, + mockHttpServletResponse, mockDataId, mockGroup, mockTenant); } catch (Throwable e) { assertEquals(e.getMessage(), mockException.getMessage()); } assertNull(localMockResult); Mockito.verify(capacityService, Mockito.times(2)).insertAndUpdateClusterUsage(eq(CounterMode.DECREMENT), anyBoolean()); Mockito.verify(capacityService, Mockito.times(1)).updateClusterUsage(eq(CounterMode.INCREMENT)); - Mockito.verify(capacityService, Mockito.times(2)).insertAndUpdateTenantUsage(eq(CounterMode.DECREMENT), eq(mockTenant), anyBoolean()); + Mockito.verify(capacityService, Mockito.times(2)) + .insertAndUpdateTenantUsage(eq(CounterMode.DECREMENT), eq(mockTenant), anyBoolean()); Mockito.verify(capacityService, Mockito.times(1)).updateTenantUsage(eq(CounterMode.INCREMENT), eq(mockTenant)); Mockito.verify(localMockProceedingJoinPoint, Mockito.times(1)).proceed(); } @Test - public void testAroundDeleteConfigForGroup() throws Throwable { + void testAroundDeleteConfigForGroup() throws Throwable { when(PropertyUtil.isManageCapacity()).thenReturn(true); when(configInfoPersistService.findConfigInfo(any(), any(), any())).thenReturn(null); when(capacityService.insertAndUpdateClusterUsage(any(), anyBoolean())).thenReturn(true); @@ -445,8 +446,8 @@ public void testAroundDeleteConfigForGroup() throws Throwable { localMockResult = null; try { - localMockResult = (String) capacityManagementAspect.aroundDeleteConfig(localMockProceedingJoinPoint, - mockHttpServletRequest, mockHttpServletResponse, mockDataId, mockGroup, null); + localMockResult = (String) capacityManagementAspect.aroundDeleteConfig(localMockProceedingJoinPoint, mockHttpServletRequest, + mockHttpServletResponse, mockDataId, mockGroup, null); } catch (Throwable e) { assertEquals(e.getMessage(), mockException.getMessage()); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspectTest.java b/config/src/test/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspectTest.java index 612b8db93c6..0f31ad53ae5 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspectTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspectTest.java @@ -35,15 +35,14 @@ import com.alibaba.nacos.plugin.config.spi.ConfigChangePluginService; import com.alibaba.nacos.sys.utils.PropertiesUtil; import org.aspectj.lang.ProceedingJoinPoint; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; @@ -51,11 +50,14 @@ import java.util.Arrays; import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; -@RunWith(SpringJUnit4ClassRunner.class) -public class ConfigChangeAspectTest { +@ExtendWith(SpringExtension.class) +class ConfigChangeAspectTest { ConfigChangeAspect configChangeAspect; @@ -68,17 +70,17 @@ public class ConfigChangeAspectTest { MockedStatic requestUtilMockedStatic; - @Before - public void before() { + @BeforeEach + void before() { //mock config change service enabled. propertiesStatic = Mockito.mockStatic(PropertiesUtil.class); requestUtilMockedStatic = Mockito.mockStatic(RequestUtil.class); Properties properties = new Properties(); properties.put("mockedConfigChangeService.enabled", "true"); - propertiesStatic.when(() -> PropertiesUtil.getPropertiesWithPrefix(any(), - eq(ConfigChangeConstants.NACOS_CORE_CONFIG_PLUGIN_PREFIX))).thenReturn(properties); - requestUtilMockedStatic.when(() -> RequestUtil.getSrcUserName(any(HttpServletRequest.class))) - .thenReturn("mockedUser"); + propertiesStatic.when( + () -> PropertiesUtil.getPropertiesWithPrefix(any(), eq(ConfigChangeConstants.NACOS_CORE_CONFIG_PLUGIN_PREFIX))) + .thenReturn(properties); + requestUtilMockedStatic.when(() -> RequestUtil.getSrcUserName(any(HttpServletRequest.class))).thenReturn("mockedUser"); Mockito.when(configChangePluginService.getServiceType()).thenReturn("mockedConfigChangeService"); Mockito.when(configChangePluginService.pointcutMethodNames()).thenReturn(ConfigChangePointCutTypes.values()); Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_AFTER_TYPE); @@ -89,14 +91,14 @@ public void before() { configChangeAspect = new ConfigChangeAspect(configChangeConfigs); } - @After - public void after() { + @AfterEach + void after() { propertiesStatic.close(); requestUtilMockedStatic.close(); } @Test - public void testImportConfigAround() throws Throwable { + void testImportConfigAround() throws Throwable { Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_AFTER_TYPE); ProceedingJoinPoint proceedingJoinPoint = Mockito.mock(ProceedingJoinPoint.class); HttpServletRequest request = Mockito.mock(HttpServletRequest.class); @@ -105,19 +107,18 @@ public void testImportConfigAround() throws Throwable { SameConfigPolicy policy = SameConfigPolicy.ABORT; MultipartFile file = Mockito.mock(MultipartFile.class); Mockito.when(proceedingJoinPoint.proceed(any())).thenReturn("mock success return"); - Object o = configChangeAspect.importConfigAround(proceedingJoinPoint, request, srcUser, namespace, policy, - file); + Object o = configChangeAspect.importConfigAround(proceedingJoinPoint, request, srcUser, namespace, policy, file); Thread.sleep(20L); // expect service executed. Mockito.verify(configChangePluginService, Mockito.times(1)) .execute(any(ConfigChangeRequest.class), any(ConfigChangeResponse.class)); //expect join point processed success. - Assert.assertEquals("mock success return", o); + assertEquals("mock success return", o); } @Test - public void testPublishOrUpdateConfigAround() throws Throwable { + void testPublishOrUpdateConfigAround() throws Throwable { Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_AFTER_TYPE); ProceedingJoinPoint proceedingJoinPoint = Mockito.mock(ProceedingJoinPoint.class); HttpServletRequest request = Mockito.mock(HttpServletRequest.class); @@ -128,19 +129,19 @@ public void testPublishOrUpdateConfigAround() throws Throwable { String group = "g1"; String tenant = "t1"; Mockito.when(proceedingJoinPoint.proceed(any())).thenReturn("mock success return"); - Object o = configChangeAspect.publishOrUpdateConfigAround(proceedingJoinPoint, request, response, dataId, group, - tenant, "c1", null, null, srcUser, null, null, null, null, null); + Object o = configChangeAspect.publishOrUpdateConfigAround(proceedingJoinPoint, request, response, dataId, group, tenant, "c1", null, + null, srcUser, null, null, null, null, null); Thread.sleep(20L); // expect service executed. Mockito.verify(configChangePluginService, Mockito.times(1)) .execute(any(ConfigChangeRequest.class), any(ConfigChangeResponse.class)); //expect join point processed success. - Assert.assertEquals("mock success return", o); + assertEquals("mock success return", o); } @Test - public void testRemoveConfigByIdAround() throws Throwable { + void testRemoveConfigByIdAround() throws Throwable { Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_AFTER_TYPE); ProceedingJoinPoint proceedingJoinPoint = Mockito.mock(ProceedingJoinPoint.class); HttpServletRequest request = Mockito.mock(HttpServletRequest.class); @@ -150,19 +151,18 @@ public void testRemoveConfigByIdAround() throws Throwable { String group = "g1"; String tenant = "t1"; Mockito.when(proceedingJoinPoint.proceed(any())).thenReturn("mock success return"); - Object o = configChangeAspect.removeConfigByIdAround(proceedingJoinPoint, request, response, dataId, group, - tenant); + Object o = configChangeAspect.removeConfigByIdAround(proceedingJoinPoint, request, response, dataId, group, tenant); Thread.sleep(20L); // expect service executed. Mockito.verify(configChangePluginService, Mockito.times(1)) .execute(any(ConfigChangeRequest.class), any(ConfigChangeResponse.class)); //expect join point processed success. - Assert.assertEquals("mock success return", o); + assertEquals("mock success return", o); } @Test - public void testRemoveConfigByIdsAround() throws Throwable { + void testRemoveConfigByIdsAround() throws Throwable { Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_AFTER_TYPE); ProceedingJoinPoint proceedingJoinPoint = Mockito.mock(ProceedingJoinPoint.class); HttpServletRequest request = Mockito.mock(HttpServletRequest.class); @@ -174,11 +174,11 @@ public void testRemoveConfigByIdsAround() throws Throwable { Mockito.verify(configChangePluginService, Mockito.times(1)) .execute(any(ConfigChangeRequest.class), any(ConfigChangeResponse.class)); //expect join point processed success. - Assert.assertEquals("mock success return", o); + assertEquals("mock success return", o); } @Test - public void testPublishConfigAroundRpc() throws Throwable { + void testPublishConfigAroundRpc() throws Throwable { Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_BEFORE_TYPE); ProceedingJoinPoint proceedingJoinPoint = Mockito.mock(ProceedingJoinPoint.class); ConfigPublishRequest request = new ConfigPublishRequest(); @@ -190,11 +190,11 @@ public void testPublishConfigAroundRpc() throws Throwable { //expect Mockito.verify(configChangePluginService, Mockito.times(1)) .execute(any(ConfigChangeRequest.class), any(ConfigChangeResponse.class)); - Assert.assertEquals(configPublishResponse, o); + assertEquals(configPublishResponse, o); } @Test - public void testPublishConfigAroundRpcException() throws Throwable { + void testPublishConfigAroundRpcException() throws Throwable { Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_BEFORE_TYPE); ProceedingJoinPoint proceedingJoinPoint = Mockito.mock(ProceedingJoinPoint.class); ConfigPublishRequest request = new ConfigPublishRequest(); @@ -207,11 +207,11 @@ public void testPublishConfigAroundRpcException() throws Throwable { Mockito.verify(configChangePluginService, Mockito.times(1)) .execute(any(ConfigChangeRequest.class), any(ConfigChangeResponse.class)); - Assert.assertTrue(((ConfigPublishResponse) o).getMessage().contains("config change join point fail")); + assertTrue(((ConfigPublishResponse) o).getMessage().contains("config change join point fail")); } @Test - public void testRemoveConfigAroundRpc() throws Throwable { + void testRemoveConfigAroundRpc() throws Throwable { Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_BEFORE_TYPE); ProceedingJoinPoint proceedingJoinPoint = Mockito.mock(ProceedingJoinPoint.class); ConfigRemoveRequest request = new ConfigRemoveRequest(); @@ -223,35 +223,35 @@ public void testRemoveConfigAroundRpc() throws Throwable { //expect Mockito.verify(configChangePluginService, Mockito.times(1)) .execute(any(ConfigChangeRequest.class), any(ConfigChangeResponse.class)); - Assert.assertEquals(configPublishResponse, o); + assertEquals(configPublishResponse, o); } @Test - public void testRemoveConfigAroundRpcException() throws Throwable { + void testRemoveConfigAroundRpcException() throws Throwable { Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_BEFORE_TYPE); ProceedingJoinPoint proceedingJoinPoint = Mockito.mock(ProceedingJoinPoint.class); ConfigRemoveRequest request = new ConfigRemoveRequest(); RequestMeta requestMeta = new RequestMeta(); - + Mockito.when(proceedingJoinPoint.proceed(any())).thenThrow(new NacosRuntimeException(503)); //execute Object o = configChangeAspect.removeConfigAroundRpc(proceedingJoinPoint, request, requestMeta); //expect Mockito.verify(configChangePluginService, Mockito.times(1)) .execute(any(ConfigChangeRequest.class), any(ConfigChangeResponse.class)); - - Assert.assertTrue(((ConfigRemoveResponse) o).getMessage().contains("config change join point fail")); + + assertTrue(((ConfigRemoveResponse) o).getMessage().contains("config change join point fail")); } @Test - public void testDisEnablePluginService() throws Throwable { + void testDisEnablePluginService() throws Throwable { Properties properties = new Properties(); properties.put("mockedConfigChangeService.enabled", "false"); - propertiesStatic.when(() -> PropertiesUtil.getPropertiesWithPrefix(any(), - eq(ConfigChangeConstants.NACOS_CORE_CONFIG_PLUGIN_PREFIX))).thenReturn(properties); + propertiesStatic.when( + () -> PropertiesUtil.getPropertiesWithPrefix(any(), eq(ConfigChangeConstants.NACOS_CORE_CONFIG_PLUGIN_PREFIX))) + .thenReturn(properties); configChangeConfigs.onEvent(ServerConfigChangeEvent.newEvent()); - Assert.assertFalse(Boolean.parseBoolean(configChangeConfigs - .getPluginProperties("mockedConfigChangeService").getProperty("enabled"))); + assertFalse(Boolean.parseBoolean(configChangeConfigs.getPluginProperties("mockedConfigChangeService").getProperty("enabled"))); Mockito.when(configChangePluginService.executeType()).thenReturn(ConfigChangeExecuteTypes.EXECUTE_BEFORE_TYPE); Mockito.when(configChangePluginService.getServiceType()).thenReturn("mockedConfigChangeService"); @@ -265,7 +265,7 @@ public void testDisEnablePluginService() throws Throwable { //expect Mockito.verify(configChangePluginService, Mockito.times(0)) .execute(any(ConfigChangeRequest.class), any(ConfigChangeResponse.class)); - Assert.assertEquals(configPublishResponse, o); + assertEquals(configPublishResponse, o); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/configuration/ConfigChangeConfigsTest.java b/config/src/test/java/com/alibaba/nacos/config/server/configuration/ConfigChangeConfigsTest.java index 8afdbdb085b..3ae828c1cc4 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/configuration/ConfigChangeConfigsTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/configuration/ConfigChangeConfigsTest.java @@ -18,24 +18,26 @@ import com.alibaba.nacos.common.event.ServerConfigChangeEvent; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.mock.env.MockEnvironment; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Nacos config change configs test. * * @author liyunfei **/ -public class ConfigChangeConfigsTest { +class ConfigChangeConfigsTest { private ConfigChangeConfigs configChangeConfigs; private MockEnvironment environment; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { environment = new MockEnvironment(); environment.setProperty("nacos.core.config.plugin.mockPlugin.enabled", "true"); EnvUtil.setEnvironment(environment); @@ -43,17 +45,15 @@ public void setUp() throws Exception { } @Test - public void testEnable() { - Assert.assertTrue(Boolean.parseBoolean(configChangeConfigs - .getPluginProperties("mockPlugin").getProperty("enabled"))); + void testEnable() { + assertTrue(Boolean.parseBoolean(configChangeConfigs.getPluginProperties("mockPlugin").getProperty("enabled"))); } @Test - public void testUpgradeEnable() { + void testUpgradeEnable() { environment.setProperty("nacos.core.config.plugin.mockPlugin.enabled", "false"); configChangeConfigs.onEvent(ServerConfigChangeEvent.newEvent()); - Assert.assertFalse(Boolean.parseBoolean(configChangeConfigs - .getPluginProperties("mockPlugin").getProperty("enabled"))); + assertFalse(Boolean.parseBoolean(configChangeConfigs.getPluginProperties("mockPlugin").getProperty("enabled"))); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/configuration/ConfigCommonConfigTest.java b/config/src/test/java/com/alibaba/nacos/config/server/configuration/ConfigCommonConfigTest.java index 86c0fb35dc9..baccac41c4e 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/configuration/ConfigCommonConfigTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/configuration/ConfigCommonConfigTest.java @@ -18,28 +18,27 @@ import com.alibaba.nacos.common.event.ServerConfigChangeEvent; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.mock.env.MockEnvironment; import java.lang.reflect.Constructor; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Nacos config common configs test. * * @author blake.qiu */ -public class ConfigCommonConfigTest { +class ConfigCommonConfigTest { private ConfigCommonConfig commonConfig; private MockEnvironment environment; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { environment = new MockEnvironment(); EnvUtil.setEnvironment(environment); Constructor declaredConstructor = ConfigCommonConfig.class.getDeclaredConstructor(); @@ -48,13 +47,13 @@ public void setUp() throws Exception { } @Test - public void getMaxPushRetryTimes() { + void getMaxPushRetryTimes() { Integer property = EnvUtil.getProperty("nacos.config.push.maxRetryTime", Integer.class, 50); assertEquals(property.intValue(), commonConfig.getMaxPushRetryTimes()); } @Test - public void setMaxPushRetryTimes() { + void setMaxPushRetryTimes() { int maxPushRetryTimesOld = commonConfig.getMaxPushRetryTimes(); commonConfig.setMaxPushRetryTimes(100); assertEquals(100, commonConfig.getMaxPushRetryTimes()); @@ -62,20 +61,20 @@ public void setMaxPushRetryTimes() { } @Test - public void testUpgradeFromEvent() { + void testUpgradeFromEvent() { environment.setProperty("nacos.config.push.maxRetryTime", "100"); commonConfig.onEvent(ServerConfigChangeEvent.newEvent()); assertEquals(100, commonConfig.getMaxPushRetryTimes()); } @Test - public void testInitConfigFormEnv() throws ReflectiveOperationException { + void testInitConfigFormEnv() throws ReflectiveOperationException { MockEnvironment environment = new MockEnvironment(); EnvUtil.setEnvironment(environment); environment.setProperty("nacos.config.push.maxRetryTime", "6"); Constructor declaredConstructor = ConfigCommonConfig.class.getDeclaredConstructor(); declaredConstructor.setAccessible(true); ConfigCommonConfig configCommonConfig = declaredConstructor.newInstance(); - Assert.assertEquals(6, configCommonConfig.getMaxPushRetryTimes()); + assertEquals(6, configCommonConfig.getMaxPushRetryTimes()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/constant/ConfigModuleStateBuilderTest.java b/config/src/test/java/com/alibaba/nacos/config/server/constant/ConfigModuleStateBuilderTest.java index 2f974b00b7b..f0294f60489 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/constant/ConfigModuleStateBuilderTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/constant/ConfigModuleStateBuilderTest.java @@ -21,14 +21,15 @@ import com.alibaba.nacos.plugin.datasource.constants.CommonConstant; import com.alibaba.nacos.sys.env.EnvUtil; import com.alibaba.nacos.sys.module.ModuleState; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.mock.env.MockEnvironment; import java.util.Map; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * config module state builder test. @@ -36,29 +37,27 @@ * @author 985492783@qq.com * @date 2023/4/7 23:34 */ -public class ConfigModuleStateBuilderTest { +class ConfigModuleStateBuilderTest { private ConfigurableEnvironment environment; - @Before - public void setUp() { - environment = new MockEnvironment() - .withProperty(PersistenceConstant.DATASOURCE_PLATFORM_PROPERTY, PersistenceConstant.DERBY) + @BeforeEach + void setUp() { + environment = new MockEnvironment().withProperty(PersistenceConstant.DATASOURCE_PLATFORM_PROPERTY, PersistenceConstant.DERBY) .withProperty(CommonConstant.NACOS_PLUGIN_DATASOURCE_LOG, "true"); EnvUtil.setEnvironment(environment); } @Test - public void testBuild() { + void testBuild() { ModuleState actual = new ConfigModuleStateBuilder().build(); Map states = actual.getStates(); assertEquals(PersistenceConstant.DERBY, states.get(Constants.DATASOURCE_PLATFORM_PROPERTY_STATE)); - assertEquals(true, states.get(Constants.NACOS_PLUGIN_DATASOURCE_LOG_STATE)); + assertTrue((Boolean) states.get(Constants.NACOS_PLUGIN_DATASOURCE_LOG_STATE)); assertEquals(PropertyUtil.getNotifyConnectTimeout(), states.get(PropertiesConstant.NOTIFY_CONNECT_TIMEOUT)); assertEquals(PropertyUtil.getNotifySocketTimeout(), states.get(PropertiesConstant.NOTIFY_SOCKET_TIMEOUT)); assertEquals(PropertyUtil.isHealthCheck(), states.get(PropertiesConstant.IS_HEALTH_CHECK)); - assertEquals(PropertyUtil.getMaxHealthCheckFailCount(), - states.get(PropertiesConstant.MAX_HEALTH_CHECK_FAIL_COUNT)); + assertEquals(PropertyUtil.getMaxHealthCheckFailCount(), states.get(PropertiesConstant.MAX_HEALTH_CHECK_FAIL_COUNT)); assertEquals(PropertyUtil.getMaxContent(), states.get(PropertiesConstant.MAX_CONTENT)); assertEquals(PropertyUtil.isManageCapacity(), states.get(PropertiesConstant.IS_MANAGE_CAPACITY)); assertEquals(PropertyUtil.isCapacityLimitCheck(), states.get(PropertiesConstant.IS_CAPACITY_LIMIT_CHECK)); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/constant/ConstantsTest.java b/config/src/test/java/com/alibaba/nacos/config/server/constant/ConstantsTest.java index f16e58ba244..c74906f8f29 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/constant/ConstantsTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/constant/ConstantsTest.java @@ -16,8 +16,7 @@ package com.alibaba.nacos.config.server.constant; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static com.alibaba.nacos.config.server.constant.Constants.CAPACITY_CONTROLLER_PATH; import static com.alibaba.nacos.config.server.constant.Constants.COMMUNICATION_CONTROLLER_PATH; @@ -29,26 +28,27 @@ import static com.alibaba.nacos.config.server.constant.Constants.NAMESPACE_CONTROLLER_PATH; import static com.alibaba.nacos.config.server.constant.Constants.OPS_CONTROLLER_PATH; import static com.alibaba.nacos.config.server.constant.Constants.RECV_WAIT_TIMEOUT; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class ConstantsTest { +class ConstantsTest { @Test - public void testControllerPathsDefaultValues() { + void testControllerPathsDefaultValues() { - Assert.assertEquals("/v1/cs/ops", OPS_CONTROLLER_PATH); - Assert.assertEquals("/v1/cs/capacity", CAPACITY_CONTROLLER_PATH); - Assert.assertEquals("/v1/cs/communication", COMMUNICATION_CONTROLLER_PATH); - Assert.assertEquals("/v1/cs/configs", CONFIG_CONTROLLER_PATH); - Assert.assertEquals("/v1/cs/health", HEALTH_CONTROLLER_PATH); - Assert.assertEquals("/v1/cs/history", HISTORY_CONTROLLER_PATH); - Assert.assertEquals("/v1/cs/listener", LISTENER_CONTROLLER_PATH); - Assert.assertEquals("/v1/cs/namespaces", NAMESPACE_CONTROLLER_PATH); - Assert.assertEquals("/v1/cs/metrics", METRICS_CONTROLLER_PATH); + assertEquals("/v1/cs/ops", OPS_CONTROLLER_PATH); + assertEquals("/v1/cs/capacity", CAPACITY_CONTROLLER_PATH); + assertEquals("/v1/cs/communication", COMMUNICATION_CONTROLLER_PATH); + assertEquals("/v1/cs/configs", CONFIG_CONTROLLER_PATH); + assertEquals("/v1/cs/health", HEALTH_CONTROLLER_PATH); + assertEquals("/v1/cs/history", HISTORY_CONTROLLER_PATH); + assertEquals("/v1/cs/listener", LISTENER_CONTROLLER_PATH); + assertEquals("/v1/cs/namespaces", NAMESPACE_CONTROLLER_PATH); + assertEquals("/v1/cs/metrics", METRICS_CONTROLLER_PATH); } @Test - public void testRecvWaitTimeoutDefaultValue() { + void testRecvWaitTimeoutDefaultValue() { - Assert.assertEquals(10000, RECV_WAIT_TIMEOUT); + assertEquals(10000, RECV_WAIT_TIMEOUT); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/constant/CounterModeTest.java b/config/src/test/java/com/alibaba/nacos/config/server/constant/CounterModeTest.java index ce6bddb8712..0043566b645 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/constant/CounterModeTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/constant/CounterModeTest.java @@ -16,21 +16,22 @@ package com.alibaba.nacos.config.server.constant; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mock; -public class CounterModeTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class CounterModeTest { @Mock CounterMode counterMode; @Test - public void testReverse() { + void testReverse() { counterMode = CounterMode.INCREMENT; - Assert.assertEquals(CounterMode.DECREMENT, counterMode.reverse()); + assertEquals(CounterMode.DECREMENT, counterMode.reverse()); counterMode = CounterMode.DECREMENT; - Assert.assertEquals(CounterMode.INCREMENT, counterMode.reverse()); + assertEquals(CounterMode.INCREMENT, counterMode.reverse()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/CapacityControllerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/CapacityControllerTest.java index 28ef4a9d732..0e3e0897943 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/CapacityControllerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/CapacityControllerTest.java @@ -21,16 +21,15 @@ import com.alibaba.nacos.config.server.model.capacity.Capacity; import com.alibaba.nacos.config.server.service.capacity.CapacityService; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.springframework.core.env.StandardEnvironment; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; @@ -41,13 +40,15 @@ import javax.servlet.ServletContext; import java.sql.Timestamp; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) @WebAppConfiguration -public class CapacityControllerTest { +class CapacityControllerTest { @InjectMocks CapacityController capacityController; @@ -60,8 +61,8 @@ public class CapacityControllerTest { @Mock private ServletContext servletContext; - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); when(servletContext.getContextPath()).thenReturn("/nacos"); ReflectionTestUtils.setField(capacityController, "capacityService", capacityService); @@ -69,7 +70,7 @@ public void setUp() { } @Test - public void testGetCapacityNormal() throws Exception { + void testGetCapacityNormal() throws Exception { Capacity capacity = new Capacity(); capacity.setId(1L); @@ -80,22 +81,22 @@ public void testGetCapacityNormal() throws Exception { capacity.setGmtModified(new Timestamp(2)); when(capacityService.getCapacityWithDefault(eq("test"), eq("test"))).thenReturn(capacity); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CAPACITY_CONTROLLER_PATH) - .param("group", "test").param("tenant", "test"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CAPACITY_CONTROLLER_PATH).param("group", "test") + .param("tenant", "test"); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); Capacity result = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get("data").toString(), Capacity.class); - Assert.assertNotNull(result); - Assert.assertEquals(capacity.getId(), result.getId()); - Assert.assertEquals(capacity.getMaxAggrCount(), result.getMaxAggrCount()); - Assert.assertEquals(capacity.getMaxSize(), result.getMaxSize()); - Assert.assertEquals(capacity.getMaxAggrSize(), result.getMaxAggrSize()); - Assert.assertEquals(capacity.getGmtCreate(), result.getGmtCreate()); - Assert.assertEquals(capacity.getGmtModified(), result.getGmtModified()); + assertNotNull(result); + assertEquals(capacity.getId(), result.getId()); + assertEquals(capacity.getMaxAggrCount(), result.getMaxAggrCount()); + assertEquals(capacity.getMaxSize(), result.getMaxSize()); + assertEquals(capacity.getMaxAggrSize(), result.getMaxAggrSize()); + assertEquals(capacity.getGmtCreate(), result.getGmtCreate()); + assertEquals(capacity.getGmtModified(), result.getGmtModified()); } @Test - public void testGetCapacityException() throws Exception { + void testGetCapacityException() throws Exception { Capacity capacity = new Capacity(); capacity.setId(1L); @@ -111,70 +112,67 @@ public void testGetCapacityException() throws Exception { System.out.println(actualValue); // tenant is blank& group is null - MockHttpServletRequestBuilder builder2 = MockMvcRequestBuilders.get(Constants.CAPACITY_CONTROLLER_PATH) - .param("tenant", ""); + MockHttpServletRequestBuilder builder2 = MockMvcRequestBuilders.get(Constants.CAPACITY_CONTROLLER_PATH).param("tenant", ""); String actualValue2 = mockMvc.perform(builder2).andReturn().getResponse().getContentAsString(); System.out.println(actualValue2); // tenant is blank& group is null when(capacityService.getCapacityWithDefault(eq("g1"), eq("123"))).thenThrow(new NullPointerException()); - MockHttpServletRequestBuilder builder3 = MockMvcRequestBuilders.get(Constants.CAPACITY_CONTROLLER_PATH) - .param("tenant", "123").param("group", "g1"); + MockHttpServletRequestBuilder builder3 = MockMvcRequestBuilders.get(Constants.CAPACITY_CONTROLLER_PATH).param("tenant", "123") + .param("group", "g1"); String actualValue3 = mockMvc.perform(builder3).andReturn().getResponse().getContentAsString(); System.out.println(actualValue3); } @Test - public void testUpdateCapacity1x() throws Exception { + void testUpdateCapacity1x() throws Exception { when(capacityService.insertOrUpdateCapacity("test", "test", 1, 1, 1, 1)).thenReturn(true); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CAPACITY_CONTROLLER_PATH) - .param("group", "test").param("tenant", "test").param("quota", "1").param("maxSize", "1") - .param("maxAggrCount", "1").param("maxAggrSize", "1"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CAPACITY_CONTROLLER_PATH).param("group", "test") + .param("tenant", "test").param("quota", "1").param("maxSize", "1").param("maxAggrCount", "1").param("maxAggrSize", "1"); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); String data = JacksonUtils.toObj(actualValue).get("data").toString(); - Assert.assertEquals("200", code); - Assert.assertEquals("true", data); + assertEquals("200", code); + assertEquals("true", data); } @Test - public void testUpdateCapacity2x() throws Exception { + void testUpdateCapacity2x() throws Exception { MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CAPACITY_CONTROLLER_PATH); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); String data = JacksonUtils.toObj(actualValue).get("data").toString(); - Assert.assertEquals("400", code); - Assert.assertEquals("false", data); + assertEquals("400", code); + assertEquals("false", data); } @Test - public void testUpdateCapacity3x() throws Exception { + void testUpdateCapacity3x() throws Exception { - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CAPACITY_CONTROLLER_PATH) - .param("group", "test").param("tenant", "test"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CAPACITY_CONTROLLER_PATH).param("group", "test") + .param("tenant", "test"); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); String data = JacksonUtils.toObj(actualValue).get("data").toString(); - Assert.assertEquals("400", code); - Assert.assertEquals("false", data); + assertEquals("400", code); + assertEquals("false", data); } @Test - public void testUpdateCapacity4x() throws Exception { + void testUpdateCapacity4x() throws Exception { when(capacityService.insertOrUpdateCapacity("test", "test", 1, 1, 1, 1)).thenReturn(false); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CAPACITY_CONTROLLER_PATH) - .param("group", "test").param("tenant", "test").param("quota", "1").param("maxSize", "1") - .param("maxAggrCount", "1").param("maxAggrSize", "1"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CAPACITY_CONTROLLER_PATH).param("group", "test") + .param("tenant", "test").param("quota", "1").param("maxSize", "1").param("maxAggrCount", "1").param("maxAggrSize", "1"); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); String data = JacksonUtils.toObj(actualValue).get("data").toString(); - Assert.assertEquals("500", code); - Assert.assertEquals("false", data); + assertEquals("500", code); + assertEquals("false", data); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/ClientMetricsControllerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/ClientMetricsControllerTest.java index d674ea4cacc..7c61815d245 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/ClientMetricsControllerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/ClientMetricsControllerTest.java @@ -24,17 +24,16 @@ import com.alibaba.nacos.core.remote.Connection; import com.alibaba.nacos.core.remote.ConnectionManager; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.springframework.core.env.StandardEnvironment; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; @@ -43,22 +42,22 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders; import javax.servlet.ServletContext; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.CountDownLatch; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) @WebAppConfiguration -public class ClientMetricsControllerTest { +class ClientMetricsControllerTest { @InjectMocks ClientMetricsController clientMetricsController; @@ -74,8 +73,8 @@ public class ClientMetricsControllerTest { @Mock private ServletContext servletContext; - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); when(servletContext.getContextPath()).thenReturn("/nacos"); ReflectionTestUtils.setField(clientMetricsController, "serverMemberManager", memberManager); @@ -84,7 +83,7 @@ public void setUp() { } @Test - public void testGetClusterMetric() throws Exception { + void testGetClusterMetric() throws Exception { List members = new ArrayList<>(); Member m1 = new Member(); m1.setIp("127.0.0.1"); @@ -101,15 +100,14 @@ public void testGetClusterMetric() throws Exception { when(memberManager.allMembers()).thenReturn(members); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get( - Constants.METRICS_CONTROLLER_PATH + "/cluster").param("ip", "127.0.0.1").param("tenant", "test") - .param("dataId", "test").param("group", "test"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.METRICS_CONTROLLER_PATH + "/cluster") + .param("ip", "127.0.0.1").param("tenant", "test").param("dataId", "test").param("group", "test"); int actualValue = mockMvc.perform(builder).andReturn().getResponse().getStatus(); - Assert.assertEquals(200, actualValue); + assertEquals(200, actualValue); } @Test - public void testClusterMetricsCallBack() { + void testClusterMetricsCallBack() { Member m1 = new Member(); m1.setIp("127.0.0.1"); @@ -142,12 +140,12 @@ public void testClusterMetricsCallBack() { clusterMetricsCallBack.onError(new NullPointerException()); clusterMetricsCallBack.onCancel(); clusterMetricsCallBack.onCancel(); - Assert.assertEquals(stringObjectHashMap, responseMap); - Assert.assertEquals(0, latch.getCount()); + assertEquals(stringObjectHashMap, responseMap); + assertEquals(0, latch.getCount()); } @Test - public void testGetCurrentMetric() throws Exception { + void testGetCurrentMetric() throws Exception { ClientConfigMetricResponse response = new ClientConfigMetricResponse(); response.putMetric("test", "test"); @@ -157,11 +155,10 @@ public void testGetCurrentMetric() throws Exception { connections.add(connection); when(connectionManager.getConnectionByIp(eq("127.0.0.1"))).thenReturn(connections); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get( - Constants.METRICS_CONTROLLER_PATH + "/current").param("ip", "127.0.0.1").param("tenant", "test") - .param("dataId", "test").param("group", "test"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.METRICS_CONTROLLER_PATH + "/current") + .param("ip", "127.0.0.1").param("tenant", "test").param("dataId", "test").param("group", "test"); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("{\"test\":\"test\"}", actualValue); + assertEquals("{\"test\":\"test\"}", actualValue); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/CommunicationControllerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/CommunicationControllerTest.java index 7576436b098..3bbd9d7f745 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/CommunicationControllerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/CommunicationControllerTest.java @@ -28,16 +28,15 @@ import com.alibaba.nacos.core.remote.ConnectionMeta; import com.alibaba.nacos.core.remote.grpc.GrpcConnection; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.springframework.core.env.StandardEnvironment; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; @@ -46,7 +45,6 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders; import javax.servlet.ServletContext; - import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -54,21 +52,17 @@ import java.util.Map; import java.util.Set; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) @WebAppConfiguration -public class CommunicationControllerTest { +class CommunicationControllerTest { @InjectMocks CommunicationController communicationController; - private MockMvc mockMvc; - - @Mock - private ServletContext servletContext; - @Mock DumpService dumpService; @@ -81,8 +75,13 @@ public class CommunicationControllerTest { @Mock ConnectionManager connectionManager; - @Before - public void setUp() { + private MockMvc mockMvc; + + @Mock + private ServletContext servletContext; + + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); when(servletContext.getContextPath()).thenReturn("/nacos"); ReflectionTestUtils.setField(communicationController, "longPollingService", longPollingService); @@ -92,8 +91,8 @@ public void setUp() { } @Test - public void testGetSubClientConfig1x() throws Exception { - + void testGetSubClientConfig1x() throws Exception { + SampleResult result = new SampleResult(); Map lisentersGroupkeyStatus = new HashMap<>(); lisentersGroupkeyStatus.put("test", "test"); @@ -103,11 +102,11 @@ public void testGetSubClientConfig1x() throws Exception { MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.COMMUNICATION_CONTROLLER_PATH + "/configWatchers") .param("dataId", "test").param("group", "test").param("tenant", "test"); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("{\"test\":\"test\"}", JacksonUtils.toObj(actualValue).get("lisentersGroupkeyStatus").toString()); + assertEquals("{\"test\":\"test\"}", JacksonUtils.toObj(actualValue).get("lisentersGroupkeyStatus").toString()); } @Test - public void testGetSubClientConfig2x() throws Exception { + void testGetSubClientConfig2x() throws Exception { SampleResult result = new SampleResult(); result.setLisentersGroupkeyStatus(new HashMap<>()); @@ -117,7 +116,8 @@ public void testGetSubClientConfig2x() throws Exception { String connectionId = "127.0.0.1"; listenersClients.add(connectionId); when(configChangeListenContext.getListeners(groupKey)).thenReturn(listenersClients); - ConnectionMeta connectionMeta = new ConnectionMeta(connectionId, connectionId, connectionId, 8888, 9848, "GRPC", "", "", new HashMap<>()); + ConnectionMeta connectionMeta = new ConnectionMeta(connectionId, connectionId, connectionId, 8888, 9848, "GRPC", "", "", + new HashMap<>()); Connection client = new GrpcConnection(connectionMeta, null, null); when(connectionManager.getConnection(connectionId)).thenReturn(client); when(configChangeListenContext.getListenKeyMd5(connectionId, groupKey)).thenReturn("md5"); @@ -125,12 +125,12 @@ public void testGetSubClientConfig2x() throws Exception { MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.COMMUNICATION_CONTROLLER_PATH + "/configWatchers") .param("dataId", "test").param("group", "test").param("tenant", "test"); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("{\"127.0.0.1\":\"md5\"}", JacksonUtils.toObj(actualValue).get("lisentersGroupkeyStatus").toString()); + assertEquals("{\"127.0.0.1\":\"md5\"}", JacksonUtils.toObj(actualValue).get("lisentersGroupkeyStatus").toString()); } @Test - public void testGetSubClientConfigByIp() throws Exception { - + void testGetSubClientConfigByIp() throws Exception { + String ip = "127.0.0.1"; SampleResult result = new SampleResult(); result.setLisentersGroupkeyStatus(new HashMap<>()); @@ -143,11 +143,11 @@ public void testGetSubClientConfigByIp() throws Exception { Map map = new HashMap<>(); map.put("test", "test"); when(configChangeListenContext.getListenKeys(ip)).thenReturn(map); - + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.COMMUNICATION_CONTROLLER_PATH + "/watcherConfigs") .param("ip", ip); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("{\"test\":\"test\"}", JacksonUtils.toObj(actualValue).get("lisentersGroupkeyStatus").toString()); - + assertEquals("{\"test\":\"test\"}", JacksonUtils.toObj(actualValue).get("lisentersGroupkeyStatus").toString()); + } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigControllerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigControllerTest.java index d31a1c080ce..44c3010a18a 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigControllerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigControllerTest.java @@ -41,10 +41,9 @@ import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.sys.env.EnvUtil; import com.fasterxml.jackson.databind.JsonNode; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockedStatic; @@ -53,7 +52,7 @@ import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; @@ -69,16 +68,18 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicReference; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyList; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) @WebAppConfiguration -public class ConfigControllerTest { +class ConfigControllerTest { @InjectMocks ConfigController configController; @@ -106,8 +107,8 @@ public class ConfigControllerTest { @Mock private ConfigSubService configSubService; - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); when(servletContext.getContextPath()).thenReturn("/nacos"); ReflectionTestUtils.setField(configController, "configSubService", configSubService); @@ -120,27 +121,27 @@ public void setUp() { } @Test - public void testPublishConfig() throws Exception { + void testPublishConfig() throws Exception { when(configOperationService.publishConfig(any(), any(), anyString())).thenReturn(true); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CONFIG_CONTROLLER_PATH) - .param("dataId", "test").param("group", "test").param("tenant", "").param("content", "test") - .param("tag", "").param("appName", "").param("src_user", "").param("config_tags", "").param("desc", "") - .param("use", "").param("effect", "").param("type", "").param("schema", ""); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CONFIG_CONTROLLER_PATH).param("dataId", "test") + .param("group", "test").param("tenant", "").param("content", "test").param("tag", "").param("appName", "") + .param("src_user", "").param("config_tags", "").param("desc", "").param("use", "").param("effect", "").param("type", "") + .param("schema", ""); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("true", actualValue); + assertEquals("true", actualValue); } @Test - public void testGetConfig() throws Exception { - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH) - .param("dataId", "test").param("group", "test").param("tenant", "").param("tag", ""); + void testGetConfig() throws Exception { + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH).param("dataId", "test") + .param("group", "test").param("tenant", "").param("tag", ""); int actualValue = mockmvc.perform(builder).andReturn().getResponse().getStatus(); - Assert.assertEquals(200, actualValue); + assertEquals(200, actualValue); } @Test - public void testDetailConfigInfo() throws Exception { + void testDetailConfigInfo() throws Exception { ConfigAllInfo configAllInfo = new ConfigAllInfo(); configAllInfo.setDataId("test"); configAllInfo.setGroup("test"); @@ -149,32 +150,31 @@ public void testDetailConfigInfo() throws Exception { when(configInfoPersistService.findConfigAllInfo("test", "test", "")).thenReturn(configAllInfo); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH) - .param("show", "all").param("dataId", "test").param("group", "test").param("tenant", ""); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH).param("show", "all") + .param("dataId", "test").param("group", "test").param("tenant", ""); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); ConfigAllInfo resConfigAllInfo = JacksonUtils.toObj(actualValue, ConfigAllInfo.class); - Assert.assertEquals(configAllInfo.getDataId(), resConfigAllInfo.getDataId()); - Assert.assertEquals(configAllInfo.getGroup(), resConfigAllInfo.getGroup()); - Assert.assertEquals(configAllInfo.getCreateIp(), resConfigAllInfo.getCreateIp()); - Assert.assertEquals(configAllInfo.getCreateUser(), resConfigAllInfo.getCreateUser()); + assertEquals(configAllInfo.getDataId(), resConfigAllInfo.getDataId()); + assertEquals(configAllInfo.getGroup(), resConfigAllInfo.getGroup()); + assertEquals(configAllInfo.getCreateIp(), resConfigAllInfo.getCreateIp()); + assertEquals(configAllInfo.getCreateUser(), resConfigAllInfo.getCreateUser()); } @Test - public void testDeleteConfig() throws Exception { - when(configOperationService.deleteConfig(anyString(), anyString(), anyString(), anyString(), any(), - any())).thenReturn(true); + void testDeleteConfig() throws Exception { + when(configOperationService.deleteConfig(anyString(), anyString(), anyString(), anyString(), any(), any())).thenReturn(true); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.delete(Constants.CONFIG_CONTROLLER_PATH) - .param("dataId", "test").param("group", "test").param("tenant", "").param("tag", ""); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.delete(Constants.CONFIG_CONTROLLER_PATH).param("dataId", "test") + .param("group", "test").param("tenant", "").param("tag", ""); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("true", actualValue); + assertEquals("true", actualValue); } @Test - public void testDeleteConfigs() throws Exception { + void testDeleteConfigs() throws Exception { List resultInfos = new ArrayList<>(); String dataId = "dataId1123"; @@ -200,22 +200,22 @@ public Class subscribeType() { } }); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.delete(Constants.CONFIG_CONTROLLER_PATH) - .param("delType", "ids").param("ids", "1,2"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.delete(Constants.CONFIG_CONTROLLER_PATH).param("delType", "ids") + .param("ids", "1,2"); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); String data = JacksonUtils.toObj(actualValue).get("data").toString(); - Assert.assertEquals("200", code); - Assert.assertEquals("true", data); + assertEquals("200", code); + assertEquals("true", data); Thread.sleep(200L); //expect - Assert.assertTrue(reference.get() != null); + assertTrue(reference.get() != null); } @Test - public void testGetConfigAdvanceInfo() throws Exception { + void testGetConfigAdvanceInfo() throws Exception { ConfigAdvanceInfo configAdvanceInfo = new ConfigAdvanceInfo(); configAdvanceInfo.setCreateIp("localhost"); @@ -224,31 +224,30 @@ public void testGetConfigAdvanceInfo() throws Exception { when(configInfoPersistService.findConfigAdvanceInfo("test", "test", "")).thenReturn(configAdvanceInfo); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get( - Constants.CONFIG_CONTROLLER_PATH + "/catalog").param("dataId", "test").param("group", "test") - .param("tenant", ""); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH + "/catalog") + .param("dataId", "test").param("group", "test").param("tenant", ""); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); String data = JacksonUtils.toObj(actualValue).get("data").toString(); ConfigAdvanceInfo resConfigAdvanceInfo = JacksonUtils.toObj(data, ConfigAdvanceInfo.class); - Assert.assertEquals("200", code); - Assert.assertEquals(configAdvanceInfo.getCreateIp(), resConfigAdvanceInfo.getCreateIp()); - Assert.assertEquals(configAdvanceInfo.getCreateUser(), resConfigAdvanceInfo.getCreateUser()); - Assert.assertEquals(configAdvanceInfo.getDesc(), resConfigAdvanceInfo.getDesc()); + assertEquals("200", code); + assertEquals(configAdvanceInfo.getCreateIp(), resConfigAdvanceInfo.getCreateIp()); + assertEquals(configAdvanceInfo.getCreateUser(), resConfigAdvanceInfo.getCreateUser()); + assertEquals(configAdvanceInfo.getDesc(), resConfigAdvanceInfo.getDesc()); } @Test - public void testListener() throws Exception { - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post( - Constants.CONFIG_CONTROLLER_PATH + "/listener").param("Listening-Configs", "test"); + void testListener() throws Exception { + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CONFIG_CONTROLLER_PATH + "/listener") + .param("Listening-Configs", "test"); int actualValue = mockmvc.perform(builder).andReturn().getResponse().getStatus(); - Assert.assertEquals(200, actualValue); + assertEquals(200, actualValue); } @Test - public void testGetListeners() throws Exception { + void testGetListeners() throws Exception { Map listenersGroupkeyStatus = new HashMap<>(); listenersGroupkeyStatus.put("test", "test"); SampleResult sampleResult = new SampleResult(); @@ -256,20 +255,18 @@ public void testGetListeners() throws Exception { when(configSubService.getCollectSampleResult("test", "test", "", 1)).thenReturn(sampleResult); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get( - Constants.CONFIG_CONTROLLER_PATH + "/listener").param("dataId", "test").param("group", "test") - .param("tenant", "").param("sampleTime", "1"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH + "/listener") + .param("dataId", "test").param("group", "test").param("tenant", "").param("sampleTime", "1"); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - GroupkeyListenserStatus groupkeyListenserStatus = JacksonUtils.toObj(actualValue, - GroupkeyListenserStatus.class); - Assert.assertEquals(200, groupkeyListenserStatus.getCollectStatus()); - Assert.assertEquals(1, groupkeyListenserStatus.getLisentersGroupkeyStatus().size()); - Assert.assertEquals("test", groupkeyListenserStatus.getLisentersGroupkeyStatus().get("test")); + GroupkeyListenserStatus groupkeyListenserStatus = JacksonUtils.toObj(actualValue, GroupkeyListenserStatus.class); + assertEquals(200, groupkeyListenserStatus.getCollectStatus()); + assertEquals(1, groupkeyListenserStatus.getLisentersGroupkeyStatus().size()); + assertEquals("test", groupkeyListenserStatus.getLisentersGroupkeyStatus().get("test")); } @Test - public void testSearchConfig() throws Exception { + void testSearchConfig() throws Exception { List configInfoList = new ArrayList<>(); ConfigInfo configInfo = new ConfigInfo("test", "test", "test"); configInfoList.add(configInfo); @@ -281,12 +278,11 @@ public void testSearchConfig() throws Exception { page.setPageItems(configInfoList); Map configAdvanceInfo = new HashMap<>(8); - when(configInfoPersistService.findConfigInfo4Page(1, 10, "test", "test", "", configAdvanceInfo)).thenReturn( - page); + when(configInfoPersistService.findConfigInfo4Page(1, 10, "test", "test", "", configAdvanceInfo)).thenReturn(page); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH) - .param("search", "accurate").param("dataId", "test").param("group", "test").param("appName", "") - .param("tenant", "").param("config_tags", "").param("pageNo", "1").param("pageSize", "10"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH).param("search", "accurate") + .param("dataId", "test").param("group", "test").param("appName", "").param("tenant", "").param("config_tags", "") + .param("pageNo", "1").param("pageSize", "10"); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); @@ -294,14 +290,14 @@ public void testSearchConfig() throws Exception { List resultList = JacksonUtils.toObj(pageItemsNode.toString(), List.class); ConfigInfo resConfigInfo = JacksonUtils.toObj(pageItemsNode.get(0).toString(), ConfigInfo.class); - Assert.assertEquals(configInfoList.size(), resultList.size()); - Assert.assertEquals(configInfo.getDataId(), resConfigInfo.getDataId()); - Assert.assertEquals(configInfo.getGroup(), resConfigInfo.getGroup()); - Assert.assertEquals(configInfo.getContent(), resConfigInfo.getContent()); + assertEquals(configInfoList.size(), resultList.size()); + assertEquals(configInfo.getDataId(), resConfigInfo.getDataId()); + assertEquals(configInfo.getGroup(), resConfigInfo.getGroup()); + assertEquals(configInfo.getContent(), resConfigInfo.getContent()); } @Test - public void testFuzzySearchConfig() throws Exception { + void testFuzzySearchConfig() throws Exception { List configInfoList = new ArrayList<>(); ConfigInfo configInfo = new ConfigInfo("test", "test", "test"); @@ -314,41 +310,39 @@ public void testFuzzySearchConfig() throws Exception { page.setPageItems(configInfoList); Map configAdvanceInfo = new HashMap<>(8); - when(configInfoPersistService.findConfigInfoLike4Page(1, 10, "test", "test", "", configAdvanceInfo)).thenReturn( - page); + when(configInfoPersistService.findConfigInfoLike4Page(1, 10, "test", "test", "", configAdvanceInfo)).thenReturn(page); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH) - .param("search", "blur").param("dataId", "test").param("group", "test").param("appName", "") - .param("tenant", "").param("config_tags", "").param("pageNo", "1").param("pageSize", "10"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH).param("search", "blur") + .param("dataId", "test").param("group", "test").param("appName", "").param("tenant", "").param("config_tags", "") + .param("pageNo", "1").param("pageSize", "10"); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); List resultList = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get("pageItems").toString(), List.class); - ConfigInfo resConfigInfo = JacksonUtils.toObj( - JacksonUtils.toObj(actualValue).get("pageItems").get(0).toString(), ConfigInfo.class); + ConfigInfo resConfigInfo = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get("pageItems").get(0).toString(), ConfigInfo.class); - Assert.assertEquals(configInfoList.size(), resultList.size()); - Assert.assertEquals(configInfo.getDataId(), resConfigInfo.getDataId()); - Assert.assertEquals(configInfo.getGroup(), resConfigInfo.getGroup()); - Assert.assertEquals(configInfo.getContent(), resConfigInfo.getContent()); + assertEquals(configInfoList.size(), resultList.size()); + assertEquals(configInfo.getDataId(), resConfigInfo.getDataId()); + assertEquals(configInfo.getGroup(), resConfigInfo.getGroup()); + assertEquals(configInfo.getContent(), resConfigInfo.getContent()); } @Test - public void testStopBeta() throws Exception { + void testStopBeta() throws Exception { - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.delete(Constants.CONFIG_CONTROLLER_PATH) - .param("beta", "true").param("dataId", "test").param("group", "test").param("tenant", ""); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.delete(Constants.CONFIG_CONTROLLER_PATH).param("beta", "true") + .param("dataId", "test").param("group", "test").param("tenant", ""); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); String data = JacksonUtils.toObj(actualValue).get("data").toString(); - Assert.assertEquals("200", code); - Assert.assertEquals("true", data); + assertEquals("200", code); + assertEquals("true", data); } @Test - public void testQueryBeta() throws Exception { + void testQueryBeta() throws Exception { ConfigInfoBetaWrapper configInfoBetaWrapper = new ConfigInfoBetaWrapper(); configInfoBetaWrapper.setDataId("test"); @@ -357,22 +351,22 @@ public void testQueryBeta() throws Exception { when(configInfoBetaPersistService.findConfigInfo4Beta("test", "test", "")).thenReturn(configInfoBetaWrapper); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH) - .param("beta", "true").param("dataId", "test").param("group", "test").param("tenant", ""); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH).param("beta", "true") + .param("dataId", "test").param("group", "test").param("tenant", ""); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); String data = JacksonUtils.toObj(actualValue).get("data").toString(); ConfigInfoBetaWrapper resConfigInfoBetaWrapper = JacksonUtils.toObj(data, ConfigInfoBetaWrapper.class); - Assert.assertEquals("200", code); - Assert.assertEquals(configInfoBetaWrapper.getDataId(), resConfigInfoBetaWrapper.getDataId()); - Assert.assertEquals(configInfoBetaWrapper.getGroup(), resConfigInfoBetaWrapper.getGroup()); - Assert.assertEquals(configInfoBetaWrapper.getContent(), resConfigInfoBetaWrapper.getContent()); + assertEquals("200", code); + assertEquals(configInfoBetaWrapper.getDataId(), resConfigInfoBetaWrapper.getDataId()); + assertEquals(configInfoBetaWrapper.getGroup(), resConfigInfoBetaWrapper.getGroup()); + assertEquals(configInfoBetaWrapper.getContent(), resConfigInfoBetaWrapper.getContent()); } @Test - public void testExportConfig() throws Exception { + void testExportConfig() throws Exception { String dataId = "dataId1.json"; String group = "group2"; @@ -389,17 +383,16 @@ public void testExportConfig() throws Exception { Mockito.when(configInfoPersistService.findAllConfigInfo4Export(eq(dataId), eq(group), eq(tenant), eq(appname), eq(Arrays.asList(1L, 2L)))).thenReturn(dataList); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH) - .param("export", "true").param("dataId", dataId).param("group", group).param("tenant", tenant) - .param("appName", appname).param("ids", "1,2"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH).param("export", "true") + .param("dataId", dataId).param("group", group).param("tenant", tenant).param("appName", appname).param("ids", "1,2"); int actualValue = mockmvc.perform(builder).andReturn().getResponse().getStatus(); - Assert.assertEquals(200, actualValue); + assertEquals(200, actualValue); } @Test - public void testExportConfigV2() throws Exception { + void testExportConfigV2() throws Exception { String dataId = "dataId2.json"; String group = "group2"; String tenant = "tenant234"; @@ -414,17 +407,16 @@ public void testExportConfigV2() throws Exception { dataList.add(configAllInfo); Mockito.when(configInfoPersistService.findAllConfigInfo4Export(eq(dataId), eq(group), eq(tenant), eq(appname), eq(Arrays.asList(1L, 2L)))).thenReturn(dataList); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH) - .param("exportV2", "true").param("dataId", dataId).param("group", group).param("tenant", tenant) - .param("appName", appname).param("ids", "1,2"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_PATH).param("exportV2", "true") + .param("dataId", dataId).param("group", group).param("tenant", tenant).param("appName", appname).param("ids", "1,2"); int actualValue = mockmvc.perform(builder).andReturn().getResponse().getStatus(); - Assert.assertEquals(200, actualValue); + assertEquals(200, actualValue); } @Test - public void testImportAndPublishConfig() throws Exception { + void testImportAndPublishConfig() throws Exception { MockedStatic zipUtilsMockedStatic = Mockito.mockStatic(ZipUtils.class); List zipItems = new ArrayList<>(); ZipUtils.ZipItem zipItem = new ZipUtils.ZipItem("test/test", "test"); @@ -436,26 +428,23 @@ public void testImportAndPublishConfig() throws Exception { when(namespacePersistService.tenantInfoCountByTenantId("public")).thenReturn(1); Map map = new HashMap<>(); map.put("test", "test"); - when(configInfoPersistService.batchInsertOrUpdate(anyList(), anyString(), anyString(), any(), - any())).thenReturn(map); + when(configInfoPersistService.batchInsertOrUpdate(anyList(), anyString(), anyString(), any(), any())).thenReturn(map); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.multipart(Constants.CONFIG_CONTROLLER_PATH) - .file(file).param("import", "true").param("src_user", "test").param("namespace", "public") - .param("policy", "ABORT"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.multipart(Constants.CONFIG_CONTROLLER_PATH).file(file) + .param("import", "true").param("src_user", "test").param("namespace", "public").param("policy", "ABORT"); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); - Assert.assertEquals("200", code); - Map resultMap = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get("data").toString(), - Map.class); - Assert.assertEquals(map.get("test"), resultMap.get("test").toString()); + assertEquals("200", code); + Map resultMap = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get("data").toString(), Map.class); + assertEquals(map.get("test"), resultMap.get("test").toString()); zipUtilsMockedStatic.close(); } @Test - public void testImportAndPublishConfigV2() throws Exception { + void testImportAndPublishConfigV2() throws Exception { List zipItems = new ArrayList<>(); String dataId = "dataId23456.json"; String group = "group132"; @@ -478,26 +467,23 @@ public void testImportAndPublishConfigV2() throws Exception { when(namespacePersistService.tenantInfoCountByTenantId("public")).thenReturn(1); Map map = new HashMap<>(); map.put("test", "test"); - when(configInfoPersistService.batchInsertOrUpdate(anyList(), anyString(), anyString(), any(), - any())).thenReturn(map); + when(configInfoPersistService.batchInsertOrUpdate(anyList(), anyString(), anyString(), any(), any())).thenReturn(map); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.multipart(Constants.CONFIG_CONTROLLER_PATH) - .file(file).param("import", "true").param("src_user", "test").param("namespace", "public") - .param("policy", "ABORT"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.multipart(Constants.CONFIG_CONTROLLER_PATH).file(file) + .param("import", "true").param("src_user", "test").param("namespace", "public").param("policy", "ABORT"); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); - Assert.assertEquals("200", code); - Map resultMap = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get("data").toString(), - Map.class); - Assert.assertEquals(map.get("test"), resultMap.get("test").toString()); + assertEquals("200", code); + Map resultMap = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get("data").toString(), Map.class); + assertEquals(map.get("test"), resultMap.get("test").toString()); zipUtilsMockedStatic.close(); } @Test - public void testCloneConfig() throws Exception { + void testCloneConfig() throws Exception { SameNamespaceCloneConfigBean sameNamespaceCloneConfigBean = new SameNamespaceCloneConfigBean(); sameNamespaceCloneConfigBean.setCfgId(1L); sameNamespaceCloneConfigBean.setDataId("test"); @@ -516,24 +502,21 @@ public void testCloneConfig() throws Exception { List idList = new ArrayList<>(configBeansList.size()); idList.add(sameNamespaceCloneConfigBean.getCfgId()); - when(configInfoPersistService.findAllConfigInfo4Export(null, null, null, null, idList)).thenReturn( - queryedDataList); + when(configInfoPersistService.findAllConfigInfo4Export(null, null, null, null, idList)).thenReturn(queryedDataList); Map map = new HashMap<>(); map.put("test", "test"); - when(configInfoPersistService.batchInsertOrUpdate(anyList(), anyString(), anyString(), any(), - any())).thenReturn(map); + when(configInfoPersistService.batchInsertOrUpdate(anyList(), anyString(), anyString(), any(), any())).thenReturn(map); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CONFIG_CONTROLLER_PATH) - .param("clone", "true").param("src_user", "test").param("tenant", "public").param("policy", "ABORT") - .content(JacksonUtils.toJson(configBeansList)).contentType(MediaType.APPLICATION_JSON); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.CONFIG_CONTROLLER_PATH).param("clone", "true") + .param("src_user", "test").param("tenant", "public").param("policy", "ABORT").content(JacksonUtils.toJson(configBeansList)) + .contentType(MediaType.APPLICATION_JSON); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); String code = JacksonUtils.toObj(actualValue).get("code").toString(); - Assert.assertEquals("200", code); - Map resultMap = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get("data").toString(), - Map.class); - Assert.assertEquals(map.get("test"), resultMap.get("test").toString()); + assertEquals("200", code); + Map resultMap = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get("data").toString(), Map.class); + assertEquals(map.get("test"), resultMap.get("test").toString()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigOpsControllerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigOpsControllerTest.java index 884f97946f3..01b7bc3d872 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigOpsControllerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigOpsControllerTest.java @@ -18,18 +18,17 @@ import com.alibaba.nacos.common.utils.JacksonUtils; import com.alibaba.nacos.config.server.constant.Constants; +import com.alibaba.nacos.config.server.service.dump.DumpService; +import com.alibaba.nacos.persistence.configuration.DatasourceConfiguration; import com.alibaba.nacos.persistence.datasource.DynamicDataSource; import com.alibaba.nacos.persistence.datasource.LocalDataSourceServiceImpl; -import com.alibaba.nacos.config.server.service.dump.DumpService; import com.alibaba.nacos.persistence.repository.embedded.operate.DatabaseOperate; -import com.alibaba.nacos.persistence.configuration.DatasourceConfiguration; import com.alibaba.nacos.sys.env.EnvUtil; import com.alibaba.nacos.sys.utils.ApplicationUtils; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockedStatic; @@ -39,7 +38,7 @@ import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; @@ -50,21 +49,17 @@ import javax.servlet.ServletContext; import java.util.ArrayList; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) @WebAppConfiguration -public class ConfigOpsControllerTest { +class ConfigOpsControllerTest { @InjectMocks ConfigOpsController configOpsController; - private MockMvc mockMvc; - - @Mock - private ServletContext servletContext; - @Mock DumpService dumpService; @@ -74,15 +69,20 @@ public class ConfigOpsControllerTest { MockedStatic applicationUtilsMockedStatic; - @After - public void after() { + private MockMvc mockMvc; + + @Mock + private ServletContext servletContext; + + @AfterEach + void after() { datasourceConfigurationMockedStatic.close(); dynamicDataSourceMockedStatic.close(); applicationUtilsMockedStatic.close(); } - @Before - public void init() { + @BeforeEach + void init() { EnvUtil.setEnvironment(new StandardEnvironment()); when(servletContext.getContextPath()).thenReturn("/nacos"); ReflectionTestUtils.setField(configOpsController, "dumpService", dumpService); @@ -94,25 +94,24 @@ public void init() { } @Test - public void testUpdateLocalCacheFromStore() throws Exception { + void testUpdateLocalCacheFromStore() throws Exception { - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post( - Constants.OPS_CONTROLLER_PATH + "/localCache"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.post(Constants.OPS_CONTROLLER_PATH + "/localCache"); int actualValue = mockMvc.perform(builder).andReturn().getResponse().getStatus(); - Assert.assertEquals(200, actualValue); + assertEquals(200, actualValue); } @Test - public void testSetLogLevel() throws Exception { + void testSetLogLevel() throws Exception { - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.put(Constants.OPS_CONTROLLER_PATH + "/log") - .param("logName", "test").param("logLevel", "test"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.put(Constants.OPS_CONTROLLER_PATH + "/log").param("logName", "test") + .param("logLevel", "test"); int actualValue = mockMvc.perform(builder).andReturn().getResponse().getStatus(); - Assert.assertEquals(200, actualValue); + assertEquals(200, actualValue); } @Test - public void testDerbyOps() throws Exception { + void testDerbyOps() throws Exception { datasourceConfigurationMockedStatic.when(DatasourceConfiguration::isEmbeddedStorage).thenReturn(true); DynamicDataSource dataSource = Mockito.mock(DynamicDataSource.class); @@ -126,22 +125,22 @@ public void testDerbyOps() throws Exception { MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.OPS_CONTROLLER_PATH + "/derby") .param("sql", "SELECT * FROM TEST"); String actualValue = mockMvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("200", JacksonUtils.toObj(actualValue).get("code").toString()); + assertEquals("200", JacksonUtils.toObj(actualValue).get("code").toString()); } @Test - public void testImportDerby() throws Exception { + void testImportDerby() throws Exception { datasourceConfigurationMockedStatic.when(DatasourceConfiguration::isEmbeddedStorage).thenReturn(true); applicationUtilsMockedStatic.when(() -> ApplicationUtils.getBean(DatabaseOperate.class)) .thenReturn(Mockito.mock(DatabaseOperate.class)); MockMultipartFile file = new MockMultipartFile("file", "test.zip", "application/zip", "test".getBytes()); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.multipart( - Constants.OPS_CONTROLLER_PATH + "/data/removal").file(file); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.multipart(Constants.OPS_CONTROLLER_PATH + "/data/removal") + .file(file); int actualValue = mockMvc.perform(builder).andReturn().getResponse().getStatus(); - Assert.assertEquals(200, actualValue); + assertEquals(200, actualValue); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigServletInnerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigServletInnerTest.java index 56bf83211d9..115c39abe2a 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigServletInnerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/ConfigServletInnerTest.java @@ -31,11 +31,10 @@ import com.alibaba.nacos.config.server.utils.MD5Util; import com.alibaba.nacos.config.server.utils.PropertyUtil; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockedStatic; @@ -43,7 +42,7 @@ import org.springframework.core.env.StandardEnvironment; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; @@ -56,32 +55,34 @@ import static com.alibaba.nacos.api.common.Constants.VIPSERVER_TAG; import static com.alibaba.nacos.config.server.constant.Constants.CONTENT_MD5; import static com.alibaba.nacos.config.server.utils.RequestUtil.CLIENT_APPNAME_HEADER; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @WebAppConfiguration -public class ConfigServletInnerTest { +class ConfigServletInnerTest { + + static MockedStatic configDiskServiceFactoryMockedStatic; @InjectMocks ConfigServletInner configServletInner; - @Mock - private LongPollingService longPollingService; - - @Mock - private ConfigRocksDbDiskService configRocksDbDiskService; - - static MockedStatic configDiskServiceFactoryMockedStatic; - MockedStatic configCacheServiceMockedStatic; MockedStatic propertyUtilMockedStatic; MockedStatic md5UtilMockedStatic; - @Before - public void setUp() { + @Mock + private LongPollingService longPollingService; + + @Mock + private ConfigRocksDbDiskService configRocksDbDiskService; + + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); ReflectionTestUtils.setField(configServletInner, "longPollingService", longPollingService); configCacheServiceMockedStatic = Mockito.mockStatic(ConfigCacheService.class); @@ -93,8 +94,8 @@ public void setUp() { } - @After - public void after() { + @AfterEach + void after() { if (configCacheServiceMockedStatic != null) { configCacheServiceMockedStatic.close(); @@ -113,7 +114,7 @@ public void after() { } @Test - public void testDoPollingConfig() throws Exception { + void testDoPollingConfig() throws Exception { Map clientMd5Map = new HashMap<>(); MockHttpServletRequest request = new MockHttpServletRequest(); @@ -128,15 +129,15 @@ public void testDoPollingConfig() throws Exception { String actualValue = configServletInner.doPollingConfig(request, response, clientMd5Map, 1); - Assert.assertEquals(HttpServletResponse.SC_OK + "", actualValue); - Assert.assertEquals("test-old", response.getHeader(Constants.PROBE_MODIFY_RESPONSE)); - Assert.assertEquals("test-new", response.getHeader(Constants.PROBE_MODIFY_RESPONSE_NEW)); - Assert.assertEquals("no-cache,no-store", response.getHeader("Cache-Control")); + assertEquals(HttpServletResponse.SC_OK + "", actualValue); + assertEquals("test-old", response.getHeader(Constants.PROBE_MODIFY_RESPONSE)); + assertEquals("test-new", response.getHeader(Constants.PROBE_MODIFY_RESPONSE_NEW)); + assertEquals("no-cache,no-store", response.getHeader("Cache-Control")); } @Test - public void testDoGetConfigV1Beta() throws Exception { + void testDoGetConfigV1Beta() throws Exception { configCacheServiceMockedStatic.when(() -> ConfigCacheService.tryConfigReadLock(anyString())).thenReturn(1); @@ -152,8 +153,7 @@ public void testDoGetConfigV1Beta() throws Exception { String dataId = "testDataId135"; String group = "group23"; String tenant = "tenant234"; - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataId, group, tenant))) + configCacheServiceMockedStatic.when(() -> ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataId, group, tenant))) .thenReturn(cacheItem); MockHttpServletRequest request = new MockHttpServletRequest(); @@ -162,13 +162,12 @@ public void testDoGetConfigV1Beta() throws Exception { MockHttpServletResponse response = new MockHttpServletResponse(); String mockBetaContent = "content3456543"; when(configRocksDbDiskService.getBetaContent(dataId, group, tenant)).thenReturn(mockBetaContent); - String actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, "", "true", - "localhost"); - Assert.assertEquals(HttpServletResponse.SC_OK + "", actualValue); - Assert.assertEquals("true", response.getHeader("isBeta")); - Assert.assertEquals("md52345Beta", response.getHeader(CONTENT_MD5)); - Assert.assertEquals("betaKey1234567", response.getHeader("Encrypted-Data-Key")); - Assert.assertEquals(mockBetaContent, response.getContentAsString()); + String actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, "", "true", "localhost"); + assertEquals(HttpServletResponse.SC_OK + "", actualValue); + assertEquals("true", response.getHeader("isBeta")); + assertEquals("md52345Beta", response.getHeader(CONTENT_MD5)); + assertEquals("betaKey1234567", response.getHeader("Encrypted-Data-Key")); + assertEquals(mockBetaContent, response.getContentAsString()); } /** @@ -177,13 +176,13 @@ public void testDoGetConfigV1Beta() throws Exception { * @throws Exception exception. */ @Test - public void testDoGetConfigV1Tag() throws Exception { + void testDoGetConfigV1Tag() throws Exception { String dataId = "dataId123455"; String group = "group"; String tenant = "tenant"; - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))).thenReturn(1); + configCacheServiceMockedStatic.when(() -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))) + .thenReturn(1); //mock cache item with tag. CacheItem cacheItem = new CacheItem("test"); @@ -204,8 +203,7 @@ public void testDoGetConfigV1Tag() throws Exception { long specificTs = System.currentTimeMillis(); cacheItem.getConfigCacheTags().get(specificTag).setLastModifiedTs(specificTs); - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.getContentCache(GroupKey2.getKey(dataId, group, tenant))) + configCacheServiceMockedStatic.when(() -> ConfigCacheService.getContentCache(GroupKey2.getKey(dataId, group, tenant))) .thenReturn(cacheItem); //test auto tag. @@ -216,44 +214,42 @@ public void testDoGetConfigV1Tag() throws Exception { MockHttpServletResponse response = new MockHttpServletResponse(); String autoTagContent = "1234566autotag"; Mockito.when(configRocksDbDiskService.getTagContent(dataId, group, tenant, autoTag)).thenReturn(autoTagContent); - String actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, null, "true", - "localhost"); - Assert.assertEquals(HttpServletResponse.SC_OK + "", actualValue); - Assert.assertEquals(autoTagContent, response.getContentAsString()); - Assert.assertEquals("md5autotag11", response.getHeader(CONTENT_MD5)); - Assert.assertEquals("autoTagkey", response.getHeader("Encrypted-Data-Key")); + String actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, null, "true", "localhost"); + assertEquals(HttpServletResponse.SC_OK + "", actualValue); + assertEquals(autoTagContent, response.getContentAsString()); + assertEquals("md5autotag11", response.getHeader(CONTENT_MD5)); + assertEquals("autoTagkey", response.getHeader("Encrypted-Data-Key")); //test for specific tag. has higher propority than auto tag. response = new MockHttpServletResponse(); String specificTagContent = "1234566autotag"; when(configRocksDbDiskService.getTagContent(dataId, group, tenant, specificTag)).thenReturn(specificTagContent); - actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, specificTag, "true", - "localhost"); - Assert.assertEquals(HttpServletResponse.SC_OK + "", actualValue); - Assert.assertEquals(specificTagContent, response.getContentAsString()); - Assert.assertEquals("md5specificTag11", response.getHeader(CONTENT_MD5)); - Assert.assertEquals("specificTagkey", response.getHeader("Encrypted-Data-Key")); + actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, specificTag, "true", "localhost"); + assertEquals(HttpServletResponse.SC_OK + "", actualValue); + assertEquals(specificTagContent, response.getContentAsString()); + assertEquals("md5specificTag11", response.getHeader(CONTENT_MD5)); + assertEquals("specificTagkey", response.getHeader("Encrypted-Data-Key")); // test for specific tag ,not exist when(configRocksDbDiskService.getTagContent(dataId, group, tenant, "auto-tag-test-not-exist")).thenReturn(null); response = new MockHttpServletResponse(); - actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, - "auto-tag-test-not-exist", "true", "localhost"); - Assert.assertEquals(HttpServletResponse.SC_NOT_FOUND + "", actualValue); + actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, "auto-tag-test-not-exist", "true", + "localhost"); + assertEquals(HttpServletResponse.SC_NOT_FOUND + "", actualValue); String expectedContent = "config data not exist"; String actualContent = response.getContentAsString(); - Assert.assertTrue(actualContent.contains(expectedContent)); + assertTrue(actualContent.contains(expectedContent)); } @Test - public void testDoGetConfigFormal() throws Exception { + void testDoGetConfigFormal() throws Exception { String dataId = "dataId1234552333"; String group = "group"; String tenant = "tenant"; - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))).thenReturn(1); + configCacheServiceMockedStatic.when(() -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))) + .thenReturn(1); //mock cache item . CacheItem cacheItem = new CacheItem("test"); @@ -264,29 +260,27 @@ public void testDoGetConfigFormal() throws Exception { long ts = System.currentTimeMillis(); cacheItem.getConfigCache().setLastModifiedTs(ts); cacheItem.getConfigCache().setEncryptedDataKey("key2345678"); - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataId, group, tenant))) + configCacheServiceMockedStatic.when(() -> ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataId, group, tenant))) .thenReturn(cacheItem); MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); when(configRocksDbDiskService.getContent(dataId, group, tenant)).thenReturn(content); - String actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, null, "true", - "localhost"); - Assert.assertEquals(content, response.getContentAsString()); - Assert.assertEquals(HttpServletResponse.SC_OK + "", actualValue); - Assert.assertEquals(md5, response.getHeader(CONTENT_MD5)); - Assert.assertEquals("key2345678", response.getHeader("Encrypted-Data-Key")); + String actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, null, "true", "localhost"); + assertEquals(content, response.getContentAsString()); + assertEquals(HttpServletResponse.SC_OK + "", actualValue); + assertEquals(md5, response.getHeader(CONTENT_MD5)); + assertEquals("key2345678", response.getHeader("Encrypted-Data-Key")); } @Test - public void testDoGetConfigFormalV2() throws Exception { + void testDoGetConfigFormalV2() throws Exception { String dataId = "dataId1234552333V2"; String group = "group"; String tenant = "tenant"; - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))).thenReturn(1); + configCacheServiceMockedStatic.when(() -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))) + .thenReturn(1); //mock cache item . CacheItem cacheItem = new CacheItem("test"); @@ -297,41 +291,36 @@ public void testDoGetConfigFormalV2() throws Exception { long ts = System.currentTimeMillis(); cacheItem.getConfigCache().setLastModifiedTs(ts); cacheItem.getConfigCache().setEncryptedDataKey("key2345678"); - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataId, group, tenant))) + configCacheServiceMockedStatic.when(() -> ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataId, group, tenant))) .thenReturn(cacheItem); MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); when(configRocksDbDiskService.getContent(dataId, group, tenant)).thenReturn(content); - String actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, null, "true", - "localhost", true); - Assert.assertEquals(JacksonUtils.toJson(Result.success(content)), response.getContentAsString()); - Assert.assertEquals(HttpServletResponse.SC_OK + "", actualValue); - Assert.assertEquals(md5, response.getHeader(CONTENT_MD5)); - Assert.assertEquals("key2345678", response.getHeader("Encrypted-Data-Key")); - Assert.assertEquals(MediaType.APPLICATION_JSON, response.getHeader(HttpHeaderConsts.CONTENT_TYPE)); + String actualValue = configServletInner.doGetConfig(request, response, dataId, group, tenant, null, "true", "localhost", true); + assertEquals(JacksonUtils.toJson(Result.success(content)), response.getContentAsString()); + assertEquals(HttpServletResponse.SC_OK + "", actualValue); + assertEquals(md5, response.getHeader(CONTENT_MD5)); + assertEquals("key2345678", response.getHeader("Encrypted-Data-Key")); + assertEquals(MediaType.APPLICATION_JSON, response.getHeader(HttpHeaderConsts.CONTENT_TYPE)); } @Test - public void testDoGetConfigNotExist() throws Exception { + void testDoGetConfigNotExist() throws Exception { // if lockResult equals 0,cache item not exist. configCacheServiceMockedStatic.when(() -> ConfigCacheService.tryConfigReadLock(anyString())).thenReturn(0); MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); - String actualValue = configServletInner.doGetConfig(request, response, "test", "test", "test", "test", "true", - "localhost"); - Assert.assertEquals(HttpServletResponse.SC_NOT_FOUND + "", actualValue); + String actualValue = configServletInner.doGetConfig(request, response, "test", "test", "test", "test", "true", "localhost"); + assertEquals(HttpServletResponse.SC_NOT_FOUND + "", actualValue); - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.getContentCache(GroupKey2.getKey("test", "test", "test"))) + configCacheServiceMockedStatic.when(() -> ConfigCacheService.getContentCache(GroupKey2.getKey("test", "test", "test"))) .thenReturn(new CacheItem(GroupKey2.getKey("test", "test", "test"))); // if lockResult less than 0 configCacheServiceMockedStatic.when(() -> ConfigCacheService.tryConfigReadLock(anyString())).thenReturn(-1); - actualValue = configServletInner.doGetConfig(request, response, "test", "test", "test", "test", "true", - "localhost"); - Assert.assertEquals(HttpServletResponse.SC_CONFLICT + "", actualValue); + actualValue = configServletInner.doGetConfig(request, response, "test", "test", "test", "test", "true", "localhost"); + assertEquals(HttpServletResponse.SC_CONFLICT + "", actualValue); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/HealthControllerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/HealthControllerTest.java index 05d6e911f9d..3cb0b334900 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/HealthControllerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/HealthControllerTest.java @@ -17,20 +17,19 @@ package com.alibaba.nacos.config.server.controller; import com.alibaba.nacos.config.server.constant.Constants; -import com.alibaba.nacos.persistence.datasource.DataSourceService; import com.alibaba.nacos.core.cluster.MemberLookup; import com.alibaba.nacos.core.cluster.ServerMemberManager; +import com.alibaba.nacos.persistence.datasource.DataSourceService; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.springframework.core.env.StandardEnvironment; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; @@ -42,12 +41,13 @@ import java.util.HashMap; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) @WebAppConfiguration -public class HealthControllerTest { +class HealthControllerTest { @InjectMocks HealthController healthController; @@ -66,8 +66,8 @@ public class HealthControllerTest { @Mock private MemberLookup memberLookup; - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); Map infos = new HashMap<>(); infos.put("addressServerHealth", true); @@ -80,58 +80,58 @@ public void setUp() { } @Test - public void testGetHealth() throws Exception { + void testGetHealth() throws Exception { when(dataSourceService.getHealth()).thenReturn("UP"); MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("UP", actualValue); + assertEquals("UP", actualValue); } @Test - public void testGetHealthWhenTheLookUpIsNull() throws Exception { + void testGetHealthWhenTheLookUpIsNull() throws Exception { when(dataSourceService.getHealth()).thenReturn("UP"); when(memberManager.getLookup()).thenReturn(null); MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("DOWN:address server down. ", actualValue); + assertEquals("DOWN:address server down. ", actualValue); } @Test - public void testGetHealthWhenTheLoopUpNotUseAddressServer() throws Exception { + void testGetHealthWhenTheLoopUpNotUseAddressServer() throws Exception { when(dataSourceService.getHealth()).thenReturn("UP"); when(memberManager.getLookup()).thenReturn(memberLookup); when(memberLookup.useAddressServer()).thenReturn(false); MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("UP", actualValue); + assertEquals("UP", actualValue); } @Test - public void testGetHealthWhenTheLoopUpInfoIsNull() throws Exception { + void testGetHealthWhenTheLoopUpInfoIsNull() throws Exception { when(dataSourceService.getHealth()).thenReturn("UP"); when(memberManager.getLookup()).thenReturn(memberLookup); when(memberLookup.useAddressServer()).thenReturn(true); when(memberLookup.info()).thenReturn(null); MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("DOWN:address server down. ", actualValue); + assertEquals("DOWN:address server down. ", actualValue); } @Test - public void testGetHealthWhenTheLoopUpInfoIsEmpty() throws Exception { + void testGetHealthWhenTheLoopUpInfoIsEmpty() throws Exception { when(dataSourceService.getHealth()).thenReturn("UP"); when(memberManager.getLookup()).thenReturn(memberLookup); when(memberLookup.useAddressServer()).thenReturn(true); when(memberLookup.info()).thenReturn(new HashMap<>()); MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("DOWN:address server down. ", actualValue); + assertEquals("DOWN:address server down. ", actualValue); } @Test - public void testGetHealthWhenTheLoopUpInfoIsDown() throws Exception { + void testGetHealthWhenTheLoopUpInfoIsDown() throws Exception { when(dataSourceService.getHealth()).thenReturn("UP"); when(memberManager.getLookup()).thenReturn(memberLookup); when(memberLookup.useAddressServer()).thenReturn(true); @@ -142,11 +142,11 @@ public void testGetHealthWhenTheLoopUpInfoIsDown() throws Exception { MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("DOWN:address server down. ", actualValue); + assertEquals("DOWN:address server down. ", actualValue); } @Test - public void testGetHealthWhenTheLoopUpInfoIsUP() throws Exception { + void testGetHealthWhenTheLoopUpInfoIsUP() throws Exception { when(dataSourceService.getHealth()).thenReturn("UP"); when(memberManager.getLookup()).thenReturn(memberLookup); when(memberLookup.useAddressServer()).thenReturn(true); @@ -157,11 +157,11 @@ public void testGetHealthWhenTheLoopUpInfoIsUP() throws Exception { MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("UP", actualValue); + assertEquals("UP", actualValue); } @Test - public void testGetHealthWhenTheLoopUpInfoParseError() throws Exception { + void testGetHealthWhenTheLoopUpInfoParseError() throws Exception { when(dataSourceService.getHealth()).thenReturn("UP"); when(memberManager.getLookup()).thenReturn(memberLookup); when(memberLookup.useAddressServer()).thenReturn(true); @@ -172,6 +172,6 @@ public void testGetHealthWhenTheLoopUpInfoParseError() throws Exception { MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); - Assert.assertEquals("DOWN:address server down. ", actualValue); + assertEquals("DOWN:address server down. ", actualValue); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/HistoryControllerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/HistoryControllerTest.java index 6eca767d07f..f36b2ddf662 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/HistoryControllerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/HistoryControllerTest.java @@ -20,21 +20,20 @@ import com.alibaba.nacos.config.server.constant.Constants; import com.alibaba.nacos.config.server.model.ConfigHistoryInfo; import com.alibaba.nacos.config.server.model.ConfigInfoWrapper; -import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.config.server.service.HistoryService; +import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.sys.env.EnvUtil; import com.fasterxml.jackson.databind.JsonNode; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.springframework.core.env.StandardEnvironment; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; @@ -48,12 +47,13 @@ import java.util.Date; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) @WebAppConfiguration -public class HistoryControllerTest { +class HistoryControllerTest { @InjectMocks HistoryController historyController; @@ -66,8 +66,8 @@ public class HistoryControllerTest { @Mock private HistoryService historyService; - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); when(servletContext.getContextPath()).thenReturn("/nacos"); ReflectionTestUtils.setField(historyController, "historyService", historyService); @@ -75,7 +75,7 @@ public void setUp() { } @Test - public void testListConfigHistory() throws Exception { + void testListConfigHistory() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId("test"); @@ -94,10 +94,8 @@ public void testListConfigHistory() throws Exception { when(historyService.listConfigHistory("test", "test", "", 1, 10)).thenReturn(page); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HISTORY_CONTROLLER_PATH) - .param("search", "accurate").param("dataId", "test") - .param("group", "test").param("tenant", "") - .param("appName", "").param("pageNo", "1") + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HISTORY_CONTROLLER_PATH).param("search", "accurate") + .param("dataId", "test").param("group", "test").param("tenant", "").param("appName", "").param("pageNo", "1") .param("pageSize", "10"); MockHttpServletResponse response = mockmvc.perform(builder).andReturn().getResponse(); @@ -108,15 +106,15 @@ public void testListConfigHistory() throws Exception { List resultList = JacksonUtils.toObj(pageItemsNode.toString(), List.class); ConfigHistoryInfo resConfigHistoryInfo = JacksonUtils.toObj(pageItemsNode.get(0).toString(), ConfigHistoryInfo.class); - Assert.assertEquals(configHistoryInfoList.size(), resultList.size()); - Assert.assertEquals(configHistoryInfo.getDataId(), resConfigHistoryInfo.getDataId()); - Assert.assertEquals(configHistoryInfo.getGroup(), resConfigHistoryInfo.getGroup()); - Assert.assertEquals(configHistoryInfo.getContent(), resConfigHistoryInfo.getContent()); + assertEquals(configHistoryInfoList.size(), resultList.size()); + assertEquals(configHistoryInfo.getDataId(), resConfigHistoryInfo.getDataId()); + assertEquals(configHistoryInfo.getGroup(), resConfigHistoryInfo.getGroup()); + assertEquals(configHistoryInfo.getContent(), resConfigHistoryInfo.getContent()); } @Test - public void testGetConfigHistoryInfo() throws Exception { + void testGetConfigHistoryInfo() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId("test"); @@ -128,23 +126,20 @@ public void testGetConfigHistoryInfo() throws Exception { when(historyController.getConfigHistoryInfo("test", "test", "", 1L)).thenReturn(configHistoryInfo); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HISTORY_CONTROLLER_PATH) - .param("dataId", "test") - .param("group", "test") - .param("tenant", "") - .param("nid", "1"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HISTORY_CONTROLLER_PATH).param("dataId", "test") + .param("group", "test").param("tenant", "").param("nid", "1"); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); ConfigHistoryInfo resConfigHistoryInfo = JacksonUtils.toObj(actualValue, ConfigHistoryInfo.class); - Assert.assertEquals(configHistoryInfo.getDataId(), resConfigHistoryInfo.getDataId()); - Assert.assertEquals(configHistoryInfo.getGroup(), resConfigHistoryInfo.getGroup()); - Assert.assertEquals(configHistoryInfo.getContent(), resConfigHistoryInfo.getContent()); + assertEquals(configHistoryInfo.getDataId(), resConfigHistoryInfo.getDataId()); + assertEquals(configHistoryInfo.getGroup(), resConfigHistoryInfo.getGroup()); + assertEquals(configHistoryInfo.getContent(), resConfigHistoryInfo.getContent()); } @Test - public void testGetPreviousConfigHistoryInfo() throws Exception { + void testGetPreviousConfigHistoryInfo() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId("test"); @@ -157,22 +152,19 @@ public void testGetPreviousConfigHistoryInfo() throws Exception { when(historyService.getPreviousConfigHistoryInfo("test", "test", "", 1L)).thenReturn(configHistoryInfo); MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HISTORY_CONTROLLER_PATH + "/previous") - .param("dataId", "test") - .param("group", "test") - .param("tenant", "") - .param("id", "1"); + .param("dataId", "test").param("group", "test").param("tenant", "").param("id", "1"); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); ConfigHistoryInfo resConfigHistoryInfo = JacksonUtils.toObj(actualValue, ConfigHistoryInfo.class); - Assert.assertEquals(configHistoryInfo.getDataId(), resConfigHistoryInfo.getDataId()); - Assert.assertEquals(configHistoryInfo.getGroup(), resConfigHistoryInfo.getGroup()); - Assert.assertEquals(configHistoryInfo.getContent(), resConfigHistoryInfo.getContent()); + assertEquals(configHistoryInfo.getDataId(), resConfigHistoryInfo.getDataId()); + assertEquals(configHistoryInfo.getGroup(), resConfigHistoryInfo.getGroup()); + assertEquals(configHistoryInfo.getContent(), resConfigHistoryInfo.getContent()); } @Test - public void testGetDataIds() throws Exception { + void testGetDataIds() throws Exception { ConfigInfoWrapper configInfoWrapper = new ConfigInfoWrapper(); configInfoWrapper.setDataId("test"); @@ -187,12 +179,13 @@ public void testGetDataIds() throws Exception { String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); List resConfigInfoWrappers = JacksonUtils.toObj(actualValue, List.class); - ConfigInfoWrapper resConfigInfoWrapper = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get(0).toString(), ConfigInfoWrapper.class); + ConfigInfoWrapper resConfigInfoWrapper = JacksonUtils.toObj(JacksonUtils.toObj(actualValue).get(0).toString(), + ConfigInfoWrapper.class); - Assert.assertEquals(configInfoWrappers.size(), resConfigInfoWrappers.size()); - Assert.assertEquals(configInfoWrapper.getDataId(), resConfigInfoWrapper.getDataId()); - Assert.assertEquals(configInfoWrapper.getGroup(), resConfigInfoWrapper.getGroup()); - Assert.assertEquals(configInfoWrapper.getContent(), resConfigInfoWrapper.getContent()); + assertEquals(configInfoWrappers.size(), resConfigInfoWrappers.size()); + assertEquals(configInfoWrapper.getDataId(), resConfigInfoWrapper.getDataId()); + assertEquals(configInfoWrapper.getGroup(), resConfigInfoWrapper.getGroup()); + assertEquals(configInfoWrapper.getContent(), resConfigInfoWrapper.getContent()); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/ListenerControllerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/ListenerControllerTest.java index dadedd557e8..1078932b8ab 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/ListenerControllerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/ListenerControllerTest.java @@ -22,16 +22,15 @@ import com.alibaba.nacos.config.server.model.SampleResult; import com.alibaba.nacos.config.server.service.ConfigSubService; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.springframework.core.env.StandardEnvironment; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; @@ -40,16 +39,16 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders; import javax.servlet.ServletContext; - import java.util.HashMap; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) @WebAppConfiguration -public class ListenerControllerTest { +class ListenerControllerTest { @InjectMocks ListenerController listenerController; @@ -62,8 +61,8 @@ public class ListenerControllerTest { @Mock private ConfigSubService configSubService; - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); when(servletContext.getContextPath()).thenReturn("/nacos"); ReflectionTestUtils.setField(listenerController, "configSubService", configSubService); @@ -71,7 +70,7 @@ public void setUp() { } @Test - public void testGetAllSubClientConfigByIp() throws Exception { + void testGetAllSubClientConfigByIp() throws Exception { SampleResult sampleResult = new SampleResult(); Map map = new HashMap<>(); @@ -79,15 +78,14 @@ public void testGetAllSubClientConfigByIp() throws Exception { sampleResult.setLisentersGroupkeyStatus(map); when(configSubService.getCollectSampleResultByIp("localhost", 1)).thenReturn(sampleResult); - MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.LISTENER_CONTROLLER_PATH) - .param("ip", "localhost").param("all", "true") - .param("tenant", "test").param("sampleTime", "1"); + MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.LISTENER_CONTROLLER_PATH).param("ip", "localhost") + .param("all", "true").param("tenant", "test").param("sampleTime", "1"); String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString(); GroupkeyListenserStatus groupkeyListenserStatus = JacksonUtils.toObj(actualValue, GroupkeyListenserStatus.class); Map resultMap = groupkeyListenserStatus.getLisentersGroupkeyStatus(); - Assert.assertEquals(map.get("test"), resultMap.get("test")); + assertEquals(map.get("test"), resultMap.get("test")); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java index 6addabecbf2..d53152f98c0 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/ConfigControllerV2Test.java @@ -24,21 +24,22 @@ import com.alibaba.nacos.config.server.controller.ConfigServletInner; import com.alibaba.nacos.config.server.model.ConfigInfo; import com.alibaba.nacos.config.server.model.ConfigRequestInfo; -import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.config.server.model.form.ConfigForm; import com.alibaba.nacos.config.server.service.ConfigDetailService; import com.alibaba.nacos.config.server.service.ConfigOperationService; import com.alibaba.nacos.config.server.service.repository.ConfigInfoPersistService; import com.alibaba.nacos.core.auth.AuthFilter; +import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.sys.env.EnvUtil; import com.fasterxml.jackson.databind.JsonNode; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import org.mockito.stubbing.Answer; import org.springframework.core.env.StandardEnvironment; import org.springframework.mock.web.MockHttpServletRequest; @@ -51,13 +52,13 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; @@ -65,8 +66,24 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class ConfigControllerV2Test { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class ConfigControllerV2Test { + + private static final String TEST_DATA_ID = "test"; + + private static final String TEST_GROUP = "test"; + + private static final String TEST_NAMESPACE_ID = ""; + + private static final String TEST_NAMESPACE_ID_PUBLIC = "public"; + + private static final String TEST_TAG = ""; + + private static final String TEST_CONTENT = "test config"; + + private static final String TEST_ENCRYPTED_DATA_KEY = "test_encrypted_data_key"; @InjectMocks private AuthFilter authFilter; @@ -92,22 +109,8 @@ public class ConfigControllerV2Test { private ConfigDetailService configDetailService; - private static final String TEST_DATA_ID = "test"; - - private static final String TEST_GROUP = "test"; - - private static final String TEST_NAMESPACE_ID = ""; - - private static final String TEST_NAMESPACE_ID_PUBLIC = "public"; - - private static final String TEST_TAG = ""; - - private static final String TEST_CONTENT = "test config"; - - private static final String TEST_ENCRYPTED_DATA_KEY = "test_encrypted_data_key"; - - @Before - public void setUp() { + @BeforeEach + void setUp() { EnvUtil.setEnvironment(new StandardEnvironment()); configDetailService = new ConfigDetailService(configInfoPersistService); configControllerV2 = new ConfigControllerV2(inner, configOperationService, configDetailService); @@ -116,24 +119,23 @@ public void setUp() { } @Test - public void testGetConfig() throws Exception { + void testGetConfig() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); Result stringResult = Result.success(TEST_CONTENT); doAnswer(x -> { x.getArgument(1, HttpServletResponse.class).setStatus(200); - x.getArgument(1, HttpServletResponse.class) - .setContentType(com.alibaba.nacos.common.http.param.MediaType.APPLICATION_JSON); + x.getArgument(1, HttpServletResponse.class).setContentType(com.alibaba.nacos.common.http.param.MediaType.APPLICATION_JSON); x.getArgument(1, HttpServletResponse.class).getWriter().print(JacksonUtils.toJson(stringResult)); return null; - }).when(inner).doGetConfig(any(HttpServletRequest.class), any(HttpServletResponse.class), eq(TEST_DATA_ID), - eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), eq(null), anyString(), eq(true)); + }).when(inner).doGetConfig(any(HttpServletRequest.class), any(HttpServletResponse.class), eq(TEST_DATA_ID), eq(TEST_GROUP), + eq(TEST_NAMESPACE_ID), eq(TEST_TAG), eq(null), anyString(), eq(true)); configControllerV2.getConfig(request, response, TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, TEST_TAG); - verify(inner).doGetConfig(eq(request), eq(response), eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), - eq(TEST_TAG), eq(null), anyString(), eq(true)); + verify(inner).doGetConfig(eq(request), eq(response), eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), + eq(null), anyString(), eq(true)); JsonNode resNode = JacksonUtils.toObj(response.getContentAsString()); Integer errCode = JacksonUtils.toObj(resNode.get("code").toString(), Integer.class); String actContent = JacksonUtils.toObj(resNode.get("data").toString(), String.class); @@ -143,7 +145,7 @@ public void testGetConfig() throws Exception { } @Test - public void testPublishConfig() throws Exception { + void testPublishConfig() throws Exception { ConfigForm configForm = new ConfigForm(); configForm.setDataId(TEST_DATA_ID); @@ -152,19 +154,18 @@ public void testPublishConfig() throws Exception { configForm.setContent(TEST_CONTENT); MockHttpServletRequest request = new MockHttpServletRequest(); - when(configOperationService.publishConfig(any(ConfigForm.class), any(ConfigRequestInfo.class), - anyString())).thenReturn(true); + when(configOperationService.publishConfig(any(ConfigForm.class), any(ConfigRequestInfo.class), anyString())).thenReturn(true); Result booleanResult = configControllerV2.publishConfig(configForm, request); verify(configOperationService).publishConfig(any(ConfigForm.class), any(ConfigRequestInfo.class), anyString()); assertEquals(ErrorCode.SUCCESS.getCode(), booleanResult.getCode()); - assertEquals(true, booleanResult.getData()); + assertTrue(booleanResult.getData()); } @Test - public void testPublishConfigWithEncryptedDataKey() throws Exception { + void testPublishConfigWithEncryptedDataKey() throws Exception { ConfigForm configForm = new ConfigForm(); configForm.setDataId(TEST_DATA_ID); @@ -182,11 +183,11 @@ public void testPublishConfigWithEncryptedDataKey() throws Exception { verify(configOperationService).publishConfig(any(ConfigForm.class), any(ConfigRequestInfo.class), anyString()); assertEquals(ErrorCode.SUCCESS.getCode(), booleanResult.getCode()); - assertEquals(true, booleanResult.getData()); + assertTrue(booleanResult.getData()); } @Test - public void testPublishConfigWhenNameSpaceIsPublic() throws Exception { + void testPublishConfigWhenNameSpaceIsPublic() throws Exception { ConfigForm configForm = new ConfigForm(); configForm.setDataId(TEST_DATA_ID); @@ -195,8 +196,8 @@ public void testPublishConfigWhenNameSpaceIsPublic() throws Exception { configForm.setContent(TEST_CONTENT); MockHttpServletRequest request = new MockHttpServletRequest(); - when(configOperationService.publishConfig(any(ConfigForm.class), any(ConfigRequestInfo.class), - anyString())).thenAnswer((Answer) invocation -> { + when(configOperationService.publishConfig(any(ConfigForm.class), any(ConfigRequestInfo.class), anyString())).thenAnswer( + (Answer) invocation -> { if (invocation.getArgument(0, ConfigForm.class).getNamespaceId().equals(TEST_NAMESPACE_ID)) { return true; } @@ -208,46 +209,43 @@ public void testPublishConfigWhenNameSpaceIsPublic() throws Exception { verify(configOperationService).publishConfig(any(ConfigForm.class), any(ConfigRequestInfo.class), anyString()); assertEquals(ErrorCode.SUCCESS.getCode(), booleanResult.getCode()); - assertEquals(true, booleanResult.getData()); + assertTrue(booleanResult.getData()); } @Test - public void testDeleteConfigWhenNameSpaceIsPublic() throws Exception { + void testDeleteConfigWhenNameSpaceIsPublic() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest(); - when(configOperationService.deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), - any(), any())).thenReturn(true); - Result booleanResult = configControllerV2.deleteConfig(request, TEST_DATA_ID, TEST_GROUP, - TEST_NAMESPACE_ID_PUBLIC, TEST_TAG); + when(configOperationService.deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), any(), + any())).thenReturn(true); + Result booleanResult = configControllerV2.deleteConfig(request, TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID_PUBLIC, + TEST_TAG); - verify(configOperationService).deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), - eq(TEST_TAG), any(), any()); + verify(configOperationService).deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), any(), any()); assertEquals(ErrorCode.SUCCESS.getCode(), booleanResult.getCode()); - assertEquals(true, booleanResult.getData()); + assertTrue(booleanResult.getData()); } @Test - public void testDeleteConfig() throws Exception { + void testDeleteConfig() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest(); - when(configOperationService.deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), - any(), any())).thenReturn(true); + when(configOperationService.deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), any(), + any())).thenReturn(true); - Result booleanResult = configControllerV2.deleteConfig(request, TEST_DATA_ID, TEST_GROUP, - TEST_NAMESPACE_ID, TEST_TAG); + Result booleanResult = configControllerV2.deleteConfig(request, TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, TEST_TAG); - verify(configOperationService).deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), - eq(TEST_TAG), any(), any()); + verify(configOperationService).deleteConfig(eq(TEST_DATA_ID), eq(TEST_GROUP), eq(TEST_NAMESPACE_ID), eq(TEST_TAG), any(), any()); assertEquals(ErrorCode.SUCCESS.getCode(), booleanResult.getCode()); - assertEquals(true, booleanResult.getData()); + assertTrue(booleanResult.getData()); } @Test - public void testGetConfigByDetail() throws Exception { + void testGetConfigByDetail() throws Exception { List configInfoList = new ArrayList<>(); ConfigInfo configInfo = new ConfigInfo("test", "test", "test"); configInfoList.add(configInfo); @@ -260,13 +258,11 @@ public void testGetConfigByDetail() throws Exception { Map configAdvanceInfo = new HashMap<>(8); configAdvanceInfo.put("content", "server.port"); - when(configInfoPersistService.findConfigInfo4Page(1, 10, "test", "test", "", configAdvanceInfo)) - .thenReturn(page); + when(configInfoPersistService.findConfigInfo4Page(1, 10, "test", "test", "", configAdvanceInfo)).thenReturn(page); MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_V2_PATH + "/searchDetail") - .param("search", "accurate").param("dataId", "test").param("group", "test") - .param("appName", "").param("tenant", "").param("config_tags", "") - .param("pageNo", "1").param("pageSize", "10").param("config_detail", "server.port"); + .param("search", "accurate").param("dataId", "test").param("group", "test").param("appName", "").param("tenant", "") + .param("config_tags", "").param("pageNo", "1").param("pageSize", "10").param("config_detail", "server.port"); MockHttpServletResponse response = mockmvc.perform(builder).andReturn().getResponse(); String actualValue = response.getContentAsString(); @@ -274,14 +270,14 @@ public void testGetConfigByDetail() throws Exception { List resultList = JacksonUtils.toObj(pageItemsNode.toString(), List.class); ConfigInfo resConfigInfo = JacksonUtils.toObj(pageItemsNode.get(0).toString(), ConfigInfo.class); - Assert.assertEquals(configInfoList.size(), resultList.size()); - Assert.assertEquals(configInfo.getDataId(), resConfigInfo.getDataId()); - Assert.assertEquals(configInfo.getGroup(), resConfigInfo.getGroup()); - Assert.assertEquals(configInfo.getContent(), resConfigInfo.getContent()); + assertEquals(configInfoList.size(), resultList.size()); + assertEquals(configInfo.getDataId(), resConfigInfo.getDataId()); + assertEquals(configInfo.getGroup(), resConfigInfo.getGroup()); + assertEquals(configInfo.getContent(), resConfigInfo.getContent()); } @Test - public void testGetConfigFuzzyByDetail() throws Exception { + void testGetConfigFuzzyByDetail() throws Exception { List configInfoList = new ArrayList<>(); ConfigInfo configInfo = new ConfigInfo("test", "test", "test"); configInfoList.add(configInfo); @@ -294,13 +290,11 @@ public void testGetConfigFuzzyByDetail() throws Exception { Map configAdvanceInfo = new HashMap<>(8); configAdvanceInfo.put("content", "server.port"); - when(configInfoPersistService.findConfigInfoLike4Page(1, 10, "test", "test", "", configAdvanceInfo)) - .thenReturn(page); + when(configInfoPersistService.findConfigInfoLike4Page(1, 10, "test", "test", "", configAdvanceInfo)).thenReturn(page); MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_V2_PATH + "/searchDetail") - .param("search", "blur").param("dataId", "test").param("group", "test") - .param("appName", "").param("tenant", "").param("config_tags", "") - .param("pageNo", "1").param("pageSize", "10").param("config_detail", "server.port"); + .param("search", "blur").param("dataId", "test").param("group", "test").param("appName", "").param("tenant", "") + .param("config_tags", "").param("pageNo", "1").param("pageSize", "10").param("config_detail", "server.port"); MockHttpServletResponse response = mockmvc.perform(builder).andReturn().getResponse(); String actualValue = response.getContentAsString(); @@ -308,23 +302,22 @@ public void testGetConfigFuzzyByDetail() throws Exception { List resultList = JacksonUtils.toObj(pageItemsNode.toString(), List.class); ConfigInfo resConfigInfo = JacksonUtils.toObj(pageItemsNode.get(0).toString(), ConfigInfo.class); - Assert.assertEquals(configInfoList.size(), resultList.size()); - Assert.assertEquals(configInfo.getDataId(), resConfigInfo.getDataId()); - Assert.assertEquals(configInfo.getGroup(), resConfigInfo.getGroup()); - Assert.assertEquals(configInfo.getContent(), resConfigInfo.getContent()); + assertEquals(configInfoList.size(), resultList.size()); + assertEquals(configInfo.getDataId(), resConfigInfo.getDataId()); + assertEquals(configInfo.getGroup(), resConfigInfo.getGroup()); + assertEquals(configInfo.getContent(), resConfigInfo.getContent()); } @Test - public void testGetConfigAuthFilter() throws Exception { + void testGetConfigAuthFilter() throws Exception { when(authConfigs.isAuthEnabled()).thenReturn(true); MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.CONFIG_CONTROLLER_V2_PATH + "/searchDetail") - .param("search", "accurate").param("dataId", "test").param("group", "test") - .param("appName", "").param("tenant", "").param("config_tags", "") - .param("pageNo", "1").param("pageSize", "10").param("config_detail", "server.port"); + .param("search", "accurate").param("dataId", "test").param("group", "test").param("appName", "").param("tenant", "") + .param("config_tags", "").param("pageNo", "1").param("pageSize", "10").param("config_detail", "server.port"); MockHttpServletResponse response = mockmvc.perform(builder).andReturn().getResponse(); - assertEquals(response.getStatus(), HttpServletResponse.SC_FORBIDDEN); + assertEquals(HttpServletResponse.SC_FORBIDDEN, response.getStatus()); assertEquals(response.getErrorMessage(), "Invalid server identity key or value, Please make sure set `nacos.core.auth.server.identity.key`" + " and `nacos.core.auth.server.identity.value`, or open `nacos.core.auth.enable.userAgentAuthWhite`"); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/HistoryControllerV2Test.java b/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/HistoryControllerV2Test.java index 8fb7bfd16c7..df6c0613594 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/HistoryControllerV2Test.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/controller/v2/HistoryControllerV2Test.java @@ -21,13 +21,13 @@ import com.alibaba.nacos.api.model.v2.Result; import com.alibaba.nacos.config.server.model.ConfigHistoryInfo; import com.alibaba.nacos.config.server.model.ConfigInfoWrapper; -import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.config.server.service.HistoryService; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import com.alibaba.nacos.persistence.model.Page; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.sql.Timestamp; import java.util.ArrayList; @@ -35,7 +35,7 @@ import java.util.Date; import java.util.List; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -46,13 +46,8 @@ * @date 2022/7/25 */ -@RunWith(MockitoJUnitRunner.class) -public class HistoryControllerV2Test { - - HistoryControllerV2 historyControllerV2; - - @Mock - private HistoryService historyService; +@ExtendWith(MockitoExtension.class) +class HistoryControllerV2Test { private static final String TEST_DATA_ID = "test"; @@ -64,13 +59,18 @@ public class HistoryControllerV2Test { private static final String TEST_CONTENT = "test config"; - @Before - public void setUp() { + HistoryControllerV2 historyControllerV2; + + @Mock + private HistoryService historyService; + + @BeforeEach + void setUp() { historyControllerV2 = new HistoryControllerV2(historyService); } @Test - public void testListConfigHistory() throws Exception { + void testListConfigHistory() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId(TEST_DATA_ID); @@ -89,8 +89,8 @@ public void testListConfigHistory() throws Exception { when(historyService.listConfigHistory(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1, 10)).thenReturn(page); - Result> pageResult = historyControllerV2.listConfigHistory(TEST_DATA_ID, TEST_GROUP, - TEST_NAMESPACE_ID, 1, 10); + Result> pageResult = historyControllerV2.listConfigHistory(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1, + 10); verify(historyService).listConfigHistory(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1, 10); @@ -106,7 +106,7 @@ public void testListConfigHistory() throws Exception { } @Test - public void testListConfigHistoryWhenNameSpaceIsPublic() throws Exception { + void testListConfigHistoryWhenNameSpaceIsPublic() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId(TEST_DATA_ID); @@ -142,7 +142,7 @@ public void testListConfigHistoryWhenNameSpaceIsPublic() throws Exception { } @Test - public void testGetConfigHistoryInfoWhenNameSpaceIsPublic() throws Exception { + void testGetConfigHistoryInfoWhenNameSpaceIsPublic() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId(TEST_DATA_ID); @@ -152,11 +152,9 @@ public void testGetConfigHistoryInfoWhenNameSpaceIsPublic() throws Exception { configHistoryInfo.setCreatedTime(new Timestamp(new Date().getTime())); configHistoryInfo.setLastModifiedTime(new Timestamp(new Date().getTime())); - when(historyService.getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L)).thenReturn( - configHistoryInfo); + when(historyService.getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L)).thenReturn(configHistoryInfo); - Result result = historyControllerV2.getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, - TEST_NAMESPACE_ID_PUBLIC, 1L); + Result result = historyControllerV2.getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID_PUBLIC, 1L); verify(historyService).getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L); @@ -170,7 +168,7 @@ public void testGetConfigHistoryInfoWhenNameSpaceIsPublic() throws Exception { } @Test - public void testGetConfigHistoryInfo() throws Exception { + void testGetConfigHistoryInfo() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId(TEST_DATA_ID); @@ -180,11 +178,9 @@ public void testGetConfigHistoryInfo() throws Exception { configHistoryInfo.setCreatedTime(new Timestamp(new Date().getTime())); configHistoryInfo.setLastModifiedTime(new Timestamp(new Date().getTime())); - when(historyService.getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L)).thenReturn( - configHistoryInfo); + when(historyService.getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L)).thenReturn(configHistoryInfo); - Result result = historyControllerV2.getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, - TEST_NAMESPACE_ID, 1L); + Result result = historyControllerV2.getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L); verify(historyService).getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L); @@ -198,7 +194,7 @@ public void testGetConfigHistoryInfo() throws Exception { } @Test - public void testGetPreviousConfigHistoryInfo() throws Exception { + void testGetPreviousConfigHistoryInfo() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId(TEST_DATA_ID); @@ -208,11 +204,10 @@ public void testGetPreviousConfigHistoryInfo() throws Exception { configHistoryInfo.setCreatedTime(new Timestamp(new Date().getTime())); configHistoryInfo.setLastModifiedTime(new Timestamp(new Date().getTime())); - when(historyService.getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L)).thenReturn( - configHistoryInfo); + when(historyService.getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L)).thenReturn(configHistoryInfo); - Result result = historyControllerV2.getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, - TEST_NAMESPACE_ID, 1L); + Result result = historyControllerV2.getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, + 1L); verify(historyService).getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L); @@ -226,7 +221,7 @@ public void testGetPreviousConfigHistoryInfo() throws Exception { } @Test - public void testGetPreviousConfigHistoryInfoWhenNameSpaceIsPublic() throws Exception { + void testGetPreviousConfigHistoryInfoWhenNameSpaceIsPublic() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId(TEST_DATA_ID); @@ -236,8 +231,7 @@ public void testGetPreviousConfigHistoryInfoWhenNameSpaceIsPublic() throws Excep configHistoryInfo.setCreatedTime(new Timestamp(new Date().getTime())); configHistoryInfo.setLastModifiedTime(new Timestamp(new Date().getTime())); - when(historyService.getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L)).thenReturn( - configHistoryInfo); + when(historyService.getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID, 1L)).thenReturn(configHistoryInfo); Result result = historyControllerV2.getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_NAMESPACE_ID_PUBLIC, 1L); @@ -254,7 +248,7 @@ public void testGetPreviousConfigHistoryInfoWhenNameSpaceIsPublic() throws Excep } @Test - public void testGetConfigListByNamespace() throws NacosApiException { + void testGetConfigListByNamespace() throws NacosApiException { ConfigInfoWrapper configInfoWrapper = new ConfigInfoWrapper(); configInfoWrapper.setDataId("test"); configInfoWrapper.setGroup("test"); @@ -275,7 +269,7 @@ public void testGetConfigListByNamespace() throws NacosApiException { } @Test - public void testGetConfigListByNamespaceWhenIsPublic() throws NacosApiException { + void testGetConfigListByNamespaceWhenIsPublic() throws NacosApiException { ConfigInfoWrapper configInfoWrapper = new ConfigInfoWrapper(); configInfoWrapper.setDataId("test"); configInfoWrapper.setGroup("test"); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/exception/GlobalExceptionHandlerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/exception/GlobalExceptionHandlerTest.java index 969f60e1a37..8f4f8ce2a60 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/exception/GlobalExceptionHandlerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/exception/GlobalExceptionHandlerTest.java @@ -19,8 +19,8 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; import com.alibaba.nacos.config.server.controller.v2.HistoryControllerV2; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; @@ -37,39 +37,38 @@ @RunWith(SpringRunner.class) @WebMvcTest(GlobalExceptionHandlerTest.class) -public class GlobalExceptionHandlerTest { +class GlobalExceptionHandlerTest { + private MockMvc mockMvc; - + @Autowired private WebApplicationContext context; - + @MockBean private HistoryControllerV2 historyControllerV2; - - @Before - public void before() { + + @BeforeEach + void before() { mockMvc = MockMvcBuilders.webAppContextSetup(context).build(); } - + @Test - public void testNacosRunTimeExceptionHandler() throws Exception { + void testNacosRunTimeExceptionHandler() throws Exception { // 设置HistoryControllerV2的行为,使其抛出NacosRuntimeException并被GlobalExceptionHandler捕获处理 - when(historyControllerV2.getConfigsByTenant("test")) - .thenThrow(new NacosRuntimeException(NacosException.INVALID_PARAM)) - .thenThrow(new NacosRuntimeException(NacosException.SERVER_ERROR)) - .thenThrow(new NacosRuntimeException(503)); - + when(historyControllerV2.getConfigsByTenant("test")).thenThrow(new NacosRuntimeException(NacosException.INVALID_PARAM)) + .thenThrow(new NacosRuntimeException(NacosException.SERVER_ERROR)).thenThrow(new NacosRuntimeException(503)); + // 执行请求并验证响应码 ResultActions resultActions = mockMvc.perform(get("/v2/cs/history/configs").param("namespaceId", "test")); resultActions.andExpect(MockMvcResultMatchers.status().is(NacosException.INVALID_PARAM)); - + // 执行请求并验证响应码 ResultActions resultActions1 = mockMvc.perform(get("/v2/cs/history/configs").param("namespaceId", "test")); resultActions1.andExpect(MockMvcResultMatchers.status().is(NacosException.SERVER_ERROR)); - + // 执行请求并验证响应码 ResultActions resultActions2 = mockMvc.perform(get("/v2/cs/history/configs").param("namespaceId", "test")); resultActions2.andExpect(MockMvcResultMatchers.status().is(503)); } - + } \ No newline at end of file diff --git a/config/src/test/java/com/alibaba/nacos/config/server/manager/TaskManagerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/manager/TaskManagerTest.java index 7cd1000946b..20b78c35b83 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/manager/TaskManagerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/manager/TaskManagerTest.java @@ -19,28 +19,28 @@ import com.alibaba.nacos.common.task.AbstractDelayTask; import com.alibaba.nacos.common.task.NacosTaskProcessor; import com.alibaba.nacos.config.server.constant.Constants; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.internal.verification.Times; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import javax.management.ObjectName; import java.lang.management.ManagementFactory; import java.util.Date; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class TaskManagerTest { +@ExtendWith(MockitoExtension.class) +class TaskManagerTest { private TaskManager taskManager; @@ -52,8 +52,8 @@ public class TaskManagerTest { private AbstractDelayTask abstractTask; - @Before - public void setUp() { + @BeforeEach + void setUp() { taskManager = new TaskManager(TaskManagerTest.class.getName()); taskManager.setDefaultTaskProcessor(taskProcessor); abstractTask = new AbstractDelayTask() { @@ -63,13 +63,13 @@ public void merge(AbstractDelayTask task) { }; } - @After - public void tearDown() { + @AfterEach + void tearDown() { taskManager.close(); } @Test - public void testSize() { + void testSize() { assertEquals(0, taskManager.size()); taskManager.addTask("test", abstractTask); assertEquals(1, taskManager.size()); @@ -78,7 +78,7 @@ public void testSize() { } @Test - public void testIsEmpty() { + void testIsEmpty() { assertTrue(taskManager.isEmpty()); taskManager.addTask("test", abstractTask); assertFalse(taskManager.isEmpty()); @@ -87,7 +87,7 @@ public void testIsEmpty() { } @Test - public void testAddProcessor() throws InterruptedException { + void testAddProcessor() throws InterruptedException { when(testTaskProcessor.process(abstractTask)).thenReturn(true); taskManager.addProcessor("test", testTaskProcessor); taskManager.addTask("test", abstractTask); @@ -97,7 +97,7 @@ public void testAddProcessor() throws InterruptedException { } @Test - public void testRemoveProcessor() throws InterruptedException { + void testRemoveProcessor() throws InterruptedException { when(taskProcessor.process(abstractTask)).thenReturn(true); taskManager.addProcessor("test", testTaskProcessor); taskManager.removeProcessor("test"); @@ -108,7 +108,7 @@ public void testRemoveProcessor() throws InterruptedException { } @Test - public void testRetryTaskAfterFail() throws InterruptedException { + void testRetryTaskAfterFail() throws InterruptedException { when(taskProcessor.process(abstractTask)).thenReturn(false, true); taskManager.addTask("test", abstractTask); TimeUnit.MILLISECONDS.sleep(300); @@ -116,7 +116,7 @@ public void testRetryTaskAfterFail() throws InterruptedException { } @Test - public void testGetTaskInfos() throws InterruptedException { + void testGetTaskInfos() throws InterruptedException { taskManager.addProcessor("test", testTaskProcessor); when(testTaskProcessor.process(abstractTask)).thenReturn(true); taskManager.addTask("test", abstractTask); @@ -126,10 +126,9 @@ public void testGetTaskInfos() throws InterruptedException { } @Test - public void testInit() throws Exception { + void testInit() throws Exception { taskManager.init(); - ObjectName oName = new ObjectName( - TaskManagerTest.class.getName() + ":type=" + TaskManager.class.getSimpleName()); + ObjectName oName = new ObjectName(TaskManagerTest.class.getName() + ":type=" + TaskManager.class.getSimpleName()); assertTrue(ManagementFactory.getPlatformMBeanServer().isRegistered(oName)); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/model/ConfigInfoTest.java b/config/src/test/java/com/alibaba/nacos/config/server/model/ConfigInfoTest.java index ae9efb9297a..686747463b1 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/model/ConfigInfoTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/model/ConfigInfoTest.java @@ -20,14 +20,15 @@ import com.alibaba.nacos.consistency.IdGenerator; import com.alibaba.nacos.core.distributed.id.SnowFlowerIdGenerator; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.core.env.StandardEnvironment; -public class ConfigInfoTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ConfigInfoTest { @Test - public void testPrecisionIssue() throws Exception { + void testPrecisionIssue() throws Exception { EnvUtil.setEnvironment(new StandardEnvironment()); IdGenerator generator = new SnowFlowerIdGenerator(); long expected = generator.nextId(); @@ -35,7 +36,7 @@ public void testPrecisionIssue() throws Exception { configInfo.setId(expected); String json = JacksonUtils.toJson(configInfo); ConfigInfo actual = JacksonUtils.toObj(json, ConfigInfo.class); - Assert.assertEquals(expected, actual.getId()); + assertEquals(expected, actual.getId()); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/paramcheck/ConfigListenerHttpParamExtractorTest.java b/config/src/test/java/com/alibaba/nacos/config/server/paramcheck/ConfigListenerHttpParamExtractorTest.java index 4576cbdeb63..b97e40989b7 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/paramcheck/ConfigListenerHttpParamExtractorTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/paramcheck/ConfigListenerHttpParamExtractorTest.java @@ -18,12 +18,11 @@ import com.alibaba.nacos.common.utils.StringUtils; import com.alibaba.nacos.config.server.model.ConfigInfo; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import javax.servlet.http.HttpServletRequest; import java.util.Arrays; @@ -31,11 +30,11 @@ import static com.alibaba.nacos.api.common.Constants.LINE_SEPARATOR; import static com.alibaba.nacos.api.common.Constants.WORD_SEPARATOR; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; -@RunWith(MockitoJUnitRunner.class) - -public class ConfigListenerHttpParamExtractorTest { +@ExtendWith(MockitoExtension.class) +class ConfigListenerHttpParamExtractorTest { ConfigListenerHttpParamExtractor configListenerHttpParamExtractor; @@ -43,7 +42,7 @@ public class ConfigListenerHttpParamExtractorTest { HttpServletRequest httpServletRequest; @Test - public void testNormal() { + void testNormal() { String listenerConfigsString = getListenerConfigsString(); Mockito.when(httpServletRequest.getParameter(eq("Listening-Configs"))).thenReturn(listenerConfigsString); configListenerHttpParamExtractor = new ConfigListenerHttpParamExtractor(); @@ -51,16 +50,16 @@ public void testNormal() { } @Test - public void testError() { + void testError() { String listenerConfigsString = getErrorListenerConfigsString(); Mockito.when(httpServletRequest.getParameter(eq("Listening-Configs"))).thenReturn(listenerConfigsString); configListenerHttpParamExtractor = new ConfigListenerHttpParamExtractor(); try { configListenerHttpParamExtractor.extractParam(httpServletRequest); - Assert.assertTrue(false); + assertTrue(false); } catch (Throwable throwable) { throwable.printStackTrace(); - Assert.assertTrue(throwable instanceof IllegalArgumentException); + assertTrue(throwable instanceof IllegalArgumentException); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/paramcheck/ParamExtractorTest.java b/config/src/test/java/com/alibaba/nacos/config/server/paramcheck/ParamExtractorTest.java index dbed43d1522..da3c57a289a 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/paramcheck/ParamExtractorTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/paramcheck/ParamExtractorTest.java @@ -22,13 +22,13 @@ import com.alibaba.nacos.core.paramcheck.ExtractorManager; import com.alibaba.nacos.core.paramcheck.ParamCheckerFilter; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.mockito.internal.verification.Times; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; @@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletResponse; import java.lang.reflect.Method; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Param Config ExtractorTest. @@ -44,8 +44,8 @@ * @author 985492783@qq.com * @date 2023/11/9 16:04 */ -@RunWith(MockitoJUnitRunner.class) -public class ParamExtractorTest { +@ExtendWith(MockitoExtension.class) +class ParamExtractorTest { @Mock private ControllerMethodsCache methodsCache; @@ -53,16 +53,15 @@ public class ParamExtractorTest { private ParamCheckerFilter filter; @Test - public void testBlurFilter() throws Exception { + void testBlurFilter() throws Exception { MockedStatic mockedStatic = Mockito.mockStatic(EnvUtil.class); - final Method check = ConfigController.class.getMethod("fuzzySearchConfig", String.class, String.class, String.class, - String.class, String.class, int.class, int.class); + final Method check = ConfigController.class.getMethod("fuzzySearchConfig", String.class, String.class, String.class, String.class, + String.class, int.class, int.class); ExtractorManager.Extractor annotation = check.getAnnotation(ExtractorManager.Extractor.class); AbstractHttpParamExtractor httpExtractor = Mockito.spy(ExtractorManager.getHttpExtractor(annotation)); MockedStatic managerMockedStatic = Mockito.mockStatic(ExtractorManager.class); - mockedStatic.when(() -> EnvUtil.getProperty(Mockito.any(), Mockito.any(), Mockito.any())) - .thenAnswer((k) -> k.getArgument(2)); + mockedStatic.when(() -> EnvUtil.getProperty(Mockito.any(), Mockito.any(), Mockito.any())).thenAnswer((k) -> k.getArgument(2)); filter = new ParamCheckerFilter(methodsCache); managerMockedStatic.when(() -> ExtractorManager.getHttpExtractor(annotation)).thenReturn(httpExtractor); @@ -74,30 +73,28 @@ public void testBlurFilter() throws Exception { filter.doFilter(request, response, (servletRequest, servletResponse) -> { }); - assertEquals(response.getStatus(), 400); + assertEquals(400, response.getStatus()); response = new MockHttpServletResponse(); request.addParameter("search", "blur"); filter.doFilter(request, response, (servletRequest, servletResponse) -> { }); - assertEquals(response.getStatus(), 200); - assertEquals(httpExtractor.getClass(), ConfigBlurSearchHttpParamExtractor.class); + assertEquals(200, response.getStatus()); + assertEquals(ConfigBlurSearchHttpParamExtractor.class, httpExtractor.getClass()); Mockito.verify(httpExtractor, new Times(2)).extractParam(Mockito.any()); managerMockedStatic.close(); mockedStatic.close(); } @Test - public void testListenerFilter() throws Exception { + void testListenerFilter() throws Exception { MockedStatic mockedStatic = Mockito.mockStatic(EnvUtil.class); - final Method check = ConfigController.class.getMethod("listener", HttpServletRequest.class, - HttpServletResponse.class); + final Method check = ConfigController.class.getMethod("listener", HttpServletRequest.class, HttpServletResponse.class); ExtractorManager.Extractor annotation = check.getAnnotation(ExtractorManager.Extractor.class); AbstractHttpParamExtractor httpExtractor = Mockito.spy(ExtractorManager.getHttpExtractor(annotation)); MockedStatic managerMockedStatic = Mockito.mockStatic(ExtractorManager.class); - mockedStatic.when(() -> EnvUtil.getProperty(Mockito.any(), Mockito.any(), Mockito.any())) - .thenAnswer((k) -> k.getArgument(2)); + mockedStatic.when(() -> EnvUtil.getProperty(Mockito.any(), Mockito.any(), Mockito.any())).thenAnswer((k) -> k.getArgument(2)); filter = new ParamCheckerFilter(methodsCache); managerMockedStatic.when(() -> ExtractorManager.getHttpExtractor(annotation)).thenReturn(httpExtractor); @@ -108,23 +105,21 @@ public void testListenerFilter() throws Exception { filter.doFilter(request, response, (servletRequest, servletResponse) -> { }); - assertEquals(httpExtractor.getClass(), ConfigListenerHttpParamExtractor.class); + assertEquals(ConfigListenerHttpParamExtractor.class, httpExtractor.getClass()); Mockito.verify(httpExtractor, new Times(1)).extractParam(Mockito.any()); managerMockedStatic.close(); mockedStatic.close(); } @Test - public void testDefaultFilter() throws Exception { + void testDefaultFilter() throws Exception { MockedStatic mockedStatic = Mockito.mockStatic(EnvUtil.class); - final Method check = ConfigController.class.getMethod("getConfigAdvanceInfo", String.class, String.class, - String.class); + final Method check = ConfigController.class.getMethod("getConfigAdvanceInfo", String.class, String.class, String.class); ExtractorManager.Extractor annotation = ConfigController.class.getAnnotation(ExtractorManager.Extractor.class); AbstractHttpParamExtractor httpExtractor = Mockito.spy(ExtractorManager.getHttpExtractor(annotation)); MockedStatic managerMockedStatic = Mockito.mockStatic(ExtractorManager.class); - mockedStatic.when(() -> EnvUtil.getProperty(Mockito.any(), Mockito.any(), Mockito.any())) - .thenAnswer((k) -> k.getArgument(2)); + mockedStatic.when(() -> EnvUtil.getProperty(Mockito.any(), Mockito.any(), Mockito.any())).thenAnswer((k) -> k.getArgument(2)); filter = new ParamCheckerFilter(methodsCache); managerMockedStatic.when(() -> ExtractorManager.getHttpExtractor(annotation)).thenReturn(httpExtractor); @@ -135,7 +130,7 @@ public void testDefaultFilter() throws Exception { filter.doFilter(request, response, (servletRequest, servletResponse) -> { }); - assertEquals(httpExtractor.getClass(), ConfigDefaultHttpParamExtractor.class); + assertEquals(ConfigDefaultHttpParamExtractor.class, httpExtractor.getClass()); Mockito.verify(httpExtractor, new Times(1)).extractParam(Mockito.any()); managerMockedStatic.close(); mockedStatic.close(); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeBatchListenRequestHandlerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeBatchListenRequestHandlerTest.java index af522752cd3..84b627748f4 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeBatchListenRequestHandlerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeBatchListenRequestHandlerTest.java @@ -23,39 +23,39 @@ import com.alibaba.nacos.config.server.service.ConfigCacheService; import com.alibaba.nacos.config.server.utils.GroupKey2; import com.alibaba.nacos.core.utils.StringPool; -import junit.framework.TestCase; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.test.util.ReflectionTestUtils; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; -@RunWith(MockitoJUnitRunner.class) -public class ConfigChangeBatchListenRequestHandlerTest extends TestCase { - +@ExtendWith(MockitoExtension.class) +class ConfigChangeBatchListenRequestHandlerTest { + @InjectMocks private ConfigChangeBatchListenRequestHandler configQueryRequestHandler; - + @InjectMocks private ConfigChangeListenContext configChangeListenContext; - + private RequestMeta requestMeta; - - @Before - public void setUp() { + + @BeforeEach + void setUp() { configQueryRequestHandler = new ConfigChangeBatchListenRequestHandler(); ReflectionTestUtils.setField(configQueryRequestHandler, "configChangeListenContext", configChangeListenContext); requestMeta = new RequestMeta(); requestMeta.setClientIp("1.1.1.1"); } - + @Test - public void testHandle() { + void testHandle() { MockedStatic configCacheServiceMockedStatic = Mockito.mockStatic(ConfigCacheService.class); String dataId = "dataId"; @@ -63,16 +63,15 @@ public void testHandle() { String tenant = "tenant"; String groupKey = GroupKey2.getKey(dataId, group, tenant); groupKey = StringPool.get(groupKey); - + final String groupKeyCopy = groupKey; configCacheServiceMockedStatic.when( - () -> ConfigCacheService.isUptodate(eq(groupKeyCopy), Mockito.any(), Mockito.any(), Mockito.any())) - .thenReturn(false); + () -> ConfigCacheService.isUptodate(eq(groupKeyCopy), Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(false); ConfigBatchListenRequest configChangeListenRequest = new ConfigBatchListenRequest(); configChangeListenRequest.addConfigListenContext(group, dataId, tenant, " "); try { - ConfigChangeBatchListenResponse configChangeBatchListenResponse = configQueryRequestHandler - .handle(configChangeListenRequest, requestMeta); + ConfigChangeBatchListenResponse configChangeBatchListenResponse = configQueryRequestHandler.handle(configChangeListenRequest, + requestMeta); boolean hasChange = false; for (ConfigChangeBatchListenResponse.ConfigContext changedConfig : configChangeBatchListenResponse.getChangedConfigs()) { if (changedConfig.getDataId().equals(dataId)) { @@ -87,5 +86,5 @@ public void testHandle() { configCacheServiceMockedStatic.close(); } } - + } \ No newline at end of file diff --git a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeClusterSyncRequestHandlerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeClusterSyncRequestHandlerTest.java index 248ea461243..81e7aad105d 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeClusterSyncRequestHandlerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeClusterSyncRequestHandlerTest.java @@ -22,30 +22,31 @@ import com.alibaba.nacos.api.remote.request.RequestMeta; import com.alibaba.nacos.api.remote.response.ResponseCode; import com.alibaba.nacos.config.server.service.dump.DumpService; -import junit.framework.TestCase; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.IOException; -@RunWith(MockitoJUnitRunner.class) -public class ConfigChangeClusterSyncRequestHandlerTest extends TestCase { +import static org.junit.jupiter.api.Assertions.assertEquals; +@ExtendWith(MockitoExtension.class) +class ConfigChangeClusterSyncRequestHandlerTest { + private ConfigChangeClusterSyncRequestHandler configChangeClusterSyncRequestHandler; - + @Mock private DumpService dumpService; - - @Before - public void setUp() throws IOException { + + @BeforeEach + void setUp() throws IOException { configChangeClusterSyncRequestHandler = new ConfigChangeClusterSyncRequestHandler(dumpService); } - + @Test - public void testHandle() throws NacosException { + void testHandle() throws NacosException { ConfigChangeClusterSyncRequest configChangeSyncRequest = new ConfigChangeClusterSyncRequest(); configChangeSyncRequest.setRequestId(""); configChangeSyncRequest.setDataId("dataId"); @@ -54,7 +55,8 @@ public void testHandle() throws NacosException { configChangeSyncRequest.setBeta(false); RequestMeta meta = new RequestMeta(); meta.setClientIp("1.1.1.1"); - ConfigChangeClusterSyncResponse configChangeClusterSyncResponse = configChangeClusterSyncRequestHandler.handle(configChangeSyncRequest, meta); + ConfigChangeClusterSyncResponse configChangeClusterSyncResponse = configChangeClusterSyncRequestHandler.handle( + configChangeSyncRequest, meta); assertEquals(configChangeClusterSyncResponse.getResultCode(), ResponseCode.SUCCESS.getCode()); } } \ No newline at end of file diff --git a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeListenContextTest.java b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeListenContextTest.java index 57e7ae8dac6..eaa3134bff0 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeListenContextTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigChangeListenContextTest.java @@ -16,69 +16,72 @@ package com.alibaba.nacos.config.server.remote; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.Map; import java.util.Set; -@RunWith(MockitoJUnitRunner.class) -public class ConfigChangeListenContextTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +@ExtendWith(MockitoExtension.class) +class ConfigChangeListenContextTest { + private ConfigChangeListenContext configChangeListenContext; - - @Before - public void setUp() throws Exception { + + @BeforeEach + void setUp() throws Exception { configChangeListenContext = new ConfigChangeListenContext(); } - + @Test - public void testAddListen() { + void testAddListen() { configChangeListenContext.addListen("groupKey", "md5", "connectionId"); Set groupKey = configChangeListenContext.getListeners("groupKey"); - Assert.assertEquals(1, groupKey.size()); + assertEquals(1, groupKey.size()); } - + @Test - public void testRemoveListen() { + void testRemoveListen() { configChangeListenContext.addListen("groupKey", "md5", "connectionId"); configChangeListenContext.removeListen("groupKey", "connectionId"); Set groupKey = configChangeListenContext.getListeners("groupKey"); - Assert.assertNull(groupKey); + assertNull(groupKey); } - + @Test - public void testGetListeners() { + void testGetListeners() { configChangeListenContext.addListen("groupKey", "md5", "connectionId"); Set groupKey = configChangeListenContext.getListeners("groupKey"); - Assert.assertEquals(1, groupKey.size()); + assertEquals(1, groupKey.size()); } - + @Test - public void testClearContextForConnectionId() { + void testClearContextForConnectionId() { configChangeListenContext.addListen("groupKey", "md5", "connectionId"); Map connectionIdBefore = configChangeListenContext.getListenKeys("connectionId"); - Assert.assertNotNull(connectionIdBefore); + assertNotNull(connectionIdBefore); configChangeListenContext.clearContextForConnectionId("connectionId"); Map connectionIdAfter = configChangeListenContext.getListenKeys("connectionId"); - Assert.assertNull(connectionIdAfter); + assertNull(connectionIdAfter); } - + @Test - public void testGetListenKeys() { + void testGetListenKeys() { configChangeListenContext.addListen("groupKey", "md5", "connectionId"); Set groupKey = configChangeListenContext.getListeners("groupKey"); - Assert.assertEquals(1, groupKey.size()); + assertEquals(1, groupKey.size()); } - + @Test - public void testGetListenKeyMd5() { + void testGetListenKeyMd5() { configChangeListenContext.addListen("groupKey", "md5", "connectionId"); String listenKeyMd5 = configChangeListenContext.getListenKeyMd5("connectionId", "groupKey"); - Assert.assertEquals("md5", listenKeyMd5); + assertEquals("md5", listenKeyMd5); } - + } \ No newline at end of file diff --git a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigPublishRequestHandlerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigPublishRequestHandlerTest.java index 49be3c12172..d5ffb5c0a38 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigPublishRequestHandlerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigPublishRequestHandlerTest.java @@ -35,29 +35,28 @@ import com.alibaba.nacos.config.server.service.repository.ConfigInfoTagPersistService; import com.alibaba.nacos.persistence.configuration.DatasourceConfiguration; import com.alibaba.nacos.sys.env.EnvUtil; - -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class ConfigPublishRequestHandlerTest { - - private ConfigPublishRequestHandler configPublishRequestHandler; +@ExtendWith(MockitoExtension.class) +class ConfigPublishRequestHandlerTest { @Mock ConfigInfoPersistService configInfoPersistService; @@ -72,19 +71,21 @@ public class ConfigPublishRequestHandlerTest { MockedStatic envUtilMockedStatic; - @Before - public void setUp() { + private ConfigPublishRequestHandler configPublishRequestHandler; + + @BeforeEach + void setUp() { aggrWhitelistMockedStatic = Mockito.mockStatic(AggrWhitelist.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); - configPublishRequestHandler = new ConfigPublishRequestHandler(configInfoPersistService, - configInfoTagPersistService, configInfoBetaPersistService); + configPublishRequestHandler = new ConfigPublishRequestHandler(configInfoPersistService, configInfoTagPersistService, + configInfoBetaPersistService); DatasourceConfiguration.setEmbeddedStorage(false); } - @After - public void after() { + @AfterEach + void after() { aggrWhitelistMockedStatic.close(); envUtilMockedStatic.close(); } @@ -95,7 +96,7 @@ public void after() { * @throws Exception exception. */ @Test - public void testNormalPublishConfigNotCas() throws Exception { + void testNormalPublishConfigNotCas() throws Exception { String dataId = "testNormalPublishConfigNotCas"; String group = "group"; String tenant = "tenant"; @@ -141,15 +142,15 @@ public Class subscribeType() { any(Map.class))).thenReturn(configOperateResult); ConfigPublishResponse response = configPublishRequestHandler.handle(configPublishRequest, requestMeta); - Assert.assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); + assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); Thread.sleep(500L); - Assert.assertTrue(reference.get() != null); - Assert.assertEquals(dataId, reference.get().dataId); - Assert.assertEquals(group, reference.get().group); - Assert.assertEquals(tenant, reference.get().tenant); - Assert.assertEquals(timestamp, reference.get().lastModifiedTs); - Assert.assertFalse(reference.get().isBatch); - Assert.assertFalse(reference.get().isBeta); + assertTrue(reference.get() != null); + assertEquals(dataId, reference.get().dataId); + assertEquals(group, reference.get().group); + assertEquals(tenant, reference.get().tenant); + assertEquals(timestamp, reference.get().lastModifiedTs); + assertFalse(reference.get().isBatch); + assertFalse(reference.get().isBeta); } @@ -159,7 +160,7 @@ public Class subscribeType() { * @throws Exception exception. */ @Test - public void testNormalPublishConfigCas() throws Exception { + void testNormalPublishConfigCas() throws Exception { String dataId = "testNormalPublishConfigCas"; String group = "group"; String tenant = "tenant"; @@ -202,19 +203,19 @@ public Class subscribeType() { long id = timestamp / 1000; configOperateResult.setId(id); configOperateResult.setLastModified(timestamp); - when(configInfoPersistService.insertOrUpdateCas(eq(requestMeta.getClientIp()), eq(srcUser), - any(ConfigInfo.class), any(Map.class))).thenReturn(configOperateResult); + when(configInfoPersistService.insertOrUpdateCas(eq(requestMeta.getClientIp()), eq(srcUser), any(ConfigInfo.class), + any(Map.class))).thenReturn(configOperateResult); ConfigPublishResponse response = configPublishRequestHandler.handle(configPublishRequest, requestMeta); - Assert.assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); + assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); Thread.sleep(500L); - Assert.assertTrue(reference.get() != null); - Assert.assertEquals(dataId, reference.get().dataId); - Assert.assertEquals(group, reference.get().group); - Assert.assertEquals(tenant, reference.get().tenant); - Assert.assertEquals(timestamp, reference.get().lastModifiedTs); - Assert.assertFalse(reference.get().isBatch); - Assert.assertFalse(reference.get().isBeta); + assertTrue(reference.get() != null); + assertEquals(dataId, reference.get().dataId); + assertEquals(group, reference.get().group); + assertEquals(tenant, reference.get().tenant); + assertEquals(timestamp, reference.get().lastModifiedTs); + assertFalse(reference.get().isBatch); + assertFalse(reference.get().isBeta); } /** @@ -223,7 +224,7 @@ public Class subscribeType() { * @throws Exception exception. */ @Test - public void testNormalPublishConfigCasError() throws Exception { + void testNormalPublishConfigCasError() throws Exception { String dataId = "testNormalPublishConfigCasError"; String group = "group"; String tenant = "tenant"; @@ -271,19 +272,19 @@ public Class subscribeType() { long id = timestamp / 1000; configOperateResult.setId(id); configOperateResult.setLastModified(timestamp); - when(configInfoPersistService.insertOrUpdateCas(eq(requestMeta.getClientIp()), eq(srcUser), - any(ConfigInfo.class), any(Map.class))).thenThrow(new NacosRuntimeException(502, "mock error")); + when(configInfoPersistService.insertOrUpdateCas(eq(requestMeta.getClientIp()), eq(srcUser), any(ConfigInfo.class), + any(Map.class))).thenThrow(new NacosRuntimeException(502, "mock error")); ConfigPublishResponse response = configPublishRequestHandler.handle(configPublishRequest, requestMeta); - Assert.assertEquals(ResponseCode.FAIL.getCode(), response.getResultCode()); - Assert.assertTrue(response.getMessage().contains("mock error")); + assertEquals(ResponseCode.FAIL.getCode(), response.getResultCode()); + assertTrue(response.getMessage().contains("mock error")); Thread.sleep(500L); - Assert.assertTrue(reference.get() == null); + assertTrue(reference.get() == null); } @Test - public void testPublishAggrCheckFail() throws NacosException, InterruptedException { + void testPublishAggrCheckFail() throws NacosException, InterruptedException { RequestMeta requestMeta = new RequestMeta(); String clientIp = "127.0.0.1"; @@ -318,14 +319,14 @@ public Class subscribeType() { }); ConfigPublishResponse response = configPublishRequestHandler.handle(configPublishRequest, requestMeta); - Assert.assertEquals(ResponseCode.FAIL.getCode(), response.getResultCode()); - Assert.assertTrue(response.getMessage().contains("is aggr")); + assertEquals(ResponseCode.FAIL.getCode(), response.getResultCode()); + assertTrue(response.getMessage().contains("is aggr")); Thread.sleep(500L); - Assert.assertTrue(reference.get() == null); + assertTrue(reference.get() == null); } @Test - public void testBetaPublishNotCas() throws NacosException, InterruptedException { + void testBetaPublishNotCas() throws NacosException, InterruptedException { String dataId = "testBetaPublish"; String group = "group"; String tenant = "tenant"; @@ -369,24 +370,24 @@ public Class subscribeType() { long id = timestamp / 1000; configOperateResult.setId(id); configOperateResult.setLastModified(timestamp); - when(configInfoBetaPersistService.insertOrUpdateBeta(any(ConfigInfo.class), eq(betaIps), - eq(requestMeta.getClientIp()), eq(srcUser))).thenReturn(configOperateResult); + when(configInfoBetaPersistService.insertOrUpdateBeta(any(ConfigInfo.class), eq(betaIps), eq(requestMeta.getClientIp()), + eq(srcUser))).thenReturn(configOperateResult); ConfigPublishResponse response = configPublishRequestHandler.handle(configPublishRequest, requestMeta); - Assert.assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); + assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); Thread.sleep(500L); - Assert.assertTrue(reference.get() != null); - Assert.assertEquals(dataId, reference.get().dataId); - Assert.assertEquals(group, reference.get().group); - Assert.assertEquals(tenant, reference.get().tenant); - Assert.assertEquals(timestamp, reference.get().lastModifiedTs); - Assert.assertFalse(reference.get().isBatch); - Assert.assertTrue(reference.get().isBeta); + assertTrue(reference.get() != null); + assertEquals(dataId, reference.get().dataId); + assertEquals(group, reference.get().group); + assertEquals(tenant, reference.get().tenant); + assertEquals(timestamp, reference.get().lastModifiedTs); + assertFalse(reference.get().isBatch); + assertTrue(reference.get().isBeta); } @Test - public void testBetaPublishCas() throws NacosException, InterruptedException { + void testBetaPublishCas() throws NacosException, InterruptedException { String dataId = "testBetaPublishCas"; String group = "group"; String tenant = "tenant"; @@ -431,24 +432,24 @@ public Class subscribeType() { long id = timestamp / 1000; configOperateResult.setId(id); configOperateResult.setLastModified(timestamp); - when(configInfoBetaPersistService.insertOrUpdateBetaCas(any(ConfigInfo.class), eq(betaIps), - eq(requestMeta.getClientIp()), eq(srcUser))).thenReturn(configOperateResult); + when(configInfoBetaPersistService.insertOrUpdateBetaCas(any(ConfigInfo.class), eq(betaIps), eq(requestMeta.getClientIp()), + eq(srcUser))).thenReturn(configOperateResult); ConfigPublishResponse response = configPublishRequestHandler.handle(configPublishRequest, requestMeta); - Assert.assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); + assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); Thread.sleep(500L); - Assert.assertTrue(reference.get() != null); - Assert.assertEquals(dataId, reference.get().dataId); - Assert.assertEquals(group, reference.get().group); - Assert.assertEquals(tenant, reference.get().tenant); - Assert.assertEquals(timestamp, reference.get().lastModifiedTs); - Assert.assertFalse(reference.get().isBatch); - Assert.assertTrue(reference.get().isBeta); + assertTrue(reference.get() != null); + assertEquals(dataId, reference.get().dataId); + assertEquals(group, reference.get().group); + assertEquals(tenant, reference.get().tenant); + assertEquals(timestamp, reference.get().lastModifiedTs); + assertFalse(reference.get().isBatch); + assertTrue(reference.get().isBeta); } @Test - public void testTagPublishNotCas() throws NacosException, InterruptedException { + void testTagPublishNotCas() throws NacosException, InterruptedException { ConfigPublishRequest configPublishRequest = new ConfigPublishRequest(); String dataId = "testTagPublishNotCas"; @@ -494,26 +495,26 @@ public Class subscribeType() { long id = timestamp / 1000; configOperateResult.setId(id); configOperateResult.setLastModified(timestamp); - when(configInfoTagPersistService.insertOrUpdateTag(any(ConfigInfo.class), eq(tag), - eq(requestMeta.getClientIp()), eq(srcUser))).thenReturn(configOperateResult); + when(configInfoTagPersistService.insertOrUpdateTag(any(ConfigInfo.class), eq(tag), eq(requestMeta.getClientIp()), + eq(srcUser))).thenReturn(configOperateResult); ConfigPublishResponse response = configPublishRequestHandler.handle(configPublishRequest, requestMeta); - Assert.assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); + assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); Thread.sleep(500L); - Assert.assertTrue(reference.get() != null); - Assert.assertEquals(dataId, reference.get().dataId); - Assert.assertEquals(group, reference.get().group); - Assert.assertEquals(tenant, reference.get().tenant); - Assert.assertEquals(timestamp, reference.get().lastModifiedTs); - Assert.assertFalse(reference.get().isBatch); - Assert.assertFalse(reference.get().isBeta); - Assert.assertEquals(tag, reference.get().tag); + assertTrue(reference.get() != null); + assertEquals(dataId, reference.get().dataId); + assertEquals(group, reference.get().group); + assertEquals(tenant, reference.get().tenant); + assertEquals(timestamp, reference.get().lastModifiedTs); + assertFalse(reference.get().isBatch); + assertFalse(reference.get().isBeta); + assertEquals(tag, reference.get().tag); } @Test - public void testTagPublishCas() throws NacosException, InterruptedException { + void testTagPublishCas() throws NacosException, InterruptedException { String dataId = "testTagPublishCas"; String group = "group"; ConfigPublishRequest configPublishRequest = new ConfigPublishRequest(); @@ -553,21 +554,21 @@ public Class subscribeType() { long id = timestamp / 1000; configOperateResult.setId(id); configOperateResult.setLastModified(timestamp); - when(configInfoTagPersistService.insertOrUpdateTagCas(any(ConfigInfo.class), eq(tag), - eq(requestMeta.getClientIp()), eq(srcUser))).thenReturn(configOperateResult); + when(configInfoTagPersistService.insertOrUpdateTagCas(any(ConfigInfo.class), eq(tag), eq(requestMeta.getClientIp()), + eq(srcUser))).thenReturn(configOperateResult); ConfigPublishResponse response = configPublishRequestHandler.handle(configPublishRequest, requestMeta); - Assert.assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); + assertEquals(ResponseCode.SUCCESS.getCode(), response.getResultCode()); Thread.sleep(500L); - Assert.assertTrue(reference.get() != null); - Assert.assertEquals(dataId, reference.get().dataId); - Assert.assertEquals(group, reference.get().group); - Assert.assertEquals(tenant, reference.get().tenant); - Assert.assertEquals(timestamp, reference.get().lastModifiedTs); - Assert.assertFalse(reference.get().isBatch); - Assert.assertFalse(reference.get().isBeta); - Assert.assertEquals(tag, reference.get().tag); + assertTrue(reference.get() != null); + assertEquals(dataId, reference.get().dataId); + assertEquals(group, reference.get().group); + assertEquals(tenant, reference.get().tenant); + assertEquals(timestamp, reference.get().lastModifiedTs); + assertFalse(reference.get().isBatch); + assertFalse(reference.get().isBeta); + assertEquals(tag, reference.get().tag); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandlerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandlerTest.java index b6edcde5707..6467ad8e948 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandlerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandlerTest.java @@ -28,14 +28,13 @@ import com.alibaba.nacos.config.server.utils.GroupKey2; import com.alibaba.nacos.config.server.utils.PropertyUtil; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.core.env.StandardEnvironment; import java.io.IOException; @@ -43,13 +42,15 @@ import static com.alibaba.nacos.api.common.Constants.VIPSERVER_TAG; import static com.alibaba.nacos.api.config.remote.response.ConfigQueryResponse.CONFIG_NOT_FOUND; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class ConfigQueryRequestHandlerTest { - - private ConfigQueryRequestHandler configQueryRequestHandler; +@ExtendWith(MockitoExtension.class) +class ConfigQueryRequestHandlerTest { static MockedStatic configCacheServiceMockedStatic; @@ -65,16 +66,18 @@ public class ConfigQueryRequestHandlerTest { String content = "content" + System.currentTimeMillis(); - @After - public void after() { + private ConfigQueryRequestHandler configQueryRequestHandler; + + @AfterEach + void after() { configCacheServiceMockedStatic.close(); propertyUtilMockedStatic.close(); configDiskServiceFactoryMockedStatic.close(); EnvUtil.setEnvironment(null); } - @Before - public void setUp() throws IOException { + @BeforeEach + void setUp() throws IOException { EnvUtil.setEnvironment(new StandardEnvironment()); configCacheServiceMockedStatic = Mockito.mockStatic(ConfigCacheService.class); propertyUtilMockedStatic = Mockito.mockStatic(PropertyUtil.class); @@ -92,7 +95,7 @@ public void setUp() throws IOException { * @throws Exception Exception. */ @Test - public void testGetNormal() throws Exception { + void testGetNormal() throws Exception { final String groupKey = GroupKey2.getKey(dataId, group, ""); String content = "content_from_notdirectreadÄãºÃ" + System.currentTimeMillis(); @@ -113,14 +116,14 @@ public void testGetNormal() throws Exception { when(configRocksDbDiskService.getContent(eq(dataId), eq(group), eq(null))).thenReturn(content); ConfigQueryResponse response = configQueryRequestHandler.handle(configQueryRequest, requestMeta); - Assert.assertEquals(content, response.getContent()); - Assert.assertEquals(MD5Utils.md5Hex(content, "UTF-8"), response.getMd5()); - Assert.assertEquals("key_testGetNormal_NotDirectRead", response.getEncryptedDataKey()); + assertEquals(content, response.getContent()); + assertEquals(MD5Utils.md5Hex(content, "UTF-8"), response.getMd5()); + assertEquals("key_testGetNormal_NotDirectRead", response.getEncryptedDataKey()); - Assert.assertFalse(response.isBeta()); - Assert.assertNull(response.getTag()); + assertFalse(response.isBeta()); + assertNull(response.getTag()); - Assert.assertEquals(content, response.getContent()); + assertEquals(content, response.getContent()); } @@ -130,7 +133,7 @@ public void testGetNormal() throws Exception { * @throws Exception Exception. */ @Test - public void testGetBeta() throws Exception { + void testGetBeta() throws Exception { final String groupKey = GroupKey2.getKey(dataId, group, ""); ConfigRocksDbDiskService configRocksDbDiskService = Mockito.mock(ConfigRocksDbDiskService.class); @@ -156,11 +159,11 @@ public void testGetBeta() throws Exception { when(configRocksDbDiskService.getBetaContent(eq(dataId), eq(group), eq(null))).thenReturn(content); ConfigQueryResponse response = configQueryRequestHandler.handle(configQueryRequest, requestMeta); //check content&md5 - Assert.assertEquals(content, response.getContent()); - Assert.assertEquals(MD5Utils.md5Hex(content, "UTF-8"), response.getMd5()); + assertEquals(content, response.getContent()); + assertEquals(MD5Utils.md5Hex(content, "UTF-8"), response.getMd5()); //check flags. - Assert.assertTrue(response.isBeta()); - Assert.assertNull(response.getTag()); + assertTrue(response.isBeta()); + assertNull(response.getTag()); } @@ -170,7 +173,7 @@ public void testGetBeta() throws Exception { * @throws Exception Exception. */ @Test - public void testGetTagNotFound() throws Exception { + void testGetTagNotFound() throws Exception { final String groupKey = GroupKey2.getKey(dataId, group, ""); String content = "content_from_tag_withtagÄãºÃ" + System.currentTimeMillis(); @@ -197,14 +200,14 @@ public void testGetTagNotFound() throws Exception { ConfigQueryResponse response = configQueryRequestHandler.handle(configQueryRequest, requestMeta); //check content&md5 - Assert.assertNull(response.getContent()); - Assert.assertNull(response.getMd5()); - Assert.assertEquals(response.getErrorCode(), CONFIG_NOT_FOUND); - Assert.assertNull(response.getEncryptedDataKey()); + assertNull(response.getContent()); + assertNull(response.getMd5()); + assertEquals(CONFIG_NOT_FOUND, response.getErrorCode()); + assertNull(response.getEncryptedDataKey()); //check flags. - Assert.assertFalse(response.isBeta()); - Assert.assertEquals(response.getTag(), specificTag); + assertFalse(response.isBeta()); + assertEquals(response.getTag(), specificTag); } @@ -214,7 +217,7 @@ public void testGetTagNotFound() throws Exception { * @throws Exception Exception. */ @Test - public void testGetTagWithTag() throws Exception { + void testGetTagWithTag() throws Exception { final String groupKey = GroupKey2.getKey(dataId, group, ""); String content = "content_from_tag_notdirectreadÄãºÃ" + System.currentTimeMillis(); @@ -248,17 +251,16 @@ public void testGetTagWithTag() throws Exception { requestMeta.setClientIp("127.0.0.1"); //mock disk read. - when(configRocksDbDiskService.getTagContent(eq(dataId), eq(group), eq(null), eq(specificTag))).thenReturn( - tagContent); + when(configRocksDbDiskService.getTagContent(eq(dataId), eq(group), eq(null), eq(specificTag))).thenReturn(tagContent); ConfigQueryResponse response = configQueryRequestHandler.handle(configQueryRequest, requestMeta); //check content&md5 - Assert.assertEquals(tagContent, response.getContent()); - Assert.assertEquals(MD5Utils.md5Hex(tagContent, "UTF-8"), response.getMd5()); - Assert.assertEquals("key_testGetTag_NotDirectRead", response.getEncryptedDataKey()); + assertEquals(tagContent, response.getContent()); + assertEquals(MD5Utils.md5Hex(tagContent, "UTF-8"), response.getMd5()); + assertEquals("key_testGetTag_NotDirectRead", response.getEncryptedDataKey()); //check flags. - Assert.assertFalse(response.isBeta()); - Assert.assertEquals(response.getTag(), specificTag); + assertFalse(response.isBeta()); + assertEquals(response.getTag(), specificTag); } @@ -268,7 +270,7 @@ public void testGetTagWithTag() throws Exception { * @throws Exception Exception. */ @Test - public void testGetTagAutoTag() throws Exception { + void testGetTagAutoTag() throws Exception { final String groupKey = GroupKey2.getKey(dataId, group, ""); String content = "content_from_tag_notdirectreadÄãºÃ" + System.currentTimeMillis(); @@ -296,18 +298,17 @@ public void testGetTagAutoTag() throws Exception { requestMeta.setClientIp("127.0.0.1"); //mock disk read. - when(configRocksDbDiskService.getTagContent(eq(dataId), eq(group), eq(null), eq(autoTag))).thenReturn( - tagContent); + when(configRocksDbDiskService.getTagContent(eq(dataId), eq(group), eq(null), eq(autoTag))).thenReturn(tagContent); ConfigQueryResponse response = configQueryRequestHandler.handle(configQueryRequest, requestMeta); //check content&md5 - Assert.assertEquals(tagContent, response.getContent()); - Assert.assertEquals(MD5Utils.md5Hex(tagContent, "UTF-8"), response.getMd5()); - Assert.assertEquals("key_testGetTag_AutoTag_NotDirectRead", response.getEncryptedDataKey()); + assertEquals(tagContent, response.getContent()); + assertEquals(MD5Utils.md5Hex(tagContent, "UTF-8"), response.getMd5()); + assertEquals("key_testGetTag_AutoTag_NotDirectRead", response.getEncryptedDataKey()); //check flags. - Assert.assertFalse(response.isBeta()); - Assert.assertEquals(response.getTag(), autoTag); + assertFalse(response.isBeta()); + assertEquals(response.getTag(), autoTag); } @@ -317,14 +318,14 @@ public void testGetTagAutoTag() throws Exception { * @throws Exception Exception. */ @Test - public void testGetConfigNotExistAndConflict() throws Exception { + void testGetConfigNotExistAndConflict() throws Exception { String dataId = "dataId" + System.currentTimeMillis(); String group = "group" + System.currentTimeMillis(); String tenant = "tenant" + System.currentTimeMillis(); //test config not exist - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))).thenReturn(0); + configCacheServiceMockedStatic.when(() -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))) + .thenReturn(0); final String groupKey = GroupKey2.getKey(dataId, group, tenant); when(ConfigCacheService.getContentCache(eq(groupKey))).thenReturn(null); @@ -336,22 +337,22 @@ public void testGetConfigNotExistAndConflict() throws Exception { requestMeta.setClientIp("127.0.0.1"); ConfigQueryResponse response = configQueryRequestHandler.handle(configQueryRequest, requestMeta); - Assert.assertEquals(CONFIG_NOT_FOUND, response.getErrorCode()); - Assert.assertEquals(null, response.getContent()); - Assert.assertEquals(null, response.getMd5()); - Assert.assertFalse(response.isBeta()); - Assert.assertNull(response.getTag()); + assertEquals(CONFIG_NOT_FOUND, response.getErrorCode()); + assertNull(response.getContent()); + assertNull(response.getMd5()); + assertFalse(response.isBeta()); + assertNull(response.getTag()); //test config conflict when(ConfigCacheService.getContentCache(eq(groupKey))).thenReturn(new CacheItem(groupKey)); - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))).thenReturn(-1); + configCacheServiceMockedStatic.when(() -> ConfigCacheService.tryConfigReadLock(GroupKey2.getKey(dataId, group, tenant))) + .thenReturn(-1); ConfigQueryResponse responseConflict = configQueryRequestHandler.handle(configQueryRequest, requestMeta); - Assert.assertEquals(ConfigQueryResponse.CONFIG_QUERY_CONFLICT, responseConflict.getErrorCode()); - Assert.assertEquals(null, responseConflict.getContent()); - Assert.assertEquals(null, responseConflict.getMd5()); - Assert.assertFalse(responseConflict.isBeta()); - Assert.assertNull(responseConflict.getTag()); + assertEquals(ConfigQueryResponse.CONFIG_QUERY_CONFLICT, responseConflict.getErrorCode()); + assertNull(responseConflict.getContent()); + assertNull(responseConflict.getMd5()); + assertFalse(responseConflict.isBeta()); + assertNull(responseConflict.getTag()); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigRemoveRequestHandlerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigRemoveRequestHandlerTest.java index f63c294e9d2..f489b112a83 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigRemoveRequestHandlerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/remote/ConfigRemoveRequestHandlerTest.java @@ -24,16 +24,18 @@ import com.alibaba.nacos.config.server.service.repository.ConfigInfoPersistService; import com.alibaba.nacos.config.server.service.repository.ConfigInfoTagPersistService; import com.alibaba.nacos.config.server.service.trace.ConfigTraceService; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; -@RunWith(MockitoJUnitRunner.class) -public class ConfigRemoveRequestHandlerTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +@ExtendWith(MockitoExtension.class) +class ConfigRemoveRequestHandlerTest { private ConfigRemoveRequestHandler configRemoveRequestHandler; @@ -43,15 +45,14 @@ public class ConfigRemoveRequestHandlerTest { @Mock private ConfigInfoTagPersistService configInfoTagPersistService; - @Before - public void setUp() throws Exception { - configRemoveRequestHandler = new ConfigRemoveRequestHandler(configInfoPersistService, - configInfoTagPersistService); + @BeforeEach + void setUp() throws Exception { + configRemoveRequestHandler = new ConfigRemoveRequestHandler(configInfoPersistService, configInfoTagPersistService); Mockito.mockStatic(ConfigTraceService.class); } @Test - public void testHandle() { + void testHandle() { ConfigRemoveRequest configRemoveRequest = new ConfigRemoveRequest(); configRemoveRequest.setRequestId("requestId"); configRemoveRequest.setGroup("group"); @@ -61,10 +62,10 @@ public void testHandle() { meta.setClientIp("1.1.1.1"); try { ConfigRemoveResponse configRemoveResponse = configRemoveRequestHandler.handle(configRemoveRequest, meta); - Assert.assertEquals(ResponseCode.SUCCESS.getCode(), configRemoveResponse.getResultCode()); + assertEquals(ResponseCode.SUCCESS.getCode(), configRemoveResponse.getResultCode()); } catch (NacosException e) { e.printStackTrace(); - Assert.assertTrue(false); + assertTrue(false); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/remote/RpcConfigChangeNotifierTest.java b/config/src/test/java/com/alibaba/nacos/config/server/remote/RpcConfigChangeNotifierTest.java index 3a25134745b..98e0806b46f 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/remote/RpcConfigChangeNotifierTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/remote/RpcConfigChangeNotifierTest.java @@ -29,14 +29,14 @@ import com.alibaba.nacos.plugin.control.tps.request.TpsCheckRequest; import com.alibaba.nacos.plugin.control.tps.response.TpsCheckResponse; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.test.util.ReflectionTestUtils; import java.util.ArrayList; @@ -52,19 +52,14 @@ import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; -@RunWith(MockitoJUnitRunner.class) -public class RpcConfigChangeNotifierTest { +@ExtendWith(MockitoExtension.class) +class RpcConfigChangeNotifierTest { - private RpcConfigChangeNotifier rpcConfigChangeNotifier; - - @Mock - private ConfigChangeListenContext configChangeListenContext; + static final String POINT_CONFIG_PUSH = "CONFIG_PUSH_COUNT"; - @Mock - private RpcPushService rpcPushService; + static final String POINT_CONFIG_PUSH_SUCCESS = "CONFIG_PUSH_SUCCESS"; - @Mock - private ConnectionManager connectionManager; + static final String POINT_CONFIG_PUSH_FAIL = "CONFIG_PUSH_FAIL"; @Mock ControlManagerCenter controlManagerCenter; @@ -76,12 +71,22 @@ public class RpcConfigChangeNotifierTest { MockedStatic envUtilMockedStatic; - @Before - public void setUp() { + private RpcConfigChangeNotifier rpcConfigChangeNotifier; + + @Mock + private ConfigChangeListenContext configChangeListenContext; + + @Mock + private RpcPushService rpcPushService; + + @Mock + private ConnectionManager connectionManager; + + @BeforeEach + void setUp() { envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); - envUtilMockedStatic.when( - () -> EnvUtil.getProperty(eq("nacos.config.push.maxRetryTime"), eq(Integer.class), anyInt())) + envUtilMockedStatic.when(() -> EnvUtil.getProperty(eq("nacos.config.push.maxRetryTime"), eq(Integer.class), anyInt())) .thenReturn(3); controlManagerCenterMockedStatic = Mockito.mockStatic(ControlManagerCenter.class); Mockito.when(ControlManagerCenter.getInstance()).thenReturn(controlManagerCenter); @@ -93,14 +98,14 @@ public void setUp() { } - @After - public void after() { + @AfterEach + void after() { envUtilMockedStatic.close(); controlManagerCenterMockedStatic.close(); } @Test - public void testOnDataEvent() throws InterruptedException { + void testOnDataEvent() throws InterruptedException { final String groupKey = GroupKey2.getKey("nacos.internal.tps.control_rule_1", "nacos", "tenant"); @@ -115,40 +120,38 @@ public void testOnDataEvent() throws InterruptedException { GrpcConnection mockConn3 = Mockito.mock(GrpcConnection.class); //mock con1 push normal Mockito.when(connectionManager.getConnection(eq("con1"))).thenReturn(mockConn1); - Mockito.when(mockConn1.getMetaInfo()).thenReturn( - new ConnectionMeta("con1", "192.168.0.1", "192.168.0.2", 34567, 9848, "GRPC", "2.2.0", null, - new HashMap<>())); + Mockito.when(mockConn1.getMetaInfo()) + .thenReturn(new ConnectionMeta("con1", "192.168.0.1", "192.168.0.2", 34567, 9848, "GRPC", "2.2.0", null, new HashMap<>())); //mock con1 noy exist Mockito.when(connectionManager.getConnection(eq("con2"))).thenReturn(null); Mockito.when(connectionManager.getConnection(eq("con3"))).thenReturn(mockConn3); - Mockito.when(mockConn3.getMetaInfo()).thenReturn( - new ConnectionMeta("con3", "192.168.0.1", "192.168.0.2", 34567, 9848, "GRPC", "2.2.0", null, - new HashMap<>())); + Mockito.when(mockConn3.getMetaInfo()) + .thenReturn(new ConnectionMeta("con3", "192.168.0.1", "192.168.0.2", 34567, 9848, "GRPC", "2.2.0", null, new HashMap<>())); Mockito.when(configChangeListenContext.getListeners(eq(groupKey))).thenReturn(mockConnectionIds); //mock push tps passed - Mockito.when(tpsControlManager.check(any(TpsCheckRequest.class))) - .thenReturn(new TpsCheckResponse(true, 200, "success")); + Mockito.when(tpsControlManager.check(any(TpsCheckRequest.class))).thenReturn(new TpsCheckResponse(true, 200, "success")); rpcConfigChangeNotifier.onEvent(new LocalDataChangeEvent(groupKey, true, betaIps)); //wait rpc push executed. Thread.sleep(50L); //expect rpc push task run. - Mockito.verify(rpcPushService, times(1)).pushWithCallback(eq("con1"), any(ConfigChangeNotifyRequest.class), - any(RpcConfigChangeNotifier.RpcPushCallback.class), any(Executor.class)); - Mockito.verify(rpcPushService, times(1)).pushWithCallback(eq("con3"), any(ConfigChangeNotifyRequest.class), - any(RpcConfigChangeNotifier.RpcPushCallback.class), any(Executor.class)); + Mockito.verify(rpcPushService, times(1)) + .pushWithCallback(eq("con1"), any(ConfigChangeNotifyRequest.class), any(RpcConfigChangeNotifier.RpcPushCallback.class), + any(Executor.class)); + Mockito.verify(rpcPushService, times(1)) + .pushWithCallback(eq("con3"), any(ConfigChangeNotifyRequest.class), any(RpcConfigChangeNotifier.RpcPushCallback.class), + any(Executor.class)); } @Test - public void testRpcCallBack() { + void testRpcCallBack() { MockedStatic configExecutorMockedStatic = Mockito.mockStatic(ConfigExecutor.class); try { RpcConfigChangeNotifier.RpcPushTask task = Mockito.mock(RpcConfigChangeNotifier.RpcPushTask.class); Mockito.when(task.getConnectionId()).thenReturn("testconn1"); - Mockito.when(connectionManager.getConnection(eq("testconn1"))) - .thenReturn(Mockito.mock(GrpcConnection.class)); + Mockito.when(connectionManager.getConnection(eq("testconn1"))).thenReturn(Mockito.mock(GrpcConnection.class)); ConfigChangeNotifyRequest notifyRequest = new ConfigChangeNotifyRequest(); notifyRequest.setDataId("d1"); notifyRequest.setGroup("g1"); @@ -156,16 +159,16 @@ public void testRpcCallBack() { //mock task not overtimes and receive exception on callback Mockito.when(task.isOverTimes()).thenReturn(false); Mockito.when(task.getTryTimes()).thenReturn(2); - RpcConfigChangeNotifier.RpcPushCallback rpcPushCallback = new RpcConfigChangeNotifier.RpcPushCallback(task, - tpsControlManager, connectionManager); + RpcConfigChangeNotifier.RpcPushCallback rpcPushCallback = new RpcConfigChangeNotifier.RpcPushCallback(task, tpsControlManager, + connectionManager); rpcPushCallback.onFail(new RuntimeException()); //expect config push fail be recorded. Mockito.verify(tpsControlManager, times(1)).check(any(TpsCheckRequest.class)); //expect schedule this task next retry times configExecutorMockedStatic.verify( - () -> ConfigExecutor.scheduleClientConfigNotifier(any(RpcConfigChangeNotifier.RpcPushTask.class), - eq(2 * 2L), eq(TimeUnit.SECONDS))); + () -> ConfigExecutor.scheduleClientConfigNotifier(any(RpcConfigChangeNotifier.RpcPushTask.class), eq(2 * 2L), + eq(TimeUnit.SECONDS))); //mock rpcPushCallback.onSuccess(); //expect config push success be recorded. @@ -182,14 +185,8 @@ public void testRpcCallBack() { } - static final String POINT_CONFIG_PUSH = "CONFIG_PUSH_COUNT"; - - static final String POINT_CONFIG_PUSH_SUCCESS = "CONFIG_PUSH_SUCCESS"; - - static final String POINT_CONFIG_PUSH_FAIL = "CONFIG_PUSH_FAIL"; - @Test - public void testRegisterTpsPoint() { + void testRegisterTpsPoint() { rpcConfigChangeNotifier.registerTpsPoint(); Mockito.verify(tpsControlManager, Mockito.times(1)).registerTpsPoint(eq(POINT_CONFIG_PUSH)); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/AggrWhitelistTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/AggrWhitelistTest.java index 4958704b2cc..dbda0ad4bf9 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/AggrWhitelistTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/AggrWhitelistTest.java @@ -16,18 +16,18 @@ package com.alibaba.nacos.config.server.service; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class AggrWhitelistTest { +class AggrWhitelistTest { @Test - public void testIsAggrDataId() { + void testIsAggrDataId() { List list = new ArrayList(); list.add("com.taobao.jiuren.*"); list.add("NS_NACOS_SUBSCRIPTION_TOPIC_*"); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/ClientTrackServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/ClientTrackServiceTest.java index 7d2be2e3231..edb32244646 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/ClientTrackServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/ClientTrackServiceTest.java @@ -17,24 +17,27 @@ package com.alibaba.nacos.config.server.service; import com.alibaba.nacos.config.server.utils.GroupKey2; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; -@RunWith(SpringJUnit4ClassRunner.class) +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +@ExtendWith(SpringExtension.class) @WebAppConfiguration -public class ClientTrackServiceTest { +class ClientTrackServiceTest { - @Before - public void before() { + @BeforeEach + void before() { ClientTrackService.clientRecords.clear(); } @Test - public void testTrackClientMd5() { + void testTrackClientMd5() { String clientIp = "1.1.1.1"; String dataId = "com.taobao.session.xml"; String group = "online"; @@ -46,13 +49,13 @@ public void testTrackClientMd5() { ClientTrackService.trackClientMd5(clientIp, groupKey, md5); ClientTrackService.trackClientMd5(clientIp, groupKey, md5); - Assert.assertEquals(true, ClientTrackService.isClientUptodate(clientIp).get(groupKey)); - Assert.assertEquals(1, ClientTrackService.subscribeClientCount()); - Assert.assertEquals(1, ClientTrackService.subscriberCount()); + assertTrue(ClientTrackService.isClientUptodate(clientIp).get(groupKey)); + assertEquals(1, ClientTrackService.subscribeClientCount()); + assertEquals(1, ClientTrackService.subscriberCount()); //服务端数据更新 ConfigCacheService.updateMd5(groupKey, md5 + "111", System.currentTimeMillis(), ""); - Assert.assertEquals(false, ClientTrackService.isClientUptodate(clientIp).get(groupKey)); + assertFalse(ClientTrackService.isClientUptodate(clientIp).get(groupKey)); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigCacheServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigCacheServiceTest.java index 040eb13bb7e..fccdb2e5b90 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigCacheServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigCacheServiceTest.java @@ -25,16 +25,15 @@ import com.alibaba.nacos.config.server.utils.PropertyUtil; import com.alibaba.nacos.config.server.utils.SimpleReadWriteLock; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.mockito.stubbing.OngoingStubbing; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.io.IOException; import java.lang.reflect.Field; @@ -43,13 +42,17 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.times; -@RunWith(SpringJUnit4ClassRunner.class) -public class ConfigCacheServiceTest { +@ExtendWith(SpringExtension.class) +class ConfigCacheServiceTest { MockedStatic propertyUtilMockedStatic; @@ -60,24 +63,23 @@ public class ConfigCacheServiceTest { MockedStatic envUtilMockedStatic; - @Before - public void before() { + @BeforeEach + void before() { envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); configDiskServiceFactoryMockedStatic = Mockito.mockStatic(ConfigDiskServiceFactory.class); - configDiskServiceFactoryMockedStatic.when(() -> ConfigDiskServiceFactory.getInstance()) - .thenReturn(configDiskService); + configDiskServiceFactoryMockedStatic.when(() -> ConfigDiskServiceFactory.getInstance()).thenReturn(configDiskService); propertyUtilMockedStatic = Mockito.mockStatic(PropertyUtil.class); } - @After - public void after() { + @AfterEach + void after() { envUtilMockedStatic.close(); propertyUtilMockedStatic.close(); configDiskServiceFactoryMockedStatic.close(); } @Test - public void testDumpFormal() throws Exception { + void testDumpFormal() throws Exception { String dataId = "dataIdtestDumpMd5NewTsNewMd5123"; String group = "group11"; String tenant = "tenant112"; @@ -86,19 +88,18 @@ public void testDumpFormal() throws Exception { String groupKey = GroupKey2.getKey(dataId, group, tenant); //make sure not exist prev cache. CacheItem contentCache = ConfigCacheService.getContentCache(groupKey); - Assert.assertTrue(contentCache == null); + assertTrue(contentCache == null); long ts = System.currentTimeMillis(); String type = "json"; String encryptedDataKey = "key12345"; - boolean result = ConfigCacheService.dumpWithMd5(dataId, group, tenant, content, md5, ts, type, - encryptedDataKey); - Assert.assertTrue(result); + boolean result = ConfigCacheService.dumpWithMd5(dataId, group, tenant, content, md5, ts, type, encryptedDataKey); + assertTrue(result); //verify cache. CacheItem contentCache1 = ConfigCacheService.getContentCache(groupKey); - Assert.assertEquals(ts, contentCache1.getConfigCache().getLastModifiedTs()); - Assert.assertEquals(md5, contentCache1.getConfigCache().getMd5Utf8()); - Assert.assertEquals(type, contentCache1.getType()); - Assert.assertEquals(encryptedDataKey, contentCache1.getConfigCache().getEncryptedDataKey()); + assertEquals(ts, contentCache1.getConfigCache().getLastModifiedTs()); + assertEquals(md5, contentCache1.getConfigCache().getMd5Utf8()); + assertEquals(type, contentCache1.getType()); + assertEquals(encryptedDataKey, contentCache1.getConfigCache().getEncryptedDataKey()); Mockito.verify(configDiskService, times(1)).saveToDisk(eq(dataId), eq(group), eq(tenant), eq(content)); //modified ts and content and md5 @@ -107,9 +108,9 @@ public void testDumpFormal() throws Exception { ConfigCacheService.dump(dataId, group, tenant, contentNew, newTs, type, encryptedDataKey); //expect save to disk invoked. Mockito.verify(configDiskService, times(1)).saveToDisk(eq(dataId), eq(group), eq(tenant), eq(contentNew)); - Assert.assertEquals(newTs, contentCache1.getConfigCache().getLastModifiedTs()); + assertEquals(newTs, contentCache1.getConfigCache().getLastModifiedTs()); String newMd5 = MD5Utils.md5Hex(contentNew, "UTF-8"); - Assert.assertEquals(newMd5, contentCache1.getConfigCache().getMd5Utf8()); + assertEquals(newMd5, contentCache1.getConfigCache().getMd5Utf8()); //modified ts old long oldTs2 = newTs - 123L; @@ -118,38 +119,37 @@ public void testDumpFormal() throws Exception { //expect save to disk invoked. Mockito.verify(configDiskService, times(0)).saveToDisk(eq(dataId), eq(group), eq(tenant), eq(contentWithOldTs)); //not change ts and md5 - Assert.assertEquals(newTs, contentCache1.getConfigCache().getLastModifiedTs()); - Assert.assertEquals(newMd5, contentCache1.getConfigCache().getMd5Utf8()); + assertEquals(newTs, contentCache1.getConfigCache().getLastModifiedTs()); + assertEquals(newMd5, contentCache1.getConfigCache().getMd5Utf8()); //modified ts new only long newTs2 = newTs + 123L; ConfigCacheService.dump(dataId, group, tenant, contentNew, newTs2, type, encryptedDataKey); - Assert.assertEquals(newTs2, contentCache1.getConfigCache().getLastModifiedTs()); + assertEquals(newTs2, contentCache1.getConfigCache().getLastModifiedTs()); //save to disk error doThrow(new IOException("No space left on device")).when(configDiskService) .saveToDisk(anyString(), anyString(), anyString(), anyString()); try { long newTs3 = newTs2 + 123L; - boolean dumpErrorResult = ConfigCacheService.dump(dataId, group, tenant, contentNew + "234567", newTs3, - type, encryptedDataKey); + boolean dumpErrorResult = ConfigCacheService.dump(dataId, group, tenant, contentNew + "234567", newTs3, type, encryptedDataKey); envUtilMockedStatic.verify(() -> EnvUtil.systemExit(), times(1)); - Assert.assertFalse(dumpErrorResult); + assertFalse(dumpErrorResult); } catch (Throwable throwable) { - Assert.assertFalse(true); + assertFalse(true); } //test remove boolean remove = ConfigCacheService.remove(dataId, group, tenant); - Assert.assertTrue(remove); + assertTrue(remove); Mockito.verify(configDiskService, times(1)).removeConfigInfo(dataId, group, tenant); CacheItem contentCacheAfterRemove = ConfigCacheService.getContentCache(groupKey); - Assert.assertNull(contentCacheAfterRemove); + assertNull(contentCacheAfterRemove); } @Test - public void testDumpBeta() throws Exception { + void testDumpBeta() throws Exception { String dataId = "dataIdtestDumpBetaNewCache123"; String group = "group11"; String tenant = "tenant112"; @@ -160,14 +160,13 @@ public void testDumpBeta() throws Exception { List betaIps = Arrays.asList("127.0.0.1", "127.0.0.2"); long ts = System.currentTimeMillis(); //init beta cache - boolean result = ConfigCacheService.dumpBeta(dataId, group, tenant, content, ts, String.join(",", betaIps), - encryptedDataKey); - Assert.assertTrue(result); + boolean result = ConfigCacheService.dumpBeta(dataId, group, tenant, content, ts, String.join(",", betaIps), encryptedDataKey); + assertTrue(result); CacheItem contentCache = ConfigCacheService.getContentCache(groupKey); - Assert.assertEquals(md5, contentCache.getConfigCacheBeta().getMd5Utf8()); - Assert.assertEquals(ts, contentCache.getConfigCacheBeta().getLastModifiedTs()); - Assert.assertEquals(betaIps, contentCache.getIps4Beta()); - Assert.assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); + assertEquals(md5, contentCache.getConfigCacheBeta().getMd5Utf8()); + assertEquals(ts, contentCache.getConfigCacheBeta().getLastModifiedTs()); + assertEquals(betaIps, contentCache.getIps4Beta()); + assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); Mockito.verify(configDiskService, times(1)).saveBetaToDisk(eq(dataId), eq(group), eq(tenant), eq(content)); //ts newer ,md5 update @@ -175,75 +174,74 @@ public void testDumpBeta() throws Exception { String contentNew = content + tsNew; String md5New = MD5Utils.md5Hex(contentNew, "UTF-8"); List betaIpsNew = Arrays.asList("127.0.0.1", "127.0.0.2", "127.0.0.3"); - boolean resultNew = ConfigCacheService.dumpBeta(dataId, group, tenant, contentNew, tsNew, - String.join(",", betaIpsNew), encryptedDataKey); - Assert.assertTrue(resultNew); - Assert.assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); - Assert.assertEquals(tsNew, contentCache.getConfigCacheBeta().getLastModifiedTs()); - Assert.assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); - Assert.assertEquals(betaIpsNew, contentCache.getIps4Beta()); + boolean resultNew = ConfigCacheService.dumpBeta(dataId, group, tenant, contentNew, tsNew, String.join(",", betaIpsNew), + encryptedDataKey); + assertTrue(resultNew); + assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); + assertEquals(tsNew, contentCache.getConfigCacheBeta().getLastModifiedTs()); + assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); + assertEquals(betaIpsNew, contentCache.getIps4Beta()); Mockito.verify(configDiskService, times(1)).saveBetaToDisk(eq(dataId), eq(group), eq(tenant), eq(contentNew)); //ts old ,md5 update long tsOld = tsNew - 1; String contentWithOldTs = "contentWithOldTs" + tsOld; List betaIpsWithOldTs = Arrays.asList("127.0.0.1", "127.0.0.2", "127.0.0.4"); - boolean resultOld = ConfigCacheService.dumpBeta(dataId, group, tenant, contentWithOldTs, tsOld, - String.join(",", betaIpsWithOldTs), encryptedDataKey); - Assert.assertTrue(resultOld); - Assert.assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); - Assert.assertEquals(tsNew, contentCache.getConfigCacheBeta().getLastModifiedTs()); - Assert.assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); - Assert.assertEquals(betaIpsNew, contentCache.getIps4Beta()); - Mockito.verify(configDiskService, times(0)) - .saveBetaToDisk(eq(dataId), eq(group), eq(tenant), eq(contentWithOldTs)); + boolean resultOld = ConfigCacheService.dumpBeta(dataId, group, tenant, contentWithOldTs, tsOld, String.join(",", betaIpsWithOldTs), + encryptedDataKey); + assertTrue(resultOld); + assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); + assertEquals(tsNew, contentCache.getConfigCacheBeta().getLastModifiedTs()); + assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); + assertEquals(betaIpsNew, contentCache.getIps4Beta()); + Mockito.verify(configDiskService, times(0)).saveBetaToDisk(eq(dataId), eq(group), eq(tenant), eq(contentWithOldTs)); //ts new ,md5 not update,beta ips list changes long tsNew2 = tsNew + 1; String contentWithPrev = contentNew; List betaIpsNew2 = Arrays.asList("127.0.0.1", "127.0.0.2", "127.0.0.4", "127.0.0.5"); - boolean resultNew2 = ConfigCacheService.dumpBeta(dataId, group, tenant, contentWithPrev, tsNew2, - String.join(",", betaIpsNew2), encryptedDataKey); - Assert.assertTrue(resultNew2); - Assert.assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); - Assert.assertEquals(tsNew2, contentCache.getConfigCacheBeta().getLastModifiedTs()); - Assert.assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); - Assert.assertEquals(betaIpsNew2, contentCache.getIps4Beta()); + boolean resultNew2 = ConfigCacheService.dumpBeta(dataId, group, tenant, contentWithPrev, tsNew2, String.join(",", betaIpsNew2), + encryptedDataKey); + assertTrue(resultNew2); + assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); + assertEquals(tsNew2, contentCache.getConfigCacheBeta().getLastModifiedTs()); + assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); + assertEquals(betaIpsNew2, contentCache.getIps4Beta()); //ts new only,md5 not update,beta ips not change long tsNew3 = tsNew2 + 1; String contentWithPrev2 = contentNew; List betaIpsNew3 = betaIpsNew2; - boolean resultNew3 = ConfigCacheService.dumpBeta(dataId, group, tenant, contentWithPrev2, tsNew3, - String.join(",", betaIpsNew3), encryptedDataKey); - Assert.assertTrue(resultNew3); - Assert.assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); - Assert.assertEquals(tsNew3, contentCache.getConfigCacheBeta().getLastModifiedTs()); - Assert.assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); - Assert.assertEquals(betaIpsNew2, contentCache.getIps4Beta()); + boolean resultNew3 = ConfigCacheService.dumpBeta(dataId, group, tenant, contentWithPrev2, tsNew3, String.join(",", betaIpsNew3), + encryptedDataKey); + assertTrue(resultNew3); + assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); + assertEquals(tsNew3, contentCache.getConfigCacheBeta().getLastModifiedTs()); + assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); + assertEquals(betaIpsNew2, contentCache.getIps4Beta()); //ts not update,md5 not update,beta ips not change long tsNew4 = tsNew3; String contentWithPrev4 = contentNew; List betaIpsNew4 = betaIpsNew2; - boolean resultNew4 = ConfigCacheService.dumpBeta(dataId, group, tenant, contentWithPrev4, tsNew4, - String.join(",", betaIpsNew4), encryptedDataKey); - Assert.assertTrue(resultNew4); - Assert.assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); - Assert.assertEquals(tsNew3, contentCache.getConfigCacheBeta().getLastModifiedTs()); - Assert.assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); - Assert.assertEquals(betaIpsNew4, contentCache.getIps4Beta()); + boolean resultNew4 = ConfigCacheService.dumpBeta(dataId, group, tenant, contentWithPrev4, tsNew4, String.join(",", betaIpsNew4), + encryptedDataKey); + assertTrue(resultNew4); + assertEquals(md5New, contentCache.getConfigCacheBeta().getMd5Utf8()); + assertEquals(tsNew3, contentCache.getConfigCacheBeta().getLastModifiedTs()); + assertEquals(encryptedDataKey, contentCache.getConfigCacheBeta().getEncryptedDataKey()); + assertEquals(betaIpsNew4, contentCache.getIps4Beta()); //test remove boolean removeBeta = ConfigCacheService.removeBeta(dataId, group, tenant); - Assert.assertTrue(removeBeta); + assertTrue(removeBeta); Mockito.verify(configDiskService, times(1)).removeConfigInfo4Beta(dataId, group, tenant); ConfigCache betaCacheAfterRemove = ConfigCacheService.getContentCache(groupKey).getConfigCacheBeta(); - Assert.assertNull(betaCacheAfterRemove); + assertNull(betaCacheAfterRemove); } @Test - public void testDumpTag() throws Exception { + void testDumpTag() throws Exception { String dataId = "dataIdtestDumpTag133323"; String group = "group11"; String tenant = "tenant112"; @@ -255,69 +253,63 @@ public void testDumpTag() throws Exception { //init dump tag boolean dumpTagResult = ConfigCacheService.dumpTag(dataId, group, tenant, tag, content, ts, encryptedDataKey); - Assert.assertTrue(dumpTagResult); - Mockito.verify(configDiskService, times(1)) - .saveTagToDisk(eq(dataId), eq(group), eq(tenant), eq(tag), eq(content)); + assertTrue(dumpTagResult); + Mockito.verify(configDiskService, times(1)).saveTagToDisk(eq(dataId), eq(group), eq(tenant), eq(tag), eq(content)); CacheItem contentCache = ConfigCacheService.getContentCache(groupKey); ConfigCache configCacheTag = contentCache.getConfigCacheTags().get(tag); - Assert.assertEquals(ts, configCacheTag.getLastModifiedTs()); + assertEquals(ts, configCacheTag.getLastModifiedTs()); String md5 = MD5Utils.md5Hex(content, "UTF-8"); - Assert.assertEquals(md5, configCacheTag.getMd5Utf8()); + assertEquals(md5, configCacheTag.getMd5Utf8()); //ts newer ,md5 update long tsNew = System.currentTimeMillis(); String contentNew = content + tsNew; String md5New = MD5Utils.md5Hex(contentNew, "UTF-8"); boolean resultNew = ConfigCacheService.dumpTag(dataId, group, tenant, tag, contentNew, tsNew, encryptedDataKey); - Assert.assertTrue(resultNew); - Assert.assertEquals(md5New, configCacheTag.getMd5Utf8()); - Assert.assertEquals(tsNew, configCacheTag.getLastModifiedTs()); - Assert.assertEquals(encryptedDataKey, configCacheTag.getEncryptedDataKey()); - Mockito.verify(configDiskService, times(1)) - .saveTagToDisk(eq(dataId), eq(group), eq(tenant), eq(tag), eq(contentNew)); + assertTrue(resultNew); + assertEquals(md5New, configCacheTag.getMd5Utf8()); + assertEquals(tsNew, configCacheTag.getLastModifiedTs()); + assertEquals(encryptedDataKey, configCacheTag.getEncryptedDataKey()); + Mockito.verify(configDiskService, times(1)).saveTagToDisk(eq(dataId), eq(group), eq(tenant), eq(tag), eq(contentNew)); //ts old ,md5 update long tsOld = tsNew - 1; String contentWithOldTs = "contentWithOldTs" + tsOld; - boolean resultOld = ConfigCacheService.dumpTag(dataId, group, tenant, tag, contentWithOldTs, tsOld, - encryptedDataKey); - Assert.assertTrue(resultOld); - Assert.assertEquals(md5New, configCacheTag.getMd5Utf8()); - Assert.assertEquals(tsNew, configCacheTag.getLastModifiedTs()); - Assert.assertEquals(encryptedDataKey, configCacheTag.getEncryptedDataKey()); - Mockito.verify(configDiskService, times(0)) - .saveTagToDisk(eq(dataId), eq(group), eq(tenant), eq(tag), eq(contentWithOldTs)); + boolean resultOld = ConfigCacheService.dumpTag(dataId, group, tenant, tag, contentWithOldTs, tsOld, encryptedDataKey); + assertTrue(resultOld); + assertEquals(md5New, configCacheTag.getMd5Utf8()); + assertEquals(tsNew, configCacheTag.getLastModifiedTs()); + assertEquals(encryptedDataKey, configCacheTag.getEncryptedDataKey()); + Mockito.verify(configDiskService, times(0)).saveTagToDisk(eq(dataId), eq(group), eq(tenant), eq(tag), eq(contentWithOldTs)); //ts new only,md5 not update long tsNew2 = tsNew + 1; String contentWithPrev2 = contentNew; - boolean resultNew2 = ConfigCacheService.dumpTag(dataId, group, tenant, tag, contentWithPrev2, tsNew2, - encryptedDataKey); - Assert.assertTrue(resultNew2); - Assert.assertEquals(md5New, configCacheTag.getMd5Utf8()); - Assert.assertEquals(tsNew2, configCacheTag.getLastModifiedTs()); - Assert.assertEquals(encryptedDataKey, configCacheTag.getEncryptedDataKey()); + boolean resultNew2 = ConfigCacheService.dumpTag(dataId, group, tenant, tag, contentWithPrev2, tsNew2, encryptedDataKey); + assertTrue(resultNew2); + assertEquals(md5New, configCacheTag.getMd5Utf8()); + assertEquals(tsNew2, configCacheTag.getLastModifiedTs()); + assertEquals(encryptedDataKey, configCacheTag.getEncryptedDataKey()); //ts not update,md5 not update long tsNew3 = tsNew2; String contentWithPrev3 = contentNew; - boolean resultNew3 = ConfigCacheService.dumpTag(dataId, group, tenant, tag, contentWithPrev3, tsNew3, - encryptedDataKey); - Assert.assertTrue(resultNew3); - Assert.assertEquals(md5New, configCacheTag.getMd5Utf8()); - Assert.assertEquals(tsNew3, configCacheTag.getLastModifiedTs()); - Assert.assertEquals(encryptedDataKey, configCacheTag.getEncryptedDataKey()); + boolean resultNew3 = ConfigCacheService.dumpTag(dataId, group, tenant, tag, contentWithPrev3, tsNew3, encryptedDataKey); + assertTrue(resultNew3); + assertEquals(md5New, configCacheTag.getMd5Utf8()); + assertEquals(tsNew3, configCacheTag.getLastModifiedTs()); + assertEquals(encryptedDataKey, configCacheTag.getEncryptedDataKey()); //test remove boolean removeTag = ConfigCacheService.removeTag(dataId, group, tenant, tag); - Assert.assertTrue(removeTag); + assertTrue(removeTag); Mockito.verify(configDiskService, times(1)).removeConfigInfo4Tag(dataId, group, tenant, tag); Map configCacheTags = ConfigCacheService.getContentCache(groupKey).getConfigCacheTags(); - Assert.assertNull(configCacheTags); + assertNull(configCacheTags); } @Test - public void testTryConfigReadLock() throws Exception { + void testTryConfigReadLock() throws Exception { String dataId = "123testTryConfigReadLock"; String group = "1234"; String tenant = "1234"; @@ -332,12 +324,12 @@ public void testTryConfigReadLock() throws Exception { // lock ==0,not exist int readLock = ConfigCacheService.tryConfigReadLock(groupKey + "3245"); - Assert.assertEquals(0, readLock); + assertEquals(0, readLock); //lock == 1 , success get lock Mockito.when(lock.tryReadLock()).thenReturn(true); int readLockSuccess = ConfigCacheService.tryConfigReadLock(groupKey); - Assert.assertEquals(1, readLockSuccess); + assertEquals(1, readLockSuccess); //lock ==-1 fail after spin all times; OngoingStubbing when = Mockito.when(lock.tryReadLock()); @@ -345,7 +337,7 @@ public void testTryConfigReadLock() throws Exception { when = when.thenReturn(false); } int readLockFail = ConfigCacheService.tryConfigReadLock(groupKey); - Assert.assertEquals(-1, readLockFail); + assertEquals(-1, readLockFail); //lock ==1 success after serval spin times; OngoingStubbing when2 = Mockito.when(lock.tryReadLock()); @@ -354,6 +346,6 @@ public void testTryConfigReadLock() throws Exception { } when2.thenReturn(true); int readLockSuccessAfterRetry = ConfigCacheService.tryConfigReadLock(groupKey); - Assert.assertEquals(1, readLockSuccessAfterRetry); + assertEquals(1, readLockSuccessAfterRetry); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigChangePublisherTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigChangePublisherTest.java index 6e3f464567b..79f4e065631 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigChangePublisherTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigChangePublisherTest.java @@ -22,23 +22,25 @@ import com.alibaba.nacos.config.server.model.event.ConfigDataChangeEvent; import com.alibaba.nacos.persistence.configuration.DatasourceConfiguration; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.concurrent.atomic.AtomicReference; -public class ConfigChangePublisherTest { +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +class ConfigChangePublisherTest { - @Before - public void startUP() { + @BeforeEach + void startUP() { EnvUtil.setIsStandalone(true); DatasourceConfiguration.setEmbeddedStorage(true); } @Test - public void testConfigChangeNotify() throws InterruptedException { + void testConfigChangeNotify() throws InterruptedException { AtomicReference reference = new AtomicReference<>(); @@ -60,43 +62,39 @@ public Class subscribeType() { EnvUtil.setIsStandalone(true); DatasourceConfiguration.setEmbeddedStorage(true); - ConfigChangePublisher - .notifyConfigChange(new ConfigDataChangeEvent("chuntaojun", "chuntaojun", System.currentTimeMillis())); + ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent("chuntaojun", "chuntaojun", System.currentTimeMillis())); Thread.sleep(2000); - Assert.assertNotNull(reference.get()); + assertNotNull(reference.get()); reference.set(null); // nacos is standalone mode and use external storage EnvUtil.setIsStandalone(true); DatasourceConfiguration.setEmbeddedStorage(false); - ConfigChangePublisher - .notifyConfigChange(new ConfigDataChangeEvent("chuntaojun", "chuntaojun", System.currentTimeMillis())); + ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent("chuntaojun", "chuntaojun", System.currentTimeMillis())); Thread.sleep(2000); - Assert.assertNotNull(reference.get()); + assertNotNull(reference.get()); reference.set(null); // nacos is cluster mode and use embedded storage EnvUtil.setIsStandalone(false); DatasourceConfiguration.setEmbeddedStorage(true); - ConfigChangePublisher - .notifyConfigChange(new ConfigDataChangeEvent("chuntaojun", "chuntaojun", System.currentTimeMillis())); + ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent("chuntaojun", "chuntaojun", System.currentTimeMillis())); Thread.sleep(2000); - Assert.assertNull(reference.get()); + assertNull(reference.get()); reference.set(null); // nacos is cluster mode and use external storage EnvUtil.setIsStandalone(false); DatasourceConfiguration.setEmbeddedStorage(false); - ConfigChangePublisher - .notifyConfigChange(new ConfigDataChangeEvent("chuntaojun", "chuntaojun", System.currentTimeMillis())); + ConfigChangePublisher.notifyConfigChange(new ConfigDataChangeEvent("chuntaojun", "chuntaojun", System.currentTimeMillis())); Thread.sleep(2000); - Assert.assertNotNull(reference.get()); + assertNotNull(reference.get()); reference.set(null); - + } - @After - public void tearDown() { + @AfterEach + void tearDown() { EnvUtil.setIsStandalone(true); DatasourceConfiguration.setEmbeddedStorage(true); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigOperationServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigOperationServiceTest.java index c23aedaf9f0..7451b7214dc 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigOperationServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigOperationServiceTest.java @@ -25,14 +25,14 @@ import com.alibaba.nacos.config.server.service.repository.ConfigInfoPersistService; import com.alibaba.nacos.config.server.service.repository.ConfigInfoTagPersistService; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.core.env.StandardEnvironment; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.verify; @@ -45,8 +45,8 @@ * @date 2022/8/11 */ -@RunWith(MockitoJUnitRunner.class) -public class ConfigOperationServiceTest { +@ExtendWith(MockitoExtension.class) +class ConfigOperationServiceTest { private ConfigOperationService configOperationService; @@ -59,15 +59,15 @@ public class ConfigOperationServiceTest { @Mock private ConfigInfoBetaPersistService configInfoBetaPersistService; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { EnvUtil.setEnvironment(new StandardEnvironment()); this.configOperationService = new ConfigOperationService(configInfoPersistService, configInfoTagPersistService, configInfoBetaPersistService); } @Test - public void testPublishConfig() throws NacosException { + void testPublishConfig() throws NacosException { ConfigForm configForm = new ConfigForm(); configForm.setDataId("test"); configForm.setGroup("test"); @@ -76,72 +76,67 @@ public void testPublishConfig() throws NacosException { ConfigRequestInfo configRequestInfo = new ConfigRequestInfo(); // if betaIps is blank, tag is blank and casMd5 is blank - when(configInfoPersistService.insertOrUpdate(any(), any(), any(ConfigInfo.class), any())).thenReturn( - new ConfigOperateResult()); + when(configInfoPersistService.insertOrUpdate(any(), any(), any(ConfigInfo.class), any())).thenReturn(new ConfigOperateResult()); Boolean aResult = configOperationService.publishConfig(configForm, configRequestInfo, ""); verify(configInfoPersistService).insertOrUpdate(any(), any(), any(ConfigInfo.class), any()); - Assert.assertEquals(true, aResult); + assertTrue(aResult); // if betaIps is blank, tag is blank and casMd5 is not blank configRequestInfo.setCasMd5("test casMd5"); - when(configInfoPersistService.insertOrUpdateCas(any(), any(), any(ConfigInfo.class), any())).thenReturn( - new ConfigOperateResult()); + when(configInfoPersistService.insertOrUpdateCas(any(), any(), any(ConfigInfo.class), any())).thenReturn(new ConfigOperateResult()); Boolean bResult = configOperationService.publishConfig(configForm, configRequestInfo, ""); verify(configInfoPersistService).insertOrUpdateCas(any(), any(), any(ConfigInfo.class), any()); - Assert.assertEquals(true, bResult); + assertTrue(bResult); configRequestInfo.setCasMd5(""); // if betaIps is blank, tag is not blank and casMd5 is blank configForm.setTag("test tag"); - when(configInfoTagPersistService.insertOrUpdateTag(any(ConfigInfo.class), eq("test tag"), any(), - any())).thenReturn(new ConfigOperateResult()); + when(configInfoTagPersistService.insertOrUpdateTag(any(ConfigInfo.class), eq("test tag"), any(), any())).thenReturn( + new ConfigOperateResult()); Boolean cResult = configOperationService.publishConfig(configForm, configRequestInfo, ""); verify(configInfoTagPersistService).insertOrUpdateTag(any(ConfigInfo.class), eq("test tag"), any(), any()); - Assert.assertEquals(true, cResult); + assertTrue(cResult); // if betaIps is blank, tag is not blank and casMd5 is not blank configForm.setTag("test tag"); configRequestInfo.setCasMd5("test casMd5"); - when(configInfoTagPersistService.insertOrUpdateTagCas(any(ConfigInfo.class), eq("test tag"), any(), - any())).thenReturn(new ConfigOperateResult()); + when(configInfoTagPersistService.insertOrUpdateTagCas(any(ConfigInfo.class), eq("test tag"), any(), any())).thenReturn( + new ConfigOperateResult()); Boolean dResult = configOperationService.publishConfig(configForm, configRequestInfo, ""); verify(configInfoTagPersistService).insertOrUpdateTagCas(any(ConfigInfo.class), eq("test tag"), any(), any()); - Assert.assertEquals(true, dResult); + assertTrue(dResult); configRequestInfo.setCasMd5(""); configForm.setTag(""); // if betaIps is not blank and casMd5 is blank configRequestInfo.setBetaIps("test-betaIps"); - when(configInfoBetaPersistService.insertOrUpdateBeta(any(ConfigInfo.class), eq("test-betaIps"), any(), - any())).thenReturn(new ConfigOperateResult()); + when(configInfoBetaPersistService.insertOrUpdateBeta(any(ConfigInfo.class), eq("test-betaIps"), any(), any())).thenReturn( + new ConfigOperateResult()); Boolean eResult = configOperationService.publishConfig(configForm, configRequestInfo, ""); - verify(configInfoBetaPersistService).insertOrUpdateBeta(any(ConfigInfo.class), eq("test-betaIps"), any(), - any()); - Assert.assertEquals(true, eResult); + verify(configInfoBetaPersistService).insertOrUpdateBeta(any(ConfigInfo.class), eq("test-betaIps"), any(), any()); + assertTrue(eResult); // if betaIps is not blank and casMd5 is not blank configRequestInfo.setBetaIps("test-betaIps"); configRequestInfo.setCasMd5("test casMd5"); - when(configInfoBetaPersistService.insertOrUpdateBetaCas(any(ConfigInfo.class), eq("test-betaIps"), any(), - any())).thenReturn(new ConfigOperateResult()); + when(configInfoBetaPersistService.insertOrUpdateBetaCas(any(ConfigInfo.class), eq("test-betaIps"), any(), any())).thenReturn( + new ConfigOperateResult()); Boolean fResult = configOperationService.publishConfig(configForm, configRequestInfo, ""); - verify(configInfoBetaPersistService).insertOrUpdateBetaCas(any(ConfigInfo.class), eq("test-betaIps"), any(), - any()); - Assert.assertEquals(true, fResult); + verify(configInfoBetaPersistService).insertOrUpdateBetaCas(any(ConfigInfo.class), eq("test-betaIps"), any(), any()); + assertTrue(fResult); } @Test - public void testDeleteConfig() { + void testDeleteConfig() { // if tag is blank Boolean aResult = configOperationService.deleteConfig("test", "test", "", "", "1.1.1.1", "test"); verify(configInfoPersistService).removeConfigInfo(eq("test"), eq("test"), eq(""), any(), any()); - Assert.assertEquals(true, aResult); + assertTrue(aResult); // if tag is not blank Boolean bResult = configOperationService.deleteConfig("test", "test", "", "test", "1.1.1.1", "test"); - verify(configInfoTagPersistService) - .removeConfigInfoTag(eq("test"), eq("test"), eq(""), eq("test"), any(), any()); - Assert.assertEquals(true, bResult); + verify(configInfoTagPersistService).removeConfigInfoTag(eq("test"), eq("test"), eq(""), eq("test"), any(), any()); + assertTrue(bResult); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigSubServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigSubServiceTest.java index a83cc60f358..e6494a6f3f5 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigSubServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/ConfigSubServiceTest.java @@ -29,16 +29,15 @@ import com.alibaba.nacos.core.cluster.Member; import com.alibaba.nacos.core.cluster.ServerMemberManager; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.ArrayList; import java.util.HashMap; @@ -48,15 +47,17 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; -@RunWith(SpringJUnit4ClassRunner.class) -public class ConfigSubServiceTest { - - private ConfigSubService configSubService; +@ExtendWith(SpringExtension.class) +class ConfigSubServiceTest { @Mock ServerMemberManager serverMemberManager; @@ -71,8 +72,10 @@ public class ConfigSubServiceTest { @Mock NacosAsyncRestTemplate nacosAsyncRestTemplate; - @Before - public void startUP() { + private ConfigSubService configSubService; + + @BeforeEach + void startUP() { httpClientManagerMockedStatic = Mockito.mockStatic(HttpClientManager.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); @@ -80,14 +83,12 @@ public void startUP() { envUtilMockedStatic.when(() -> EnvUtil.getContextPath()).thenReturn("/nacos"); envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), anyString())).thenReturn("mock string"); EnvUtil.setContextPath("/nacos"); - httpClientManagerMockedStatic.when(() -> HttpClientManager.getNacosRestTemplate()) - .thenReturn(nacosRestTemplate); - httpClientManagerMockedStatic.when(() -> HttpClientManager.getNacosAsyncRestTemplate()) - .thenReturn(nacosAsyncRestTemplate); + httpClientManagerMockedStatic.when(() -> HttpClientManager.getNacosRestTemplate()).thenReturn(nacosRestTemplate); + httpClientManagerMockedStatic.when(() -> HttpClientManager.getNacosAsyncRestTemplate()).thenReturn(nacosAsyncRestTemplate); } - @After - public void after() { + @AfterEach + void after() { if (!envUtilMockedStatic.isClosed()) { envUtilMockedStatic.close(); } @@ -95,7 +96,7 @@ public void after() { } @Test - public void testGetCollectSampleResult() throws Exception { + void testGetCollectSampleResult() throws Exception { envUtilMockedStatic.close(); EnvUtil.setContextPath("/nacos"); ConfigurableEnvironment environment = Mockito.mock(ConfigurableEnvironment.class); @@ -120,7 +121,7 @@ public void testGetCollectSampleResult() throws Exception { } @Test - public void testRunSingleJob() throws Exception { + void testRunSingleJob() throws Exception { Map params = new HashMap<>(); params.put("dataId", "d1"); params.put("group", "g1"); @@ -138,31 +139,26 @@ public void testRunSingleJob() throws Exception { String mockJsonString = JacksonUtils.toJson(sampleResult1); httpRestResult.setData(mockJsonString); //mock success - Mockito.when(nacosRestTemplate.get(anyString(), any(Header.class), eq(Query.EMPTY), eq(String.class))) - .thenReturn(httpRestResult); + Mockito.when(nacosRestTemplate.get(anyString(), any(Header.class), eq(Query.EMPTY), eq(String.class))).thenReturn(httpRestResult); String url = "url"; - SampleResult returnObj = (SampleResult) ConfigSubService.runSingleJob("127.0.0.1", params, url, - SampleResult.class); - Assert.assertEquals(sampleResult1.getLisentersGroupkeyStatus(), returnObj.getLisentersGroupkeyStatus()); + SampleResult returnObj = (SampleResult) ConfigSubService.runSingleJob("127.0.0.1", params, url, SampleResult.class); + assertEquals(sampleResult1.getLisentersGroupkeyStatus(), returnObj.getLisentersGroupkeyStatus()); //mock fail response httpRestResult.setCode(500); - Mockito.when(nacosRestTemplate.get(anyString(), any(Header.class), eq(Query.EMPTY), eq(String.class))) - .thenReturn(httpRestResult); - SampleResult returnObj500 = (SampleResult) ConfigSubService.runSingleJob("127.0.0.1", params, url, - SampleResult.class); - Assert.assertEquals(null, returnObj500); + Mockito.when(nacosRestTemplate.get(anyString(), any(Header.class), eq(Query.EMPTY), eq(String.class))).thenReturn(httpRestResult); + SampleResult returnObj500 = (SampleResult) ConfigSubService.runSingleJob("127.0.0.1", params, url, SampleResult.class); + assertNull(returnObj500); //mock get url throw exception Mockito.when(nacosRestTemplate.get(anyString(), any(Header.class), eq(Query.EMPTY), eq(String.class))) .thenThrow(new NacosRuntimeException(500, "timeout")); - SampleResult returnObjTimeout = (SampleResult) ConfigSubService.runSingleJob("127.0.0.1", params, url, - SampleResult.class); - Assert.assertEquals(null, returnObjTimeout); + SampleResult returnObjTimeout = (SampleResult) ConfigSubService.runSingleJob("127.0.0.1", params, url, SampleResult.class); + assertNull(returnObjTimeout); } @Test - public void testClusterListenerJob() throws Exception { + void testClusterListenerJob() throws Exception { Map mockedMembers = new HashMap<>(); mockedMembers.put("127.0.0.1", createMember("127.0.0.1")); mockedMembers.put("127.0.0.2", createMember("127.0.0.2")); @@ -177,26 +173,26 @@ public void testClusterListenerJob() throws Exception { .thenReturn(createSampleResultFuture(true, true), createSampleResultFuture(true, true), createSampleResultFuture(true, true)); Map params = new HashMap<>(); - ConfigSubService.ClusterListenerJob clusterListenerJob = new ConfigSubService.ClusterListenerJob(params, - mockService, serverMemberManager); + ConfigSubService.ClusterListenerJob clusterListenerJob = new ConfigSubService.ClusterListenerJob(params, mockService, + serverMemberManager); List sampleResults = clusterListenerJob.runJobs(); - Assert.assertEquals(3, sampleResults.size()); + assertEquals(3, sampleResults.size()); //mock success with exception Mockito.when(mockService.poll(anyLong(), any(TimeUnit.class))) .thenReturn(createSampleResultFuture(true, true), createSampleResultFuture(false, false)) .thenThrow(new NacosRuntimeException(500, "13")); Map params2 = new HashMap<>(); - ConfigSubService.ClusterListenerJob clusterListenerJob2 = new ConfigSubService.ClusterListenerJob(params2, - mockService, serverMemberManager); + ConfigSubService.ClusterListenerJob clusterListenerJob2 = new ConfigSubService.ClusterListenerJob(params2, mockService, + serverMemberManager); List sampleResults2 = clusterListenerJob2.runJobs(); - Assert.assertEquals(1, sampleResults2.size()); - Assert.assertEquals(false, sampleResults2.get(0).getLisentersGroupkeyStatus().isEmpty()); + assertEquals(1, sampleResults2.size()); + assertFalse(sampleResults2.get(0).getLisentersGroupkeyStatus().isEmpty()); } @Test - public void testMergeSampleResult() throws Exception { + void testMergeSampleResult() throws Exception { SampleResult sampleResult1 = new SampleResult(); Map listener1 = new HashMap<>(); listener1.put("config1", "md51123"); @@ -217,14 +213,14 @@ public void testMergeSampleResult() throws Exception { sampleResults.add(sampleResult3); //sampleResult ips is null SampleResult sampleResultMerge1 = configSubService.mergeSampleResult(sampleResult1, sampleResults); - Assert.assertEquals(6, sampleResultMerge1.getLisentersGroupkeyStatus().size()); + assertEquals(6, sampleResultMerge1.getLisentersGroupkeyStatus().size()); SampleResult sampleResultMerge2 = configSubService.mergeSampleResult(new SampleResult(), sampleResults); - Assert.assertEquals(4, sampleResultMerge2.getLisentersGroupkeyStatus().size()); + assertEquals(4, sampleResultMerge2.getLisentersGroupkeyStatus().size()); } @Test - public void testMergeListenerCheckResult() throws Exception { + void testMergeListenerCheckResult() throws Exception { ListenerCheckResult sampleResult2 = new ListenerCheckResult(); sampleResult2.setHasListener(true); sampleResult2.setCode(200); @@ -236,18 +232,16 @@ public void testMergeListenerCheckResult() throws Exception { sampleResults.add(sampleResult3); ListenerCheckResult sampleResult1 = new ListenerCheckResult(); //one ip return true - ListenerCheckResult sampleResultMerge1 = configSubService.mergeListenerCheckResult(sampleResult1, sampleResults, - 2); - Assert.assertEquals(200, sampleResultMerge1.getCode()); - Assert.assertEquals(true, sampleResultMerge1.isHasListener()); + ListenerCheckResult sampleResultMerge1 = configSubService.mergeListenerCheckResult(sampleResult1, sampleResults, 2); + assertEquals(200, sampleResultMerge1.getCode()); + assertTrue(sampleResultMerge1.isHasListener()); //all ip return false,but not equals member size sampleResult2.setHasListener(false); sampleResult3.setHasListener(false); sampleResult1.setHasListener(false); - ListenerCheckResult sampleResultMerge2 = configSubService.mergeListenerCheckResult(sampleResult1, sampleResults, - 3); - Assert.assertEquals(201, sampleResultMerge2.getCode()); - Assert.assertEquals(false, sampleResultMerge2.isHasListener()); + ListenerCheckResult sampleResultMerge2 = configSubService.mergeListenerCheckResult(sampleResult1, sampleResults, 3); + assertEquals(201, sampleResultMerge2.getCode()); + assertFalse(sampleResultMerge2.isHasListener()); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/HistoryServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/HistoryServiceTest.java index e3e656f80e0..0d2b29e8f7c 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/HistoryServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/HistoryServiceTest.java @@ -18,14 +18,14 @@ import com.alibaba.nacos.config.server.model.ConfigHistoryInfo; import com.alibaba.nacos.config.server.model.ConfigInfoWrapper; -import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.config.server.service.repository.ConfigInfoPersistService; import com.alibaba.nacos.config.server.service.repository.HistoryConfigInfoPersistService; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import com.alibaba.nacos.persistence.model.Page; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.sql.Timestamp; import java.util.ArrayList; @@ -33,26 +33,19 @@ import java.util.Date; import java.util.List; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; /** * HistoryServiceTest. + * * @author dongyafei * @date 2022/8/11 */ -@RunWith(MockitoJUnitRunner.class) -public class HistoryServiceTest { - - private HistoryService historyService; - - @Mock - private HistoryConfigInfoPersistService historyConfigInfoPersistService; - - @Mock - private ConfigInfoPersistService configInfoPersistService; +@ExtendWith(MockitoExtension.class) +class HistoryServiceTest { private static final String TEST_DATA_ID = "test"; @@ -62,13 +55,21 @@ public class HistoryServiceTest { private static final String TEST_CONTENT = "test config"; - @Before - public void setUp() throws Exception { + private HistoryService historyService; + + @Mock + private HistoryConfigInfoPersistService historyConfigInfoPersistService; + + @Mock + private ConfigInfoPersistService configInfoPersistService; + + @BeforeEach + void setUp() throws Exception { this.historyService = new HistoryService(historyConfigInfoPersistService, configInfoPersistService); } @Test - public void testListConfigHistory() { + void testListConfigHistory() { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId(TEST_DATA_ID); configHistoryInfo.setGroup(TEST_GROUP); @@ -77,23 +78,22 @@ public void testListConfigHistory() { configHistoryInfo.setLastModifiedTime(new Timestamp(new Date().getTime())); List configHistoryInfoList = new ArrayList<>(); configHistoryInfoList.add(configHistoryInfo); - + Page page = new Page<>(); page.setTotalCount(15); page.setPageNumber(1); page.setPagesAvailable(2); page.setPageItems(configHistoryInfoList); - + when(historyConfigInfoPersistService.findConfigHistory(TEST_DATA_ID, TEST_GROUP, TEST_TENANT, 1, 10)).thenReturn(page); - - Page pageResult = historyService - .listConfigHistory(TEST_DATA_ID, TEST_GROUP, TEST_TENANT, 1, 10); - + + Page pageResult = historyService.listConfigHistory(TEST_DATA_ID, TEST_GROUP, TEST_TENANT, 1, 10); + verify(historyConfigInfoPersistService).findConfigHistory(TEST_DATA_ID, TEST_GROUP, TEST_TENANT, 1, 10); - + List resultList = pageResult.getPageItems(); ConfigHistoryInfo resConfigHistoryInfo = resultList.get(0); - + assertEquals(configHistoryInfoList.size(), resultList.size()); assertEquals(configHistoryInfo.getDataId(), resConfigHistoryInfo.getDataId()); assertEquals(configHistoryInfo.getGroup(), resConfigHistoryInfo.getGroup()); @@ -101,7 +101,7 @@ public void testListConfigHistory() { } @Test - public void testGetConfigHistoryInfo() throws Exception { + void testGetConfigHistoryInfo() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId(TEST_DATA_ID); @@ -113,8 +113,7 @@ public void testGetConfigHistoryInfo() throws Exception { when(historyConfigInfoPersistService.detailConfigHistory(1L)).thenReturn(configHistoryInfo); - ConfigHistoryInfo resConfigHistoryInfo = historyService - .getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_TENANT, 1L); + ConfigHistoryInfo resConfigHistoryInfo = historyService.getConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_TENANT, 1L); verify(historyConfigInfoPersistService).detailConfigHistory(1L); @@ -125,7 +124,7 @@ public void testGetConfigHistoryInfo() throws Exception { } @Test - public void testGetPreviousConfigHistoryInfo() throws Exception { + void testGetPreviousConfigHistoryInfo() throws Exception { ConfigHistoryInfo configHistoryInfo = new ConfigHistoryInfo(); configHistoryInfo.setDataId(TEST_DATA_ID); @@ -137,8 +136,7 @@ public void testGetPreviousConfigHistoryInfo() throws Exception { when(historyConfigInfoPersistService.detailPreviousConfigHistory(1L)).thenReturn(configHistoryInfo); - ConfigHistoryInfo resConfigHistoryInfo = historyService - .getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_TENANT, 1L); + ConfigHistoryInfo resConfigHistoryInfo = historyService.getPreviousConfigHistoryInfo(TEST_DATA_ID, TEST_GROUP, TEST_TENANT, 1L); verify(historyConfigInfoPersistService).detailPreviousConfigHistory(1L); @@ -149,7 +147,7 @@ public void testGetPreviousConfigHistoryInfo() throws Exception { } @Test - public void testGetConfigListByNamespace() { + void testGetConfigListByNamespace() { ConfigInfoWrapper configInfoWrapper = new ConfigInfoWrapper(); configInfoWrapper.setDataId("test"); configInfoWrapper.setGroup("test"); @@ -157,7 +155,7 @@ public void testGetConfigListByNamespace() { List configInfoWrappers = Collections.singletonList(configInfoWrapper); when(configInfoPersistService.queryConfigInfoByNamespace("test")).thenReturn(configInfoWrappers); - + List actualList = historyService.getConfigListByNamespace("test"); verify(configInfoPersistService).queryConfigInfoByNamespace("test"); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/LongPollingServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/LongPollingServiceTest.java index c1c04529d06..79409b7cfa9 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/LongPollingServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/LongPollingServiceTest.java @@ -26,15 +26,16 @@ import com.alibaba.nacos.plugin.control.ControlManagerCenter; import com.alibaba.nacos.plugin.control.connection.ConnectionControlManager; import com.alibaba.nacos.plugin.control.connection.response.ConnectionCheckResponse; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import javax.servlet.AsyncContext; import javax.servlet.http.HttpServletRequest; @@ -45,14 +46,18 @@ import java.util.HashMap; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; -@RunWith(MockitoJUnitRunner.class) -public class LongPollingServiceTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class LongPollingServiceTest { LongPollingService longPollingService; @@ -70,21 +75,20 @@ public class LongPollingServiceTest { MockedStatic switchServiceMockedStatic; - @Before - public void before() { + @BeforeEach + void before() { longPollingService = new LongPollingService(); switchServiceMockedStatic = Mockito.mockStatic(SwitchService.class); configCacheServiceMockedStatic = Mockito.mockStatic(ConfigCacheService.class); configExecutorMocked = Mockito.mockStatic(ConfigExecutor.class); connectionControlManagerMockedStatic = Mockito.mockStatic(ControlManagerCenter.class); - connectionControlManagerMockedStatic.when(() -> ControlManagerCenter.getInstance()) - .thenReturn(controlManagerCenter); + connectionControlManagerMockedStatic.when(() -> ControlManagerCenter.getInstance()).thenReturn(controlManagerCenter); Mockito.when(controlManagerCenter.getConnectionControlManager()).thenReturn(connectionControlManager); } - @After - public void after() { + @AfterEach + void after() { configCacheServiceMockedStatic.close(); if (!configExecutorMocked.isClosed()) { configExecutorMocked.close(); @@ -94,7 +98,7 @@ public void after() { } @Test - public void testAddLongPollingClientHasNotEqualsMd5() throws IOException { + void testAddLongPollingClientHasNotEqualsMd5() throws IOException { Map clientMd5Map = new HashMap<>(); String group = "group"; @@ -109,16 +113,13 @@ public void testAddLongPollingClientHasNotEqualsMd5() throws IOException { clientMd5Map.put(groupKeyNotEquals, md5NotEquals1); HttpServletRequest httpServletRequest = Mockito.mock(HttpServletRequest.class); - Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))) - .thenReturn(null); + Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))).thenReturn(null); String clientIp = "192.168.0.1"; Mockito.when(httpServletRequest.getHeader(eq("X-Forwarded-For"))).thenReturn(clientIp); configCacheServiceMockedStatic.when( - () -> ConfigCacheService.isUptodate(eq(groupKeyNotEquals), eq(md5NotEquals1), eq(clientIp), eq(null))) - .thenReturn(false); - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.isUptodate(eq(groupKeyEquals), eq(md5Equals0), eq(clientIp), eq(null))) + () -> ConfigCacheService.isUptodate(eq(groupKeyNotEquals), eq(md5NotEquals1), eq(clientIp), eq(null))).thenReturn(false); + configCacheServiceMockedStatic.when(() -> ConfigCacheService.isUptodate(eq(groupKeyEquals), eq(md5Equals0), eq(clientIp), eq(null))) .thenReturn(true); HttpServletResponse httpServletResponse = Mockito.mock(HttpServletResponse.class); PrintWriter printWriter = Mockito.mock(PrintWriter.class); @@ -134,7 +135,7 @@ public void testAddLongPollingClientHasNotEqualsMd5() throws IOException { } @Test - public void testRejectByConnectionLimit() throws Exception { + void testRejectByConnectionLimit() throws Exception { //mock connection no limit ConnectionCheckResponse connectionCheckResponse = new ConnectionCheckResponse(); connectionCheckResponse.setSuccess(false); @@ -144,8 +145,7 @@ public void testRejectByConnectionLimit() throws Exception { Mockito.when(httpServletResponse.getWriter()).thenReturn(printWriter); HttpServletRequest httpServletRequest = Mockito.mock(HttpServletRequest.class); - Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))) - .thenReturn(null); + Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))).thenReturn(null); String clientIp = "192.168.0.1"; Mockito.when(httpServletRequest.getHeader(eq("X-Forwarded-For"))).thenReturn(clientIp); Mockito.when(httpServletRequest.startAsync()).thenReturn(Mockito.mock(AsyncContext.class)); @@ -159,7 +159,7 @@ public void testRejectByConnectionLimit() throws Exception { } @Test - public void testAddLongPollingClientAllEqualsMd5() throws IOException { + void testAddLongPollingClientAllEqualsMd5() throws IOException { //mock connection no limit ConnectionCheckResponse connectionCheckResponse = new ConnectionCheckResponse(); connectionCheckResponse.setSuccess(true); @@ -179,16 +179,13 @@ public void testAddLongPollingClientAllEqualsMd5() throws IOException { HttpServletRequest httpServletRequest = Mockito.mock(HttpServletRequest.class); Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_HEADER))).thenReturn("5000"); - Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))) - .thenReturn(null); + Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))).thenReturn(null); String clientIp = "192.168.0.1"; Mockito.when(httpServletRequest.getHeader(eq("X-Forwarded-For"))).thenReturn(clientIp); Mockito.when(httpServletRequest.startAsync()).thenReturn(Mockito.mock(AsyncContext.class)); configCacheServiceMockedStatic.when( - () -> ConfigCacheService.isUptodate(eq(groupKeyNotEquals), eq(md5NotEquals1), eq(clientIp), eq(null))) - .thenReturn(true); - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.isUptodate(eq(groupKeyEquals), eq(md5Equals0), eq(clientIp), eq(null))) + () -> ConfigCacheService.isUptodate(eq(groupKeyNotEquals), eq(md5NotEquals1), eq(clientIp), eq(null))).thenReturn(true); + configCacheServiceMockedStatic.when(() -> ConfigCacheService.isUptodate(eq(groupKeyEquals), eq(md5Equals0), eq(clientIp), eq(null))) .thenReturn(true); int propSize = 3; HttpServletResponse httpServletResponse = Mockito.mock(HttpServletResponse.class); @@ -197,13 +194,12 @@ public void testAddLongPollingClientAllEqualsMd5() throws IOException { //expect response not returned Mockito.verify(httpServletResponse, times(0)).setStatus(anyInt()); //expect to schedule a task - configExecutorMocked.verify( - () -> ConfigExecutor.executeLongPolling(any(LongPollingService.ClientLongPolling.class)), times(1)); + configExecutorMocked.verify(() -> ConfigExecutor.executeLongPolling(any(LongPollingService.ClientLongPolling.class)), times(1)); } @Test - public void testReceiveDataChangeEventAndNotify() throws Exception { + void testReceiveDataChangeEventAndNotify() throws Exception { configExecutorMocked.close(); //mock connection no limit @@ -223,8 +219,7 @@ public void testReceiveDataChangeEventAndNotify() throws Exception { Mockito.when(httpServletResponse.getWriter()).thenReturn(printWriter); Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_HEADER))).thenReturn("5000"); - Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))) - .thenReturn(null); + Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))).thenReturn(null); String clientIp = "192.168.0.1"; Mockito.when(httpServletRequest.getHeader(eq("X-Forwarded-For"))).thenReturn(clientIp); AsyncContext asyncContext = Mockito.mock(AsyncContext.class); @@ -232,20 +227,20 @@ public void testReceiveDataChangeEventAndNotify() throws Exception { Mockito.when(asyncContext.getRequest()).thenReturn(httpServletRequest); Mockito.when(asyncContext.getResponse()).thenReturn(httpServletResponse); - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.isUptodate(anyString(), anyString(), anyString(), eq(null))).thenReturn(true); + configCacheServiceMockedStatic.when(() -> ConfigCacheService.isUptodate(anyString(), anyString(), anyString(), eq(null))) + .thenReturn(true); longPollingService.addLongPollingClient(httpServletRequest, httpServletResponse, clientMd5Map, 3); //test getSubscribleInfo by groupKey SampleResult subscribleInfo = longPollingService.getCollectSubscribleInfo(dataIdChanged, group, tenant); Map lisentersGroupkeyStatus = subscribleInfo.getLisentersGroupkeyStatus(); - Assert.assertFalse(lisentersGroupkeyStatus.isEmpty()); - Assert.assertEquals("mockMd5", lisentersGroupkeyStatus.get(clientIp)); + assertFalse(lisentersGroupkeyStatus.isEmpty()); + assertEquals("mockMd5", lisentersGroupkeyStatus.get(clientIp)); SampleResult collectSubscribleInfoByIp = longPollingService.getCollectSubscribleInfoByIp(clientIp); Map lisentersGroupkeyStatus1 = collectSubscribleInfoByIp.getLisentersGroupkeyStatus(); - Assert.assertFalse(lisentersGroupkeyStatus1.isEmpty()); - Assert.assertEquals("mockMd5", lisentersGroupkeyStatus1.get(groupKeyChanged)); + assertFalse(lisentersGroupkeyStatus1.isEmpty()); + assertEquals("mockMd5", lisentersGroupkeyStatus1.get(groupKeyChanged)); //test receive config change event LocalDataChangeEvent localDataChangeEvent = new LocalDataChangeEvent(groupKeyChanged); @@ -260,7 +255,7 @@ public void testReceiveDataChangeEventAndNotify() throws Exception { } @Test - public void testLongPollingTimeout() throws Exception { + void testLongPollingTimeout() throws Exception { configExecutorMocked.close(); String dataIdChanged = "dataIdChanged"; String group = "group"; @@ -274,21 +269,19 @@ public void testLongPollingTimeout() throws Exception { Map clientMd5Map = new HashMap<>(); clientMd5Map.put(groupKeyChanged, "md5"); - switchServiceMockedStatic.when(() -> SwitchService.getSwitchInteger(eq("MIN_LONG_POOLING_TIMEOUT"), eq(10000))) - .thenReturn(1000); + switchServiceMockedStatic.when(() -> SwitchService.getSwitchInteger(eq("MIN_LONG_POOLING_TIMEOUT"), eq(10000))).thenReturn(1000); HttpServletRequest httpServletRequest = Mockito.mock(HttpServletRequest.class); Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_HEADER))).thenReturn("1000"); - Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))) - .thenReturn(null); + Mockito.when(httpServletRequest.getHeader(eq(LongPollingService.LONG_POLLING_NO_HANG_UP_HEADER))).thenReturn(null); String clientIp = "192.168.0.1"; Mockito.when(httpServletRequest.getHeader(eq("X-Forwarded-For"))).thenReturn(clientIp); AsyncContext asyncContext = Mockito.mock(AsyncContext.class); Mockito.when(httpServletRequest.startAsync()).thenReturn(asyncContext); Mockito.when(asyncContext.getRequest()).thenReturn(httpServletRequest); - configCacheServiceMockedStatic.when( - () -> ConfigCacheService.isUptodate(anyString(), anyString(), anyString(), eq(null))).thenReturn(true); + configCacheServiceMockedStatic.when(() -> ConfigCacheService.isUptodate(anyString(), anyString(), anyString(), eq(null))) + .thenReturn(true); HttpServletResponse httpServletResponse = Mockito.mock(HttpServletResponse.class); longPollingService.addLongPollingClient(httpServletRequest, httpServletResponse, clientMd5Map, 3); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/CapacityServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/CapacityServiceTest.java index abd6d435cda..88396b71d4f 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/CapacityServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/CapacityServiceTest.java @@ -22,31 +22,31 @@ import com.alibaba.nacos.config.server.model.capacity.TenantCapacity; import com.alibaba.nacos.config.server.service.repository.ConfigInfoPersistService; import com.alibaba.nacos.config.server.utils.PropertyUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import java.util.ArrayList; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) @WebAppConfiguration -public class CapacityServiceTest { +class CapacityServiceTest { private CapacityService service; @@ -59,8 +59,8 @@ public class CapacityServiceTest { @Mock private ConfigInfoPersistService configInfoPersistService; - @Before - public void setUp() { + @BeforeEach + void setUp() { service = new CapacityService(); ReflectionTestUtils.setField(service, "groupCapacityPersistService", groupCapacityPersistService); ReflectionTestUtils.setField(service, "tenantCapacityPersistService", tenantCapacityPersistService); @@ -68,12 +68,12 @@ public void setUp() { } @Test - public void testInit() { + void testInit() { service.init(); } @Test - public void testCorrectUsage() { + void testCorrectUsage() { List groupCapacityList = new ArrayList<>(); GroupCapacity groupCapacity = new GroupCapacity(); groupCapacity.setId(1L); @@ -104,21 +104,21 @@ public void testCorrectUsage() { } @Test - public void testCorrectGroupUsage() { + void testCorrectGroupUsage() { when(groupCapacityPersistService.correctUsage(eq("testGroup"), any())).thenReturn(true); service.correctGroupUsage("testGroup"); Mockito.verify(groupCapacityPersistService, times(1)).correctUsage(eq("testGroup"), any()); } @Test - public void testCorrectTenantUsage() { + void testCorrectTenantUsage() { when(tenantCapacityPersistService.correctUsage(eq("testTenant"), any())).thenReturn(true); service.correctTenantUsage("testTenant"); Mockito.verify(tenantCapacityPersistService, times(1)).correctUsage(eq("testTenant"), any()); } @Test - public void testInitAllCapacity() { + void testInitAllCapacity() { List groupList = new ArrayList<>(); groupList.add("testGroup"); when(configInfoPersistService.getGroupIdList(eq(1), eq(500))).thenReturn(groupList); @@ -152,7 +152,7 @@ public void testInitAllCapacity() { } @Test - public void testInsertAndUpdateClusterUsage() { + void testInsertAndUpdateClusterUsage() { when(groupCapacityPersistService.insertGroupCapacity(any())).thenReturn(true); when(groupCapacityPersistService.incrementUsage(any())).thenReturn(true); when(groupCapacityPersistService.incrementUsageWithDefaultQuotaLimit(any())).thenReturn(true); @@ -169,7 +169,7 @@ public void testInsertAndUpdateClusterUsage() { } @Test - public void testUpdateClusterUsage() { + void testUpdateClusterUsage() { when(groupCapacityPersistService.incrementUsageWithDefaultQuotaLimit(any())).thenReturn(true); when(groupCapacityPersistService.decrementUsage(any())).thenReturn(true); @@ -181,7 +181,7 @@ public void testUpdateClusterUsage() { } @Test - public void testInsertAndUpdateGroupUsage() { + void testInsertAndUpdateGroupUsage() { GroupCapacity groupCapacity = new GroupCapacity(); groupCapacity.setGroup("testGroup"); groupCapacity.setUsage(300); @@ -201,7 +201,7 @@ public void testInsertAndUpdateGroupUsage() { } @Test - public void testUpdateGroupUsage() { + void testUpdateGroupUsage() { when(groupCapacityPersistService.incrementUsageWithDefaultQuotaLimit(any())).thenReturn(true); when(groupCapacityPersistService.decrementUsage(any())).thenReturn(true); @@ -213,19 +213,19 @@ public void testUpdateGroupUsage() { } @Test - public void testGetGroupCapacity() { + void testGetGroupCapacity() { GroupCapacity groupCapacity = new GroupCapacity(); groupCapacity.setId(1L); groupCapacity.setGroup("testGroup"); when(groupCapacityPersistService.getGroupCapacity(eq("testGroup"))).thenReturn(groupCapacity); GroupCapacity resGroupCapacity = service.getGroupCapacity("testGroup"); - Assert.assertEquals(groupCapacity.getId(), resGroupCapacity.getId()); - Assert.assertEquals(groupCapacity.getGroup(), resGroupCapacity.getGroup()); + assertEquals(groupCapacity.getId(), resGroupCapacity.getId()); + assertEquals(groupCapacity.getGroup(), resGroupCapacity.getGroup()); } @Test - public void testInitGroupCapacity() { + void testInitGroupCapacity() { GroupCapacity groupCapacity = new GroupCapacity(); groupCapacity.setGroup("testGroup"); groupCapacity.setUsage(300); @@ -240,7 +240,7 @@ public void testInitGroupCapacity() { } @Test - public void testGetCapacity() { + void testGetCapacity() { GroupCapacity groupCapacity = new GroupCapacity(); groupCapacity.setId(1L); when(groupCapacityPersistService.getGroupCapacity(eq("testGroup"))).thenReturn(groupCapacity); @@ -250,14 +250,14 @@ public void testGetCapacity() { when(tenantCapacityPersistService.getTenantCapacity(eq("testTenant"))).thenReturn(tenantCapacity); Capacity resCapacity1 = service.getCapacity("testGroup", null); - Assert.assertEquals(1L, resCapacity1.getId().longValue()); + assertEquals(1L, resCapacity1.getId().longValue()); Capacity resCapacity2 = service.getCapacity(null, "testTenant"); - Assert.assertEquals(2L, resCapacity2.getId().longValue()); + assertEquals(2L, resCapacity2.getId().longValue()); } @Test - public void testGetCapacityWithDefault() { + void testGetCapacityWithDefault() { TenantCapacity tenantCapacity = new TenantCapacity(); tenantCapacity.setQuota(0); tenantCapacity.setMaxSize(0); @@ -274,17 +274,17 @@ public void testGetCapacityWithDefault() { //group is null Capacity resCapacity1 = service.getCapacityWithDefault(null, "testTenant"); - Assert.assertEquals(PropertyUtil.getDefaultGroupQuota(), resCapacity1.getQuota().intValue()); - Assert.assertEquals(PropertyUtil.getDefaultMaxSize(), resCapacity1.getMaxSize().intValue()); - Assert.assertEquals(PropertyUtil.getDefaultMaxAggrCount(), resCapacity1.getMaxAggrCount().intValue()); - Assert.assertEquals(PropertyUtil.getDefaultMaxAggrSize(), resCapacity1.getMaxAggrSize().intValue()); + assertEquals(PropertyUtil.getDefaultGroupQuota(), resCapacity1.getQuota().intValue()); + assertEquals(PropertyUtil.getDefaultMaxSize(), resCapacity1.getMaxSize().intValue()); + assertEquals(PropertyUtil.getDefaultMaxAggrCount(), resCapacity1.getMaxAggrCount().intValue()); + assertEquals(PropertyUtil.getDefaultMaxAggrSize(), resCapacity1.getMaxAggrSize().intValue()); //group is GroupCapacityPersistService.CLUSTER Capacity resCapacity2 = service.getCapacityWithDefault(GroupCapacityPersistService.CLUSTER, null); - Assert.assertEquals(PropertyUtil.getDefaultClusterQuota(), resCapacity2.getQuota().intValue()); - Assert.assertEquals(PropertyUtil.getDefaultMaxSize(), resCapacity2.getMaxSize().intValue()); - Assert.assertEquals(PropertyUtil.getDefaultMaxAggrCount(), resCapacity2.getMaxAggrCount().intValue()); - Assert.assertEquals(PropertyUtil.getDefaultMaxAggrSize(), resCapacity2.getMaxAggrSize().intValue()); + assertEquals(PropertyUtil.getDefaultClusterQuota(), resCapacity2.getQuota().intValue()); + assertEquals(PropertyUtil.getDefaultMaxSize(), resCapacity2.getMaxSize().intValue()); + assertEquals(PropertyUtil.getDefaultMaxAggrCount(), resCapacity2.getMaxAggrCount().intValue()); + assertEquals(PropertyUtil.getDefaultMaxAggrSize(), resCapacity2.getMaxAggrSize().intValue()); GroupCapacity groupCapacity2 = new GroupCapacity(); groupCapacity2.setQuota(0); @@ -295,14 +295,14 @@ public void testGetCapacityWithDefault() { //tenant is null Capacity resCapacity3 = service.getCapacityWithDefault("testGroup", null); - Assert.assertEquals(PropertyUtil.getDefaultGroupQuota(), resCapacity3.getQuota().intValue()); - Assert.assertEquals(PropertyUtil.getDefaultMaxSize(), resCapacity3.getMaxSize().intValue()); - Assert.assertEquals(PropertyUtil.getDefaultMaxAggrCount(), resCapacity3.getMaxAggrCount().intValue()); - Assert.assertEquals(PropertyUtil.getDefaultMaxAggrSize(), resCapacity3.getMaxAggrSize().intValue()); + assertEquals(PropertyUtil.getDefaultGroupQuota(), resCapacity3.getQuota().intValue()); + assertEquals(PropertyUtil.getDefaultMaxSize(), resCapacity3.getMaxSize().intValue()); + assertEquals(PropertyUtil.getDefaultMaxAggrCount(), resCapacity3.getMaxAggrCount().intValue()); + assertEquals(PropertyUtil.getDefaultMaxAggrSize(), resCapacity3.getMaxAggrSize().intValue()); } @Test - public void testInitCapacityV1() { + void testInitCapacityV1() { GroupCapacity groupCapacity = new GroupCapacity(); groupCapacity.setUsage(300); when(groupCapacityPersistService.getGroupCapacity(eq("testGroup"))).thenReturn(groupCapacity); @@ -327,7 +327,7 @@ public void testInitCapacityV1() { } @Test - public void testInitCapacityV2() { + void testInitCapacityV2() { when(groupCapacityPersistService.insertGroupCapacity(any())).thenReturn(true); service.initCapacity(GroupCapacityPersistService.CLUSTER, null); @@ -335,7 +335,7 @@ public void testInitCapacityV2() { } @Test - public void testInsertAndUpdateTenantUsage() { + void testInsertAndUpdateTenantUsage() { TenantCapacity tenantCapacity = new TenantCapacity(); tenantCapacity.setTenant("testTenant"); tenantCapacity.setUsage(300); @@ -355,7 +355,7 @@ public void testInsertAndUpdateTenantUsage() { } @Test - public void testUpdateTenantUsage() { + void testUpdateTenantUsage() { when(tenantCapacityPersistService.incrementUsageWithDefaultQuotaLimit(any())).thenReturn(true); when(tenantCapacityPersistService.decrementUsage(any())).thenReturn(true); @@ -367,7 +367,7 @@ public void testUpdateTenantUsage() { } @Test - public void testInitTenantCapacityV1() { + void testInitTenantCapacityV1() { TenantCapacity tenantCapacity = new TenantCapacity(); tenantCapacity.setTenant("testTenant"); tenantCapacity.setUsage(300); @@ -382,7 +382,7 @@ public void testInitTenantCapacityV1() { } @Test - public void testInitTenantCapacityV2() { + void testInitTenantCapacityV2() { TenantCapacity tenantCapacity = new TenantCapacity(); tenantCapacity.setTenant("testTenant"); tenantCapacity.setUsage(300); @@ -393,44 +393,40 @@ public void testInitTenantCapacityV2() { } @Test - public void testGetTenantCapacity() { + void testGetTenantCapacity() { TenantCapacity tenantCapacity = new TenantCapacity(); tenantCapacity.setId(1L); tenantCapacity.setTenant("testTenant"); when(tenantCapacityPersistService.getTenantCapacity(eq("testTenant"))).thenReturn(tenantCapacity); TenantCapacity resTenantCapacity = service.getTenantCapacity("testTenant"); - Assert.assertEquals(tenantCapacity.getId(), resTenantCapacity.getId()); - Assert.assertEquals(tenantCapacity.getTenant(), resTenantCapacity.getTenant()); + assertEquals(tenantCapacity.getId(), resTenantCapacity.getId()); + assertEquals(tenantCapacity.getTenant(), resTenantCapacity.getTenant()); } @Test - public void testInsertOrUpdateCapacityV1() { + void testInsertOrUpdateCapacityV1() { //tenant is null GroupCapacity groupCapacity = new GroupCapacity(); groupCapacity.setUsage(300); when(groupCapacityPersistService.getGroupCapacity(eq("testGroup"))).thenReturn(groupCapacity); - when(groupCapacityPersistService.updateGroupCapacity(eq("testGroup"), eq(0), eq(0), eq(0), eq(0))) - .thenReturn(true); + when(groupCapacityPersistService.updateGroupCapacity(eq("testGroup"), eq(0), eq(0), eq(0), eq(0))).thenReturn(true); service.insertOrUpdateCapacity("testGroup", null, 0, 0, 0, 0); Mockito.verify(groupCapacityPersistService, times(1)).getGroupCapacity(eq("testGroup")); - Mockito.verify(groupCapacityPersistService, times(1)) - .updateGroupCapacity(eq("testGroup"), eq(0), eq(0), eq(0), eq(0)); + Mockito.verify(groupCapacityPersistService, times(1)).updateGroupCapacity(eq("testGroup"), eq(0), eq(0), eq(0), eq(0)); //tenant is not null TenantCapacity tenantCapacity = new TenantCapacity(); tenantCapacity.setTenant("testTenant"); when(tenantCapacityPersistService.getTenantCapacity(eq("testTenant"))).thenReturn(tenantCapacity); - when(tenantCapacityPersistService.updateTenantCapacity(eq("testTenant"), eq(0), eq(0), eq(0), eq(0))) - .thenReturn(true); + when(tenantCapacityPersistService.updateTenantCapacity(eq("testTenant"), eq(0), eq(0), eq(0), eq(0))).thenReturn(true); service.insertOrUpdateCapacity(null, "testTenant", 0, 0, 0, 0); Mockito.verify(tenantCapacityPersistService, times(1)).getTenantCapacity(eq("testTenant")); - Mockito.verify(tenantCapacityPersistService, times(1)) - .updateTenantCapacity(eq("testTenant"), eq(0), eq(0), eq(0), eq(0)); + Mockito.verify(tenantCapacityPersistService, times(1)).updateTenantCapacity(eq("testTenant"), eq(0), eq(0), eq(0), eq(0)); } @Test - public void testInsertOrUpdateCapacityV2() { + void testInsertOrUpdateCapacityV2() { when(groupCapacityPersistService.getGroupCapacity(eq("testGroup"))).thenReturn(null); when(groupCapacityPersistService.insertGroupCapacity(any())).thenReturn(true); service.insertOrUpdateCapacity("testGroup", null, 0, 0, 0, 0); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistServiceTest.java index d076f52ae32..a8aa5f0a32d 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistServiceTest.java @@ -25,11 +25,10 @@ import com.alibaba.nacos.plugin.datasource.constants.TableConstant; import com.alibaba.nacos.plugin.datasource.impl.mysql.ConfigInfoMapperByMySql; import com.alibaba.nacos.plugin.datasource.impl.mysql.GroupCapacityMapperByMysql; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockedStatic; @@ -41,7 +40,7 @@ import org.springframework.jdbc.core.RowMapper; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.util.ReflectionTestUtils; import java.sql.ResultSet; @@ -50,15 +49,19 @@ import java.util.ArrayList; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) -public class GroupCapacityPersistServiceTest { +class GroupCapacityPersistServiceTest { + + MockedStatic timeUtilsMockedStatic; @InjectMocks private GroupCapacityPersistService service; @@ -72,27 +75,24 @@ public class GroupCapacityPersistServiceTest { @Mock private MapperManager mapperManager; - MockedStatic timeUtilsMockedStatic; - - @After - public void after() { + @AfterEach + void after() { timeUtilsMockedStatic.close(); } - @Before - public void setUp() { + @BeforeEach + void setUp() { ReflectionTestUtils.setField(service, "jdbcTemplate", jdbcTemplate); ReflectionTestUtils.setField(service, "dataSourceService", dataSourceService); ReflectionTestUtils.setField(service, "mapperManager", mapperManager); when(dataSourceService.getJdbcTemplate()).thenReturn(jdbcTemplate); - doReturn(new GroupCapacityMapperByMysql()).when(mapperManager) - .findMapper(any(), eq(TableConstant.GROUP_CAPACITY)); + doReturn(new GroupCapacityMapperByMysql()).when(mapperManager).findMapper(any(), eq(TableConstant.GROUP_CAPACITY)); timeUtilsMockedStatic = Mockito.mockStatic(TimeUtils.class); } @Test - public void testGetGroupCapacity() { + void testGetGroupCapacity() { List list = new ArrayList<>(); GroupCapacity groupCapacity = new GroupCapacity(); @@ -103,11 +103,11 @@ public void testGetGroupCapacity() { when(jdbcTemplate.query(anyString(), eq(new Object[] {groupId}), any(RowMapper.class))).thenReturn(list); GroupCapacity ret = service.getGroupCapacity(groupId); - Assert.assertEquals(groupCapacity.getGroup(), ret.getGroup()); + assertEquals(groupCapacity.getGroup(), ret.getGroup()); } @Test - public void testGetClusterCapacity() { + void testGetClusterCapacity() { List list = new ArrayList<>(); GroupCapacity groupCapacity = new GroupCapacity(); @@ -118,30 +118,28 @@ public void testGetClusterCapacity() { when(jdbcTemplate.query(anyString(), eq(new Object[] {groupId}), any(RowMapper.class))).thenReturn(list); Capacity ret = service.getClusterCapacity(); - Assert.assertEquals(groupCapacity.getId(), ret.getId()); + assertEquals(groupCapacity.getId(), ret.getId()); } @Test - public void testInsertGroupCapacity() { + void testInsertGroupCapacity() { - doReturn(1).when(jdbcTemplate) - .update(anyString(), eq(""), eq(null), eq(null), eq(null), eq(null), eq(null), eq(null)); + doReturn(1).when(jdbcTemplate).update(anyString(), eq(""), eq(null), eq(null), eq(null), eq(null), eq(null), eq(null)); // when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test3"))).thenReturn(1); GroupCapacity capacity = new GroupCapacity(); capacity.setGroup(GroupCapacityPersistService.CLUSTER); - Assert.assertTrue(service.insertGroupCapacity(capacity)); + assertTrue(service.insertGroupCapacity(capacity)); capacity.setGroup("test"); doReturn(1).when(jdbcTemplate) - .update(anyString(), eq("test"), eq(null), eq(null), eq(null), eq(null), eq(null), eq(null), - eq("test")); + .update(anyString(), eq("test"), eq(null), eq(null), eq(null), eq(null), eq(null), eq(null), eq("test")); - Assert.assertTrue(service.insertGroupCapacity(capacity)); + assertTrue(service.insertGroupCapacity(capacity)); } @Test - public void testGetClusterUsage() { + void testGetClusterUsage() { doReturn(new ConfigInfoMapperByMySql()).when(mapperManager).findMapper(any(), eq(TableConstant.CONFIG_INFO)); List list = new ArrayList<>(); @@ -152,16 +150,15 @@ public void testGetClusterUsage() { String groupId = GroupCapacityPersistService.CLUSTER; when(jdbcTemplate.query(anyString(), eq(new Object[] {groupId}), any(RowMapper.class))).thenReturn(list); - Assert.assertEquals(groupCapacity.getUsage().intValue(), service.getClusterUsage()); + assertEquals(groupCapacity.getUsage().intValue(), service.getClusterUsage()); - when(jdbcTemplate.query(anyString(), eq(new Object[] {groupId}), any(RowMapper.class))).thenReturn( - new ArrayList<>()); + when(jdbcTemplate.query(anyString(), eq(new Object[] {groupId}), any(RowMapper.class))).thenReturn(new ArrayList<>()); when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(20); - Assert.assertEquals(20, service.getClusterUsage()); + assertEquals(20, service.getClusterUsage()); } @Test - public void testIncrementUsageWithDefaultQuotaLimit() { + void testIncrementUsageWithDefaultQuotaLimit() { GroupCapacity groupCapacity = new GroupCapacity(); Timestamp timestamp = new Timestamp(System.currentTimeMillis()); groupCapacity.setGmtModified(timestamp); @@ -169,42 +166,41 @@ public void testIncrementUsageWithDefaultQuotaLimit() { groupCapacity.setQuota(1); when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test"), eq(1))).thenReturn(1); - Assert.assertTrue(service.incrementUsageWithDefaultQuotaLimit(groupCapacity)); + assertTrue(service.incrementUsageWithDefaultQuotaLimit(groupCapacity)); //mock get connection fail when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test"), eq(1))).thenThrow( new CannotGetJdbcConnectionException("conn fail")); try { service.incrementUsageWithDefaultQuotaLimit(groupCapacity); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testIncrementUsageWithQuotaLimit() { + void testIncrementUsageWithQuotaLimit() { GroupCapacity groupCapacity = new GroupCapacity(); Timestamp timestamp = new Timestamp(System.currentTimeMillis()); groupCapacity.setGmtModified(timestamp); groupCapacity.setGroup("test2"); when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test2"))).thenReturn(1); - Assert.assertTrue(service.incrementUsageWithQuotaLimit(groupCapacity)); + assertTrue(service.incrementUsageWithQuotaLimit(groupCapacity)); //mock get connection fail - when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test2"))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test2"))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.incrementUsageWithQuotaLimit(groupCapacity); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testIncrementUsage() { + void testIncrementUsage() { GroupCapacity groupCapacity = new GroupCapacity(); Timestamp timestamp = new Timestamp(System.currentTimeMillis()); @@ -212,42 +208,40 @@ public void testIncrementUsage() { groupCapacity.setGroup("test3"); when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test3"))).thenReturn(1); - Assert.assertTrue(service.incrementUsage(groupCapacity)); + assertTrue(service.incrementUsage(groupCapacity)); //mock get connection fail - when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test3"))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test3"))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.incrementUsage(groupCapacity); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testDecrementUsage() { + void testDecrementUsage() { GroupCapacity groupCapacity = new GroupCapacity(); Timestamp timestamp = new Timestamp(System.currentTimeMillis()); groupCapacity.setGmtModified(timestamp); groupCapacity.setGroup("test4"); when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test4"))).thenReturn(1); - Assert.assertTrue(service.decrementUsage(groupCapacity)); + assertTrue(service.decrementUsage(groupCapacity)); //mock get connection fail - when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test4"))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test4"))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.decrementUsage(groupCapacity); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testUpdateGroupCapacity() { + void testUpdateGroupCapacity() { List argList = CollectionUtils.list(); @@ -272,28 +266,26 @@ public void testUpdateGroupCapacity() { when(jdbcTemplate.update(anyString(), any(Object.class))).thenAnswer((Answer) invocationOnMock -> { if (invocationOnMock.getArgument(1).equals(quota) && invocationOnMock.getArgument(2).equals(maxSize) - && invocationOnMock.getArgument(3).equals(maxAggrCount) && invocationOnMock.getArgument(4) - .equals(maxAggrSize) && invocationOnMock.getArgument(5).equals(timestamp) - && invocationOnMock.getArgument(6).equals(group)) { + && invocationOnMock.getArgument(3).equals(maxAggrCount) && invocationOnMock.getArgument(4).equals(maxAggrSize) + && invocationOnMock.getArgument(5).equals(timestamp) && invocationOnMock.getArgument(6).equals(group)) { return 1; } return 0; }); - Assert.assertTrue(service.updateGroupCapacity(group, quota, maxSize, maxAggrCount, maxAggrSize)); + assertTrue(service.updateGroupCapacity(group, quota, maxSize, maxAggrCount, maxAggrSize)); //mock get connection fail - when(jdbcTemplate.update(anyString(), any(Object.class))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(anyString(), any(Object.class))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.updateGroupCapacity(group, quota, maxSize, maxAggrCount, maxAggrSize); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testGroupCapacityRowMapper() throws SQLException { + void testGroupCapacityRowMapper() throws SQLException { GroupCapacityPersistService.GroupCapacityRowMapper groupCapacityRowMapper = new GroupCapacityPersistService.GroupCapacityRowMapper(); ResultSet rs = Mockito.mock(ResultSet.class); int quota = 12345; @@ -310,16 +302,16 @@ public void testGroupCapacityRowMapper() throws SQLException { Mockito.when(rs.getString(eq("group_id"))).thenReturn(group); GroupCapacity groupCapacity = groupCapacityRowMapper.mapRow(rs, 1); - Assert.assertEquals(quota, groupCapacity.getQuota().intValue()); - Assert.assertEquals(usage, groupCapacity.getUsage().intValue()); - Assert.assertEquals(maxSize, groupCapacity.getMaxSize().intValue()); - Assert.assertEquals(maxAggrCount, groupCapacity.getMaxAggrCount().intValue()); - Assert.assertEquals(maxAggrSize, groupCapacity.getMaxAggrSize().intValue()); - Assert.assertEquals(group, groupCapacity.getGroup()); + assertEquals(quota, groupCapacity.getQuota().intValue()); + assertEquals(usage, groupCapacity.getUsage().intValue()); + assertEquals(maxSize, groupCapacity.getMaxSize().intValue()); + assertEquals(maxAggrCount, groupCapacity.getMaxAggrCount().intValue()); + assertEquals(maxAggrSize, groupCapacity.getMaxAggrSize().intValue()); + assertEquals(group, groupCapacity.getGroup()); } @Test - public void testUpdateQuota() { + void testUpdateQuota() { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); when(TimeUtils.getCurrentTime()).thenReturn(timestamp); List argList = CollectionUtils.list(); @@ -332,11 +324,11 @@ public void testUpdateQuota() { when(jdbcTemplate.update(anyString(), eq(2), eq(timestamp), eq(group))).thenReturn(1); - Assert.assertTrue(service.updateQuota(group, quota)); + assertTrue(service.updateQuota(group, quota)); } @Test - public void testUpdateMaxSize() { + void testUpdateMaxSize() { List argList = CollectionUtils.list(); Timestamp timestamp = new Timestamp(System.currentTimeMillis()); @@ -348,35 +340,35 @@ public void testUpdateMaxSize() { argList.add(group); when(jdbcTemplate.update(anyString(), eq(3), eq(timestamp), eq(group))).thenReturn(1); - Assert.assertTrue(service.updateMaxSize(group, maxSize)); + assertTrue(service.updateMaxSize(group, maxSize)); } @Test - public void testCorrectUsage() { + void testCorrectUsage() { String group = GroupCapacityPersistService.CLUSTER; Timestamp timestamp = new Timestamp(System.currentTimeMillis()); when(jdbcTemplate.update(anyString(), eq(timestamp), eq(group))).thenReturn(1); - Assert.assertTrue(service.correctUsage(group, timestamp)); + assertTrue(service.correctUsage(group, timestamp)); group = "test"; when(jdbcTemplate.update(anyString(), eq(group), eq(timestamp), eq(group))).thenReturn(1); - Assert.assertTrue(service.correctUsage(group, timestamp)); + assertTrue(service.correctUsage(group, timestamp)); //mock get connection fail when(jdbcTemplate.update(anyString(), eq(group), eq(timestamp), eq(group))).thenThrow( new CannotGetJdbcConnectionException("conn fail")); try { service.correctUsage(group, timestamp); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testGetCapacityList4CorrectUsage() { + void testGetCapacityList4CorrectUsage() { List list = new ArrayList<>(); GroupCapacity groupCapacity = new GroupCapacity(); @@ -385,38 +377,36 @@ public void testGetCapacityList4CorrectUsage() { long lastId = 1; int pageSize = 1; - when(jdbcTemplate.query(anyString(), eq(new Object[] {lastId, pageSize}), any(RowMapper.class))).thenReturn( - list); + when(jdbcTemplate.query(anyString(), eq(new Object[] {lastId, pageSize}), any(RowMapper.class))).thenReturn(list); List ret = service.getCapacityList4CorrectUsage(lastId, pageSize); - Assert.assertEquals(list.size(), ret.size()); - Assert.assertEquals(groupCapacity.getGroup(), ret.get(0).getGroup()); + assertEquals(list.size(), ret.size()); + assertEquals(groupCapacity.getGroup(), ret.get(0).getGroup()); //mock get connection fail when(jdbcTemplate.query(anyString(), eq(new Object[] {lastId, pageSize}), any(RowMapper.class))).thenThrow( new CannotGetJdbcConnectionException("conn fail")); try { service.getCapacityList4CorrectUsage(lastId, pageSize); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testDeleteGroupCapacity() { + void testDeleteGroupCapacity() { when(jdbcTemplate.update(any(PreparedStatementCreator.class))).thenReturn(1); - Assert.assertTrue(service.deleteGroupCapacity("test")); + assertTrue(service.deleteGroupCapacity("test")); //mock get connection fail - when(jdbcTemplate.update(any(PreparedStatementCreator.class))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(any(PreparedStatementCreator.class))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.deleteGroupCapacity("test"); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistServiceTest.java index b1efc63cba2..dfd57828fcf 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistServiceTest.java @@ -23,10 +23,9 @@ import com.alibaba.nacos.plugin.datasource.MapperManager; import com.alibaba.nacos.plugin.datasource.constants.TableConstant; import com.alibaba.nacos.plugin.datasource.impl.mysql.TenantCapacityMapperByMySql; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockedStatic; @@ -38,7 +37,7 @@ import org.springframework.jdbc.core.RowMapper; import org.springframework.mock.web.MockServletContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.util.ReflectionTestUtils; import java.sql.ResultSet; @@ -47,15 +46,17 @@ import java.util.ArrayList; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) @ContextConfiguration(classes = MockServletContext.class) -public class TenantCapacityPersistServiceTest { +class TenantCapacityPersistServiceTest { @Mock private JdbcTemplate jdbcTemplate; @@ -69,18 +70,17 @@ public class TenantCapacityPersistServiceTest { @InjectMocks private TenantCapacityPersistService service; - @Before - public void setUp() { + @BeforeEach + void setUp() { ReflectionTestUtils.setField(service, "jdbcTemplate", jdbcTemplate); ReflectionTestUtils.setField(service, "dataSourceService", dataSourceService); ReflectionTestUtils.setField(service, "mapperManager", mapperManager); when(dataSourceService.getJdbcTemplate()).thenReturn(jdbcTemplate); - doReturn(new TenantCapacityMapperByMySql()).when(mapperManager) - .findMapper(any(), eq(TableConstant.TENANT_CAPACITY)); + doReturn(new TenantCapacityMapperByMySql()).when(mapperManager).findMapper(any(), eq(TableConstant.TENANT_CAPACITY)); } @Test - public void testGetTenantCapacity() { + void testGetTenantCapacity() { List list = new ArrayList<>(); TenantCapacity tenantCapacity = new TenantCapacity(); @@ -91,32 +91,32 @@ public void testGetTenantCapacity() { when(jdbcTemplate.query(anyString(), eq(new Object[] {tenantId}), any(RowMapper.class))).thenReturn(list); TenantCapacity ret = service.getTenantCapacity(tenantId); - Assert.assertEquals(tenantCapacity.getTenant(), ret.getTenant()); + assertEquals(tenantCapacity.getTenant(), ret.getTenant()); } @Test - public void testInsertTenantCapacity() { + void testInsertTenantCapacity() { when(jdbcTemplate.update(anyString(), eq("test"), eq(null), eq(null), eq(null), eq(null), eq(null), eq(null), eq("test"))).thenReturn(1); TenantCapacity capacity = new TenantCapacity(); capacity.setTenant("test"); - Assert.assertTrue(service.insertTenantCapacity(capacity)); + assertTrue(service.insertTenantCapacity(capacity)); //mock get connection fail when(jdbcTemplate.update(anyString(), eq("test"), eq(null), eq(null), eq(null), eq(null), eq(null), eq(null), eq("test"))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.insertTenantCapacity(capacity); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testIncrementUsageWithDefaultQuotaLimit() { + void testIncrementUsageWithDefaultQuotaLimit() { TenantCapacity tenantCapacity = new TenantCapacity(); Timestamp timestamp = new Timestamp(System.currentTimeMillis()); @@ -125,21 +125,21 @@ public void testIncrementUsageWithDefaultQuotaLimit() { tenantCapacity.setQuota(1); when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test"), eq(1))).thenReturn(1); - Assert.assertTrue(service.incrementUsageWithDefaultQuotaLimit(tenantCapacity)); + assertTrue(service.incrementUsageWithDefaultQuotaLimit(tenantCapacity)); //mock get connection fail when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test"), eq(1))).thenThrow( new CannotGetJdbcConnectionException("conn fail")); try { service.incrementUsageWithDefaultQuotaLimit(tenantCapacity); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testIncrementUsageWithQuotaLimit() { + void testIncrementUsageWithQuotaLimit() { TenantCapacity tenantCapacity = new TenantCapacity(); Timestamp timestamp = new Timestamp(System.currentTimeMillis()); @@ -147,21 +147,20 @@ public void testIncrementUsageWithQuotaLimit() { tenantCapacity.setTenant("test2"); when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test2"))).thenReturn(1); - Assert.assertTrue(service.incrementUsageWithQuotaLimit(tenantCapacity)); + assertTrue(service.incrementUsageWithQuotaLimit(tenantCapacity)); //mock get connection fail - when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test2"))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test2"))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.incrementUsageWithQuotaLimit(tenantCapacity); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testIncrementUsage() { + void testIncrementUsage() { TenantCapacity tenantCapacity = new TenantCapacity(); Timestamp timestamp = new Timestamp(System.currentTimeMillis()); @@ -169,21 +168,20 @@ public void testIncrementUsage() { tenantCapacity.setTenant("test3"); when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test3"))).thenReturn(1); - Assert.assertTrue(service.incrementUsage(tenantCapacity)); + assertTrue(service.incrementUsage(tenantCapacity)); //mock get connection fail - when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test3"))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test3"))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.incrementUsage(tenantCapacity); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testDecrementUsage() { + void testDecrementUsage() { TenantCapacity tenantCapacity = new TenantCapacity(); Timestamp timestamp = new Timestamp(System.currentTimeMillis()); @@ -191,21 +189,20 @@ public void testDecrementUsage() { tenantCapacity.setTenant("test4"); when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test4"))).thenReturn(1); - Assert.assertTrue(service.decrementUsage(tenantCapacity)); + assertTrue(service.decrementUsage(tenantCapacity)); //mock get connection fail - when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test4"))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(anyString(), eq(timestamp), eq("test4"))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.decrementUsage(tenantCapacity); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testUpdateTenantCapacity() { + void testUpdateTenantCapacity() { final MockedStatic timeUtilsMockedStatic = Mockito.mockStatic(TimeUtils.class); List argList = CollectionUtils.list(); @@ -231,20 +228,19 @@ public void testUpdateTenantCapacity() { when(jdbcTemplate.update(anyString(), any(Object.class))).thenAnswer((Answer) invocationOnMock -> { if (invocationOnMock.getArgument(1).equals(quota) && invocationOnMock.getArgument(2).equals(maxSize) - && invocationOnMock.getArgument(3).equals(maxAggrCount) && invocationOnMock.getArgument(4) - .equals(maxAggrSize) && invocationOnMock.getArgument(5).equals(timestamp) - && invocationOnMock.getArgument(6).equals(tenant)) { + && invocationOnMock.getArgument(3).equals(maxAggrCount) && invocationOnMock.getArgument(4).equals(maxAggrSize) + && invocationOnMock.getArgument(5).equals(timestamp) && invocationOnMock.getArgument(6).equals(tenant)) { return 1; } return 0; }); - Assert.assertTrue(service.updateTenantCapacity(tenant, quota, maxSize, maxAggrCount, maxAggrSize)); + assertTrue(service.updateTenantCapacity(tenant, quota, maxSize, maxAggrCount, maxAggrSize)); timeUtilsMockedStatic.close(); } @Test - public void testUpdateQuota() { + void testUpdateQuota() { List argList = CollectionUtils.list(); Integer quota = 2; @@ -259,41 +255,40 @@ public void testUpdateQuota() { } return 0; }); - Assert.assertTrue(service.updateQuota(tenant, quota)); + assertTrue(service.updateQuota(tenant, quota)); //mock get connection fail - when(jdbcTemplate.update(anyString(), any(Object.class))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(anyString(), any(Object.class))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.updateQuota(tenant, quota); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testCorrectUsage() { + void testCorrectUsage() { String tenant = "test"; Timestamp timestamp = new Timestamp(System.currentTimeMillis()); when(jdbcTemplate.update(anyString(), eq(tenant), eq(timestamp), eq(tenant))).thenReturn(1); - Assert.assertTrue(service.correctUsage(tenant, timestamp)); + assertTrue(service.correctUsage(tenant, timestamp)); //mock get connection fail when(jdbcTemplate.update(anyString(), eq(tenant), eq(timestamp), eq(tenant))).thenThrow( new CannotGetJdbcConnectionException("conn fail")); try { service.correctUsage(tenant, timestamp); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testGetCapacityList4CorrectUsage() { + void testGetCapacityList4CorrectUsage() { List list = new ArrayList<>(); TenantCapacity tenantCapacity = new TenantCapacity(); @@ -302,43 +297,41 @@ public void testGetCapacityList4CorrectUsage() { long lastId = 1; int pageSize = 1; - when(jdbcTemplate.query(anyString(), eq(new Object[] {lastId, pageSize}), any(RowMapper.class))).thenReturn( - list); + when(jdbcTemplate.query(anyString(), eq(new Object[] {lastId, pageSize}), any(RowMapper.class))).thenReturn(list); List ret = service.getCapacityList4CorrectUsage(lastId, pageSize); - Assert.assertEquals(list.size(), ret.size()); - Assert.assertEquals(tenantCapacity.getTenant(), ret.get(0).getTenant()); + assertEquals(list.size(), ret.size()); + assertEquals(tenantCapacity.getTenant(), ret.get(0).getTenant()); //mock get connection fail when(jdbcTemplate.query(anyString(), eq(new Object[] {lastId, pageSize}), any(RowMapper.class))).thenThrow( new CannotGetJdbcConnectionException("conn fail")); try { service.getCapacityList4CorrectUsage(lastId, pageSize); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testDeleteTenantCapacity() { + void testDeleteTenantCapacity() { when(jdbcTemplate.update(any(PreparedStatementCreator.class))).thenReturn(1); - Assert.assertTrue(service.deleteTenantCapacity("test")); + assertTrue(service.deleteTenantCapacity("test")); //mock get connection fail - when(jdbcTemplate.update(any(PreparedStatementCreator.class))).thenThrow( - new CannotGetJdbcConnectionException("conn fail")); + when(jdbcTemplate.update(any(PreparedStatementCreator.class))).thenThrow(new CannotGetJdbcConnectionException("conn fail")); try { service.deleteTenantCapacity("test"); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn fail", e.getMessage()); + assertEquals("conn fail", e.getMessage()); } } @Test - public void testTenantCapacityRowMapper() throws SQLException { + void testTenantCapacityRowMapper() throws SQLException { TenantCapacityPersistService.TenantCapacityRowMapper groupCapacityRowMapper = new TenantCapacityPersistService.TenantCapacityRowMapper(); ResultSet rs = Mockito.mock(ResultSet.class); int quota = 12345; @@ -355,11 +348,11 @@ public void testTenantCapacityRowMapper() throws SQLException { Mockito.when(rs.getString(eq("tenant_id"))).thenReturn(tenant); TenantCapacity groupCapacity = groupCapacityRowMapper.mapRow(rs, 1); - Assert.assertEquals(quota, groupCapacity.getQuota().intValue()); - Assert.assertEquals(usage, groupCapacity.getUsage().intValue()); - Assert.assertEquals(maxSize, groupCapacity.getMaxSize().intValue()); - Assert.assertEquals(maxAggrCount, groupCapacity.getMaxAggrCount().intValue()); - Assert.assertEquals(maxAggrSize, groupCapacity.getMaxAggrSize().intValue()); - Assert.assertEquals(tenant, groupCapacity.getTenant()); + assertEquals(quota, groupCapacity.getQuota().intValue()); + assertEquals(usage, groupCapacity.getUsage().intValue()); + assertEquals(maxSize, groupCapacity.getMaxSize().intValue()); + assertEquals(maxAggrCount, groupCapacity.getMaxAggrCount().intValue()); + assertEquals(maxAggrSize, groupCapacity.getMaxAggrSize().intValue()); + assertEquals(tenant, groupCapacity.getTenant()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpChangeConfigWorkerTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpChangeConfigWorkerTest.java index 7ba2dabeb27..cde308bce33 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpChangeConfigWorkerTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpChangeConfigWorkerTest.java @@ -31,15 +31,14 @@ import com.alibaba.nacos.persistence.datasource.DynamicDataSource; import com.alibaba.nacos.plugin.datasource.constants.CommonConstant; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.File; import java.lang.reflect.Field; @@ -47,6 +46,8 @@ import java.util.ArrayList; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyLong; @@ -54,8 +55,8 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class DumpChangeConfigWorkerTest { +@ExtendWith(MockitoExtension.class) +class DumpChangeConfigWorkerTest { @Mock DynamicDataSource dynamicDataSource; @@ -75,13 +76,12 @@ public class DumpChangeConfigWorkerTest { MockedStatic envUtilMockedStatic; - @Before - public void init() throws Exception { + @BeforeEach + void init() throws Exception { dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); when(EnvUtil.getNacosHome()).thenReturn(System.getProperty("user.home") + File.separator + "tmp"); - when(EnvUtil.getProperty(eq(CommonConstant.NACOS_PLUGIN_DATASOURCE_LOG), eq(Boolean.class), - eq(false))).thenReturn(false); + when(EnvUtil.getProperty(eq(CommonConstant.NACOS_PLUGIN_DATASOURCE_LOG), eq(Boolean.class), eq(false))).thenReturn(false); dynamicDataSourceMockedStatic.when(DynamicDataSource::getInstance).thenReturn(dynamicDataSource); Field[] declaredFields = ConfigDiskServiceFactory.class.getDeclaredFields(); @@ -100,8 +100,8 @@ protected ConfigDiskService createDiskService() { return new ConfigRocksDbDiskService(); } - @After - public void after() throws IllegalAccessException { + @AfterEach + void after() throws IllegalAccessException { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); ConfigDiskServiceFactory.getInstance().clearAll(); @@ -118,14 +118,14 @@ public void after() throws IllegalAccessException { } @Test - public void testDumpChangeIfOff() { + void testDumpChangeIfOff() { PropertyUtil.setDumpChangeOn(false); dumpChangeConfigWorker.run(); Mockito.verify(historyConfigInfoPersistService, times(0)).findDeletedConfig(any(), anyLong(), anyInt()); } @Test - public void testDumpChangeOfDeleteConfigs() { + void testDumpChangeOfDeleteConfigs() { PropertyUtil.setDumpChangeOn(true); dumpChangeConfigWorker.setPageSize(3); //mock delete first page @@ -138,29 +138,25 @@ public void testDumpChangeOfDeleteConfigs() { firstPageDeleted.add(createConfigInfoStateWrapper(dataIdPrefix, 3, startTime.getTime() + 3)); //pre set cache for id1 preSetCache(dataIdPrefix, 1, System.currentTimeMillis()); - Assert.assertEquals("encrykey" + 1, - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getEncryptedDataKey()); - Mockito.when(historyConfigInfoPersistService.findDeletedConfig(eq(startTime), eq(0L), eq(3))) - .thenReturn(firstPageDeleted); + assertEquals("encrykey" + 1, + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getEncryptedDataKey()); + Mockito.when(historyConfigInfoPersistService.findDeletedConfig(eq(startTime), eq(0L), eq(3))).thenReturn(firstPageDeleted); //mock delete config query is null - Mockito.when( - configInfoPersistService.findConfigInfoState(eq(dataIdPrefix + 1), eq("group" + 1), eq("tenant" + 1))) + Mockito.when(configInfoPersistService.findConfigInfoState(eq(dataIdPrefix + 1), eq("group" + 1), eq("tenant" + 1))) .thenReturn(null); - Mockito.when( - configInfoPersistService.findConfigInfoState(eq(dataIdPrefix + 2), eq("group" + 2), eq("tenant" + 2))) + Mockito.when(configInfoPersistService.findConfigInfoState(eq(dataIdPrefix + 2), eq("group" + 2), eq("tenant" + 2))) .thenReturn(null); dumpChangeConfigWorker.run(); //expect delete page return pagesize and will select second page Mockito.verify(historyConfigInfoPersistService, times(1)).findDeletedConfig(eq(startTime), eq(3L), eq(3)); //expect cache to be cleared. - Assert.assertNull( - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1))); + assertNull(ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1))); } @Test - public void testDumpChangeOfChangedConfigsNewTimestampOverride() { + void testDumpChangeOfChangedConfigsNewTimestampOverride() { PropertyUtil.setDumpChangeOn(true); dumpChangeConfigWorker.setPageSize(3); //mock delete first page @@ -170,9 +166,9 @@ public void testDumpChangeOfChangedConfigsNewTimestampOverride() { //pre set cache for id1 with old timestamp preSetCache(dataIdPrefix, 1, startTime.getTime() - 1); - Assert.assertEquals(startTime.getTime() - 1, - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getLastModifiedTs()); + assertEquals(startTime.getTime() - 1, + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getLastModifiedTs()); List firstChanged = new ArrayList<>(); firstChanged.add(createConfigInfoStateWrapper(dataIdPrefix, 1, startTime.getTime() + 1)); @@ -180,8 +176,7 @@ public void testDumpChangeOfChangedConfigsNewTimestampOverride() { //mock change config query obj //1 timestamp-new&content-new - ConfigInfoWrapper configInfoWrapperNewForId1 = createConfigInfoWrapper(dataIdPrefix, 1, - startTime.getTime() + 2); + ConfigInfoWrapper configInfoWrapperNewForId1 = createConfigInfoWrapper(dataIdPrefix, 1, startTime.getTime() + 2); configInfoWrapperNewForId1.setContent("content" + System.currentTimeMillis()); Mockito.when(configInfoPersistService.findConfigInfo(eq(dataIdPrefix + 1), eq("group" + 1), eq("tenant" + 1))) .thenReturn(configInfoWrapperNewForId1); @@ -189,16 +184,16 @@ public void testDumpChangeOfChangedConfigsNewTimestampOverride() { dumpChangeConfigWorker.run(); //expect cache to be cleared. - Assert.assertEquals(startTime.getTime() + 2, - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getLastModifiedTs()); - Assert.assertEquals(MD5Utils.md5Hex(configInfoWrapperNewForId1.getContent(), "UTF-8"), - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getMd5Utf8()); + assertEquals(startTime.getTime() + 2, + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getLastModifiedTs()); + assertEquals(MD5Utils.md5Hex(configInfoWrapperNewForId1.getContent(), "UTF-8"), + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getMd5Utf8()); } @Test - public void testDumpChangeOfChangedConfigsNewTimestampEqualMd5() { + void testDumpChangeOfChangedConfigsNewTimestampEqualMd5() { PropertyUtil.setDumpChangeOn(true); dumpChangeConfigWorker.setPageSize(3); //mock delete first page @@ -208,9 +203,9 @@ public void testDumpChangeOfChangedConfigsNewTimestampEqualMd5() { //pre set cache for id1 with old timestamp preSetCache(dataIdPrefix, 1, startTime.getTime() - 1); - Assert.assertEquals(startTime.getTime() - 1, - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getLastModifiedTs()); + assertEquals(startTime.getTime() - 1, + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getLastModifiedTs()); List firstChanged = new ArrayList<>(); firstChanged.add(createConfigInfoStateWrapper(dataIdPrefix, 1, startTime.getTime() + 1)); @@ -218,25 +213,24 @@ public void testDumpChangeOfChangedConfigsNewTimestampEqualMd5() { //mock change config query obj //1 timestamp-new&content-old - ConfigInfoWrapper configInfoWrapperNewForId1 = createConfigInfoWrapper(dataIdPrefix, 1, - startTime.getTime() + 2); + ConfigInfoWrapper configInfoWrapperNewForId1 = createConfigInfoWrapper(dataIdPrefix, 1, startTime.getTime() + 2); Mockito.when(configInfoPersistService.findConfigInfo(eq(dataIdPrefix + 1), eq("group" + 1), eq("tenant" + 1))) .thenReturn(configInfoWrapperNewForId1); dumpChangeConfigWorker.run(); //expect cache - Assert.assertEquals(startTime.getTime() + 2, - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getLastModifiedTs()); - Assert.assertEquals(MD5Utils.md5Hex(configInfoWrapperNewForId1.getContent(), "UTF-8"), - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getMd5Utf8()); + assertEquals(startTime.getTime() + 2, + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getLastModifiedTs()); + assertEquals(MD5Utils.md5Hex(configInfoWrapperNewForId1.getContent(), "UTF-8"), + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getMd5Utf8()); } @Test - public void testDumpChangeOfChangedConfigsOldTimestamp() { + void testDumpChangeOfChangedConfigsOldTimestamp() { PropertyUtil.setDumpChangeOn(true); dumpChangeConfigWorker.setPageSize(3); //mock delete first page @@ -247,9 +241,9 @@ public void testDumpChangeOfChangedConfigsOldTimestamp() { //pre set cache for id1 with old timestamp preSetCache(dataIdPrefix, 1, startTime.getTime() - 1); - Assert.assertEquals(startTime.getTime() - 1, - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getLastModifiedTs()); + assertEquals(startTime.getTime() - 1, + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getLastModifiedTs()); List firstChanged = new ArrayList<>(); firstChanged.add(createConfigInfoStateWrapper(dataIdPrefix, 1, startTime.getTime() - 2)); @@ -257,8 +251,7 @@ public void testDumpChangeOfChangedConfigsOldTimestamp() { //mock change config query obj //1 timestamp-new&content-new - ConfigInfoWrapper configInfoWrapperNewForId1 = createConfigInfoWrapper(dataIdPrefix, 1, - startTime.getTime() - 2); + ConfigInfoWrapper configInfoWrapperNewForId1 = createConfigInfoWrapper(dataIdPrefix, 1, startTime.getTime() - 2); configInfoWrapperNewForId1.setContent("content" + System.currentTimeMillis()); Mockito.when(configInfoPersistService.findConfigInfo(eq(dataIdPrefix + 1), eq("group" + 1), eq("tenant" + 1))) .thenReturn(configInfoWrapperNewForId1); @@ -266,17 +259,17 @@ public void testDumpChangeOfChangedConfigsOldTimestamp() { dumpChangeConfigWorker.run(); //expect cache to be cleared. - Assert.assertEquals(startTime.getTime() - 1, - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getLastModifiedTs()); - Assert.assertEquals(MD5Utils.md5Hex("content" + 1, "UTF-8"), - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getMd5Utf8()); + assertEquals(startTime.getTime() - 1, + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getLastModifiedTs()); + assertEquals(MD5Utils.md5Hex("content" + 1, "UTF-8"), + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getMd5Utf8()); } @Test - public void testDumpChangeOfChangedConfigsEqualsTimestampMd5Update() { + void testDumpChangeOfChangedConfigsEqualsTimestampMd5Update() { PropertyUtil.setDumpChangeOn(true); dumpChangeConfigWorker.setPageSize(3); //mock delete first page @@ -287,9 +280,9 @@ public void testDumpChangeOfChangedConfigsEqualsTimestampMd5Update() { //pre set cache for id1 with old timestamp preSetCache(dataIdPrefix, 1, startTime.getTime() - 1); - Assert.assertEquals(startTime.getTime() - 1, - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getLastModifiedTs()); + assertEquals(startTime.getTime() - 1, + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getLastModifiedTs()); List firstChanged = new ArrayList<>(); firstChanged.add(createConfigInfoStateWrapper(dataIdPrefix, 1, startTime.getTime() - 1)); @@ -297,8 +290,7 @@ public void testDumpChangeOfChangedConfigsEqualsTimestampMd5Update() { //mock change config query obj //1 timestamp-new&content-new - ConfigInfoWrapper configInfoWrapperNewForId1 = createConfigInfoWrapper(dataIdPrefix, 1, - startTime.getTime() - 1); + ConfigInfoWrapper configInfoWrapperNewForId1 = createConfigInfoWrapper(dataIdPrefix, 1, startTime.getTime() - 1); configInfoWrapperNewForId1.setContent("content" + System.currentTimeMillis()); Mockito.when(configInfoPersistService.findConfigInfo(eq(dataIdPrefix + 1), eq("group" + 1), eq("tenant" + 1))) .thenReturn(configInfoWrapperNewForId1); @@ -306,12 +298,12 @@ public void testDumpChangeOfChangedConfigsEqualsTimestampMd5Update() { dumpChangeConfigWorker.run(); //expect cache to be cleared. - Assert.assertEquals(startTime.getTime() - 1, - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getLastModifiedTs()); - Assert.assertEquals(MD5Utils.md5Hex(configInfoWrapperNewForId1.getContent(), "UTF-8"), - ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)) - .getConfigCache().getMd5Utf8()); + assertEquals(startTime.getTime() - 1, + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getLastModifiedTs()); + assertEquals(MD5Utils.md5Hex(configInfoWrapperNewForId1.getContent(), "UTF-8"), + ConfigCacheService.getContentCache(GroupKey.getKeyTenant(dataIdPrefix + 1, "group" + 1, "tenant" + 1)).getConfigCache() + .getMd5Utf8()); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpProcessorTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpProcessorTest.java index 56bb3dd2717..d01fc330d12 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpProcessorTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpProcessorTest.java @@ -35,25 +35,27 @@ import com.alibaba.nacos.persistence.datasource.DynamicDataSource; import com.alibaba.nacos.plugin.datasource.constants.CommonConstant; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.IOException; import java.lang.reflect.Field; import java.util.Arrays; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class DumpProcessorTest { +@ExtendWith(MockitoExtension.class) +class DumpProcessorTest { @Mock DynamicDataSource dynamicDataSource; @@ -78,21 +80,19 @@ public class DumpProcessorTest { MockedStatic envUtilMockedStatic; - @Before - public void init() throws Exception { + @BeforeEach + void init() throws Exception { dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); when(EnvUtil.getNacosHome()).thenReturn(System.getProperty("user.home")); - when(EnvUtil.getProperty(eq(CommonConstant.NACOS_PLUGIN_DATASOURCE_LOG), eq(Boolean.class), - eq(false))).thenReturn(false); + when(EnvUtil.getProperty(eq(CommonConstant.NACOS_PLUGIN_DATASOURCE_LOG), eq(Boolean.class), eq(false))).thenReturn(false); dynamicDataSourceMockedStatic.when(DynamicDataSource::getInstance).thenReturn(dynamicDataSource); when(dynamicDataSource.getDataSource()).thenReturn(dataSourceService); dumpService = new ExternalDumpService(configInfoPersistService, null, null, null, configInfoBetaPersistService, configInfoTagPersistService, null, null); - dumpProcessor = new DumpProcessor(configInfoPersistService, configInfoBetaPersistService, - configInfoTagPersistService); + dumpProcessor = new DumpProcessor(configInfoPersistService, configInfoBetaPersistService, configInfoTagPersistService); Field[] declaredFields = ConfigDiskServiceFactory.class.getDeclaredFields(); for (Field filed : declaredFields) { if (filed.getName().equals("configDiskService")) { @@ -107,8 +107,8 @@ protected ConfigDiskService createDiskService() { return new ConfigRocksDbDiskService(); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); ConfigDiskServiceFactory.getInstance().clearAll(); @@ -118,7 +118,7 @@ public void after() { } @Test - public void testDumpNormalAndRemove() throws IOException { + void testDumpNormalAndRemove() throws IOException { String dataId = "testDataId"; String group = "testGroup"; String tenant = "testTenant"; @@ -131,41 +131,39 @@ public void testDumpNormalAndRemove() throws IOException { configInfoWrapper.setContent(content); configInfoWrapper.setLastModified(time); - Mockito.when(configInfoPersistService.findConfigInfo(eq(dataId), eq(group), eq(tenant))) - .thenReturn(configInfoWrapper); + Mockito.when(configInfoPersistService.findConfigInfo(eq(dataId), eq(group), eq(tenant))).thenReturn(configInfoWrapper); String handlerIp = "127.0.0.1"; long lastModified = System.currentTimeMillis(); - DumpTask dumpTask = new DumpTask(GroupKey2.getKey(dataId, group, tenant), false, false, false, null, - lastModified, handlerIp); + DumpTask dumpTask = new DumpTask(GroupKey2.getKey(dataId, group, tenant), false, false, false, null, lastModified, handlerIp); boolean process = dumpProcessor.process(dumpTask); - Assert.assertTrue(process); + assertTrue(process); //Check cache CacheItem contentCache = ConfigCacheService.getContentCache(GroupKey2.getKey(dataId, group, tenant)); - Assert.assertEquals(MD5Utils.md5Hex(content, "UTF-8"), contentCache.getConfigCache().getMd5Utf8()); - Assert.assertEquals(time, contentCache.getConfigCache().getLastModifiedTs()); + assertEquals(MD5Utils.md5Hex(content, "UTF-8"), contentCache.getConfigCache().getMd5Utf8()); + assertEquals(time, contentCache.getConfigCache().getLastModifiedTs()); //check disk String contentFromDisk = ConfigDiskServiceFactory.getInstance().getContent(dataId, group, tenant); - Assert.assertEquals(content, contentFromDisk); + assertEquals(content, contentFromDisk); // remove Mockito.when(configInfoPersistService.findConfigInfo(eq(dataId), eq(group), eq(tenant))).thenReturn(null); boolean processRemove = dumpProcessor.process(dumpTask); - Assert.assertTrue(processRemove); + assertTrue(processRemove); //Check cache CacheItem contentCacheAfterRemove = ConfigCacheService.getContentCache(GroupKey2.getKey(dataId, group, tenant)); - Assert.assertTrue(contentCacheAfterRemove == null); + assertTrue(contentCacheAfterRemove == null); //check disk String contentFromDiskAfterRemove = ConfigDiskServiceFactory.getInstance().getContent(dataId, group, tenant); - Assert.assertNull(contentFromDiskAfterRemove); + assertNull(contentFromDiskAfterRemove); } @Test - public void testDumpBetaAndRemove() throws IOException { + void testDumpBetaAndRemove() throws IOException { String dataId = "testDataIdBeta"; String group = "testGroup"; String tenant = "testTenant"; @@ -180,43 +178,39 @@ public void testDumpBetaAndRemove() throws IOException { String betaIps = "127.0.0.1123,127.0.0.11"; configInfoWrapper.setBetaIps(betaIps); - Mockito.when(configInfoBetaPersistService.findConfigInfo4Beta(eq(dataId), eq(group), eq(tenant))) - .thenReturn(configInfoWrapper); + Mockito.when(configInfoBetaPersistService.findConfigInfo4Beta(eq(dataId), eq(group), eq(tenant))).thenReturn(configInfoWrapper); String handlerIp = "127.0.0.1"; long lastModified = System.currentTimeMillis(); - DumpTask dumpTask = new DumpTask(GroupKey2.getKey(dataId, group, tenant), true, false, false, null, - lastModified, handlerIp); + DumpTask dumpTask = new DumpTask(GroupKey2.getKey(dataId, group, tenant), true, false, false, null, lastModified, handlerIp); boolean process = dumpProcessor.process(dumpTask); - Assert.assertTrue(process); + assertTrue(process); //Check cache CacheItem contentCache = ConfigCacheService.getContentCache(GroupKey2.getKey(dataId, group, tenant)); - Assert.assertEquals(MD5Utils.md5Hex(content, "UTF-8"), contentCache.getConfigCacheBeta().getMd5Utf8()); - Assert.assertEquals(time, contentCache.getConfigCacheBeta().getLastModifiedTs()); - Assert.assertTrue(contentCache.ips4Beta.containsAll(Arrays.asList(betaIps.split(",")))); + assertEquals(MD5Utils.md5Hex(content, "UTF-8"), contentCache.getConfigCacheBeta().getMd5Utf8()); + assertEquals(time, contentCache.getConfigCacheBeta().getLastModifiedTs()); + assertTrue(contentCache.ips4Beta.containsAll(Arrays.asList(betaIps.split(",")))); //check disk String contentFromDisk = ConfigDiskServiceFactory.getInstance().getBetaContent(dataId, group, tenant); - Assert.assertEquals(content, contentFromDisk); + assertEquals(content, contentFromDisk); // remove - Mockito.when(configInfoBetaPersistService.findConfigInfo4Beta(eq(dataId), eq(group), eq(tenant))) - .thenReturn(null); + Mockito.when(configInfoBetaPersistService.findConfigInfo4Beta(eq(dataId), eq(group), eq(tenant))).thenReturn(null); boolean processRemove = dumpProcessor.process(dumpTask); - Assert.assertTrue(processRemove); + assertTrue(processRemove); //Check cache CacheItem contentCacheAfterRemove = ConfigCacheService.getContentCache(GroupKey2.getKey(dataId, group, tenant)); - Assert.assertTrue(contentCacheAfterRemove == null || contentCacheAfterRemove.getConfigCacheBeta() == null); + assertTrue(contentCacheAfterRemove == null || contentCacheAfterRemove.getConfigCacheBeta() == null); //check disk - String contentFromDiskAfterRemove = ConfigDiskServiceFactory.getInstance() - .getBetaContent(dataId, group, tenant); - Assert.assertNull(contentFromDiskAfterRemove); + String contentFromDiskAfterRemove = ConfigDiskServiceFactory.getInstance().getBetaContent(dataId, group, tenant); + assertNull(contentFromDiskAfterRemove); } @Test - public void testDumpTagAndRemove() throws IOException { + void testDumpTagAndRemove() throws IOException { String dataId = "testDataIdBeta"; String group = "testGroup"; String tenant = "testTenant"; @@ -235,33 +229,30 @@ public void testDumpTagAndRemove() throws IOException { String handlerIp = "127.0.0.1"; long lastModified = System.currentTimeMillis(); - DumpTask dumpTask = new DumpTask(GroupKey2.getKey(dataId, group, tenant), false, false, true, tag, lastModified, - handlerIp); + DumpTask dumpTask = new DumpTask(GroupKey2.getKey(dataId, group, tenant), false, false, true, tag, lastModified, handlerIp); boolean process = dumpProcessor.process(dumpTask); - Assert.assertTrue(process); + assertTrue(process); //Check cache CacheItem contentCache = ConfigCacheService.getContentCache(GroupKey2.getKey(dataId, group, tenant)); - Assert.assertEquals(MD5Utils.md5Hex(content, "UTF-8"), contentCache.getConfigCacheTags().get(tag).getMd5Utf8()); - Assert.assertEquals(time, contentCache.getConfigCacheTags().get(tag).getLastModifiedTs()); + assertEquals(MD5Utils.md5Hex(content, "UTF-8"), contentCache.getConfigCacheTags().get(tag).getMd5Utf8()); + assertEquals(time, contentCache.getConfigCacheTags().get(tag).getLastModifiedTs()); //check disk String contentFromDisk = ConfigDiskServiceFactory.getInstance().getTagContent(dataId, group, tenant, tag); - Assert.assertEquals(content, contentFromDisk); + assertEquals(content, contentFromDisk); // remove - Mockito.when(configInfoTagPersistService.findConfigInfo4Tag(eq(dataId), eq(group), eq(tenant), eq(tag))) - .thenReturn(null); + Mockito.when(configInfoTagPersistService.findConfigInfo4Tag(eq(dataId), eq(group), eq(tenant), eq(tag))).thenReturn(null); boolean processRemove = dumpProcessor.process(dumpTask); - Assert.assertTrue(processRemove); + assertTrue(processRemove); //Check cache CacheItem contentCacheAfterRemove = ConfigCacheService.getContentCache(GroupKey2.getKey(dataId, group, tenant)); - Assert.assertTrue(contentCacheAfterRemove == null || contentCache.getConfigCacheTags() == null + assertTrue(contentCacheAfterRemove == null || contentCache.getConfigCacheTags() == null || contentCache.getConfigCacheTags().get(tag) == null); //check disk - String contentFromDiskAfterRemove = ConfigDiskServiceFactory.getInstance() - .getTagContent(dataId, group, tenant, tag); - Assert.assertNull(contentFromDiskAfterRemove); + String contentFromDiskAfterRemove = ConfigDiskServiceFactory.getInstance().getTagContent(dataId, group, tenant, tag); + assertNull(contentFromDiskAfterRemove); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpProcessorUserRwaDiskTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpProcessorUserRwaDiskTest.java index 0ae123012fc..27a3bf09fc9 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpProcessorUserRwaDiskTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpProcessorUserRwaDiskTest.java @@ -18,18 +18,18 @@ import com.alibaba.nacos.config.server.service.dump.disk.ConfigDiskService; import com.alibaba.nacos.config.server.service.dump.disk.ConfigRawDiskService; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.IOException; -@RunWith(MockitoJUnitRunner.class) -public class DumpProcessorUserRwaDiskTest extends DumpProcessorTest { +@ExtendWith(MockitoExtension.class) +class DumpProcessorUserRwaDiskTest extends DumpProcessorTest { - @Before + @BeforeEach public void init() throws Exception { super.init(); } @@ -39,7 +39,7 @@ protected ConfigDiskService createDiskService() { return new ConfigRawDiskService(); } - @After + @AfterEach public void after() { super.after(); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpServiceTest.java index 717cee46102..6bd463b51f4 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpServiceTest.java @@ -34,14 +34,14 @@ import com.alibaba.nacos.persistence.datasource.DataSourceService; import com.alibaba.nacos.persistence.datasource.DynamicDataSource; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.util.ReflectionTestUtils; import java.sql.Timestamp; @@ -57,8 +57,12 @@ import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; -@RunWith(SpringJUnit4ClassRunner.class) -public class DumpServiceTest { +@ExtendWith(SpringExtension.class) +class DumpServiceTest { + + private static final String BETA_TABLE_NAME = "config_info_beta"; + + private static final String TAG_TABLE_NAME = "config_info_tag"; @Mock ConfigInfoPersistService configInfoPersistService; @@ -85,26 +89,22 @@ public class DumpServiceTest { @Mock ServerMemberManager memberManager; - @Mock - private DataSourceService dataSourceService; - MockedStatic envUtilMockedStatic; MockedStatic configExecutorMocked; MockedStatic propertyUtilMockedStatic; + @Mock + private DataSourceService dataSourceService; + private DumpService dumpService; @Mock private TaskManager dumpTaskMgr; - private static final String BETA_TABLE_NAME = "config_info_beta"; - - private static final String TAG_TABLE_NAME = "config_info_tag"; - - @Before - public void setUp() { + @BeforeEach + void setUp() { envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); propertyUtilMockedStatic = Mockito.mockStatic(PropertyUtil.class); propertyUtilMockedStatic.when(() -> PropertyUtil.getAllDumpPageSize()).thenReturn(100); @@ -112,26 +112,24 @@ public void setUp() { ReflectionTestUtils.setField(DynamicDataSource.getInstance(), "localDataSourceService", dataSourceService); ReflectionTestUtils.setField(DynamicDataSource.getInstance(), "basicDataSourceService", dataSourceService); - dumpService = new ExternalDumpService(configInfoPersistService, namespacePersistService, - historyConfigInfoPersistService, configInfoAggrPersistService, configInfoBetaPersistService, - configInfoTagPersistService, mergeDatumService, memberManager); + dumpService = new ExternalDumpService(configInfoPersistService, namespacePersistService, historyConfigInfoPersistService, + configInfoAggrPersistService, configInfoBetaPersistService, configInfoTagPersistService, mergeDatumService, memberManager); configExecutorMocked = Mockito.mockStatic(ConfigExecutor.class); } - @After - public void after() { + @AfterEach + void after() { envUtilMockedStatic.close(); configExecutorMocked.close(); propertyUtilMockedStatic.close(); } @Test - public void dumpRequest() throws Throwable { + void dumpRequest() throws Throwable { String dataId = "12345667dataId"; String group = "234445group"; - DumpRequest dumpRequest = DumpRequest.create(dataId, group, "testtenant", System.currentTimeMillis(), - "127.0.0.1"); + DumpRequest dumpRequest = DumpRequest.create(dataId, group, "testtenant", System.currentTimeMillis(), "127.0.0.1"); // TaskManager dumpTaskMgr; ReflectionTestUtils.setField(dumpService, "dumpTaskMgr", dumpTaskMgr); Mockito.doNothing().when(dumpTaskMgr).addTask(any(), any()); @@ -141,30 +139,26 @@ public void dumpRequest() throws Throwable { dumpRequest.setBeta(true); dumpService.dump(dumpRequest); Mockito.verify(dumpTaskMgr, times(1)) - .addTask(eq(GroupKey.getKeyTenant(dataId, group, dumpRequest.getTenant()) + "+beta"), - any(DumpTask.class)); + .addTask(eq(GroupKey.getKeyTenant(dataId, group, dumpRequest.getTenant()) + "+beta"), any(DumpTask.class)); dumpRequest.setBeta(false); dumpRequest.setBatch(true); dumpService.dump(dumpRequest); Mockito.verify(dumpTaskMgr, times(1)) - .addTask(eq(GroupKey.getKeyTenant(dataId, group, dumpRequest.getTenant()) + "+batch"), - any(DumpTask.class)); + .addTask(eq(GroupKey.getKeyTenant(dataId, group, dumpRequest.getTenant()) + "+batch"), any(DumpTask.class)); dumpRequest.setBatch(false); dumpRequest.setTag("testTag111"); dumpService.dump(dumpRequest); - Mockito.verify(dumpTaskMgr, times(1)).addTask( - eq(GroupKey.getKeyTenant(dataId, group, dumpRequest.getTenant()) + "+tag+" + dumpRequest.getTag()), - any(DumpTask.class)); + Mockito.verify(dumpTaskMgr, times(1)) + .addTask(eq(GroupKey.getKeyTenant(dataId, group, dumpRequest.getTenant()) + "+tag+" + dumpRequest.getTag()), + any(DumpTask.class)); } @Test - public void dumpOperate() throws Throwable { - configExecutorMocked.when( - () -> ConfigExecutor.scheduleConfigTask(any(Runnable.class), anyInt(), anyInt(), any(TimeUnit.class))) + void dumpOperate() throws Throwable { + configExecutorMocked.when(() -> ConfigExecutor.scheduleConfigTask(any(Runnable.class), anyInt(), anyInt(), any(TimeUnit.class))) .thenAnswer(invocation -> null); - configExecutorMocked.when( - () -> ConfigExecutor.scheduleConfigChangeTask(any(Runnable.class), anyInt(), any(TimeUnit.class))) + configExecutorMocked.when(() -> ConfigExecutor.scheduleConfigChangeTask(any(Runnable.class), anyInt(), any(TimeUnit.class))) .thenAnswer(invocation -> null); Mockito.when(namespacePersistService.isExistTable(BETA_TABLE_NAME)).thenReturn(true); Mockito.when(namespacePersistService.isExistTable(TAG_TABLE_NAME)).thenReturn(true); @@ -199,24 +193,23 @@ public void dumpOperate() throws Throwable { // expect dump formal,beta,tag,history clear,config change task to be scheduled. // expect config clear history task be scheduled. configExecutorMocked.verify( - () -> ConfigExecutor.scheduleConfigTask(any(DumpService.DumpAllProcessorRunner.class), anyLong(), - anyLong(), eq(TimeUnit.MINUTES)), times(1)); - configExecutorMocked.verify( - () -> ConfigExecutor.scheduleConfigTask(any(DumpService.DumpAllBetaProcessorRunner.class), anyLong(), - anyLong(), eq(TimeUnit.MINUTES)), times(1)); - configExecutorMocked.verify( - () -> ConfigExecutor.scheduleConfigTask(any(DumpService.DumpAllTagProcessorRunner.class), anyLong(), - anyLong(), eq(TimeUnit.MINUTES)), times(1)); + () -> ConfigExecutor.scheduleConfigTask(any(DumpService.DumpAllProcessorRunner.class), anyLong(), anyLong(), + eq(TimeUnit.MINUTES)), times(1)); configExecutorMocked.verify( - () -> ConfigExecutor.scheduleConfigChangeTask(any(DumpChangeConfigWorker.class), anyLong(), - eq(TimeUnit.MILLISECONDS)), times(1)); + () -> ConfigExecutor.scheduleConfigTask(any(DumpService.DumpAllBetaProcessorRunner.class), anyLong(), anyLong(), + eq(TimeUnit.MINUTES)), times(1)); configExecutorMocked.verify( - () -> ConfigExecutor.scheduleConfigTask(any(DumpService.ConfigHistoryClear.class), anyLong(), anyLong(), + () -> ConfigExecutor.scheduleConfigTask(any(DumpService.DumpAllTagProcessorRunner.class), anyLong(), anyLong(), eq(TimeUnit.MINUTES)), times(1)); + configExecutorMocked.verify( + () -> ConfigExecutor.scheduleConfigChangeTask(any(DumpChangeConfigWorker.class), anyLong(), eq(TimeUnit.MILLISECONDS)), + times(1)); + configExecutorMocked.verify(() -> ConfigExecutor.scheduleConfigTask(any(DumpService.ConfigHistoryClear.class), anyLong(), anyLong(), + eq(TimeUnit.MINUTES)), times(1)); } @Test - public void clearHistory() { + void clearHistory() { envUtilMockedStatic.when(() -> EnvUtil.getProperty(eq("nacos.config.retention.days"))).thenReturn("10"); Mockito.when(memberManager.isFirstIp()).thenReturn(true); dumpService.clearConfigHistory(); @@ -224,16 +217,15 @@ public void clearHistory() { } @Test - public void testHandleConfigDataChange() { - ConfigDataChangeEvent configDataChangeEvent = new ConfigDataChangeEvent("dataId", "group", - System.currentTimeMillis()); + void testHandleConfigDataChange() { + ConfigDataChangeEvent configDataChangeEvent = new ConfigDataChangeEvent("dataId", "group", System.currentTimeMillis()); ReflectionTestUtils.setField(dumpService, "dumpTaskMgr", dumpTaskMgr); Mockito.doNothing().when(dumpTaskMgr).addTask(any(), any()); dumpService.handleConfigDataChange(configDataChangeEvent); - Mockito.verify(dumpTaskMgr, times(1)).addTask( - eq(GroupKey.getKeyTenant(configDataChangeEvent.dataId, configDataChangeEvent.group, - configDataChangeEvent.tenant)), any(DumpTask.class)); + Mockito.verify(dumpTaskMgr, times(1)) + .addTask(eq(GroupKey.getKeyTenant(configDataChangeEvent.dataId, configDataChangeEvent.group, configDataChangeEvent.tenant)), + any(DumpTask.class)); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigDiskServiceFactoryTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigDiskServiceFactoryTest.java index f54d928f8f6..5289fa01f17 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigDiskServiceFactoryTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigDiskServiceFactoryTest.java @@ -16,47 +16,48 @@ package com.alibaba.nacos.config.server.service.dump.disk; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; -@RunWith(MockitoJUnitRunner.class) -public class ConfigDiskServiceFactoryTest { +import static org.junit.jupiter.api.Assertions.assertTrue; + +@ExtendWith(MockitoExtension.class) +class ConfigDiskServiceFactoryTest { - @Before - public void before() throws Exception { + @BeforeEach + void before() throws Exception { clearDiskInstance(); } - @After - public void after() { + @AfterEach + void after() { } @Test - public void getRawDiskInstance() { + void getRawDiskInstance() { System.setProperty("config_disk_type", "rawdisk"); ConfigDiskService instance = ConfigDiskServiceFactory.getInstance(); - Assert.assertTrue(instance instanceof ConfigRawDiskService); + assertTrue(instance instanceof ConfigRawDiskService); } @Test - public void getRockDbDiskInstance() { + void getRockDbDiskInstance() { System.setProperty("config_disk_type", "rocksdb"); ConfigDiskService instance = ConfigDiskServiceFactory.getInstance(); - Assert.assertTrue(instance instanceof ConfigRocksDbDiskService); + assertTrue(instance instanceof ConfigRocksDbDiskService); } @Test - public void getDefaultRawDiskInstance() { + void getDefaultRawDiskInstance() { System.setProperty("config_disk_type", "123"); ConfigDiskService instance = ConfigDiskServiceFactory.getInstance(); - Assert.assertTrue(instance instanceof ConfigRawDiskService); + assertTrue(instance instanceof ConfigRawDiskService); } private void clearDiskInstance() throws Exception { diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskServiceTest.java index e3b64a9e066..a0cce0f95f6 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/disk/ConfigRawDiskServiceTest.java @@ -16,8 +16,8 @@ package com.alibaba.nacos.config.server.service.dump.disk; -import junit.framework.TestCase; -import org.junit.Before; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.io.File; import java.lang.reflect.InvocationTargetException; @@ -25,12 +25,14 @@ import java.nio.file.Path; import java.nio.file.Paths; -public class ConfigRawDiskServiceTest extends TestCase { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ConfigRawDiskServiceTest { private String cachedOsName; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { cachedOsName = System.getProperty("os.name"); } @@ -41,7 +43,8 @@ private boolean isWindows() { /** * 测试获取文件路径. */ - public void testTargetFile() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { + @Test + void testTargetFile() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Method method = ConfigRawDiskService.class.getDeclaredMethod("targetFile", String.class, String.class, String.class); method.setAccessible(true); File result = (File) method.invoke(null, "aaaa?dsaknkf", "aaaa*dsaknkf", "aaaa:dsaknkf"); @@ -61,7 +64,8 @@ public void testTargetFile() throws NoSuchMethodException, IllegalAccessExceptio /** * 测试获取beta文件路径. */ - public void testTargetBetaFile() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { + @Test + void testTargetBetaFile() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Method method = ConfigRawDiskService.class.getDeclaredMethod("targetBetaFile", String.class, String.class, String.class); method.setAccessible(true); File result = (File) method.invoke(null, "aaaa?dsaknkf", "aaaa*dsaknkf", "aaaa:dsaknkf"); @@ -81,12 +85,15 @@ public void testTargetBetaFile() throws NoSuchMethodException, IllegalAccessExce /** * 测试获取tag文件路径. - * @throws NoSuchMethodException 方法不存在异常 - * @throws IllegalAccessException 非法访问异常 + * + * @throws NoSuchMethodException 方法不存在异常 + * @throws IllegalAccessException 非法访问异常 * @throws InvocationTargetException 目标异常 */ - public void testTargetTagFile() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { - Method method = ConfigRawDiskService.class.getDeclaredMethod("targetTagFile", String.class, String.class, String.class, String.class); + @Test + void testTargetTagFile() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { + Method method = ConfigRawDiskService.class.getDeclaredMethod("targetTagFile", String.class, String.class, String.class, + String.class); method.setAccessible(true); File result = (File) method.invoke(null, "aaaa?dsaknkf", "aaaa*dsaknkf", "aaaa:dsaknkf", "aaaadsaknkf"); // 分解路径 diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/processor/DumpAllProcessorTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/processor/DumpAllProcessorTest.java index 392e4015bc4..206d950adcf 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/processor/DumpAllProcessorTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/processor/DumpAllProcessorTest.java @@ -33,26 +33,28 @@ import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.plugin.datasource.constants.CommonConstant; import com.alibaba.nacos.sys.env.EnvUtil; -import junit.framework.TestCase; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.beans.BeanUtils; import java.util.Arrays; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class DumpAllProcessorTest extends TestCase { +@ExtendWith(MockitoExtension.class) +class DumpAllProcessorTest { + + private static int newConfigCount = 1; @Mock DynamicDataSource dynamicDataSource; @@ -79,14 +81,13 @@ public class DumpAllProcessorTest extends TestCase { private String mockMem = "tmpmocklimitfile.txt"; - @Before - public void init() throws Exception { + @BeforeEach + void init() throws Exception { dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); dumpAllProcessor = new DumpAllProcessor(configInfoPersistService); when(EnvUtil.getNacosHome()).thenReturn(System.getProperty("user.home")); - when(EnvUtil.getProperty(eq(CommonConstant.NACOS_PLUGIN_DATASOURCE_LOG), eq(Boolean.class), - eq(false))).thenReturn(false); + when(EnvUtil.getProperty(eq(CommonConstant.NACOS_PLUGIN_DATASOURCE_LOG), eq(Boolean.class), eq(false))).thenReturn(false); dynamicDataSourceMockedStatic.when(DynamicDataSource::getInstance).thenReturn(dynamicDataSource); when(dynamicDataSource.getDataSource()).thenReturn(dataSourceService); @@ -95,18 +96,16 @@ public void init() throws Exception { configInfoTagPersistService, null, null); dumpAllProcessor = new DumpAllProcessor(configInfoPersistService); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(eq("memory_limit_file_path"), - eq("/sys/fs/cgroup/memory/memory.limit_in_bytes"))).thenReturn(mockMem); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(eq("memory_limit_file_path"), eq("/sys/fs/cgroup/memory/memory.limit_in_bytes"))) + .thenReturn(mockMem); } - @After - public void after() throws Exception { + @AfterEach + void after() throws Exception { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); } - private static int newConfigCount = 1; - private ConfigInfoWrapper createNewConfig(int id) { ConfigInfoWrapper configInfoWrapper = new ConfigInfoWrapper(); String dataId = "dataIdTime" + newConfigCount; @@ -123,7 +122,7 @@ private ConfigInfoWrapper createNewConfig(int id) { } @Test - public void testDumpAllOnStartUp() throws Exception { + void testDumpAllOnStartUp() throws Exception { ConfigInfoWrapper configInfoWrapper1 = createNewConfig(1); ConfigInfoWrapper configInfoWrapper2 = createNewConfig(2); long timestamp = System.currentTimeMillis(); @@ -137,8 +136,7 @@ public void testDumpAllOnStartUp() throws Exception { page.setPageItems(list); Mockito.when(configInfoPersistService.findConfigMaxId()).thenReturn(2L); - Mockito.when(configInfoPersistService.findAllConfigInfoFragment(0, PropertyUtil.getAllDumpPageSize(), true)) - .thenReturn(page); + Mockito.when(configInfoPersistService.findAllConfigInfoFragment(0, PropertyUtil.getAllDumpPageSize(), true)).thenReturn(page); // For config 1, assign a latter time, to make sure that it would be updated. // For config 2, assign an earlier time, to make sure that it is not be updated. @@ -147,52 +145,44 @@ public void testDumpAllOnStartUp() throws Exception { long latterTimestamp = timestamp + 999; long earlierTimestamp = timestamp - 999; String encryptedDataKey = "testEncryptedDataKey"; - ConfigCacheService.dumpWithMd5(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), - configInfoWrapper1.getTenant(), configInfoWrapper1.getContent(), md51, latterTimestamp, "json", - encryptedDataKey); - ConfigCacheService.dumpWithMd5(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), - configInfoWrapper2.getTenant(), configInfoWrapper2.getContent(), md52, earlierTimestamp, "json", - encryptedDataKey); + ConfigCacheService.dumpWithMd5(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), configInfoWrapper1.getTenant(), + configInfoWrapper1.getContent(), md51, latterTimestamp, "json", encryptedDataKey); + ConfigCacheService.dumpWithMd5(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), configInfoWrapper2.getTenant(), + configInfoWrapper2.getContent(), md52, earlierTimestamp, "json", encryptedDataKey); DumpAllTask dumpAllTask = new DumpAllTask(true); boolean process = dumpAllProcessor.process(dumpAllTask); - Assert.assertTrue(process); + assertTrue(process); //Check cache CacheItem contentCache1 = ConfigCacheService.getContentCache( - GroupKey2.getKey(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), - configInfoWrapper1.getTenant())); - Assert.assertEquals(md51, contentCache1.getConfigCache().getMd5Utf8()); + GroupKey2.getKey(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), configInfoWrapper1.getTenant())); + assertEquals(md51, contentCache1.getConfigCache().getMd5Utf8()); // check if config1 is updated - Assert.assertTrue(timestamp < contentCache1.getConfigCache().getLastModifiedTs()); + assertTrue(timestamp < contentCache1.getConfigCache().getLastModifiedTs()); //check disk String contentFromDisk1 = ConfigDiskServiceFactory.getInstance() - .getContent(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), - configInfoWrapper1.getTenant()); - Assert.assertEquals(configInfoWrapper1.getContent(), contentFromDisk1); + .getContent(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), configInfoWrapper1.getTenant()); + assertEquals(configInfoWrapper1.getContent(), contentFromDisk1); //Check cache CacheItem contentCache2 = ConfigCacheService.getContentCache( - GroupKey2.getKey(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), - configInfoWrapper2.getTenant())); - Assert.assertEquals(MD5Utils.md5Hex(configInfoWrapper2.getContent(), "UTF-8"), - contentCache2.getConfigCache().getMd5Utf8()); + GroupKey2.getKey(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), configInfoWrapper2.getTenant())); + assertEquals(MD5Utils.md5Hex(configInfoWrapper2.getContent(), "UTF-8"), contentCache2.getConfigCache().getMd5Utf8()); // check if config2 is updated - Assert.assertEquals(timestamp, contentCache2.getConfigCache().getLastModifiedTs()); + assertEquals(timestamp, contentCache2.getConfigCache().getLastModifiedTs()); //check disk String contentFromDisk2 = ConfigDiskServiceFactory.getInstance() - .getContent(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), - configInfoWrapper2.getTenant()); - Assert.assertEquals(configInfoWrapper2.getContent(), contentFromDisk2); + .getContent(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), configInfoWrapper2.getTenant()); + assertEquals(configInfoWrapper2.getContent(), contentFromDisk2); } /** * test dump all for all check task. - * */ @Test - public void testDumpAllOnCheckAll() throws Exception { + void testDumpAllOnCheckAll() throws Exception { ConfigInfoWrapper configInfoWrapper1 = createNewConfig(1); ConfigInfoWrapper configInfoWrapper2 = createNewConfig(2); long timestamp = System.currentTimeMillis(); @@ -206,22 +196,19 @@ public void testDumpAllOnCheckAll() throws Exception { page.setPageItems(list); Mockito.when(configInfoPersistService.findConfigMaxId()).thenReturn(2L); - Mockito.when(configInfoPersistService.findAllConfigInfoFragment(0, PropertyUtil.getAllDumpPageSize(), false)) - .thenReturn(page); + Mockito.when(configInfoPersistService.findAllConfigInfoFragment(0, PropertyUtil.getAllDumpPageSize(), false)).thenReturn(page); ConfigInfoWrapper configInfoWrapperSingle1 = new ConfigInfoWrapper(); BeanUtils.copyProperties(configInfoWrapper1, configInfoWrapperSingle1); configInfoWrapperSingle1.setContent("content123456"); - Mockito.when( - configInfoPersistService.findConfigInfo(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), - configInfoWrapper1.getTenant())).thenReturn(configInfoWrapperSingle1); + Mockito.when(configInfoPersistService.findConfigInfo(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), + configInfoWrapper1.getTenant())).thenReturn(configInfoWrapperSingle1); ConfigInfoWrapper configInfoWrapperSingle2 = new ConfigInfoWrapper(); BeanUtils.copyProperties(configInfoWrapper2, configInfoWrapperSingle2); configInfoWrapperSingle2.setContent("content123456222"); - Mockito.when( - configInfoPersistService.findConfigInfo(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), - configInfoWrapper2.getTenant())).thenReturn(configInfoWrapperSingle2); + Mockito.when(configInfoPersistService.findConfigInfo(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), + configInfoWrapper2.getTenant())).thenReturn(configInfoWrapperSingle2); // For config 1, assign a latter time, to make sure that it would not be updated. // For config 2, assign an earlier time, to make sure that it would be updated. @@ -230,44 +217,37 @@ public void testDumpAllOnCheckAll() throws Exception { long latterTimestamp = timestamp + 999; long earlierTimestamp = timestamp - 999; String encryptedDataKey = "testEncryptedDataKey"; - ConfigCacheService.dumpWithMd5(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), - configInfoWrapper1.getTenant(), configInfoWrapper1.getContent(), md51, latterTimestamp, "json", - encryptedDataKey); - ConfigCacheService.dumpWithMd5(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), - configInfoWrapper2.getTenant(), configInfoWrapper2.getContent(), md52, earlierTimestamp, "json", - encryptedDataKey); + ConfigCacheService.dumpWithMd5(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), configInfoWrapper1.getTenant(), + configInfoWrapper1.getContent(), md51, latterTimestamp, "json", encryptedDataKey); + ConfigCacheService.dumpWithMd5(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), configInfoWrapper2.getTenant(), + configInfoWrapper2.getContent(), md52, earlierTimestamp, "json", encryptedDataKey); DumpAllTask dumpAllTask = new DumpAllTask(false); boolean process = dumpAllProcessor.process(dumpAllTask); - Assert.assertTrue(process); + assertTrue(process); //Check cache CacheItem contentCache1 = ConfigCacheService.getContentCache( - GroupKey2.getKey(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), - configInfoWrapper1.getTenant())); + GroupKey2.getKey(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), configInfoWrapper1.getTenant())); // check if config1 is not updated - Assert.assertEquals(md51, contentCache1.getConfigCache().getMd5Utf8()); - Assert.assertEquals(latterTimestamp, contentCache1.getConfigCache().getLastModifiedTs()); + assertEquals(md51, contentCache1.getConfigCache().getMd5Utf8()); + assertEquals(latterTimestamp, contentCache1.getConfigCache().getLastModifiedTs()); //check disk String contentFromDisk1 = ConfigDiskServiceFactory.getInstance() - .getContent(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), - configInfoWrapper1.getTenant()); - Assert.assertEquals(configInfoWrapper1.getContent(), contentFromDisk1); + .getContent(configInfoWrapper1.getDataId(), configInfoWrapper1.getGroup(), configInfoWrapper1.getTenant()); + assertEquals(configInfoWrapper1.getContent(), contentFromDisk1); //Check cache CacheItem contentCache2 = ConfigCacheService.getContentCache( - GroupKey2.getKey(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), - configInfoWrapper2.getTenant())); + GroupKey2.getKey(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), configInfoWrapper2.getTenant())); // check if config2 is updated - Assert.assertEquals(MD5Utils.md5Hex(configInfoWrapperSingle2.getContent(), "UTF-8"), - contentCache2.getConfigCache().getMd5Utf8()); - Assert.assertEquals(configInfoWrapper2.getLastModified(), contentCache2.getConfigCache().getLastModifiedTs()); + assertEquals(MD5Utils.md5Hex(configInfoWrapperSingle2.getContent(), "UTF-8"), contentCache2.getConfigCache().getMd5Utf8()); + assertEquals(configInfoWrapper2.getLastModified(), contentCache2.getConfigCache().getLastModifiedTs()); //check disk String contentFromDisk2 = ConfigDiskServiceFactory.getInstance() - .getContent(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), - configInfoWrapper2.getTenant()); - Assert.assertEquals(configInfoWrapperSingle2.getContent(), contentFromDisk2); + .getContent(configInfoWrapper2.getDataId(), configInfoWrapper2.getGroup(), configInfoWrapper2.getTenant()); + assertEquals(configInfoWrapperSingle2.getContent(), contentFromDisk2); } - + } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/merge/MergeDatumServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/merge/MergeDatumServiceTest.java index 4cc30a0431f..f2eeeb570d4 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/merge/MergeDatumServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/merge/MergeDatumServiceTest.java @@ -30,21 +30,21 @@ import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.sys.env.EnvUtil; import com.alibaba.nacos.sys.utils.ApplicationUtils; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.util.ReflectionTestUtils; import java.util.ArrayList; import java.util.List; import static com.alibaba.nacos.persistence.constants.PersistenceConstant.CONFIG_MODEL_RAFT_GROUP; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; @@ -52,8 +52,8 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) -public class MergeDatumServiceTest { +@ExtendWith(SpringExtension.class) +class MergeDatumServiceTest { @Mock ConfigInfoPersistService configInfoPersistService; @@ -67,37 +67,35 @@ public class MergeDatumServiceTest { @Mock ProtocolManager protocolManager; - @Mock - private DataSourceService dataSourceService; - MockedStatic envUtilMockedStatic; MockedStatic applicationUtilsMockedStaticc; + @Mock + private DataSourceService dataSourceService; + private MergeDatumService mergeDatumService; - @Before - public void setUp() { + @BeforeEach + void setUp() { envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); applicationUtilsMockedStaticc = Mockito.mockStatic(ApplicationUtils.class); - applicationUtilsMockedStaticc.when(() -> ApplicationUtils.getBean(eq(ProtocolManager.class))) - .thenReturn(protocolManager); + applicationUtilsMockedStaticc.when(() -> ApplicationUtils.getBean(eq(ProtocolManager.class))).thenReturn(protocolManager); ReflectionTestUtils.setField(DynamicDataSource.getInstance(), "localDataSourceService", dataSourceService); ReflectionTestUtils.setField(DynamicDataSource.getInstance(), "basicDataSourceService", dataSourceService); - mergeDatumService = new MergeDatumService(configInfoPersistService, configInfoAggrPersistService, - configInfoTagPersistService); + mergeDatumService = new MergeDatumService(configInfoPersistService, configInfoAggrPersistService, configInfoTagPersistService); } - @After - public void after() { + @AfterEach + void after() { envUtilMockedStatic.close(); applicationUtilsMockedStaticc.close(); } @Test - public void testSplitList() { + void testSplitList() { String dataId = "dataID"; int count = 5; List configList = new ArrayList<>(); @@ -119,11 +117,11 @@ public void testSplitList() { for (int j = 0; j < indexList.size(); j++) { ConfigInfoChanged configInfoChanged = indexList.get(j); actualCount++; - Assert.assertEquals(configInfoChanged, configList.get((j * count) + i)); + assertEquals(configInfoChanged, configList.get((j * count) + i)); } } - Assert.assertEquals(originalCount, actualCount); + assertEquals(originalCount, actualCount); } @@ -136,7 +134,7 @@ private ConfigInfoChanged create(String dataID, int i) { } @Test - public void executeMergeConfigTask() { + void executeMergeConfigTask() { envUtilMockedStatic.when(() -> EnvUtil.getProperty(eq("nacos.config.retention.days"))).thenReturn("10"); ConfigInfoChanged hasDatum = new ConfigInfoChanged(); hasDatum.setDataId("hasDatumdataId1"); @@ -170,7 +168,7 @@ public void executeMergeConfigTask() { } @Test - public void testAddMergeTaskExternalModel() { + void testAddMergeTaskExternalModel() { String dataId = "dataId12345"; String group = "group123"; String tenant = "tenant1234"; @@ -183,7 +181,7 @@ public void testAddMergeTaskExternalModel() { } @Test - public void testAddMergeTaskEmbeddedAndStandAloneModel() { + void testAddMergeTaskEmbeddedAndStandAloneModel() { DatasourceConfiguration.setEmbeddedStorage(true); envUtilMockedStatic.when(() -> EnvUtil.getStandaloneMode()).thenReturn(true); @@ -198,7 +196,7 @@ public void testAddMergeTaskEmbeddedAndStandAloneModel() { } @Test - public void testAddMergeTaskEmbeddedAndClusterModelLeader() { + void testAddMergeTaskEmbeddedAndClusterModelLeader() { DatasourceConfiguration.setEmbeddedStorage(true); envUtilMockedStatic.when(() -> EnvUtil.getStandaloneMode()).thenReturn(false); @@ -217,7 +215,7 @@ public void testAddMergeTaskEmbeddedAndClusterModelLeader() { } @Test - public void testAddMergeTaskEmbeddedAndClusterModelNotLeader() { + void testAddMergeTaskEmbeddedAndClusterModelNotLeader() { DatasourceConfiguration.setEmbeddedStorage(true); envUtilMockedStatic.when(() -> EnvUtil.getStandaloneMode()).thenReturn(false); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/merge/MergeTaskProcessorTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/merge/MergeTaskProcessorTest.java index b5163cc6436..12855d8ff61 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/merge/MergeTaskProcessorTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/merge/MergeTaskProcessorTest.java @@ -31,25 +31,25 @@ import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.sys.env.EnvUtil; import com.alibaba.nacos.sys.utils.InetUtils; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.util.ReflectionTestUtils; import java.util.concurrent.atomic.AtomicReference; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) +@ExtendWith(SpringExtension.class) public class MergeTaskProcessorTest { @@ -62,31 +62,30 @@ public class MergeTaskProcessorTest { @Mock ConfigInfoTagPersistService configInfoTagPersistService; - @Mock - private DataSourceService dataSourceService; - - @Mock - private MergeDatumService mergeDatumService; - MockedStatic envUtilMockedStatic; MergeTaskProcessor mergeTaskProcessor; MockedStatic inetUtilsMockedStatic; - @Before - public void setUp() { + @Mock + private DataSourceService dataSourceService; + + @Mock + private MergeDatumService mergeDatumService; + + @BeforeEach + void setUp() { envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); inetUtilsMockedStatic = Mockito.mockStatic(InetUtils.class); ReflectionTestUtils.setField(DynamicDataSource.getInstance(), "localDataSourceService", dataSourceService); ReflectionTestUtils.setField(DynamicDataSource.getInstance(), "basicDataSourceService", dataSourceService); - mergeTaskProcessor = new MergeTaskProcessor(configInfoPersistService, configInfoAggrPersistService, - configInfoTagPersistService, mergeDatumService); + mergeTaskProcessor = new MergeTaskProcessor(configInfoPersistService, configInfoAggrPersistService, configInfoTagPersistService, + mergeDatumService); inetUtilsMockedStatic.when(InetUtils::getSelfIP).thenReturn("127.0.0.1"); - + after(); } - @Before public void after() { envUtilMockedStatic.close(); inetUtilsMockedStatic.close(); @@ -96,7 +95,7 @@ public void after() { * test aggr has datum and merge it expect: 1.config to be inserted 2.config data change event to be published */ @Test - public void testMergerExistAggrConfig() throws InterruptedException { + void testMergerExistAggrConfig() throws InterruptedException { String dataId = "dataId12345"; String group = "group123"; String tenant = "tenant1234"; @@ -109,8 +108,8 @@ public void testMergerExistAggrConfig() throws InterruptedException { datumPage.getPageItems().add(configInfoAggr1); datumPage.getPageItems().add(configInfoAggr2); - when(configInfoAggrPersistService.findConfigInfoAggrByPage(eq(dataId), eq(group), eq(tenant), anyInt(), - anyInt())).thenReturn(datumPage); + when(configInfoAggrPersistService.findConfigInfoAggrByPage(eq(dataId), eq(group), eq(tenant), anyInt(), anyInt())).thenReturn( + datumPage); when(configInfoPersistService.insertOrUpdate(eq(null), eq(null), any(ConfigInfo.class), eq(null))).thenReturn( new ConfigOperateResult()); @@ -135,10 +134,9 @@ public Class subscribeType() { MergeDataTask mergeDataTask = new MergeDataTask(dataId, group, tenant, "127.0.0.1"); mergeTaskProcessor.process(mergeDataTask); - Mockito.verify(configInfoPersistService, times(1)) - .insertOrUpdate(eq(null), eq(null), any(ConfigInfo.class), eq(null)); + Mockito.verify(configInfoPersistService, times(1)).insertOrUpdate(eq(null), eq(null), any(ConfigInfo.class), eq(null)); Thread.sleep(1000L); - Assert.assertTrue(reference.get() != null); + assertTrue(reference.get() != null); } @@ -146,7 +144,7 @@ public Class subscribeType() { * test aggr has datum and remove it. */ @Test - public void testMergerNotExistAggrConfig() throws InterruptedException { + void testMergerNotExistAggrConfig() throws InterruptedException { String dataId = "dataId12345"; String group = "group123"; String tenant = "tenant1234"; @@ -170,21 +168,19 @@ public Class subscribeType() { }); MergeDataTask mergeDataTask = new MergeDataTask(dataId, group, tenant, "127.0.0.1"); - Mockito.doNothing().when(configInfoPersistService) - .removeConfigInfo(eq(dataId), eq(group), eq(tenant), eq("127.0.0.1"), eq(null)); + Mockito.doNothing().when(configInfoPersistService).removeConfigInfo(eq(dataId), eq(group), eq(tenant), eq("127.0.0.1"), eq(null)); //Mockito.doNothing().when(configInfoTagPersistService).removeConfigInfoTag(eq(dataId), eq(group), eq(tenant),eq(),eq("127.0.0.1"),eq(null)); mergeTaskProcessor.process(mergeDataTask); - Mockito.verify(configInfoPersistService, times(1)) - .removeConfigInfo(eq(dataId), eq(group), eq(tenant), eq("127.0.0.1"), eq(null)); + Mockito.verify(configInfoPersistService, times(1)).removeConfigInfo(eq(dataId), eq(group), eq(tenant), eq("127.0.0.1"), eq(null)); Thread.sleep(1000L); - Assert.assertTrue(reference.get() != null); + assertTrue(reference.get() != null); } /** * test aggr has no datum and remove it tag. */ @Test - public void testTagMergerNotExistAggrConfig() throws InterruptedException { + void testTagMergerNotExistAggrConfig() throws InterruptedException { String dataId = "dataId12345"; String group = "group123"; String tenant = "tenant1234"; @@ -197,8 +193,7 @@ public void testTagMergerNotExistAggrConfig() throws InterruptedException { @Override public void onEvent(Event event) { ConfigDataChangeEvent event1 = (ConfigDataChangeEvent) event; - if (event1.dataId.equals(dataId) && event1.group.equals(group) && tenant.equals(event1.tenant) - && tag.equals(event1.tag)) { + if (event1.dataId.equals(dataId) && event1.group.equals(group) && tenant.equals(event1.tenant) && tag.equals(event1.tag)) { reference.set((ConfigDataChangeEvent) event); } } @@ -217,19 +212,18 @@ public Class subscribeType() { Mockito.verify(configInfoTagPersistService, times(1)) .removeConfigInfoTag(eq(dataId), eq(group), eq(tenant), eq(tag), eq("127.0.0.1"), eq(null)); Thread.sleep(1000L); - Assert.assertTrue(reference.get() != null); + assertTrue(reference.get() != null); } /** * test aggr has no datum and remove it tag. */ @Test - public void testTagMergerError() throws InterruptedException { + void testTagMergerError() throws InterruptedException { String dataId = "dataId12345"; String group = "group123"; String tenant = "tenant1234"; - when(configInfoAggrPersistService.aggrConfigInfoCount(eq(dataId), eq(group), eq(tenant))).thenThrow( - new NullPointerException()); + when(configInfoAggrPersistService.aggrConfigInfoCount(eq(dataId), eq(group), eq(tenant))).thenThrow(new NullPointerException()); MergeDataTask mergeDataTask = new MergeDataTask(dataId, group, tenant, "127.0.0.1"); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/notify/AsyncNotifyServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/notify/AsyncNotifyServiceTest.java index d0191492937..a6072adab3e 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/notify/AsyncNotifyServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/notify/AsyncNotifyServiceTest.java @@ -29,14 +29,14 @@ import com.alibaba.nacos.core.cluster.ServerMemberManager; import com.alibaba.nacos.sys.env.EnvUtil; import com.alibaba.nacos.sys.utils.InetUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.util.ReflectionTestUtils; import java.util.ArrayList; @@ -56,38 +56,38 @@ * * @author shiyiyue */ -@RunWith(SpringJUnit4ClassRunner.class) -public class AsyncNotifyServiceTest { +@ExtendWith(SpringExtension.class) +class AsyncNotifyServiceTest { @Mock ServerMemberManager serverMemberManager; - @Mock - private ConfigClusterRpcClientProxy configClusterRpcClientProxy; - MockedStatic envUtilMocked; MockedStatic configExecutorMocked; MockedStatic inetUtilsMocked; - @Before - public void setUp() { + @Mock + private ConfigClusterRpcClientProxy configClusterRpcClientProxy; + + @BeforeEach + void setUp() { envUtilMocked = Mockito.mockStatic(EnvUtil.class); configExecutorMocked = Mockito.mockStatic(ConfigExecutor.class); inetUtilsMocked = Mockito.mockStatic(InetUtils.class); inetUtilsMocked.when(InetUtils::getSelfIP).thenReturn("127.0.0.1"); } - @After - public void after() { + @AfterEach + void after() { envUtilMocked.close(); inetUtilsMocked.close(); configExecutorMocked.close(); } @Test - public void testSyncConfigChangeCallback() { + void testSyncConfigChangeCallback() { long timeStamp = System.currentTimeMillis(); Member member1 = new Member(); member1.setIp("testip1" + timeStamp); @@ -96,17 +96,15 @@ public void testSyncConfigChangeCallback() { ReflectionTestUtils.setField(asyncNotifyService, "configClusterRpcClientProxy", configClusterRpcClientProxy); String dataId = "testDataId" + timeStamp; String group = "testGroup"; - AsyncNotifyService.NotifySingleRpcTask notifySingleRpcTask = new AsyncNotifyService.NotifySingleRpcTask(dataId, - group, null, null, 0, false, false, member1); - configExecutorMocked.when( - () -> ConfigExecutor.scheduleAsyncNotify(any(Runnable.class), anyLong(), any(TimeUnit.class))) + AsyncNotifyService.NotifySingleRpcTask notifySingleRpcTask = new AsyncNotifyService.NotifySingleRpcTask(dataId, group, null, null, + 0, false, false, member1); + configExecutorMocked.when(() -> ConfigExecutor.scheduleAsyncNotify(any(Runnable.class), anyLong(), any(TimeUnit.class))) .thenAnswer(invocation -> null); notifySingleRpcTask.setBatch(true); notifySingleRpcTask.setTag("test"); notifySingleRpcTask.setBeta(false); - AsyncRpcNotifyCallBack asyncRpcNotifyCallBack = new AsyncRpcNotifyCallBack(asyncNotifyService, - notifySingleRpcTask); + AsyncRpcNotifyCallBack asyncRpcNotifyCallBack = new AsyncRpcNotifyCallBack(asyncNotifyService, notifySingleRpcTask); ConfigChangeClusterSyncResponse successResponse = new ConfigChangeClusterSyncResponse(); //1. success response asyncRpcNotifyCallBack.onResponse(successResponse); @@ -118,15 +116,15 @@ public void testSyncConfigChangeCallback() { // expect schedule twice fail or exception response. configExecutorMocked.verify( - () -> ConfigExecutor.scheduleAsyncNotify(any(AsyncNotifyService.AsyncRpcTask.class), anyLong(), - any(TimeUnit.class)), times(2)); + () -> ConfigExecutor.scheduleAsyncNotify(any(AsyncNotifyService.AsyncRpcTask.class), anyLong(), any(TimeUnit.class)), + times(2)); } /** * test HandleConfigDataChangeEvent. expect create a AsyncRpcTask and execute in ConfigExecutor. */ @Test - public void testHandleConfigDataChangeEvent() { + void testHandleConfigDataChangeEvent() { long timeStamp = System.currentTimeMillis(); List memberList = new ArrayList<>(); @@ -148,23 +146,20 @@ public void testHandleConfigDataChangeEvent() { Mockito.when(serverMemberManager.allMembersWithoutSelf()).thenReturn(memberList); - configExecutorMocked.when( - () -> ConfigExecutor.scheduleAsyncNotify(any(Runnable.class), anyLong(), any(TimeUnit.class))) + configExecutorMocked.when(() -> ConfigExecutor.scheduleAsyncNotify(any(Runnable.class), anyLong(), any(TimeUnit.class))) .thenAnswer(invocation -> null); String dataId = "testDataId" + timeStamp; String group = "testGroup"; AsyncNotifyService asyncNotifyService = new AsyncNotifyService(serverMemberManager); - asyncNotifyService.handleConfigDataChangeEvent( - new ConfigDataChangeEvent(dataId, group, System.currentTimeMillis())); + asyncNotifyService.handleConfigDataChangeEvent(new ConfigDataChangeEvent(dataId, group, System.currentTimeMillis())); // expect schedule twice fail or exception response. - configExecutorMocked.verify( - () -> ConfigExecutor.executeAsyncNotify(any(AsyncNotifyService.AsyncRpcTask.class)), times(1)); + configExecutorMocked.verify(() -> ConfigExecutor.executeAsyncNotify(any(AsyncNotifyService.AsyncRpcTask.class)), times(1)); } @Test - public void testExecuteAsyncRpcTask() throws Exception { + void testExecuteAsyncRpcTask() throws Exception { long timeStamp = System.currentTimeMillis(); String dataId = "testDataId" + timeStamp; String group = "testGroup"; @@ -189,9 +184,8 @@ public void testExecuteAsyncRpcTask() throws Exception { for (Member member : memberList) { // grpc report data change only - rpcQueue.add( - new AsyncNotifyService.NotifySingleRpcTask(dataId, group, null, null, System.currentTimeMillis(), - false, false, member)); + rpcQueue.add(new AsyncNotifyService.NotifySingleRpcTask(dataId, group, null, null, System.currentTimeMillis(), false, false, + member)); } AsyncNotifyService asyncNotifyService = new AsyncNotifyService(serverMemberManager); @@ -201,18 +195,14 @@ public void testExecuteAsyncRpcTask() throws Exception { Mockito.when(serverMemberManager.hasMember(eq(member1.getAddress()))).thenReturn(true); Mockito.when(serverMemberManager.hasMember(eq(member2.getAddress()))).thenReturn(true); Mockito.when(serverMemberManager.hasMember(eq(member3.getAddress()))).thenReturn(true); - Mockito.when(serverMemberManager.stateCheck(eq(member1.getAddress()), eq(HEALTHY_CHECK_STATUS))) - .thenReturn(true); - Mockito.when(serverMemberManager.stateCheck(eq(member2.getAddress()), eq(HEALTHY_CHECK_STATUS))) - .thenReturn(true); + Mockito.when(serverMemberManager.stateCheck(eq(member1.getAddress()), eq(HEALTHY_CHECK_STATUS))).thenReturn(true); + Mockito.when(serverMemberManager.stateCheck(eq(member2.getAddress()), eq(HEALTHY_CHECK_STATUS))).thenReturn(true); // mock stateCheck fail before notify member3 - Mockito.when(serverMemberManager.stateCheck(eq(member3.getAddress()), eq(HEALTHY_CHECK_STATUS))) - .thenReturn(false); + Mockito.when(serverMemberManager.stateCheck(eq(member3.getAddress()), eq(HEALTHY_CHECK_STATUS))).thenReturn(false); //mock syncConfigChange exception when notify member2 Mockito.doThrow(new NacosException()).when(configClusterRpcClientProxy) .syncConfigChange(eq(member2), any(ConfigChangeClusterSyncRequest.class), any(RequestCallBack.class)); - configExecutorMocked.when( - () -> ConfigExecutor.scheduleAsyncNotify(any(Runnable.class), anyLong(), any(TimeUnit.class))) + configExecutorMocked.when(() -> ConfigExecutor.scheduleAsyncNotify(any(Runnable.class), anyLong(), any(TimeUnit.class))) .thenAnswer(invocation -> null); asyncNotifyService.executeAsyncRpcTask(rpcQueue); @@ -226,8 +216,8 @@ public void testExecuteAsyncRpcTask() throws Exception { //verify scheduleAsyncNotify member2 & member3 in task when syncConfigChange fail configExecutorMocked.verify( - () -> ConfigExecutor.scheduleAsyncNotify(any(AsyncNotifyService.AsyncRpcTask.class), anyLong(), - any(TimeUnit.class)), times(2)); + () -> ConfigExecutor.scheduleAsyncNotify(any(AsyncNotifyService.AsyncRpcTask.class), anyLong(), any(TimeUnit.class)), + times(2)); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/ConfigRowMapperInjectorTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/ConfigRowMapperInjectorTest.java index 35df8476961..3e93e4f69c4 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/ConfigRowMapperInjectorTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/ConfigRowMapperInjectorTest.java @@ -38,29 +38,29 @@ import com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.ConfigInfoTagWrapperRowMapper; import com.alibaba.nacos.persistence.repository.RowMapperManager; import com.mysql.cj.jdbc.result.ResultSetImpl; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.sql.SQLException; import java.sql.Timestamp; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.eq; -@RunWith(SpringJUnit4ClassRunner.class) -public class ConfigRowMapperInjectorTest { +@ExtendWith(SpringExtension.class) +class ConfigRowMapperInjectorTest { @Test - public void testInit() { + void testInit() { ConfigRowMapperInjector configRowMapperInjector = new ConfigRowMapperInjector(); - Assert.assertEquals(ConfigRowMapperInjector.CONFIG_INFO_WRAPPER_ROW_MAPPER, RowMapperManager.getRowMapper( - ConfigRowMapperInjector.CONFIG_INFO_WRAPPER_ROW_MAPPER.getClass().getCanonicalName())); + assertEquals(ConfigRowMapperInjector.CONFIG_INFO_WRAPPER_ROW_MAPPER, + RowMapperManager.getRowMapper(ConfigRowMapperInjector.CONFIG_INFO_WRAPPER_ROW_MAPPER.getClass().getCanonicalName())); } @Test - public void testConfigInfoTagWrapperRowMapper() throws SQLException { + void testConfigInfoTagWrapperRowMapper() throws SQLException { ConfigInfoTagWrapper preConfig = new ConfigInfoTagWrapper(); preConfig.setDataId("testDataId"); preConfig.setGroup("group_id11"); @@ -87,12 +87,12 @@ public void testConfigInfoTagWrapperRowMapper() throws SQLException { Mockito.when(resultSet.getString(eq("tag_id"))).thenReturn(preConfig.getTag()); ConfigInfoTagWrapperRowMapper configInfoWrapperRowMapper = new ConfigInfoTagWrapperRowMapper(); ConfigInfoTagWrapper configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); - Assert.assertEquals(preConfig.getTag(), configInfoWrapper.getTag()); + assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig.getTag(), configInfoWrapper.getTag()); } @Test - public void testConfigInfo4BetaRowMapper() throws SQLException { + void testConfigInfo4BetaRowMapper() throws SQLException { ConfigInfo4Beta preConfig = new ConfigInfo4Beta(); preConfig.setDataId("testDataId"); preConfig.setGroup("group_id11"); @@ -117,12 +117,12 @@ public void testConfigInfo4BetaRowMapper() throws SQLException { Mockito.when(resultSet.getString(eq("encrypted_data_key"))).thenReturn(preConfig.getEncryptedDataKey()); ConfigInfo4BetaRowMapper configInfoWrapperRowMapper = new ConfigInfo4BetaRowMapper(); ConfigInfo4Beta configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); - Assert.assertEquals(preConfig.getBetaIps(), configInfoWrapper.getBetaIps()); + assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig.getBetaIps(), configInfoWrapper.getBetaIps()); } @Test - public void testConfigInfoBetaWrapperRowMapper() throws SQLException { + void testConfigInfoBetaWrapperRowMapper() throws SQLException { ConfigInfoBetaWrapper preConfig = new ConfigInfoBetaWrapper(); preConfig.setDataId("testDataId"); preConfig.setGroup("group_id11"); @@ -147,11 +147,11 @@ public void testConfigInfoBetaWrapperRowMapper() throws SQLException { Mockito.when(resultSet.getString(eq("encrypted_data_key"))).thenReturn(preConfig.getEncryptedDataKey()); ConfigInfoBetaWrapperRowMapper configInfoWrapperRowMapper = new ConfigInfoBetaWrapperRowMapper(); ConfigInfoBetaWrapper configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigAdvanceInfoRowMapper() throws SQLException { + void testConfigAdvanceInfoRowMapper() throws SQLException { ConfigAdvanceInfo preConfig = new ConfigAdvanceInfo(); preConfig.setModifyTime(System.currentTimeMillis()); preConfig.setCreateTime(System.currentTimeMillis()); @@ -174,11 +174,11 @@ public void testConfigAdvanceInfoRowMapper() throws SQLException { Mockito.when(resultSet.getString(eq("c_schema"))).thenReturn(preConfig.getSchema()); ConfigRowMapperInjector.ConfigAdvanceInfoRowMapper configInfoWrapperRowMapper = new ConfigRowMapperInjector.ConfigAdvanceInfoRowMapper(); ConfigAdvanceInfo configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigAllInfoRowMapper() throws SQLException { + void testConfigAllInfoRowMapper() throws SQLException { ConfigAllInfo preConfig = new ConfigAllInfo(); preConfig.setDataId("testDataId"); preConfig.setGroup("group_id11"); @@ -206,11 +206,11 @@ public void testConfigAllInfoRowMapper() throws SQLException { ConfigRowMapperInjector.ConfigAllInfoRowMapper configInfoWrapperRowMapper = new ConfigRowMapperInjector.ConfigAllInfoRowMapper(); ConfigAllInfo configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigInfoRowMapper() throws SQLException { + void testConfigInfoRowMapper() throws SQLException { ConfigInfo preConfig = new ConfigInfo(); preConfig.setDataId("testDataId"); @@ -234,11 +234,11 @@ public void testConfigInfoRowMapper() throws SQLException { Mockito.when(resultSet.getString(eq("encrypted_data_key"))).thenReturn(preConfig.getEncryptedDataKey()); ConfigRowMapperInjector.ConfigInfoRowMapper configInfoWrapperRowMapper = new ConfigRowMapperInjector.ConfigInfoRowMapper(); ConfigInfo configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigInfoWrapperRowMapper() throws SQLException { + void testConfigInfoWrapperRowMapper() throws SQLException { ConfigInfoWrapper preConfig = new ConfigInfoWrapper(); preConfig.setDataId("testDataId"); @@ -264,12 +264,12 @@ public void testConfigInfoWrapperRowMapper() throws SQLException { Mockito.when(resultSet.getString(eq("encrypted_data_key"))).thenReturn(preConfig.getEncryptedDataKey()); ConfigRowMapperInjector.ConfigInfoWrapperRowMapper configInfoWrapperRowMapper = new ConfigRowMapperInjector.ConfigInfoWrapperRowMapper(); ConfigInfoWrapper configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigInfo4TagRowMapper() throws SQLException { + void testConfigInfo4TagRowMapper() throws SQLException { ConfigInfo4Tag preConfig = new ConfigInfo4Tag(); preConfig.setDataId("testDataId"); @@ -295,12 +295,12 @@ public void testConfigInfo4TagRowMapper() throws SQLException { Mockito.when(resultSet.getString(eq("encrypted_data_key"))).thenReturn(preConfig.getEncryptedDataKey()); ConfigRowMapperInjector.ConfigInfo4TagRowMapper configInfoWrapperRowMapper = new ConfigRowMapperInjector.ConfigInfo4TagRowMapper(); ConfigInfo4Tag configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigInfoBaseRowMapper() throws SQLException { + void testConfigInfoBaseRowMapper() throws SQLException { ConfigInfoBase preConfig = new ConfigInfoBase(); preConfig.setDataId("testDataId"); @@ -314,12 +314,12 @@ public void testConfigInfoBaseRowMapper() throws SQLException { Mockito.when(resultSet.getLong(eq("id"))).thenReturn(preConfig.getId()); ConfigRowMapperInjector.ConfigInfoBaseRowMapper configInfoWrapperRowMapper = new ConfigRowMapperInjector.ConfigInfoBaseRowMapper(); ConfigInfoBase configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigInfoAggrRowMapper() throws SQLException { + void testConfigInfoAggrRowMapper() throws SQLException { ConfigInfoAggr preConfig = new ConfigInfoAggr(); preConfig.setDataId("testDataId"); @@ -338,12 +338,12 @@ public void testConfigInfoAggrRowMapper() throws SQLException { ConfigRowMapperInjector.ConfigInfoAggrRowMapper configInfoWrapperRowMapper = new ConfigRowMapperInjector.ConfigInfoAggrRowMapper(); ConfigInfoAggr configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigInfoChangedRowMapper() throws SQLException { + void testConfigInfoChangedRowMapper() throws SQLException { ConfigInfoChanged preConfig = new ConfigInfoChanged(); preConfig.setDataId("testDataId"); @@ -355,12 +355,12 @@ public void testConfigInfoChangedRowMapper() throws SQLException { Mockito.when(resultSet.getString(eq("tenant_id"))).thenReturn(preConfig.getTenant()); ConfigInfoChangedRowMapper configInfoWrapperRowMapper = new ConfigInfoChangedRowMapper(); ConfigInfoChanged configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigHistoryRowMapper() throws SQLException { + void testConfigHistoryRowMapper() throws SQLException { ConfigHistoryInfo preConfig = new ConfigHistoryInfo(); preConfig.setDataId("testDataId"); @@ -387,12 +387,12 @@ public void testConfigHistoryRowMapper() throws SQLException { ConfigRowMapperInjector.ConfigHistoryRowMapper configInfoWrapperRowMapper = new ConfigRowMapperInjector.ConfigHistoryRowMapper(); ConfigHistoryInfo configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigHistoryDetailRowMapper() throws SQLException { + void testConfigHistoryDetailRowMapper() throws SQLException { ConfigHistoryInfo preConfig = new ConfigHistoryInfo(); preConfig.setDataId("testDataId"); @@ -427,12 +427,12 @@ public void testConfigHistoryDetailRowMapper() throws SQLException { ConfigHistoryDetailRowMapper configInfoWrapperRowMapper = new ConfigHistoryDetailRowMapper(); ConfigHistoryInfo configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigInfoStateWrapperRowMapper() throws SQLException { + void testConfigInfoStateWrapperRowMapper() throws SQLException { ConfigInfoStateWrapper preConfig = new ConfigInfoStateWrapper(); preConfig.setDataId("testDataId"); @@ -448,12 +448,12 @@ public void testConfigInfoStateWrapperRowMapper() throws SQLException { Mockito.when(resultSet.getLong(eq("id"))).thenReturn(preConfig.getId()); ConfigInfoStateWrapperRowMapper configInfoWrapperRowMapper = new ConfigInfoStateWrapperRowMapper(); ConfigInfoStateWrapper configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } @Test - public void testConfigKeyRowMapper() throws SQLException { + void testConfigKeyRowMapper() throws SQLException { ConfigKey preConfig = new ConfigKey(); preConfig.setDataId("testDataId"); preConfig.setGroup("group_id11"); @@ -465,7 +465,7 @@ public void testConfigKeyRowMapper() throws SQLException { ConfigRowMapperInjector.ConfigKeyRowMapper configInfoWrapperRowMapper = new ConfigRowMapperInjector.ConfigKeyRowMapper(); ConfigKey configInfoWrapper = configInfoWrapperRowMapper.mapRow(resultSet, 10); - Assert.assertEquals(preConfig, configInfoWrapper); + assertEquals(preConfig, configInfoWrapper); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoAggrPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoAggrPersistServiceImplTest.java index c6607c3c98e..33b45b4ade9 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoAggrPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoAggrPersistServiceImplTest.java @@ -24,15 +24,14 @@ import com.alibaba.nacos.persistence.repository.embedded.EmbeddedStorageContextHolder; import com.alibaba.nacos.persistence.repository.embedded.operate.DatabaseOperate; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.ArrayList; import java.util.HashMap; @@ -41,22 +40,20 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_AGGR_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_CHANGED_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; /** - * test for embedded config aggr. + * test for embedded config aggr. + * * @author shiyiyue */ -@RunWith(SpringJUnit4ClassRunner.class) -public class EmbeddedConfigInfoAggrPersistServiceImplTest { - - private EmbeddedConfigInfoAggrPersistServiceImpl embededConfigInfoAggrPersistService; - - @Mock - private DataSourceService dataSourceService; +@ExtendWith(SpringExtension.class) +class EmbeddedConfigInfoAggrPersistServiceImplTest { MockedStatic envUtilMockedStatic; @@ -70,28 +67,32 @@ public class EmbeddedConfigInfoAggrPersistServiceImplTest { @Mock DatabaseOperate databaseOperate; - @Before - public void before() { + private EmbeddedConfigInfoAggrPersistServiceImpl embededConfigInfoAggrPersistService; + + @Mock + private DataSourceService dataSourceService; + + @BeforeEach + void before() { embeddedStorageContextHolderMockedStatic = Mockito.mockStatic(EmbeddedStorageContextHolder.class); dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); when(DynamicDataSource.getInstance()).thenReturn(dynamicDataSource); when(dynamicDataSource.getDataSource()).thenReturn(dataSourceService); when(dataSourceService.getDataSourceType()).thenReturn("derby"); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); embededConfigInfoAggrPersistService = new EmbeddedConfigInfoAggrPersistServiceImpl(databaseOperate); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); embeddedStorageContextHolderMockedStatic.close(); } @Test - public void testAddAggrConfigInfoOfEqualContent() { + void testAddAggrConfigInfoOfEqualContent() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; @@ -101,18 +102,17 @@ public void testAddAggrConfigInfoOfEqualContent() { //mock query datumId and equal with current content param. String existContent = "content1234"; - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), - eq(String.class))).thenReturn(existContent); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), eq(String.class))) + .thenReturn(existContent); //mock insert success Mockito.when(databaseOperate.update(any(List.class))).thenReturn(true); - boolean result = embededConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, - content); - Assert.assertTrue(result); + boolean result = embededConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, content); + assertTrue(result); } @Test - public void testAddAggrConfigInfoOfAddNewContent() { + void testAddAggrConfigInfoOfAddNewContent() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; @@ -121,19 +121,18 @@ public void testAddAggrConfigInfoOfAddNewContent() { String content = "content1234"; //mock query datumId and return null. - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), - eq(String.class))).thenReturn(null); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), eq(String.class))) + .thenReturn(null); //mock insert success Mockito.when(databaseOperate.update(any(List.class))).thenReturn(true); //execute - boolean result = embededConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, - content); - Assert.assertTrue(result); + boolean result = embededConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, content); + assertTrue(result); } @Test - public void testAddAggrConfigInfoOfUpdateNotEqualContent() { + void testAddAggrConfigInfoOfUpdateNotEqualContent() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; @@ -143,33 +142,29 @@ public void testAddAggrConfigInfoOfUpdateNotEqualContent() { //mock query datumId String existContent = "existContent111"; - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), - eq(String.class))).thenReturn(existContent); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), eq(String.class))) + .thenReturn(existContent); //mock update success,return 1 Mockito.when(databaseOperate.update(any(List.class))).thenReturn(true); //mock update content - boolean result = embededConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, - content); - Assert.assertTrue(result); + boolean result = embededConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, content); + assertTrue(result); } @Test - public void testBatchPublishAggrSuccess() { + void testBatchPublishAggrSuccess() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; //mock query datumId and equal with current content param. - Mockito.when( - databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, "d1"}), eq(String.class))) + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, "d1"}), eq(String.class))) .thenReturn("c1"); - Mockito.when( - databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, "d2"}), eq(String.class))) + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, "d2"}), eq(String.class))) .thenReturn("c2"); - Mockito.when( - databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, "d3"}), eq(String.class))) + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, "d3"}), eq(String.class))) .thenReturn("c3"); Mockito.when(databaseOperate.update(any(List.class))).thenReturn(true); @@ -179,11 +174,11 @@ public void testBatchPublishAggrSuccess() { datumMap.put("d3", "c3"); String appName = "appname1234"; boolean result = embededConfigInfoAggrPersistService.batchPublishAggr(dataId, group, tenant, datumMap, appName); - Assert.assertTrue(result); + assertTrue(result); } @Test - public void testAggrConfigInfoCount() { + void testAggrConfigInfoCount() { String dataId = "dataId11122"; String group = "group"; String tenant = "tenant"; @@ -192,38 +187,37 @@ public void testAggrConfigInfoCount() { Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))) .thenReturn(new Integer(101)); int result = embededConfigInfoAggrPersistService.aggrConfigInfoCount(dataId, group, tenant); - Assert.assertEquals(101, result); + assertEquals(101, result); } @Test - public void testFindConfigInfoAggrByPage() { + void testFindConfigInfoAggrByPage() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; //mock query count. - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))) - .thenReturn(101); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))).thenReturn(101); //mock query page list List configInfoAggrs = new ArrayList<>(); configInfoAggrs.add(new ConfigInfoAggr()); configInfoAggrs.add(new ConfigInfoAggr()); configInfoAggrs.add(new ConfigInfoAggr()); - Mockito.when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_AGGR_ROW_MAPPER))).thenReturn(configInfoAggrs); + Mockito.when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_AGGR_ROW_MAPPER))) + .thenReturn(configInfoAggrs); int pageNo = 1; int pageSize = 120; - Page configInfoAggrByPage = embededConfigInfoAggrPersistService.findConfigInfoAggrByPage(dataId, - group, tenant, pageNo, pageSize); - Assert.assertEquals(101, configInfoAggrByPage.getTotalCount()); - Assert.assertEquals(configInfoAggrs, configInfoAggrByPage.getPageItems()); + Page configInfoAggrByPage = embededConfigInfoAggrPersistService.findConfigInfoAggrByPage(dataId, group, tenant, + pageNo, pageSize); + assertEquals(101, configInfoAggrByPage.getTotalCount()); + assertEquals(configInfoAggrs, configInfoAggrByPage.getPageItems()); } @Test - public void testFindAllAggrGroup() { + void testFindAllAggrGroup() { List configList = new ArrayList<>(); configList.add(create("dataId", 0)); configList.add(create("dataId", 1)); @@ -232,7 +226,7 @@ public void testFindAllAggrGroup() { .thenReturn(configList); List allAggrGroup = embededConfigInfoAggrPersistService.findAllAggrGroup(); - Assert.assertEquals(configList, allAggrGroup); + assertEquals(configList, allAggrGroup); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoBetaPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoBetaPersistServiceImplTest.java index 9a8c859b5d6..89f5e1f157d 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoBetaPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoBetaPersistServiceImplTest.java @@ -28,15 +28,14 @@ import com.alibaba.nacos.persistence.repository.embedded.EmbeddedStorageContextHolder; import com.alibaba.nacos.persistence.repository.embedded.operate.DatabaseOperate; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.sql.Timestamp; import java.util.ArrayList; @@ -44,6 +43,7 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; @@ -55,13 +55,8 @@ * * @author shiyiyue */ -@RunWith(SpringJUnit4ClassRunner.class) -public class EmbeddedConfigInfoBetaPersistServiceImplTest { - - private EmbeddedConfigInfoBetaPersistServiceImpl embeddedConfigInfoBetaPersistService; - - @Mock - private DataSourceService dataSourceService; +@ExtendWith(SpringExtension.class) +class EmbeddedConfigInfoBetaPersistServiceImplTest { MockedStatic envUtilMockedStatic; @@ -75,28 +70,32 @@ public class EmbeddedConfigInfoBetaPersistServiceImplTest { @Mock DatabaseOperate databaseOperate; - @Before - public void before() { + private EmbeddedConfigInfoBetaPersistServiceImpl embeddedConfigInfoBetaPersistService; + + @Mock + private DataSourceService dataSourceService; + + @BeforeEach + void before() { embeddedStorageContextHolderMockedStatic = Mockito.mockStatic(EmbeddedStorageContextHolder.class); dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); when(DynamicDataSource.getInstance()).thenReturn(dynamicDataSource); when(dynamicDataSource.getDataSource()).thenReturn(dataSourceService); when(dataSourceService.getDataSourceType()).thenReturn("derby"); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); embeddedConfigInfoBetaPersistService = new EmbeddedConfigInfoBetaPersistServiceImpl(databaseOperate); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); embeddedStorageContextHolderMockedStatic.close(); } @Test - public void testInsertOrUpdateBetaOfUpdate() { + void testInsertOrUpdateBetaOfUpdate() { String dataId = "betaDataId113"; String group = "group"; String tenant = "tenant"; @@ -107,8 +106,8 @@ public void testInsertOrUpdateBetaOfUpdate() { mockedConfigInfoStateWrapper.setTenant(tenant); mockedConfigInfoStateWrapper.setId(123456L); mockedConfigInfoStateWrapper.setLastModified(System.currentTimeMillis()); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) .thenReturn(mockedConfigInfoStateWrapper, mockedConfigInfoStateWrapper); //execute String betaIps = "betaips..."; @@ -118,22 +117,21 @@ public void testInsertOrUpdateBetaOfUpdate() { String content = "content111"; ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content); configInfo.setEncryptedDataKey("key34567"); - ConfigOperateResult configOperateResult = embeddedConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, - betaIps, srcIp, srcUser); + ConfigOperateResult configOperateResult = embeddedConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, betaIps, srcIp, + srcUser); //expect return obj - Assert.assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); //verify update to be invoked embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(configInfo.getContent()), - eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), eq(srcUser), any(Timestamp.class), - eq(configInfo.getAppName()), eq(configInfo.getEncryptedDataKey()), eq(dataId), eq(group), - eq(tenant)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(configInfo.getContent()), eq(configInfo.getMd5()), + eq(betaIps), eq(srcIp), eq(srcUser), any(Timestamp.class), eq(configInfo.getAppName()), + eq(configInfo.getEncryptedDataKey()), eq(dataId), eq(group), eq(tenant)), times(1)); } @Test - public void testInsertOrUpdateBetaOfAdd() { + void testInsertOrUpdateBetaOfAdd() { String dataId = "betaDataId113"; String group = "group113"; String tenant = "tenant113"; @@ -144,8 +142,9 @@ public void testInsertOrUpdateBetaOfAdd() { mockedConfigInfoStateWrapper.setTenant(tenant); mockedConfigInfoStateWrapper.setId(123456L); mockedConfigInfoStateWrapper.setLastModified(System.currentTimeMillis()); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null).thenReturn(mockedConfigInfoStateWrapper); + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + .thenReturn(null).thenReturn(mockedConfigInfoStateWrapper); String betaIps = "betaips..."; String srcIp = "srcUp..."; @@ -155,21 +154,20 @@ public void testInsertOrUpdateBetaOfAdd() { ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content); configInfo.setEncryptedDataKey("key34567"); //execute - ConfigOperateResult configOperateResult = embeddedConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, - betaIps, srcIp, srcUser); + ConfigOperateResult configOperateResult = embeddedConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, betaIps, srcIp, + srcUser); //expect return obj - Assert.assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); //verify add to be invoked embeddedStorageContextHolderMockedStatic.verify( () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant), - eq(configInfo.getAppName()), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), - eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class), - eq(configInfo.getEncryptedDataKey())), times(1)); + eq(configInfo.getAppName()), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), + eq(srcUser), any(Timestamp.class), any(Timestamp.class), eq(configInfo.getEncryptedDataKey())), times(1)); } @Test - public void testInsertOrUpdateBetaCasOfUpdate() { + void testInsertOrUpdateBetaCasOfUpdate() { String dataId = "betaDataId113"; String group = "group"; String tenant = "tenant"; @@ -180,8 +178,8 @@ public void testInsertOrUpdateBetaCasOfUpdate() { mockedConfigInfoStateWrapper.setTenant(tenant); mockedConfigInfoStateWrapper.setId(123456L); mockedConfigInfoStateWrapper.setLastModified(System.currentTimeMillis()); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) .thenReturn(mockedConfigInfoStateWrapper, mockedConfigInfoStateWrapper); //execute @@ -196,22 +194,21 @@ public void testInsertOrUpdateBetaCasOfUpdate() { String betaIps = "betaips..."; String srcIp = "srcUp..."; String srcUser = "srcUser..."; - ConfigOperateResult configOperateResult = embeddedConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, - betaIps, srcIp, srcUser); + ConfigOperateResult configOperateResult = embeddedConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, betaIps, srcIp, + srcUser); //expect return obj - Assert.assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); //verify cas update to be invoked embeddedStorageContextHolderMockedStatic.verify( () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(configInfo.getContent()), - eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(betaIps), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(configInfo.getMd5())), - times(1)); + eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(betaIps), eq(srcIp), eq(srcUser), any(Timestamp.class), + eq(appName), eq(dataId), eq(group), eq(tenant), eq(configInfo.getMd5())), times(1)); } @Test - public void testInsertOrUpdateBetaCasOfAdd() { + void testInsertOrUpdateBetaCasOfAdd() { String dataId = "betaDataId113"; String group = "group113"; String tenant = "tenant113"; @@ -222,8 +219,9 @@ public void testInsertOrUpdateBetaCasOfAdd() { mockedConfigInfoStateWrapper.setTenant(tenant); mockedConfigInfoStateWrapper.setId(123456L); mockedConfigInfoStateWrapper.setLastModified(System.currentTimeMillis()); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null).thenReturn(mockedConfigInfoStateWrapper); + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + .thenReturn(null).thenReturn(mockedConfigInfoStateWrapper); String betaIps = "betaips..."; String srcIp = "srcUp..."; @@ -233,22 +231,21 @@ public void testInsertOrUpdateBetaCasOfAdd() { ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content); configInfo.setEncryptedDataKey("key34567"); //execute - ConfigOperateResult configOperateResult = embeddedConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, - betaIps, srcIp, srcUser); + ConfigOperateResult configOperateResult = embeddedConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, betaIps, srcIp, + srcUser); //expect return obj - Assert.assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); //verify add to be invoked embeddedStorageContextHolderMockedStatic.verify( () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant), - eq(configInfo.getAppName()), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), - eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class), - eq(configInfo.getEncryptedDataKey())), times(1)); + eq(configInfo.getAppName()), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), + eq(srcUser), any(Timestamp.class), any(Timestamp.class), eq(configInfo.getEncryptedDataKey())), times(1)); } @Test - public void testRemoveConfigInfo4Beta() { + void testRemoveConfigInfo4Beta() { String dataId = "dataId456789"; String group = "group4567"; String tenant = "tenant56789o0"; @@ -259,21 +256,21 @@ public void testRemoveConfigInfo4Beta() { mockedConfigInfoStateWrapper.setTenant(tenant); mockedConfigInfoStateWrapper.setId(123456L); mockedConfigInfoStateWrapper.setLastModified(System.currentTimeMillis()); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(mockedConfigInfoStateWrapper); + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + .thenReturn(mockedConfigInfoStateWrapper); //mock remove ok Mockito.when(databaseOperate.update(any(List.class))).thenReturn(true); embeddedConfigInfoBetaPersistService.removeConfigInfo4Beta(dataId, group, tenant); //verity embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant)), - times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant)), times(1)); } @Test - public void testFindConfigInfo4Beta() { + void testFindConfigInfo4Beta() { String dataId = "dataId456789"; String group = "group4567"; String tenant = "tenant56789o0"; @@ -284,23 +281,23 @@ public void testFindConfigInfo4Beta() { mockedConfigInfoStateWrapper.setTenant(tenant); mockedConfigInfoStateWrapper.setId(123456L); mockedConfigInfoStateWrapper.setLastModified(System.currentTimeMillis()); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))).thenReturn(mockedConfigInfoStateWrapper); - ConfigInfoBetaWrapper configInfo4BetaReturn = embeddedConfigInfoBetaPersistService.findConfigInfo4Beta(dataId, - group, tenant); - Assert.assertEquals(mockedConfigInfoStateWrapper, configInfo4BetaReturn); + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))) + .thenReturn(mockedConfigInfoStateWrapper); + ConfigInfoBetaWrapper configInfo4BetaReturn = embeddedConfigInfoBetaPersistService.findConfigInfo4Beta(dataId, group, tenant); + assertEquals(mockedConfigInfoStateWrapper, configInfo4BetaReturn); } @Test - public void testConfigInfoBetaCount() { + void testConfigInfoBetaCount() { Mockito.when(databaseOperate.queryOne(anyString(), eq(Integer.class))).thenReturn(101); int returnCount = embeddedConfigInfoBetaPersistService.configInfoBetaCount(); - Assert.assertEquals(101, returnCount); + assertEquals(101, returnCount); } @Test - public void testFindAllConfigInfoBetaForDumpAll() { + void testFindAllConfigInfoBetaForDumpAll() { //mock count Mockito.when(databaseOperate.queryOne(anyString(), eq(Integer.class))).thenReturn(12345); @@ -313,18 +310,16 @@ public void testFindAllConfigInfoBetaForDumpAll() { mockList.get(1).setLastModified(System.currentTimeMillis()); mockList.get(2).setLastModified(System.currentTimeMillis()); - Mockito.when( - databaseOperate.queryMany(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))) + Mockito.when(databaseOperate.queryMany(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))) .thenReturn(mockList); int pageNo = 1; int pageSize = 101; Mockito.when(databaseOperate.queryOne(anyString(), eq(Integer.class))).thenReturn(101); //execute & expect - Page pageReturn = embeddedConfigInfoBetaPersistService.findAllConfigInfoBetaForDumpAll( - pageNo, pageSize); - Assert.assertEquals(mockList, pageReturn.getPageItems()); - Assert.assertEquals(101, pageReturn.getTotalCount()); + Page pageReturn = embeddedConfigInfoBetaPersistService.findAllConfigInfoBetaForDumpAll(pageNo, pageSize); + assertEquals(mockList, pageReturn.getPageItems()); + assertEquals(101, pageReturn.getTotalCount()); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoPersistServiceImplTest.java index 5d263382f6b..db8378a167a 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoPersistServiceImplTest.java @@ -35,15 +35,14 @@ import com.alibaba.nacos.persistence.repository.embedded.EmbeddedStorageContextHolder; import com.alibaba.nacos.persistence.repository.embedded.operate.DatabaseOperate; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.sql.Timestamp; import java.util.ArrayList; @@ -58,6 +57,8 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_WRAPPER_ROW_MAPPER; import static com.alibaba.nacos.persistence.repository.RowMapperManager.MAP_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; @@ -70,16 +71,8 @@ * * @author shiyiyue */ -@RunWith(SpringJUnit4ClassRunner.class) -public class EmbeddedConfigInfoPersistServiceImplTest { - - private EmbeddedConfigInfoPersistServiceImpl embeddedConfigInfoPersistService; - - @Mock - private DataSourceService dataSourceService; - - @Mock - private HistoryConfigInfoPersistService historyConfigInfoPersistService; +@ExtendWith(SpringExtension.class) +class EmbeddedConfigInfoPersistServiceImplTest { @Mock IdGeneratorManager idGeneratorManager; @@ -96,29 +89,36 @@ public class EmbeddedConfigInfoPersistServiceImplTest { @Mock DatabaseOperate databaseOperate; - @Before - public void before() { + private EmbeddedConfigInfoPersistServiceImpl embeddedConfigInfoPersistService; + + @Mock + private DataSourceService dataSourceService; + + @Mock + private HistoryConfigInfoPersistService historyConfigInfoPersistService; + + @BeforeEach + void before() { embeddedStorageContextHolderMockedStatic = Mockito.mockStatic(EmbeddedStorageContextHolder.class); dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); when(DynamicDataSource.getInstance()).thenReturn(dynamicDataSource); when(dynamicDataSource.getDataSource()).thenReturn(dataSourceService); when(dataSourceService.getDataSourceType()).thenReturn("derby"); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); embeddedConfigInfoPersistService = new EmbeddedConfigInfoPersistServiceImpl(databaseOperate, idGeneratorManager, historyConfigInfoPersistService); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); embeddedStorageContextHolderMockedStatic.close(); } @Test - public void testInsertOrUpdateOfInsertConfigSuccess() { + void testInsertOrUpdateOfInsertConfigSuccess() { String dataId = "dataId"; String group = "group"; @@ -146,44 +146,42 @@ public void testInsertOrUpdateOfInsertConfigSuccess() { configInfoStateWrapperFinalSelect.setId(insertConfigIndoId); configInfoStateWrapperFinalSelect.setLastModified(System.currentTimeMillis()); //mock get config state - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null, configInfoStateWrapperFinalSelect); + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + .thenReturn(null, configInfoStateWrapperFinalSelect); String srcIp = "srcIp"; String srcUser = "srcUser"; //mock insert config info Mockito.doNothing().when(historyConfigInfoPersistService) - .insertConfigHistoryAtomic(eq(0), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), - eq("I")); + .insertConfigHistoryAtomic(eq(0), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), eq("I")); - ConfigOperateResult configOperateResult = embeddedConfigInfoPersistService.insertOrUpdate(srcIp, srcUser, - configInfo, configAdvanceInfo); - Assert.assertEquals(configInfoStateWrapperFinalSelect.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapperFinalSelect.getLastModified(), configOperateResult.getLastModified()); + ConfigOperateResult configOperateResult = embeddedConfigInfoPersistService.insertOrUpdate(srcIp, srcUser, configInfo, + configAdvanceInfo); + assertEquals(configInfoStateWrapperFinalSelect.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapperFinalSelect.getLastModified(), configOperateResult.getLastModified()); //expect insert config info invoked. embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq(dataId), eq(group), - eq(tenant), eq(appName), eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), - eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class), eq(desc), eq(use), - eq(effect), eq(type), eq(schema), eq(encryptedDataKey)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq(dataId), eq(group), eq(tenant), eq(appName), + eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), + any(Timestamp.class), eq(desc), eq(use), eq(effect), eq(type), eq(schema), eq(encryptedDataKey)), times(1)); //expect insert config tags embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag1"), - eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), + eq(group), eq(tenant)), times(1)); embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag2"), - eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), + eq(group), eq(tenant)), times(1)); //expect insert history info Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(0L), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), - eq("I")); + .insertConfigHistoryAtomic(eq(0L), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), eq("I")); } @Test - public void testInsertOrUpdateCasOfInsertConfigSuccess() { + void testInsertOrUpdateCasOfInsertConfigSuccess() { Map configAdvanceInfo = new HashMap<>(); String desc = "testdesc"; @@ -211,36 +209,35 @@ public void testInsertOrUpdateCasOfInsertConfigSuccess() { configInfoStateWrapperFinalSelect.setId(insertConfigIndoId); configInfoStateWrapperFinalSelect.setLastModified(System.currentTimeMillis()); //mock get config state - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null, configInfoStateWrapperFinalSelect); + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + .thenReturn(null, configInfoStateWrapperFinalSelect); String srcIp = "iptest"; String srcUser = "users"; - ConfigOperateResult configOperateResult = embeddedConfigInfoPersistService.insertOrUpdateCas(srcIp, srcUser, - configInfo, configAdvanceInfo); - Assert.assertEquals(configInfoStateWrapperFinalSelect.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapperFinalSelect.getLastModified(), configOperateResult.getLastModified()); + ConfigOperateResult configOperateResult = embeddedConfigInfoPersistService.insertOrUpdateCas(srcIp, srcUser, configInfo, + configAdvanceInfo); + assertEquals(configInfoStateWrapperFinalSelect.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapperFinalSelect.getLastModified(), configOperateResult.getLastModified()); //expect insert config info invoked. embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq(dataId), eq(group), - eq(tenant), eq(appName), eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), - eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class), eq(desc), eq(use), - eq(effect), eq(type), eq(schema), eq(encryptedDatakey)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq(dataId), eq(group), eq(tenant), eq(appName), + eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), + any(Timestamp.class), eq(desc), eq(use), eq(effect), eq(type), eq(schema), eq(encryptedDatakey)), times(1)); //expect insert config tags embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag1"), - eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), + eq(group), eq(tenant)), times(1)); embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag2"), - eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), + eq(group), eq(tenant)), times(1)); //expect insert history info Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(0L), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), - eq("I")); + .insertConfigHistoryAtomic(eq(0L), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), eq("I")); } @Test - public void testInsertOrUpdateOfUpdateConfigSuccess() { + void testInsertOrUpdateOfUpdateConfigSuccess() { Map configAdvanceInfo = new HashMap<>(); String desc = "testdesc"; @@ -264,8 +261,8 @@ public void testInsertOrUpdateOfUpdateConfigSuccess() { String encryptedDataKey = "key34567"; configInfo.setEncryptedDataKey(encryptedDataKey); //mock get config state,first and second is not null - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) .thenReturn(new ConfigInfoStateWrapper(), new ConfigInfoStateWrapper()); //mock select config info before update @@ -276,36 +273,34 @@ public void testInsertOrUpdateOfUpdateConfigSuccess() { configInfoWrapperOld.setAppName("old_app"); configInfoWrapperOld.setMd5("old_md5"); configInfoWrapperOld.setId(12345678765L); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(configInfoWrapperOld); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenReturn(configInfoWrapperOld); String srcIp = "srcIp"; String srcUser = "srcUser"; embeddedConfigInfoPersistService.insertOrUpdate(srcIp, srcUser, configInfo, configAdvanceInfo); //expect update config info invoked. - embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(content), - eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(desc), eq(use), eq(effect), eq(type), eq(schema), - eq(encryptedDataKey), eq(dataId), eq(group), eq(tenant)), times(1)); + embeddedStorageContextHolderMockedStatic.verify(() -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(content), + eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), eq(appName), eq(desc), + eq(use), eq(effect), eq(type), eq(schema), eq(encryptedDataKey), eq(dataId), eq(group), eq(tenant)), times(1)); //expect insert config tags embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag1"), - eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), + eq(group), eq(tenant)), times(1)); embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag2"), - eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), + eq(group), eq(tenant)), times(1)); //expect insert history info of U Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), any(ConfigInfo.class), eq(srcIp), - eq(srcUser), any(Timestamp.class), eq("U")); + .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), any(ConfigInfo.class), eq(srcIp), eq(srcUser), + any(Timestamp.class), eq("U")); } @Test - public void testInsertOrUpdateCasOfUpdateConfigSuccess() { + void testInsertOrUpdateCasOfUpdateConfigSuccess() { Map configAdvanceInfo = new HashMap<>(); String desc = "testdesc11"; @@ -331,8 +326,8 @@ public void testInsertOrUpdateCasOfUpdateConfigSuccess() { configInfo.setEncryptedDataKey(encryptedDataKey); //mock get config state,first and second is not null - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + Mockito.when( + databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) .thenReturn(new ConfigInfoStateWrapper(), new ConfigInfoStateWrapper()); //mock select config info before update @@ -343,8 +338,8 @@ public void testInsertOrUpdateCasOfUpdateConfigSuccess() { configInfoWrapperOld.setAppName("old_app11"); configInfoWrapperOld.setMd5("old_md5"); configInfoWrapperOld.setId(123456799L); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(configInfoWrapperOld); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenReturn(configInfoWrapperOld); String srcIp = "srcIp"; String srcUser = "srcUser"; @@ -352,27 +347,27 @@ public void testInsertOrUpdateCasOfUpdateConfigSuccess() { //expect update config info invoked. embeddedStorageContextHolderMockedStatic.verify( () -> EmbeddedStorageContextHolder.addSqlContext(eq(Boolean.TRUE), anyString(), eq(content), - eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(desc), eq(use), eq(effect), eq(type), eq(schema), - eq(encryptedDataKey), eq(dataId), eq(group), eq(tenant), eq(casMd5)), times(1)); + eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), eq(appName), + eq(desc), eq(use), eq(effect), eq(type), eq(schema), eq(encryptedDataKey), eq(dataId), eq(group), eq(tenant), + eq(casMd5)), times(1)); //expect insert config tags embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag1"), - eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), + eq(group), eq(tenant)), times(1)); embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag2"), - eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), anyLong(), eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), + eq(group), eq(tenant)), times(1)); //expect insert history info of U Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), any(ConfigInfo.class), eq(srcIp), - eq(srcUser), any(Timestamp.class), eq("U")); + .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), any(ConfigInfo.class), eq(srcIp), eq(srcUser), + any(Timestamp.class), eq("U")); } @Test - public void testRemoveConfigInfo() { + void testRemoveConfigInfo() { String dataId = "dataId4567"; String group = "group3456789"; String tenant = "tenant4567890"; @@ -387,8 +382,8 @@ public void testRemoveConfigInfo() { configInfoWrapperOld.setMd5("old_md5"); configInfoWrapperOld.setId(12345678765L); configInfoWrapperOld.setEncryptedDataKey("key3456"); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(configInfoWrapperOld); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenReturn(configInfoWrapperOld); String srcIp = "srcIp1234"; String srcUser = "srcUser"; Mockito.when(databaseOperate.update(any())).thenReturn(true); @@ -396,21 +391,19 @@ public void testRemoveConfigInfo() { //expect delete config to be invoked embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant)), - times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant)), times(1)); //expect delete config tag to be invoked embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(configInfoWrapperOld.getId())), - times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(configInfoWrapperOld.getId())), times(1)); //expect insert delete history Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), eq(configInfoWrapperOld), eq(srcIp), - eq(srcUser), any(), eq("D")); + .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), eq(configInfoWrapperOld), eq(srcIp), eq(srcUser), any(), + eq("D")); } @Test - public void testRemoveConfigInfoByIds() { + void testRemoveConfigInfoByIds() { //mock exist config info List configInfos = new ArrayList<>(); @@ -419,8 +412,7 @@ public void testRemoveConfigInfoByIds() { List deleteIds = Arrays.asList(12344L, 3456789L); configInfos.get(0).setId(12344L); configInfos.get(1).setId(3456789L); - Mockito.when(databaseOperate.queryMany(anyString(), eq(deleteIds.toArray()), eq(CONFIG_INFO_ROW_MAPPER))) - .thenReturn(configInfos); + Mockito.when(databaseOperate.queryMany(anyString(), eq(deleteIds.toArray()), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(configInfos); String srcIp = "srcIp1234"; String srcUser = "srcUser"; Mockito.when(databaseOperate.update(any())).thenReturn(true); @@ -433,22 +425,20 @@ public void testRemoveConfigInfoByIds() { embeddedStorageContextHolderMockedStatic.verify( () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(deleteId0), eq(deleteId1)), times(1)); //expect delete config tag to be invoked - embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(deleteId0)), times(1)); - embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(deleteId1)), times(1)); + embeddedStorageContextHolderMockedStatic.verify(() -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(deleteId0)), + times(1)); + embeddedStorageContextHolderMockedStatic.verify(() -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(deleteId1)), + times(1)); //expect insert delete history Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfos.get(0).getId()), eq(configInfos.get(0)), eq(srcIp), - eq(srcUser), any(), eq("D")); + .insertConfigHistoryAtomic(eq(configInfos.get(0).getId()), eq(configInfos.get(0)), eq(srcIp), eq(srcUser), any(), eq("D")); Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfos.get(1).getId()), eq(configInfos.get(1)), eq(srcIp), - eq(srcUser), any(), eq("D")); + .insertConfigHistoryAtomic(eq(configInfos.get(1).getId()), eq(configInfos.get(1)), eq(srcIp), eq(srcUser), any(), eq("D")); } @Test - public void testBatchInsertOrUpdateOverwrite() throws NacosException { + void testBatchInsertOrUpdateOverwrite() throws NacosException { List configInfoList = new ArrayList<>(); //insert direct configInfoList.add(createMockConfigAllInfo(0)); @@ -462,32 +452,28 @@ public void testBatchInsertOrUpdateOverwrite() throws NacosException { //mock add config 1 success,config 2 fail and skip,config 3 success Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(0).getDataId(), configInfoList.get(0).getGroup(), - configInfoList.get(0).getTenant()}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(null); + eq(new Object[] {configInfoList.get(0).getDataId(), configInfoList.get(0).getGroup(), configInfoList.get(0).getTenant()}), + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null); Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(1).getDataId(), configInfoList.get(1).getGroup(), - configInfoList.get(1).getTenant()}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(new ConfigInfoStateWrapper()); + eq(new Object[] {configInfoList.get(1).getDataId(), configInfoList.get(1).getGroup(), configInfoList.get(1).getTenant()}), + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()); Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(2).getDataId(), configInfoList.get(2).getGroup(), - configInfoList.get(1).getTenant()}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(null); + eq(new Object[] {configInfoList.get(2).getDataId(), configInfoList.get(2).getGroup(), configInfoList.get(1).getTenant()}), + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null); //mock query config info during update ConfigInfoWrapper configInfoWrapper = new ConfigInfoWrapper(); Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(1).getDataId(), configInfoList.get(1).getGroup(), - configInfoList.get(1).getTenant()}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) - .thenReturn(configInfoWrapper); + eq(new Object[] {configInfoList.get(1).getDataId(), configInfoList.get(1).getGroup(), configInfoList.get(1).getTenant()}), + eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(configInfoWrapper); - Map stringObjectMap = embeddedConfigInfoPersistService.batchInsertOrUpdate(configInfoList, - srcUser, srcIp, configAdvanceInfo, SameConfigPolicy.OVERWRITE); - Assert.assertEquals(3, stringObjectMap.get("succCount")); - Assert.assertEquals(0, stringObjectMap.get("skipCount")); + Map stringObjectMap = embeddedConfigInfoPersistService.batchInsertOrUpdate(configInfoList, srcUser, srcIp, + configAdvanceInfo, SameConfigPolicy.OVERWRITE); + assertEquals(3, stringObjectMap.get("succCount")); + assertEquals(0, stringObjectMap.get("skipCount")); } @Test - public void testBatchInsertOrUpdateSkip() throws NacosException { + void testBatchInsertOrUpdateSkip() throws NacosException { List configInfoList = new ArrayList<>(); //insert direct configInfoList.add(createMockConfigAllInfo(0)); @@ -501,28 +487,24 @@ public void testBatchInsertOrUpdateSkip() throws NacosException { //mock add config 1 success,config 2 fail and skip,config 3 success Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(0).getDataId(), configInfoList.get(0).getGroup(), - configInfoList.get(0).getTenant()}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(null); + eq(new Object[] {configInfoList.get(0).getDataId(), configInfoList.get(0).getGroup(), configInfoList.get(0).getTenant()}), + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null); Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(1).getDataId(), configInfoList.get(1).getGroup(), - configInfoList.get(1).getTenant()}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(new ConfigInfoStateWrapper()); + eq(new Object[] {configInfoList.get(1).getDataId(), configInfoList.get(1).getGroup(), configInfoList.get(1).getTenant()}), + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()); Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(2).getDataId(), configInfoList.get(2).getGroup(), - configInfoList.get(1).getTenant()}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(null); - - Map stringObjectMap = embeddedConfigInfoPersistService.batchInsertOrUpdate(configInfoList, - srcUser, srcIp, configAdvanceInfo, SameConfigPolicy.SKIP); - Assert.assertEquals(2, stringObjectMap.get("succCount")); - Assert.assertEquals(1, stringObjectMap.get("skipCount")); - Assert.assertEquals(configInfoList.get(1).getDataId(), - ((List>) stringObjectMap.get("skipData")).get(0).get("dataId")); + eq(new Object[] {configInfoList.get(2).getDataId(), configInfoList.get(2).getGroup(), configInfoList.get(1).getTenant()}), + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null); + + Map stringObjectMap = embeddedConfigInfoPersistService.batchInsertOrUpdate(configInfoList, srcUser, srcIp, + configAdvanceInfo, SameConfigPolicy.SKIP); + assertEquals(2, stringObjectMap.get("succCount")); + assertEquals(1, stringObjectMap.get("skipCount")); + assertEquals(configInfoList.get(1).getDataId(), ((List>) stringObjectMap.get("skipData")).get(0).get("dataId")); } @Test - public void testBatchInsertOrUpdateAbort() throws NacosException { + void testBatchInsertOrUpdateAbort() throws NacosException { List configInfoList = new ArrayList<>(); //insert direct configInfoList.add(createMockConfigAllInfo(0)); @@ -536,28 +518,23 @@ public void testBatchInsertOrUpdateAbort() throws NacosException { //mock add config 1 success,config 2 fail and abort,config 3 not operated Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(0).getDataId(), configInfoList.get(0).getGroup(), - configInfoList.get(0).getTenant()}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(null); + eq(new Object[] {configInfoList.get(0).getDataId(), configInfoList.get(0).getGroup(), configInfoList.get(0).getTenant()}), + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null); Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(1).getDataId(), configInfoList.get(1).getGroup(), - configInfoList.get(1).getTenant()}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(new ConfigInfoStateWrapper()); + eq(new Object[] {configInfoList.get(1).getDataId(), configInfoList.get(1).getGroup(), configInfoList.get(1).getTenant()}), + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()); Mockito.when(databaseOperate.queryOne(anyString(), - eq(new Object[] {configInfoList.get(2).getDataId(), configInfoList.get(2).getGroup(), - configInfoList.get(1).getTenant()}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(null); - - Map stringObjectMap = embeddedConfigInfoPersistService.batchInsertOrUpdate(configInfoList, - srcUser, srcIp, configAdvanceInfo, SameConfigPolicy.ABORT); - Assert.assertEquals(1, stringObjectMap.get("succCount")); - Assert.assertEquals(1, stringObjectMap.get("skipCount")); + eq(new Object[] {configInfoList.get(2).getDataId(), configInfoList.get(2).getGroup(), configInfoList.get(1).getTenant()}), + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null); + + Map stringObjectMap = embeddedConfigInfoPersistService.batchInsertOrUpdate(configInfoList, srcUser, srcIp, + configAdvanceInfo, SameConfigPolicy.ABORT); + assertEquals(1, stringObjectMap.get("succCount")); + assertEquals(1, stringObjectMap.get("skipCount")); // config 2 failed - Assert.assertEquals(configInfoList.get(1).getDataId(), - ((List>) stringObjectMap.get("failData")).get(0).get("dataId")); + assertEquals(configInfoList.get(1).getDataId(), ((List>) stringObjectMap.get("failData")).get(0).get("dataId")); //skip config 3 - Assert.assertEquals(configInfoList.get(2).getDataId(), - ((List>) stringObjectMap.get("skipData")).get(0).get("dataId")); + assertEquals(configInfoList.get(2).getDataId(), ((List>) stringObjectMap.get("skipData")).get(0).get("dataId")); } private ConfigAllInfo createMockConfigAllInfo(long mockId) { @@ -597,34 +574,33 @@ private ConfigInfo createMockConfigInfo(long mockId) { } @Test - public void testFindConfigMaxId() { + void testFindConfigMaxId() { Mockito.when(databaseOperate.queryOne(anyString(), eq(Long.class))).thenReturn(123456L); long configMaxId = embeddedConfigInfoPersistService.findConfigMaxId(); - Assert.assertEquals(123456L, configMaxId); + assertEquals(123456L, configMaxId); } @Test - public void testFindConfigMaxId0() { + void testFindConfigMaxId0() { Mockito.when(databaseOperate.queryOne(anyString(), eq(Long.class))).thenReturn(0L); long configMaxId = embeddedConfigInfoPersistService.findConfigMaxId(); - Assert.assertEquals(0, configMaxId); + assertEquals(0, configMaxId); } @Test - public void testFindConfigInfoById() { + void testFindConfigInfoById() { long id = 1234567890876L; ConfigInfo configInfo = new ConfigInfo(); configInfo.setId(id); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {id}), eq(CONFIG_INFO_ROW_MAPPER))) - .thenReturn(configInfo); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {id}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(configInfo); ConfigInfo configReturn = embeddedConfigInfoPersistService.findConfigInfo(id); - Assert.assertEquals(id, configReturn.getId()); + assertEquals(id, configReturn.getId()); } @Test - public void testFindConfigInfoByDataId() { + void testFindConfigInfoByDataId() { String dataId = "dataId4567"; String group = "group3456789"; String tenant = "tenant4567890"; @@ -633,38 +609,37 @@ public void testFindConfigInfoByDataId() { configInfoWrapper.setGroup(group); configInfoWrapper.setTenant(tenant); - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(configInfoWrapper); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenReturn(configInfoWrapper); ConfigInfo configReturn = embeddedConfigInfoPersistService.findConfigInfo(dataId, group, tenant); - Assert.assertEquals(dataId, configReturn.getDataId()); + assertEquals(dataId, configReturn.getDataId()); } @Test - public void testFindConfigInfo4Page() { + void testFindConfigInfo4Page() { String dataId = "dataId4567222"; String group = "group3456789"; String tenant = "tenant4567890"; //mock total count - when(databaseOperate.queryOne(anyString(), eq(new Object[] {tenant, dataId, group}), - eq(Integer.class))).thenReturn(new Integer(9)); + when(databaseOperate.queryOne(anyString(), eq(new Object[] {tenant, dataId, group}), eq(Integer.class))).thenReturn(new Integer(9)); //mock page list List result = new ArrayList<>(); result.add(createMockConfigInfo(0)); result.add(createMockConfigInfo(1)); result.add(createMockConfigInfo(2)); - when(databaseOperate.queryMany(anyString(), eq(new Object[] {tenant, dataId, group}), - eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); + when(databaseOperate.queryMany(anyString(), eq(new Object[] {tenant, dataId, group}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn( + result); Map configAdvanceInfo = new HashMap<>(); - Page configInfo4Page = embeddedConfigInfoPersistService.findConfigInfo4Page(1, 3, dataId, group, - tenant, configAdvanceInfo); - Assert.assertEquals(result.size(), configInfo4Page.getPageItems().size()); - Assert.assertEquals(9, configInfo4Page.getTotalCount()); + Page configInfo4Page = embeddedConfigInfoPersistService.findConfigInfo4Page(1, 3, dataId, group, tenant, + configAdvanceInfo); + assertEquals(result.size(), configInfo4Page.getPageItems().size()); + assertEquals(9, configInfo4Page.getTotalCount()); } @Test - public void testFindConfigInfo4PageWithTags() { + void testFindConfigInfo4PageWithTags() { String dataId = "dataId4567222"; String group = "group3456789"; String tenant = "tenant4567890"; @@ -682,52 +657,51 @@ public void testFindConfigInfo4PageWithTags() { when(databaseOperate.queryMany(anyString(), eq(new Object[] {tenant, dataId, group, "tags1", "tags3"}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); - Page configInfo4Page = embeddedConfigInfoPersistService.findConfigInfo4Page(1, 3, dataId, group, - tenant, configAdvanceInfo); - Assert.assertEquals(result.size(), configInfo4Page.getPageItems().size()); - Assert.assertEquals(9, configInfo4Page.getTotalCount()); + Page configInfo4Page = embeddedConfigInfoPersistService.findConfigInfo4Page(1, 3, dataId, group, tenant, + configAdvanceInfo); + assertEquals(result.size(), configInfo4Page.getPageItems().size()); + assertEquals(9, configInfo4Page.getTotalCount()); } @Test - public void testConfigInfoCount() { + void testConfigInfoCount() { //mock total count when(databaseOperate.queryOne(anyString(), eq(Integer.class))).thenReturn(new Integer(9)); int count = embeddedConfigInfoPersistService.configInfoCount(); - Assert.assertEquals(9, count); + assertEquals(9, count); when(databaseOperate.queryOne(anyString(), eq(Integer.class))).thenReturn(null); try { embeddedConfigInfoPersistService.configInfoCount(); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertTrue(e instanceof IllegalArgumentException); + assertTrue(e instanceof IllegalArgumentException); } } @Test - public void testConfigInfoCountByTenant() { + void testConfigInfoCountByTenant() { String tenant = "tenant124"; //mock total count - when(databaseOperate.queryOne(anyString(), eq(new Object[] {tenant}), eq(Integer.class))).thenReturn( - new Integer(90)); + when(databaseOperate.queryOne(anyString(), eq(new Object[] {tenant}), eq(Integer.class))).thenReturn(new Integer(90)); int count = embeddedConfigInfoPersistService.configInfoCount(tenant); - Assert.assertEquals(90, count); + assertEquals(90, count); when(databaseOperate.queryOne(anyString(), eq(new Object[] {tenant}), eq(Integer.class))).thenReturn(null); try { embeddedConfigInfoPersistService.configInfoCount(tenant); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertTrue(e instanceof IllegalArgumentException); + assertTrue(e instanceof IllegalArgumentException); } } @Test - public void testFindConfigInfoLike4Page() { + void testFindConfigInfoLike4Page() { String dataId = "dataId4567222*"; String group = "group3456789*"; String tenant = "tenant4567890"; @@ -738,26 +712,26 @@ public void testFindConfigInfoLike4Page() { configAdvanceInfo.put("content", content); //mock total count when(databaseOperate.queryOne(anyString(), - eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, - content}), eq(Integer.class))).thenReturn(new Integer(9)); + eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content}), + eq(Integer.class))).thenReturn(new Integer(9)); //mock page list List result = new ArrayList<>(); result.add(createMockConfigInfo(0)); result.add(createMockConfigInfo(1)); result.add(createMockConfigInfo(2)); when(databaseOperate.queryMany(anyString(), - eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, - content}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); + eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content}), + eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); - Page configInfo4Page = embeddedConfigInfoPersistService.findConfigInfoLike4Page(1, 3, dataId, group, - tenant, configAdvanceInfo); - Assert.assertEquals(result.size(), configInfo4Page.getPageItems().size()); - Assert.assertEquals(9, configInfo4Page.getTotalCount()); + Page configInfo4Page = embeddedConfigInfoPersistService.findConfigInfoLike4Page(1, 3, dataId, group, tenant, + configAdvanceInfo); + assertEquals(result.size(), configInfo4Page.getPageItems().size()); + assertEquals(9, configInfo4Page.getTotalCount()); } @Test - public void testFindConfigInfoLike4PageWithTags() { + void testFindConfigInfoLike4PageWithTags() { String appName = "appName1234"; String content = "content123"; @@ -770,26 +744,26 @@ public void testFindConfigInfoLike4PageWithTags() { String tenant = "tenant4567890"; //mock total count when(databaseOperate.queryOne(anyString(), - eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content, - "tags", "tag2"}), eq(Integer.class))).thenReturn(new Integer(9)); + eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content, "tags", "tag2"}), + eq(Integer.class))).thenReturn(new Integer(9)); //mock page list List result = new ArrayList<>(); result.add(createMockConfigInfo(0)); result.add(createMockConfigInfo(1)); result.add(createMockConfigInfo(2)); when(databaseOperate.queryMany(anyString(), - eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content, - "tags", "tag2"}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); + eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content, "tags", "tag2"}), + eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); - Page configInfo4Page = embeddedConfigInfoPersistService.findConfigInfoLike4Page(1, 3, dataId, group, - tenant, configAdvanceInfo); - Assert.assertEquals(result.size(), configInfo4Page.getPageItems().size()); - Assert.assertEquals(9, configInfo4Page.getTotalCount()); + Page configInfo4Page = embeddedConfigInfoPersistService.findConfigInfoLike4Page(1, 3, dataId, group, tenant, + configAdvanceInfo); + assertEquals(result.size(), configInfo4Page.getPageItems().size()); + assertEquals(9, configInfo4Page.getTotalCount()); } @Test - public void testFindChangeConfig() { + void testFindChangeConfig() { //mock page list List result = new ArrayList<>(); @@ -802,56 +776,52 @@ public void testFindChangeConfig() { when(databaseOperate.queryMany(anyString(), eq(new Object[] {startTime, lastMaxId, pageSize}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(result); - List configInfo4List = embeddedConfigInfoPersistService.findChangeConfig(startTime, - lastMaxId, pageSize); - Assert.assertEquals(result.size(), configInfo4List.size()); + List configInfo4List = embeddedConfigInfoPersistService.findChangeConfig(startTime, lastMaxId, pageSize); + assertEquals(result.size(), configInfo4List.size()); } @Test - public void testSelectTagByConfig() { + void testSelectTagByConfig() { String dataId = "dataId4567222"; String group = "group3456789"; String tenant = "tenant4567890"; //mock page list List tagStrings = Arrays.asList("", "", ""); - when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(String.class))).thenReturn(tagStrings); + when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))).thenReturn(tagStrings); List configTags = embeddedConfigInfoPersistService.selectTagByConfig(dataId, group, tenant); - Assert.assertEquals(tagStrings, configTags); + assertEquals(tagStrings, configTags); } @Test - public void testFindConfigInfosByIds() { + void testFindConfigInfosByIds() { //mock page list List result = new ArrayList<>(); result.add(createMockConfigInfo(0)); result.add(createMockConfigInfo(1)); result.add(createMockConfigInfo(2)); - when(databaseOperate.queryMany(anyString(), eq(new Object[] {123L, 1232345L}), - eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); + when(databaseOperate.queryMany(anyString(), eq(new Object[] {123L, 1232345L}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); String ids = "123,1232345"; List configInfosByIds = embeddedConfigInfoPersistService.findConfigInfosByIds(ids); - Assert.assertEquals(result.size(), configInfosByIds.size()); - Assert.assertEquals(result.get(2).getDataId(), configInfosByIds.get(2).getDataId()); + assertEquals(result.size(), configInfosByIds.size()); + assertEquals(result.get(2).getDataId(), configInfosByIds.get(2).getDataId()); //blank ids. List nullResultBlankIds = embeddedConfigInfoPersistService.findConfigInfosByIds(""); - Assert.assertTrue(nullResultBlankIds == null); + assertTrue(nullResultBlankIds == null); } @Test - public void testFindConfigAdvanceInfo() { + void testFindConfigAdvanceInfo() { String dataId = "dataId1324"; String group = "group23546"; String tenant = "tenant13245"; //mock select tags List mockTags = Arrays.asList("tag1", "tag2", "tag3"); - when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(String.class))).thenReturn(mockTags); + when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))).thenReturn(mockTags); String schema = "schema12345654"; //mock select config advance @@ -861,41 +831,39 @@ public void testFindConfigAdvanceInfo() { eq(CONFIG_ADVANCE_INFO_ROW_MAPPER))).thenReturn(mockedAdvance); //execute return mock obj - ConfigAdvanceInfo configAdvanceInfo = embeddedConfigInfoPersistService.findConfigAdvanceInfo(dataId, group, - tenant); + ConfigAdvanceInfo configAdvanceInfo = embeddedConfigInfoPersistService.findConfigAdvanceInfo(dataId, group, tenant); //expect check schema & tags. - Assert.assertEquals(mockedAdvance.getSchema(), configAdvanceInfo.getSchema()); - Assert.assertEquals(String.join(",", mockTags), configAdvanceInfo.getConfigTags()); + assertEquals(mockedAdvance.getSchema(), configAdvanceInfo.getSchema()); + assertEquals(String.join(",", mockTags), configAdvanceInfo.getConfigTags()); } @Test - public void testFindConfigAllInfo() { + void testFindConfigAllInfo() { String dataId = "dataId1324"; String group = "group23546"; String tenant = "tenant13245"; //mock select tags List mockTags = Arrays.asList("tag1", "tag2", "tag3"); - when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(String.class))).thenReturn(mockTags); + when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))).thenReturn(mockTags); String schema = "schema12345654"; //mock select config advance ConfigAllInfo mockedConfig = new ConfigAllInfo(); mockedConfig.setSchema(schema); - when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn(mockedConfig); + when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn( + mockedConfig); //execute return mock obj ConfigAllInfo configAllInfo = embeddedConfigInfoPersistService.findConfigAllInfo(dataId, group, tenant); //expect check schema & tags. - Assert.assertEquals(mockedConfig.getSchema(), configAllInfo.getSchema()); - Assert.assertEquals(String.join(",", mockTags), configAllInfo.getConfigTags()); + assertEquals(mockedConfig.getSchema(), configAllInfo.getSchema()); + assertEquals(String.join(",", mockTags), configAllInfo.getConfigTags()); } @Test - public void testFindConfigInfoState() { + void testFindConfigInfoState() { String dataId = "dataId1324"; String group = "group23546"; @@ -909,15 +877,14 @@ public void testFindConfigInfoState() { eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(mockedConfig); //execute return mock obj - ConfigInfoStateWrapper configInfoStateWrapper = embeddedConfigInfoPersistService.findConfigInfoState(dataId, - group, tenant); + ConfigInfoStateWrapper configInfoStateWrapper = embeddedConfigInfoPersistService.findConfigInfoState(dataId, group, tenant); //expect check schema & tags. - Assert.assertEquals(mockedConfig.getId(), configInfoStateWrapper.getId()); - Assert.assertEquals(mockedConfig.getLastModified(), configInfoStateWrapper.getLastModified()); + assertEquals(mockedConfig.getId(), configInfoStateWrapper.getId()); + assertEquals(mockedConfig.getLastModified(), configInfoStateWrapper.getLastModified()); } @Test - public void testFindAllConfigInfo4Export() { + void testFindAllConfigInfo4Export() { //mock select config state List mockConfigs = new ArrayList<>(); @@ -931,26 +898,26 @@ public void testFindAllConfigInfo4Export() { String appName = "appName1243"; List ids = Arrays.asList(132L, 1343L, 245L); - when(databaseOperate.queryMany(anyString(), eq(new Object[] {132L, 1343L, 245L}), - eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn(mockConfigs); + when(databaseOperate.queryMany(anyString(), eq(new Object[] {132L, 1343L, 245L}), eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn( + mockConfigs); //execute return mock obj - List configAllInfosIds = embeddedConfigInfoPersistService.findAllConfigInfo4Export(dataId, group, - tenant, appName, ids); + List configAllInfosIds = embeddedConfigInfoPersistService.findAllConfigInfo4Export(dataId, group, tenant, appName, + ids); //expect check - Assert.assertEquals(mockConfigs, configAllInfosIds); + assertEquals(mockConfigs, configAllInfosIds); when(databaseOperate.queryMany(anyString(), eq(new Object[] {tenant, dataId, group, appName}), eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn(mockConfigs); //execute return mock obj - List configAllInfosWithDataId = embeddedConfigInfoPersistService.findAllConfigInfo4Export(dataId, - group, tenant, appName, null); + List configAllInfosWithDataId = embeddedConfigInfoPersistService.findAllConfigInfo4Export(dataId, group, tenant, + appName, null); //expect check - Assert.assertEquals(mockConfigs, configAllInfosWithDataId); + assertEquals(mockConfigs, configAllInfosWithDataId); } @Test - public void testQueryConfigInfoByNamespace() { + void testQueryConfigInfoByNamespace() { //mock select config state List mockConfigs = new ArrayList<>(); @@ -958,17 +925,15 @@ public void testQueryConfigInfoByNamespace() { mockConfigs.add(createMockConfigInfoWrapper(1)); mockConfigs.add(createMockConfigInfoWrapper(2)); String tenant = "tenant13245"; - when(databaseOperate.queryMany(anyString(), eq(new Object[] {tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(mockConfigs); + when(databaseOperate.queryMany(anyString(), eq(new Object[] {tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(mockConfigs); //execute return mock obj - List configInfoWrappers = embeddedConfigInfoPersistService.queryConfigInfoByNamespace( - tenant); + List configInfoWrappers = embeddedConfigInfoPersistService.queryConfigInfoByNamespace(tenant); //expect check - Assert.assertEquals(mockConfigs, configInfoWrappers); + assertEquals(mockConfigs, configInfoWrappers); } @Test - public void testGetTenantIdList() { + void testGetTenantIdList() { //mock select config state List tenantStrings = Arrays.asList("tenant1", "tenant2", "tenant3"); @@ -987,11 +952,11 @@ public void testGetTenantIdList() { //execute return mock obj List returnTenants = embeddedConfigInfoPersistService.getTenantIdList(page, pageSize); //expect check - Assert.assertEquals(tenantStrings, returnTenants); + assertEquals(tenantStrings, returnTenants); } @Test - public void testGetGroupIdList() { + void testGetGroupIdList() { //mock select config state List groupStrings = Arrays.asList("group1", "group2", "group3"); @@ -1011,25 +976,23 @@ public void testGetGroupIdList() { List returnGroups = embeddedConfigInfoPersistService.getGroupIdList(page, pageSize); //expect check - Assert.assertEquals(groupStrings, returnGroups); + assertEquals(groupStrings, returnGroups); } @Test - public void testFindAllConfigInfoFragment() { + void testFindAllConfigInfoFragment() { //mock page list List mockConfigs = new ArrayList<>(); mockConfigs.add(createMockConfigInfoWrapper(0)); mockConfigs.add(createMockConfigInfoWrapper(1)); mockConfigs.add(createMockConfigInfoWrapper(2)); long lastId = 10111L; - when(databaseOperate.queryMany(anyString(), eq(new Object[] {lastId}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(mockConfigs); + when(databaseOperate.queryMany(anyString(), eq(new Object[] {lastId}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(mockConfigs); int pageSize = 100; //execute return mock obj - Page returnConfigPage = embeddedConfigInfoPersistService.findAllConfigInfoFragment(lastId, - pageSize, true); + Page returnConfigPage = embeddedConfigInfoPersistService.findAllConfigInfoFragment(lastId, pageSize, true); //expect check - Assert.assertEquals(mockConfigs, returnConfigPage.getPageItems()); + assertEquals(mockConfigs, returnConfigPage.getPageItems()); } } \ No newline at end of file diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoTagPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoTagPersistServiceImplTest.java index 90466e04f4e..5c09eeef356 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoTagPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoTagPersistServiceImplTest.java @@ -28,15 +28,14 @@ import com.alibaba.nacos.persistence.repository.embedded.EmbeddedStorageContextHolder; import com.alibaba.nacos.persistence.repository.embedded.operate.DatabaseOperate; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.sql.Timestamp; import java.util.ArrayList; @@ -45,6 +44,7 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; @@ -52,16 +52,12 @@ import static org.mockito.Mockito.when; /** - * test for embedded config tag. + * test for embedded config tag. + * * @author shiyiyue */ -@RunWith(SpringJUnit4ClassRunner.class) -public class EmbeddedConfigInfoTagPersistServiceImplTest { - - private EmbeddedConfigInfoTagPersistServiceImpl embeddedConfigInfoTagPersistService; - - @Mock - private DataSourceService dataSourceService; +@ExtendWith(SpringExtension.class) +class EmbeddedConfigInfoTagPersistServiceImplTest { MockedStatic envUtilMockedStatic; @@ -75,28 +71,32 @@ public class EmbeddedConfigInfoTagPersistServiceImplTest { @Mock DatabaseOperate databaseOperate; - @Before - public void before() { + private EmbeddedConfigInfoTagPersistServiceImpl embeddedConfigInfoTagPersistService; + + @Mock + private DataSourceService dataSourceService; + + @BeforeEach + void before() { embeddedStorageContextHolderMockedStatic = Mockito.mockStatic(EmbeddedStorageContextHolder.class); dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); when(DynamicDataSource.getInstance()).thenReturn(dynamicDataSource); when(dynamicDataSource.getDataSource()).thenReturn(dataSourceService); when(dataSourceService.getDataSourceType()).thenReturn("derby"); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); embeddedConfigInfoTagPersistService = new EmbeddedConfigInfoTagPersistServiceImpl(databaseOperate); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); embeddedStorageContextHolderMockedStatic.close(); } @Test - public void testInsertOrUpdateTagOfAdd() { + void testInsertOrUpdateTagOfAdd() { String dataId = "dataId111222"; String group = "group"; String tenant = "tenant"; @@ -116,21 +116,20 @@ public void testInsertOrUpdateTagOfAdd() { String srcIp = "ip345678"; String srcUser = "user1234567"; - ConfigOperateResult configOperateResult = embeddedConfigInfoTagPersistService.insertOrUpdateTag(configInfo, tag, - srcIp, srcUser); + ConfigOperateResult configOperateResult = embeddedConfigInfoTagPersistService.insertOrUpdateTag(configInfo, tag, srcIp, srcUser); //mock insert invoked. embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant), - eq(tag), eq(appName), eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), - eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class)), times(1)); - Assert.assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag), eq(appName), + eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), + any(Timestamp.class)), times(1)); + assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); } @Test - public void testInsertOrUpdateTagOfUpdate() { + void testInsertOrUpdateTagOfUpdate() { String dataId = "dataId111222"; String group = "group"; String tenant = "tenant"; @@ -146,24 +145,21 @@ public void testInsertOrUpdateTagOfUpdate() { String tag = "tag123"; Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, tag}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()) - .thenReturn(configInfoStateWrapper); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()).thenReturn(configInfoStateWrapper); String srcIp = "ip345678"; String srcUser = "user1234567"; - ConfigOperateResult configOperateResult = embeddedConfigInfoTagPersistService.insertOrUpdateTag(configInfo, tag, - srcIp, srcUser); + ConfigOperateResult configOperateResult = embeddedConfigInfoTagPersistService.insertOrUpdateTag(configInfo, tag, srcIp, srcUser); //verify update to be invoked - embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(content), - eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag)), times(1)); - Assert.assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + embeddedStorageContextHolderMockedStatic.verify(() -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(content), + eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), eq(appName), + eq(dataId), eq(group), eq(tenant), eq(tag)), times(1)); + assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); } @Test - public void testInsertOrUpdateTagCasOfAdd() { + void testInsertOrUpdateTagCasOfAdd() { String dataId = "dataId111222"; String group = "group"; String tenant = "tenant"; @@ -184,21 +180,20 @@ public void testInsertOrUpdateTagCasOfAdd() { String srcIp = "ip345678"; String srcUser = "user1234567"; - ConfigOperateResult configOperateResult = embeddedConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, - tag, srcIp, srcUser); + ConfigOperateResult configOperateResult = embeddedConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, tag, srcIp, srcUser); //verify insert to be invoked //mock insert invoked. embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant), - eq(tag), eq(appName), eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), - eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class)), times(1)); - Assert.assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag), eq(appName), + eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), + any(Timestamp.class)), times(1)); + assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); } @Test - public void testInsertOrUpdateTagCasOfUpdate() { + void testInsertOrUpdateTagCasOfUpdate() { String dataId = "dataId111222"; String group = "group"; String tenant = "tenant"; @@ -214,27 +209,23 @@ public void testInsertOrUpdateTagCasOfUpdate() { configInfoStateWrapper.setId(234567890L); String tag = "tag123"; Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, tag}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()) - .thenReturn(configInfoStateWrapper); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()).thenReturn(configInfoStateWrapper); String srcIp = "ip345678"; String srcUser = "user1234567"; //mock cas update return 1 Mockito.when(databaseOperate.blockUpdate()).thenReturn(true); - ConfigOperateResult configOperateResult = embeddedConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, - tag, srcIp, srcUser); + ConfigOperateResult configOperateResult = embeddedConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, tag, srcIp, srcUser); //verify update to be invoked - embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(content), - eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag), - eq(configInfo.getMd5())), times(1)); - Assert.assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + embeddedStorageContextHolderMockedStatic.verify(() -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(content), + eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), eq(appName), + eq(dataId), eq(group), eq(tenant), eq(tag), eq(configInfo.getMd5())), times(1)); + assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); } @Test - public void testRemoveConfigInfoTag() { + void testRemoveConfigInfoTag() { String dataId = "dataId1112222"; String group = "group22"; String tenant = "tenant2"; @@ -244,12 +235,11 @@ public void testRemoveConfigInfoTag() { embeddedConfigInfoTagPersistService.removeConfigInfoTag(dataId, group, tenant, tag, srcIp, srcUser); //verify delete sql invoked. embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant), - eq(tag)), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag)), times(1)); } @Test - public void testFindConfigInfo4Tag() { + void testFindConfigInfo4Tag() { String dataId = "dataId1112222"; String group = "group22"; String tenant = "tenant2"; @@ -262,24 +252,23 @@ public void testFindConfigInfo4Tag() { Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant, tag}), eq(CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER))).thenReturn(configInfoTagWrapperMocked); - ConfigInfoTagWrapper configInfo4TagReturn = embeddedConfigInfoTagPersistService.findConfigInfo4Tag(dataId, - group, tenant, tag); - Assert.assertEquals(configInfoTagWrapperMocked, configInfo4TagReturn); + ConfigInfoTagWrapper configInfo4TagReturn = embeddedConfigInfoTagPersistService.findConfigInfo4Tag(dataId, group, tenant, tag); + assertEquals(configInfoTagWrapperMocked, configInfo4TagReturn); } @Test - public void testConfigInfoTagCount() { + void testConfigInfoTagCount() { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); //mock count Mockito.when(databaseOperate.queryOne(anyString(), eq(Integer.class))).thenReturn(308); //execute & verify int count = embeddedConfigInfoTagPersistService.configInfoTagCount(); - Assert.assertEquals(308, count); + assertEquals(308, count); } @Test - public void testFindAllConfigInfoTagForDumpAll() { + void testFindAllConfigInfoTagForDumpAll() { //mock count Mockito.when(databaseOperate.queryOne(anyString(), eq(Integer.class))).thenReturn(308); @@ -291,20 +280,18 @@ public void testFindAllConfigInfoTagForDumpAll() { mockTagList.get(1).setLastModified(System.currentTimeMillis()); mockTagList.get(2).setLastModified(System.currentTimeMillis()); //mock query list - Mockito.when( - databaseOperate.queryMany(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER))) + Mockito.when(databaseOperate.queryMany(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER))) .thenReturn(mockTagList); int pageNo = 3; int pageSize = 100; //execute & verify - Page returnTagPage = embeddedConfigInfoTagPersistService.findAllConfigInfoTagForDumpAll( - pageNo, pageSize); - Assert.assertEquals(308, returnTagPage.getTotalCount()); - Assert.assertEquals(mockTagList, returnTagPage.getPageItems()); + Page returnTagPage = embeddedConfigInfoTagPersistService.findAllConfigInfoTagForDumpAll(pageNo, pageSize); + assertEquals(308, returnTagPage.getTotalCount()); + assertEquals(mockTagList, returnTagPage.getPageItems()); } @Test - public void testFindConfigInfoTags() { + void testFindConfigInfoTags() { String dataId = "dataId1112222"; String group = "group22"; String tenant = "tenant2"; @@ -312,6 +299,6 @@ public void testFindConfigInfoTags() { Mockito.when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))) .thenReturn(mockedTags); List configInfoTags = embeddedConfigInfoTagPersistService.findConfigInfoTags(dataId, group, tenant); - Assert.assertEquals(mockedTags, configInfoTags); + assertEquals(mockedTags, configInfoTags); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedHistoryConfigInfoPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedHistoryConfigInfoPersistServiceImplTest.java index 52b27017329..47a33bf16a2 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedHistoryConfigInfoPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedHistoryConfigInfoPersistServiceImplTest.java @@ -25,15 +25,14 @@ import com.alibaba.nacos.persistence.repository.embedded.EmbeddedStorageContextHolder; import com.alibaba.nacos.persistence.repository.embedded.operate.DatabaseOperate; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.sql.Timestamp; import java.util.ArrayList; @@ -42,6 +41,7 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.HISTORY_DETAIL_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.HISTORY_LIST_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; @@ -52,13 +52,8 @@ * * @author shiyiyue */ -@RunWith(SpringJUnit4ClassRunner.class) -public class EmbeddedHistoryConfigInfoPersistServiceImplTest { - - private EmbeddedHistoryConfigInfoPersistServiceImpl embeddedHistoryConfigInfoPersistService; - - @Mock - private DataSourceService dataSourceService; +@ExtendWith(SpringExtension.class) +class EmbeddedHistoryConfigInfoPersistServiceImplTest { MockedStatic envUtilMockedStatic; @@ -72,28 +67,32 @@ public class EmbeddedHistoryConfigInfoPersistServiceImplTest { @Mock DatabaseOperate databaseOperate; - @Before - public void before() { + private EmbeddedHistoryConfigInfoPersistServiceImpl embeddedHistoryConfigInfoPersistService; + + @Mock + private DataSourceService dataSourceService; + + @BeforeEach + void before() { embeddedStorageContextHolderMockedStatic = Mockito.mockStatic(EmbeddedStorageContextHolder.class); dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); when(DynamicDataSource.getInstance()).thenReturn(dynamicDataSource); when(dynamicDataSource.getDataSource()).thenReturn(dataSourceService); when(dataSourceService.getDataSourceType()).thenReturn("derby"); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); embeddedHistoryConfigInfoPersistService = new EmbeddedHistoryConfigInfoPersistServiceImpl(databaseOperate); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); embeddedStorageContextHolderMockedStatic.close(); } @Test - public void testInsertConfigHistoryAtomic() { + void testInsertConfigHistoryAtomic() { String dataId = "dateId243"; String group = "group243"; String tenant = "tenant243"; @@ -107,18 +106,17 @@ public void testInsertConfigHistoryAtomic() { ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content); configInfo.setEncryptedDataKey("key23456"); //expect insert success,verify insert invoked - embeddedHistoryConfigInfoPersistService.insertConfigHistoryAtomic(id, configInfo, srcIp, srcUser, timestamp, - ops); + embeddedHistoryConfigInfoPersistService.insertConfigHistoryAtomic(id, configInfo, srcIp, srcUser, timestamp, ops); //verify insert to be invoked embeddedStorageContextHolderMockedStatic.verify( - () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(id), eq(dataId), eq(group), eq(tenant), - eq(appName), eq(content), eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), eq(timestamp), - eq(ops), eq(configInfo.getEncryptedDataKey())), times(1)); + () -> EmbeddedStorageContextHolder.addSqlContext(anyString(), eq(id), eq(dataId), eq(group), eq(tenant), eq(appName), + eq(content), eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), eq(timestamp), eq(ops), + eq(configInfo.getEncryptedDataKey())), times(1)); } @Test - public void testRemoveConfigHistory() { + void testRemoveConfigHistory() { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); int pageSize = 1233; embeddedHistoryConfigInfoPersistService.removeConfigHistory(timestamp, pageSize); @@ -128,7 +126,7 @@ public void testRemoveConfigHistory() { } @Test - public void testFindDeletedConfig() { + void testFindDeletedConfig() { //mock query list return ConfigInfoStateWrapper mockObj1 = new ConfigInfoStateWrapper(); @@ -152,47 +150,46 @@ public void testFindDeletedConfig() { Mockito.when(databaseOperate.queryMany(anyString(), eq(new Object[] {timestamp, startId, pageSize}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(list); //execute - List deletedConfig = embeddedHistoryConfigInfoPersistService.findDeletedConfig( - timestamp, startId, pageSize); + List deletedConfig = embeddedHistoryConfigInfoPersistService.findDeletedConfig(timestamp, startId, + pageSize); //expect verify - Assert.assertEquals("data_id1", deletedConfig.get(0).getDataId()); - Assert.assertEquals("group_id1", deletedConfig.get(0).getGroup()); - Assert.assertEquals("tenant_id1", deletedConfig.get(0).getTenant()); - Assert.assertEquals(mockObj1.getLastModified(), deletedConfig.get(0).getLastModified()); - Assert.assertEquals("data_id2", deletedConfig.get(1).getDataId()); - Assert.assertEquals("group_id2", deletedConfig.get(1).getGroup()); - Assert.assertEquals("tenant_id2", deletedConfig.get(1).getTenant()); - Assert.assertEquals(mockObj2.getLastModified(), deletedConfig.get(1).getLastModified()); + assertEquals("data_id1", deletedConfig.get(0).getDataId()); + assertEquals("group_id1", deletedConfig.get(0).getGroup()); + assertEquals("tenant_id1", deletedConfig.get(0).getTenant()); + assertEquals(mockObj1.getLastModified(), deletedConfig.get(0).getLastModified()); + assertEquals("data_id2", deletedConfig.get(1).getDataId()); + assertEquals("group_id2", deletedConfig.get(1).getGroup()); + assertEquals("tenant_id2", deletedConfig.get(1).getTenant()); + assertEquals(mockObj2.getLastModified(), deletedConfig.get(1).getLastModified()); } @Test - public void testFindConfigHistory() { + void testFindConfigHistory() { String dataId = "dataId34567"; String group = "group34567"; String tenant = "tenant34567"; //mock count - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))) - .thenReturn(300); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))).thenReturn(300); //mock list List mockList = new ArrayList<>(); mockList.add(createMockConfigHistoryInfo(0)); mockList.add(createMockConfigHistoryInfo(1)); mockList.add(createMockConfigHistoryInfo(2)); - Mockito.when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(HISTORY_LIST_ROW_MAPPER))).thenReturn(mockList); + Mockito.when(databaseOperate.queryMany(anyString(), eq(new Object[] {dataId, group, tenant}), eq(HISTORY_LIST_ROW_MAPPER))) + .thenReturn(mockList); int pageSize = 100; int pageNo = 2; //execute & verify - Page historyReturn = embeddedHistoryConfigInfoPersistService.findConfigHistory(dataId, group, - tenant, pageNo, pageSize); - Assert.assertEquals(mockList, historyReturn.getPageItems()); - Assert.assertEquals(300, historyReturn.getTotalCount()); + Page historyReturn = embeddedHistoryConfigInfoPersistService.findConfigHistory(dataId, group, tenant, pageNo, + pageSize); + assertEquals(mockList, historyReturn.getPageItems()); + assertEquals(300, historyReturn.getTotalCount()); } @Test - public void testDetailConfigHistory() { + void testDetailConfigHistory() { long nid = 256789; //mock query @@ -201,11 +198,11 @@ public void testDetailConfigHistory() { .thenReturn(mockConfigHistoryInfo); //execute & verify ConfigHistoryInfo historyReturn = embeddedHistoryConfigInfoPersistService.detailConfigHistory(nid); - Assert.assertEquals(mockConfigHistoryInfo, historyReturn); + assertEquals(mockConfigHistoryInfo, historyReturn); } @Test - public void testDetailPreviousConfigHistory() { + void testDetailPreviousConfigHistory() { long nid = 256789; //mock query ConfigHistoryInfo mockConfigHistoryInfo = createMockConfigHistoryInfo(0); @@ -213,19 +210,18 @@ public void testDetailPreviousConfigHistory() { .thenReturn(mockConfigHistoryInfo); //execute & verify ConfigHistoryInfo historyReturn = embeddedHistoryConfigInfoPersistService.detailPreviousConfigHistory(nid); - Assert.assertEquals(mockConfigHistoryInfo, historyReturn); + assertEquals(mockConfigHistoryInfo, historyReturn); } @Test - public void testFindConfigHistoryCountByTime() { + void testFindConfigHistoryCountByTime() { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); //mock count - Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {timestamp}), eq(Integer.class))) - .thenReturn(308); + Mockito.when(databaseOperate.queryOne(anyString(), eq(new Object[] {timestamp}), eq(Integer.class))).thenReturn(308); //execute & verify int count = embeddedHistoryConfigInfoPersistService.findConfigHistoryCountByTime(timestamp); - Assert.assertEquals(308, count); + assertEquals(308, count); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoAggrPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoAggrPersistServiceImplTest.java index 47922d240e2..93209fb85fa 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoAggrPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoAggrPersistServiceImplTest.java @@ -24,18 +24,17 @@ import com.alibaba.nacos.persistence.datasource.DynamicDataSource; import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.jdbc.CannotGetJdbcConnectionException; import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.TransactionSystemException; import org.springframework.transaction.support.TransactionTemplate; @@ -47,13 +46,26 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_AGGR_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_CHANGED_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) -public class ExternalConfigInfoAggrPersistServiceImplTest { +@ExtendWith(SpringExtension.class) +class ExternalConfigInfoAggrPersistServiceImplTest { + + MockedStatic envUtilMockedStatic; + + MockedStatic externalStorageUtilsMockedStatic; + + MockedStatic dynamicDataSourceMockedStatic; + + @Mock + DynamicDataSource dynamicDataSource; private ExternalConfigInfoAggrPersistServiceImpl externalConfigInfoAggrPersistService; @@ -65,17 +77,8 @@ public class ExternalConfigInfoAggrPersistServiceImplTest { private TransactionTemplate transactionTemplate = TestCaseUtils.createMockTransactionTemplate(); - MockedStatic envUtilMockedStatic; - - MockedStatic externalStorageUtilsMockedStatic; - - MockedStatic dynamicDataSourceMockedStatic; - - @Mock - DynamicDataSource dynamicDataSource; - - @Before - public void before() { + @BeforeEach + void before() { dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); externalStorageUtilsMockedStatic = Mockito.mockStatic(ExternalStorageUtils.class); @@ -84,21 +87,20 @@ public void before() { when(dataSourceService.getTransactionTemplate()).thenReturn(transactionTemplate); when(dataSourceService.getJdbcTemplate()).thenReturn(jdbcTemplate); when(dataSourceService.getDataSourceType()).thenReturn("mysql"); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); externalConfigInfoAggrPersistService = new ExternalConfigInfoAggrPersistServiceImpl(); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); externalStorageUtilsMockedStatic.close(); } @Test - public void testAddAggrConfigInfoOfEqualContent() { + void testAddAggrConfigInfoOfEqualContent() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; @@ -108,16 +110,15 @@ public void testAddAggrConfigInfoOfEqualContent() { //mock query datumId and equal with current content param. String existContent = "content1234"; - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), - eq(String.class))).thenReturn(existContent); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), eq(String.class))).thenReturn( + existContent); - boolean result = externalConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, - content); - Assert.assertTrue(result); + boolean result = externalConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, content); + assertTrue(result); } @Test - public void testAddAggrConfigInfoOfAddNewContent() { + void testAddAggrConfigInfoOfAddNewContent() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; @@ -126,20 +127,19 @@ public void testAddAggrConfigInfoOfAddNewContent() { String content = "content1234"; //mock query datumId and throw EmptyResultDataAccessException. - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), - eq(String.class))).thenThrow(new EmptyResultDataAccessException(1)); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), eq(String.class))).thenThrow( + new EmptyResultDataAccessException(1)); //mock insert success when(jdbcTemplate.update(anyString(), eq(dataId), eq(group), eq(tenant), eq(datumId), eq(appName), eq(content), any(Timestamp.class))).thenReturn(1); //execute - boolean result = externalConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, - content); - Assert.assertTrue(result); + boolean result = externalConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, content); + assertTrue(result); } @Test - public void testAddAggrConfigInfoOfUpdateNotEqualContent() { + void testAddAggrConfigInfoOfUpdateNotEqualContent() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; @@ -149,20 +149,19 @@ public void testAddAggrConfigInfoOfUpdateNotEqualContent() { //mock query datumId String existContent = "existContent111"; - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), - eq(String.class))).thenReturn(existContent); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), eq(String.class))).thenReturn( + existContent); //mock update success,return 1 when(jdbcTemplate.update(anyString(), eq(content), any(Timestamp.class), eq(dataId), eq(group), eq(tenant), eq(datumId))).thenReturn(1); //mock update content - boolean result = externalConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, - content); - Assert.assertTrue(result); + boolean result = externalConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, content); + assertTrue(result); } @Test - public void testAddAggrConfigInfoOfException() { + void testAddAggrConfigInfoOfException() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; @@ -171,159 +170,151 @@ public void testAddAggrConfigInfoOfException() { String content = "content1234"; //mock query datumId and throw EmptyResultDataAccessException. - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), - eq(String.class))).thenThrow(new CannotGetJdbcConnectionException("mock exp")); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, datumId}), eq(String.class))).thenThrow( + new CannotGetJdbcConnectionException("mock exp")); try { externalConfigInfoAggrPersistService.addAggrConfigInfo(dataId, group, tenant, datumId, appName, content); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exp) { - Assert.assertEquals("mock exp", exp.getMessage()); + assertEquals("mock exp", exp.getMessage()); } } @Test - public void testBatchPublishAggrSuccess() { + void testBatchPublishAggrSuccess() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; //mock query datumId and equal with current content param. - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, "d1"}), - eq(String.class))).thenReturn("c1"); - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, "d2"}), - eq(String.class))).thenReturn("c2"); - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, "d3"}), - eq(String.class))).thenReturn("c3"); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, "d1"}), eq(String.class))).thenReturn("c1"); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, "d2"}), eq(String.class))).thenReturn("c2"); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, "d3"}), eq(String.class))).thenReturn("c3"); Map datumMap = new HashMap<>(); datumMap.put("d1", "c1"); datumMap.put("d2", "c2"); datumMap.put("d3", "c3"); String appName = "appname1234"; - boolean result = externalConfigInfoAggrPersistService.batchPublishAggr(dataId, group, tenant, datumMap, - appName); - Assert.assertTrue(result); + boolean result = externalConfigInfoAggrPersistService.batchPublishAggr(dataId, group, tenant, datumMap, appName); + assertTrue(result); } @Test - public void testBatchPublishAggrException() { + void testBatchPublishAggrException() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; //mock query datumId and equal with current content param. - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, "d1"}), - eq(String.class))).thenThrow(new TransactionSystemException("c1t fail")); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, "d1"}), eq(String.class))).thenThrow( + new TransactionSystemException("c1t fail")); Map datumMap = new HashMap<>(); datumMap.put("d1", "c1"); datumMap.put("d2", "c2"); datumMap.put("d3", "c3"); String appName = "appname1234"; - boolean result = externalConfigInfoAggrPersistService.batchPublishAggr(dataId, group, tenant, datumMap, - appName); - Assert.assertFalse(result); + boolean result = externalConfigInfoAggrPersistService.batchPublishAggr(dataId, group, tenant, datumMap, appName); + assertFalse(result); } @Test - public void testAggrConfigInfoCount() { + void testAggrConfigInfoCount() { String dataId = "dataId11122"; String group = "group"; String tenant = "tenant"; //mock select count of aggr. - when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class), eq(dataId), eq(group), eq(tenant))).thenReturn( - new Integer(101)); + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class), eq(dataId), eq(group), eq(tenant))).thenReturn(new Integer(101)); int result = externalConfigInfoAggrPersistService.aggrConfigInfoCount(dataId, group, tenant); - Assert.assertEquals(101, result); + assertEquals(101, result); } @Test - public void testFindConfigInfoAggrByPage() { + void testFindConfigInfoAggrByPage() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; //mock query count. - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(Integer.class))).thenReturn(101); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))).thenReturn(101); //mock query page list List configInfoAggrs = new ArrayList<>(); configInfoAggrs.add(new ConfigInfoAggr()); configInfoAggrs.add(new ConfigInfoAggr()); configInfoAggrs.add(new ConfigInfoAggr()); - when(jdbcTemplate.query(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_AGGR_ROW_MAPPER))).thenReturn(configInfoAggrs); + when(jdbcTemplate.query(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_AGGR_ROW_MAPPER))).thenReturn( + configInfoAggrs); int pageNo = 1; int pageSize = 120; - Page configInfoAggrByPage = externalConfigInfoAggrPersistService.findConfigInfoAggrByPage( - dataId, group, tenant, pageNo, pageSize); - Assert.assertEquals(101, configInfoAggrByPage.getTotalCount()); - Assert.assertEquals(configInfoAggrs, configInfoAggrByPage.getPageItems()); + Page configInfoAggrByPage = externalConfigInfoAggrPersistService.findConfigInfoAggrByPage(dataId, group, tenant, + pageNo, pageSize); + assertEquals(101, configInfoAggrByPage.getTotalCount()); + assertEquals(configInfoAggrs, configInfoAggrByPage.getPageItems()); } @Test - public void testFindConfigInfoAggrByPageOfException() { + void testFindConfigInfoAggrByPageOfException() { String dataId = "dataId111"; String group = "group"; String tenant = "tenant"; //mock query count exception. - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(Integer.class))).thenThrow(new CannotGetJdbcConnectionException("mock fail222")); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))).thenThrow( + new CannotGetJdbcConnectionException("mock fail222")); try { int pageNo = 1; int pageSize = 120; externalConfigInfoAggrPersistService.findConfigInfoAggrByPage(dataId, group, tenant, pageNo, pageSize); - Assert.assertTrue(false); + assertTrue(false); } catch (Throwable throwable) { - Assert.assertEquals("mock fail222", throwable.getMessage()); + assertEquals("mock fail222", throwable.getMessage()); } } @Test - public void testFindAllAggrGroup() { + void testFindAllAggrGroup() { List configList = new ArrayList<>(); configList.add(create("dataId", 0)); configList.add(create("dataId", 1)); //mock return list - when(jdbcTemplate.query(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_CHANGED_ROW_MAPPER))).thenReturn( - configList); + when(jdbcTemplate.query(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_CHANGED_ROW_MAPPER))).thenReturn(configList); List allAggrGroup = externalConfigInfoAggrPersistService.findAllAggrGroup(); - Assert.assertEquals(configList, allAggrGroup); + assertEquals(configList, allAggrGroup); } @Test - public void testFindAllAggrGroupException() { + void testFindAllAggrGroupException() { //mock throw CannotGetJdbcConnectionException when(jdbcTemplate.query(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_CHANGED_ROW_MAPPER))).thenThrow( new CannotGetJdbcConnectionException("mock fail")); try { externalConfigInfoAggrPersistService.findAllAggrGroup(); - Assert.assertTrue(false); + assertTrue(false); } catch (Throwable throwable) { - Assert.assertEquals("mock fail", throwable.getMessage()); + assertEquals("mock fail", throwable.getMessage()); } //mock throw EmptyResultDataAccessException when(jdbcTemplate.query(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_CHANGED_ROW_MAPPER))).thenThrow( new EmptyResultDataAccessException(1)); List allAggrGroup = externalConfigInfoAggrPersistService.findAllAggrGroup(); - Assert.assertEquals(null, allAggrGroup); + assertNull(allAggrGroup); //mock Exception when(jdbcTemplate.query(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_CHANGED_ROW_MAPPER))).thenThrow( new RuntimeException("789")); try { externalConfigInfoAggrPersistService.findAllAggrGroup(); - Assert.assertTrue(false); + assertTrue(false); } catch (Throwable throwable) { - Assert.assertEquals("789", throwable.getCause().getMessage()); + assertEquals("789", throwable.getCause().getMessage()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoBetaPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoBetaPersistServiceImplTest.java index c1ab3fb2f71..4327deccb9b 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoBetaPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoBetaPersistServiceImplTest.java @@ -28,18 +28,17 @@ import com.alibaba.nacos.persistence.datasource.DynamicDataSource; import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.jdbc.CannotGetJdbcConnectionException; import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.support.TransactionTemplate; import java.sql.Timestamp; @@ -48,14 +47,26 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) -public class ExternalConfigInfoBetaPersistServiceImplTest { +@ExtendWith(SpringExtension.class) +class ExternalConfigInfoBetaPersistServiceImplTest { + + MockedStatic envUtilMockedStatic; + + MockedStatic externalStorageUtilsMockedStatic; + + MockedStatic dynamicDataSourceMockedStatic; + + @Mock + DynamicDataSource dynamicDataSource; private ExternalConfigInfoBetaPersistServiceImpl externalConfigInfoBetaPersistService; @@ -67,17 +78,8 @@ public class ExternalConfigInfoBetaPersistServiceImplTest { private TransactionTemplate transactionTemplate = TestCaseUtils.createMockTransactionTemplate(); - MockedStatic envUtilMockedStatic; - - MockedStatic externalStorageUtilsMockedStatic; - - MockedStatic dynamicDataSourceMockedStatic; - - @Mock - DynamicDataSource dynamicDataSource; - - @Before - public void before() { + @BeforeEach + void before() { dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); externalStorageUtilsMockedStatic = Mockito.mockStatic(ExternalStorageUtils.class); @@ -86,20 +88,19 @@ public void before() { when(dataSourceService.getTransactionTemplate()).thenReturn(transactionTemplate); when(dataSourceService.getJdbcTemplate()).thenReturn(jdbcTemplate); when(dataSourceService.getDataSourceType()).thenReturn("mysql"); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); externalConfigInfoBetaPersistService = new ExternalConfigInfoBetaPersistServiceImpl(); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); externalStorageUtilsMockedStatic.close(); } @Test - public void testInsertOrUpdateBetaOfUpdate() { + void testInsertOrUpdateBetaOfUpdate() { String dataId = "betaDataId113"; String group = "group"; String tenant = "tenant"; @@ -111,8 +112,7 @@ public void testInsertOrUpdateBetaOfUpdate() { mockedConfigInfoStateWrapper.setId(123456L); mockedConfigInfoStateWrapper.setLastModified(System.currentTimeMillis()); when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(mockedConfigInfoStateWrapper, - mockedConfigInfoStateWrapper); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(mockedConfigInfoStateWrapper, mockedConfigInfoStateWrapper); //execute String betaIps = "betaips..."; String srcIp = "srcUp..."; @@ -121,20 +121,20 @@ public void testInsertOrUpdateBetaOfUpdate() { String content = "content111"; ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content); configInfo.setEncryptedDataKey("key34567"); - ConfigOperateResult configOperateResult = externalConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, - betaIps, srcIp, srcUser); + ConfigOperateResult configOperateResult = externalConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, betaIps, srcIp, + srcUser); //expect return obj - Assert.assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); //verify update to be invoked Mockito.verify(jdbcTemplate, times(1)) - .update(anyString(), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), - eq(srcUser), any(Timestamp.class), eq(configInfo.getAppName()), - eq(configInfo.getEncryptedDataKey()), eq(dataId), eq(group), eq(tenant)); + .update(anyString(), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), eq(srcUser), + any(Timestamp.class), eq(configInfo.getAppName()), eq(configInfo.getEncryptedDataKey()), eq(dataId), eq(group), + eq(tenant)); } @Test - public void testInsertOrUpdateBetaOfAdd() { + void testInsertOrUpdateBetaOfAdd() { String dataId = "betaDataId113"; String group = "group113"; String tenant = "tenant113"; @@ -157,21 +157,21 @@ public void testInsertOrUpdateBetaOfAdd() { ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content); configInfo.setEncryptedDataKey("key34567"); //execute - ConfigOperateResult configOperateResult = externalConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, - betaIps, srcIp, srcUser); + ConfigOperateResult configOperateResult = externalConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, betaIps, srcIp, + srcUser); //expect return obj - Assert.assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); //verify add to be invoked Mockito.verify(jdbcTemplate, times(1)) - .update(anyString(), eq(dataId), eq(group), eq(tenant), eq(configInfo.getAppName()), - eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), eq(srcUser), - any(Timestamp.class), any(Timestamp.class), eq(configInfo.getEncryptedDataKey())); + .update(anyString(), eq(dataId), eq(group), eq(tenant), eq(configInfo.getAppName()), eq(configInfo.getContent()), + eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class), + eq(configInfo.getEncryptedDataKey())); } @Test - public void testInsertOrUpdateBetaOfException() { + void testInsertOrUpdateBetaOfException() { String dataId = "betaDataId113"; String group = "group113"; String tenant = "tenant113"; @@ -194,50 +194,47 @@ public void testInsertOrUpdateBetaOfException() { configInfo.setEncryptedDataKey("key34567"); // mock update throw CannotGetJdbcConnectionException - when(jdbcTemplate.update(anyString(), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), - eq(srcIp), eq(srcUser), any(Timestamp.class), eq(configInfo.getAppName()), - eq(configInfo.getEncryptedDataKey()), eq(dataId), eq(group), eq(tenant))).thenThrow( - new CannotGetJdbcConnectionException("mock fail")); + when(jdbcTemplate.update(anyString(), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), eq(srcUser), + any(Timestamp.class), eq(configInfo.getAppName()), eq(configInfo.getEncryptedDataKey()), eq(dataId), eq(group), + eq(tenant))).thenThrow(new CannotGetJdbcConnectionException("mock fail")); //execute of update& expect. try { externalConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, betaIps, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exception) { - Assert.assertEquals("mock fail", exception.getMessage()); + assertEquals("mock fail", exception.getMessage()); } //mock query return null when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null); //mock add throw CannotGetJdbcConnectionException - when(jdbcTemplate.update(anyString(), eq(dataId), eq(group), eq(tenant), eq(configInfo.getAppName()), - eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), eq(srcUser), - any(Timestamp.class), any(Timestamp.class), eq(configInfo.getEncryptedDataKey()))).thenThrow( - new CannotGetJdbcConnectionException("mock fail add")); + when(jdbcTemplate.update(anyString(), eq(dataId), eq(group), eq(tenant), eq(configInfo.getAppName()), eq(configInfo.getContent()), + eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class), + eq(configInfo.getEncryptedDataKey()))).thenThrow(new CannotGetJdbcConnectionException("mock fail add")); //execute of add& expect. try { externalConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, betaIps, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exception) { - Assert.assertEquals("mock fail add", exception.getMessage()); + assertEquals("mock fail add", exception.getMessage()); } //mock query throw CannotGetJdbcConnectionException when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenThrow( - new CannotGetJdbcConnectionException("get c fail")); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenThrow(new CannotGetJdbcConnectionException("get c fail")); //execute of add& expect. try { externalConfigInfoBetaPersistService.insertOrUpdateBeta(configInfo, betaIps, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exception) { - Assert.assertEquals("get c fail", exception.getMessage()); + assertEquals("get c fail", exception.getMessage()); } } @Test - public void testInsertOrUpdateBetaCasOfUpdate() { + void testInsertOrUpdateBetaCasOfUpdate() { String dataId = "betaDataId113"; String group = "group"; String tenant = "tenant"; @@ -249,8 +246,7 @@ public void testInsertOrUpdateBetaCasOfUpdate() { mockedConfigInfoStateWrapper.setId(123456L); mockedConfigInfoStateWrapper.setLastModified(System.currentTimeMillis()); when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(mockedConfigInfoStateWrapper, - mockedConfigInfoStateWrapper); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(mockedConfigInfoStateWrapper, mockedConfigInfoStateWrapper); //execute String betaIps = "betaips..."; @@ -262,25 +258,25 @@ public void testInsertOrUpdateBetaCasOfUpdate() { configInfo.setEncryptedDataKey("key34567"); configInfo.setMd5("casMd5"); //mock cas update - when(jdbcTemplate.update(anyString(), eq(configInfo.getContent()), - eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(betaIps), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), + when(jdbcTemplate.update(anyString(), eq(configInfo.getContent()), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), + eq(betaIps), eq(srcIp), eq(srcUser), any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(configInfo.getMd5()))).thenReturn(1); - ConfigOperateResult configOperateResult = externalConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, - betaIps, srcIp, srcUser); + ConfigOperateResult configOperateResult = externalConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, betaIps, srcIp, + srcUser); //expect return obj - Assert.assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); //verify cas update to be invoked - Mockito.verify(jdbcTemplate, times(1)).update(anyString(), eq(configInfo.getContent()), - eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(betaIps), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(configInfo.getMd5())); + Mockito.verify(jdbcTemplate, times(1)) + .update(anyString(), eq(configInfo.getContent()), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(betaIps), + eq(srcIp), eq(srcUser), any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), + eq(configInfo.getMd5())); } @Test - public void testInsertOrUpdateBetaCasOfAdd() { + void testInsertOrUpdateBetaCasOfAdd() { String dataId = "betaDataId113"; String group = "group113"; String tenant = "tenant113"; @@ -303,21 +299,21 @@ public void testInsertOrUpdateBetaCasOfAdd() { ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content); configInfo.setEncryptedDataKey("key34567"); //execute - ConfigOperateResult configOperateResult = externalConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, - betaIps, srcIp, srcUser); + ConfigOperateResult configOperateResult = externalConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, betaIps, srcIp, + srcUser); //expect return obj - Assert.assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + assertEquals(mockedConfigInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(mockedConfigInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); //verify add to be invoked Mockito.verify(jdbcTemplate, times(1)) - .update(anyString(), eq(dataId), eq(group), eq(tenant), eq(configInfo.getAppName()), - eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), eq(srcUser), - any(Timestamp.class), any(Timestamp.class), eq(configInfo.getEncryptedDataKey())); + .update(anyString(), eq(dataId), eq(group), eq(tenant), eq(configInfo.getAppName()), eq(configInfo.getContent()), + eq(configInfo.getMd5()), eq(betaIps), eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class), + eq(configInfo.getEncryptedDataKey())); } @Test - public void testInsertOrUpdateBetaCasOfException() { + void testInsertOrUpdateBetaCasOfException() { String dataId = "betaDataId113"; String group = "group113"; String tenant = "tenant113"; @@ -340,51 +336,49 @@ public void testInsertOrUpdateBetaCasOfException() { configInfo.setEncryptedDataKey("key34567"); configInfo.setMd5("casMd5"); // mock update throw CannotGetJdbcConnectionException - when(jdbcTemplate.update(anyString(), eq(configInfo.getContent()), - eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(betaIps), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), + when(jdbcTemplate.update(anyString(), eq(configInfo.getContent()), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), + eq(betaIps), eq(srcIp), eq(srcUser), any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(configInfo.getMd5()))).thenThrow(new CannotGetJdbcConnectionException("mock fail")); //execute of update& expect. try { externalConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, betaIps, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exception) { - Assert.assertEquals("mock fail", exception.getMessage()); + assertEquals("mock fail", exception.getMessage()); } //mock query return null when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null); //mock add throw CannotGetJdbcConnectionException - when(jdbcTemplate.update(anyString(), eq(dataId), eq(group), eq(tenant), eq(configInfo.getAppName()), - eq(configInfo.getContent()), eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), - eq(betaIps), eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class), - eq(configInfo.getEncryptedDataKey()))).thenThrow(new CannotGetJdbcConnectionException("mock fail add")); + when(jdbcTemplate.update(anyString(), eq(dataId), eq(group), eq(tenant), eq(configInfo.getAppName()), eq(configInfo.getContent()), + eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(betaIps), eq(srcIp), eq(srcUser), + any(Timestamp.class), any(Timestamp.class), eq(configInfo.getEncryptedDataKey()))).thenThrow( + new CannotGetJdbcConnectionException("mock fail add")); //execute of add& expect. try { externalConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, betaIps, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exception) { - Assert.assertEquals("mock fail add", exception.getMessage()); + assertEquals("mock fail add", exception.getMessage()); } //mock query throw CannotGetJdbcConnectionException when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenThrow( - new CannotGetJdbcConnectionException("get c fail")); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenThrow(new CannotGetJdbcConnectionException("get c fail")); //execute of add& expect. try { externalConfigInfoBetaPersistService.insertOrUpdateBetaCas(configInfo, betaIps, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exception) { - Assert.assertEquals("get c fail", exception.getMessage()); + assertEquals("get c fail", exception.getMessage()); } } @Test - public void testRemoveConfigInfo4Beta() { + void testRemoveConfigInfo4Beta() { String dataId = "dataId456789"; String group = "group4567"; String tenant = "tenant56789o0"; @@ -404,19 +398,18 @@ public void testRemoveConfigInfo4Beta() { //mock query throw CannotGetJdbcConnectionException when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenThrow( - new CannotGetJdbcConnectionException("mock fail11111")); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenThrow(new CannotGetJdbcConnectionException("mock fail11111")); try { externalConfigInfoBetaPersistService.removeConfigInfo4Beta(dataId, group, tenant); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exception) { - Assert.assertEquals("mock fail11111", exception.getMessage()); + assertEquals("mock fail11111", exception.getMessage()); } } @Test - public void testFindConfigInfo4Beta() { + void testFindConfigInfo4Beta() { String dataId = "dataId456789"; String group = "group4567"; String tenant = "tenant56789o0"; @@ -429,38 +422,35 @@ public void testFindConfigInfo4Beta() { mockedConfigInfoStateWrapper.setLastModified(System.currentTimeMillis()); when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))).thenReturn(mockedConfigInfoStateWrapper); - ConfigInfoBetaWrapper configInfo4BetaReturn = externalConfigInfoBetaPersistService.findConfigInfo4Beta(dataId, - group, tenant); - Assert.assertEquals(mockedConfigInfoStateWrapper, configInfo4BetaReturn); + ConfigInfoBetaWrapper configInfo4BetaReturn = externalConfigInfoBetaPersistService.findConfigInfo4Beta(dataId, group, tenant); + assertEquals(mockedConfigInfoStateWrapper, configInfo4BetaReturn); //mock query throw CannotGetJdbcConnectionException when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))).thenThrow( - new CannotGetJdbcConnectionException("mock fail11111")); + eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))).thenThrow(new CannotGetJdbcConnectionException("mock fail11111")); try { externalConfigInfoBetaPersistService.findConfigInfo4Beta(dataId, group, tenant); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exception) { - Assert.assertEquals("mock fail11111", exception.getMessage()); + assertEquals("mock fail11111", exception.getMessage()); } //mock query throw EmptyResultDataAccessException when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))).thenThrow(new EmptyResultDataAccessException(1)); - ConfigInfoBetaWrapper configInfo4BetaNull = externalConfigInfoBetaPersistService.findConfigInfo4Beta(dataId, - group, tenant); - Assert.assertNull(configInfo4BetaNull); + ConfigInfoBetaWrapper configInfo4BetaNull = externalConfigInfoBetaPersistService.findConfigInfo4Beta(dataId, group, tenant); + assertNull(configInfo4BetaNull); } @Test - public void testConfigInfoBetaCount() { + void testConfigInfoBetaCount() { when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(101); int returnCount = externalConfigInfoBetaPersistService.configInfoBetaCount(); - Assert.assertEquals(101, returnCount); + assertEquals(101, returnCount); } @Test - public void testFindAllConfigInfoBetaForDumpAll() { + void testFindAllConfigInfoBetaForDumpAll() { //mock count when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(12345); @@ -473,27 +463,24 @@ public void testFindAllConfigInfoBetaForDumpAll() { mockList.get(1).setLastModified(System.currentTimeMillis()); mockList.get(2).setLastModified(System.currentTimeMillis()); - when(jdbcTemplate.query(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))).thenReturn( - mockList); + when(jdbcTemplate.query(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_BETA_WRAPPER_ROW_MAPPER))).thenReturn(mockList); int pageNo = 1; int pageSize = 101; when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(101); //execute & expect - Page pageReturn = externalConfigInfoBetaPersistService.findAllConfigInfoBetaForDumpAll( - pageNo, pageSize); - Assert.assertEquals(mockList, pageReturn.getPageItems()); - Assert.assertEquals(101, pageReturn.getTotalCount()); + Page pageReturn = externalConfigInfoBetaPersistService.findAllConfigInfoBetaForDumpAll(pageNo, pageSize); + assertEquals(mockList, pageReturn.getPageItems()); + assertEquals(101, pageReturn.getTotalCount()); //mock count throw CannotGetJdbcConnectionException - when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenThrow( - new CannotGetJdbcConnectionException("345678909fail")); + when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenThrow(new CannotGetJdbcConnectionException("345678909fail")); //execute &expect try { externalConfigInfoBetaPersistService.findAllConfigInfoBetaForDumpAll(pageNo, pageSize); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception exception) { - Assert.assertEquals("345678909fail", exception.getMessage()); + assertEquals("345678909fail", exception.getMessage()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoPersistServiceImplTest.java index 6ea3e887e4f..499ac9604d6 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoPersistServiceImplTest.java @@ -36,11 +36,10 @@ import com.alibaba.nacos.plugin.datasource.constants.TableConstant; import com.alibaba.nacos.plugin.datasource.mapper.ConfigInfoMapper; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; @@ -52,7 +51,7 @@ import org.springframework.jdbc.core.PreparedStatementCreator; import org.springframework.jdbc.support.GeneratedKeyHolder; import org.springframework.jdbc.support.KeyHolder; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.transaction.support.TransactionTemplate; @@ -72,6 +71,10 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_WRAPPER_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; @@ -79,8 +82,17 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) -public class ExternalConfigInfoPersistServiceImplTest { +@ExtendWith(SpringExtension.class) +class ExternalConfigInfoPersistServiceImplTest { + + MockedStatic envUtilMockedStatic; + + MockedStatic externalStorageUtilsMockedStatic; + + MockedStatic dynamicDataSourceMockedStatic; + + @Mock + DynamicDataSource dynamicDataSource; private ExternalConfigInfoPersistServiceImpl externalConfigInfoPersistService; @@ -95,17 +107,8 @@ public class ExternalConfigInfoPersistServiceImplTest { private TransactionTemplate transactionTemplate = TestCaseUtils.createMockTransactionTemplate(); - MockedStatic envUtilMockedStatic; - - MockedStatic externalStorageUtilsMockedStatic; - - MockedStatic dynamicDataSourceMockedStatic; - - @Mock - DynamicDataSource dynamicDataSource; - - @Before - public void before() { + @BeforeEach + void before() { dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); externalStorageUtilsMockedStatic = Mockito.mockStatic(ExternalStorageUtils.class); @@ -116,20 +119,19 @@ public void before() { when(dataSourceService.getDataSourceType()).thenReturn("mysql"); /*when(EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false);*/ - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); externalConfigInfoPersistService = new ExternalConfigInfoPersistServiceImpl(historyConfigInfoPersistService); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); externalStorageUtilsMockedStatic.close(); } @Test - public void testInsertOrUpdateOfInsertConfigSuccess() { + void testInsertOrUpdateOfInsertConfigSuccess() { String dataId = "dataId"; String group = "group"; @@ -147,24 +149,19 @@ public void testInsertOrUpdateOfInsertConfigSuccess() { eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null, new ConfigInfoStateWrapper()); //mock insert config info Mockito.when(jdbcTemplate.update(any(PreparedStatementCreator.class), eq(generatedKeyHolder))).thenReturn(1); - Mockito.when(jdbcTemplate.update( - eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), - TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(insertConfigIndoId), eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))) - .thenReturn(1); - Mockito.when(jdbcTemplate.update( - eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), - TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(insertConfigIndoId), eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))) - .thenReturn(1); + Mockito.when(jdbcTemplate.update(eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), + TableConstant.CONFIG_TAGS_RELATION) + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(insertConfigIndoId), + eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))).thenReturn(1); + Mockito.when(jdbcTemplate.update(eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), + TableConstant.CONFIG_TAGS_RELATION) + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(insertConfigIndoId), + eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))).thenReturn(1); String srcIp = "srcIp"; String srcUser = "srcUser"; //mock insert config info Mockito.doNothing().when(historyConfigInfoPersistService) - .insertConfigHistoryAtomic(eq(0), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), - eq("I")); + .insertConfigHistoryAtomic(eq(0), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), eq("I")); externalConfigInfoPersistService.insertOrUpdate(srcIp, srcUser, configInfo, configAdvanceInfo); //expect insert config info @@ -173,23 +170,22 @@ public void testInsertOrUpdateOfInsertConfigSuccess() { Mockito.verify(jdbcTemplate, times(1)).update(eq( externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(insertConfigIndoId), eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)); + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(insertConfigIndoId), + eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)); Mockito.verify(jdbcTemplate, times(1)).update(eq( externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(insertConfigIndoId), eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)); + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(insertConfigIndoId), + eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)); //expect insert history info Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(0L), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), - eq("I")); + .insertConfigHistoryAtomic(eq(0L), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), eq("I")); } @Test - public void testInsertOrUpdateCasOfInsertConfigSuccess() { + void testInsertOrUpdateCasOfInsertConfigSuccess() { Map configAdvanceInfo = new HashMap<>(); configAdvanceInfo.put("config_tags", "tag1,tag2"); @@ -207,24 +203,19 @@ public void testInsertOrUpdateCasOfInsertConfigSuccess() { eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null, new ConfigInfoStateWrapper()); //mock insert config info Mockito.when(jdbcTemplate.update(any(PreparedStatementCreator.class), eq(generatedKeyHolder))).thenReturn(1); - Mockito.when(jdbcTemplate.update( - eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), - TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(insertConfigIndoId), eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))) - .thenReturn(1); - Mockito.when(jdbcTemplate.update( - eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), - TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(insertConfigIndoId), eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))) - .thenReturn(1); + Mockito.when(jdbcTemplate.update(eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), + TableConstant.CONFIG_TAGS_RELATION) + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(insertConfigIndoId), + eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))).thenReturn(1); + Mockito.when(jdbcTemplate.update(eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), + TableConstant.CONFIG_TAGS_RELATION) + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(insertConfigIndoId), + eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))).thenReturn(1); String srcIp = "srcIp"; String srcUser = "srcUser"; //mock insert config info Mockito.doNothing().when(historyConfigInfoPersistService) - .insertConfigHistoryAtomic(eq(0), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), - eq("I")); + .insertConfigHistoryAtomic(eq(0), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), eq("I")); externalConfigInfoPersistService.insertOrUpdateCas(srcIp, srcUser, configInfo, configAdvanceInfo); //expect insert config info @@ -233,23 +224,22 @@ public void testInsertOrUpdateCasOfInsertConfigSuccess() { Mockito.verify(jdbcTemplate, times(1)).update(eq( externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(insertConfigIndoId), eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)); + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(insertConfigIndoId), + eq("tag1"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)); Mockito.verify(jdbcTemplate, times(1)).update(eq( externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(insertConfigIndoId), eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)); + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(insertConfigIndoId), + eq("tag2"), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant)); //expect insert history info Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(0L), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), - eq("I")); + .insertConfigHistoryAtomic(eq(0L), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), eq("I")); } @Test - public void testInsertOrUpdateOfException() { + void testInsertOrUpdateOfException() { String dataId = "dataId"; String group = "group"; String tenant = "tenant"; @@ -267,15 +257,15 @@ public void testInsertOrUpdateOfException() { ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, null, "content"); try { externalConfigInfoPersistService.insertOrUpdate("srcIp", "srcUser", configInfo, configAdvanceInfo); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals(e.getMessage(), "mock fail"); + assertEquals("mock fail", e.getMessage()); } } @Test - public void testInsertOrUpdateOfUpdateConfigSuccess() { + void testInsertOrUpdateOfUpdateConfigSuccess() { Map configAdvanceInfo = new HashMap<>(); configAdvanceInfo.put("config_tags", "tag1,tag2"); @@ -295,8 +285,7 @@ public void testInsertOrUpdateOfUpdateConfigSuccess() { configInfo.setEncryptedDataKey(encryptedDataKey); //mock get config state,first and second is not null Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(new ConfigInfoStateWrapper(), new ConfigInfoStateWrapper()); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper(), new ConfigInfoStateWrapper()); //mock select config info before update ConfigInfoWrapper configInfoWrapperOld = new ConfigInfoWrapper(); @@ -306,34 +295,30 @@ public void testInsertOrUpdateOfUpdateConfigSuccess() { configInfoWrapperOld.setAppName("old_app"); configInfoWrapperOld.setMd5("old_md5"); configInfoWrapperOld.setId(12345678765L); - Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(configInfoWrapperOld); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenReturn(configInfoWrapperOld); String srcIp = "srcIp"; String srcUser = "srcUser"; //mock update config info - Mockito.when(jdbcTemplate.update( - eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), + Mockito.when(jdbcTemplate.update(eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), TableConstant.CONFIG_INFO) - .update(Arrays.asList("content", "md5", "src_ip", "src_user", "gmt_modified", "app_name", - "c_desc", "c_use", "effect", "type", "c_schema", "encrypted_data_key"), - Arrays.asList("data_id", "group_id", "tenant_id"))), eq(configInfo.getContent()), - eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), any(), eq(configInfoWrapperOld.getAppName()), - eq(configAdvanceInfo.get("desc")), eq(configAdvanceInfo.get("use")), - eq(configAdvanceInfo.get("effect")), eq(configAdvanceInfo.get("type")), - eq(configAdvanceInfo.get("schema")), eq(encryptedDataKey), eq(configInfo.getDataId()), + .update(Arrays.asList("content", "md5", "src_ip", "src_user", "gmt_modified", "app_name", "c_desc", "c_use", "effect", + "type", "c_schema", "encrypted_data_key"), Arrays.asList("data_id", "group_id", "tenant_id"))), + eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), any(), eq(configInfoWrapperOld.getAppName()), + eq(configAdvanceInfo.get("desc")), eq(configAdvanceInfo.get("use")), eq(configAdvanceInfo.get("effect")), + eq(configAdvanceInfo.get("type")), eq(configAdvanceInfo.get("schema")), eq(encryptedDataKey), eq(configInfo.getDataId()), eq(configInfo.getGroup()), eq(tenant))).thenReturn(1); //mock insert config tags. - Mockito.when(jdbcTemplate.update( - eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), + Mockito.when(jdbcTemplate.update(eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(12345678765L), anyString(), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))).thenReturn(1); + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(12345678765L), anyString(), + eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))).thenReturn(1); //mock insert his config info Mockito.doNothing().when(historyConfigInfoPersistService) - .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), eq(configInfo), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq("I")); + .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), + eq("I")); externalConfigInfoPersistService.insertOrUpdate(srcIp, srcUser, configInfo, configAdvanceInfo); @@ -351,13 +336,13 @@ public void testInsertOrUpdateOfUpdateConfigSuccess() { //expect insert history info Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), any(ConfigInfo.class), eq(srcIp), - eq(srcUser), any(Timestamp.class), eq("U")); + .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), any(ConfigInfo.class), eq(srcIp), eq(srcUser), + any(Timestamp.class), eq("U")); } @Test - public void testInsertOrUpdateCasOfUpdateConfigSuccess() { + void testInsertOrUpdateCasOfUpdateConfigSuccess() { Map configAdvanceInfo = new HashMap<>(); configAdvanceInfo.put("config_tags", "tag1,tag2"); @@ -378,8 +363,7 @@ public void testInsertOrUpdateCasOfUpdateConfigSuccess() { //mock get config state,first and second is not null Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenReturn(new ConfigInfoStateWrapper(), new ConfigInfoStateWrapper()); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper(), new ConfigInfoStateWrapper()); //mock select config info before update ConfigInfoWrapper configInfoWrapperOld = new ConfigInfoWrapper(); @@ -389,41 +373,34 @@ public void testInsertOrUpdateCasOfUpdateConfigSuccess() { configInfoWrapperOld.setAppName("old_app11"); configInfoWrapperOld.setMd5("old_md5"); configInfoWrapperOld.setId(123456799L); - Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(configInfoWrapperOld); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenReturn(configInfoWrapperOld); String srcIp = "srcIp"; String srcUser = "srcUser"; //mock update config info cas - Mockito.when( - jdbcTemplate.update(anyString(), eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), - eq(srcIp), eq(srcUser), any(Timestamp.class), eq(configInfoWrapperOld.getAppName()), - eq(configAdvanceInfo.get("desc")), eq(configAdvanceInfo.get("use")), - eq(configAdvanceInfo.get("effect")), eq(configAdvanceInfo.get("type")), - eq(configAdvanceInfo.get("schema")), eq(encryptedDataKey), eq(dataId), eq(group), eq(tenant), - eq(casMd5))).thenReturn(1); + Mockito.when(jdbcTemplate.update(anyString(), eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), + eq(srcUser), any(Timestamp.class), eq(configInfoWrapperOld.getAppName()), eq(configAdvanceInfo.get("desc")), + eq(configAdvanceInfo.get("use")), eq(configAdvanceInfo.get("effect")), eq(configAdvanceInfo.get("type")), + eq(configAdvanceInfo.get("schema")), eq(encryptedDataKey), eq(dataId), eq(group), eq(tenant), eq(casMd5))).thenReturn(1); //mock insert config tags. - Mockito.when(jdbcTemplate.update( - eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), + Mockito.when(jdbcTemplate.update(eq(externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), TableConstant.CONFIG_TAGS_RELATION) - .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), - eq(configInfoWrapperOld.getId()), anyString(), eq(StringUtils.EMPTY), eq(dataId), eq(group), - eq(tenant))).thenReturn(1); + .insert(Arrays.asList("id", "tag_name", "tag_type", "data_id", "group_id", "tenant_id"))), eq(configInfoWrapperOld.getId()), + anyString(), eq(StringUtils.EMPTY), eq(dataId), eq(group), eq(tenant))).thenReturn(1); //mock insert his config info Mockito.doNothing().when(historyConfigInfoPersistService) - .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), eq(configInfo), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq("I")); + .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), eq(configInfo), eq(srcIp), eq(srcUser), any(Timestamp.class), + eq("I")); externalConfigInfoPersistService.insertOrUpdateCas(srcIp, srcUser, configInfo, configAdvanceInfo); //expect update config cas Mockito.verify(jdbcTemplate, times(1)) - .update(anyString(), eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), - eq(srcUser), any(Timestamp.class), eq(configInfoWrapperOld.getAppName()), - eq(configAdvanceInfo.get("desc")), eq(configAdvanceInfo.get("use")), - eq(configAdvanceInfo.get("effect")), eq(configAdvanceInfo.get("type")), - eq(configAdvanceInfo.get("schema")), eq(encryptedDataKey), eq(dataId), eq(group), eq(tenant), - eq(casMd5)); + .update(anyString(), eq(content), eq(MD5Utils.md5Hex(content, Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), + any(Timestamp.class), eq(configInfoWrapperOld.getAppName()), eq(configAdvanceInfo.get("desc")), + eq(configAdvanceInfo.get("use")), eq(configAdvanceInfo.get("effect")), eq(configAdvanceInfo.get("type")), + eq(configAdvanceInfo.get("schema")), eq(encryptedDataKey), eq(dataId), eq(group), eq(tenant), eq(casMd5)); //expect update config tags Mockito.verify(jdbcTemplate, times(1)).update(eq( @@ -439,13 +416,13 @@ public void testInsertOrUpdateCasOfUpdateConfigSuccess() { //expect insert history info Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), any(ConfigInfo.class), eq(srcIp), - eq(srcUser), any(Timestamp.class), eq("U")); + .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), any(ConfigInfo.class), eq(srcIp), eq(srcUser), + any(Timestamp.class), eq("U")); } @Test - public void testCreatePsForInsertConfigInfo() throws SQLException { + void testCreatePsForInsertConfigInfo() throws SQLException { Map configAdvanceInfo = new HashMap<>(); configAdvanceInfo.put("config_tags", "tag1,tag2"); @@ -462,21 +439,21 @@ public void testCreatePsForInsertConfigInfo() throws SQLException { Connection mockConnection = Mockito.mock(Connection.class); PreparedStatement preparedStatement = Mockito.mock(PreparedStatement.class); - ConfigInfoMapper configInfoMapper = externalConfigInfoPersistService.mapperManager.findMapper( - dataSourceService.getDataSourceType(), TableConstant.CONFIG_INFO); + ConfigInfoMapper configInfoMapper = externalConfigInfoPersistService.mapperManager.findMapper(dataSourceService.getDataSourceType(), + TableConstant.CONFIG_INFO); Mockito.when(mockConnection.prepareStatement(anyString(), any(String[].class))).thenReturn(preparedStatement); String srcIp = "srcIp"; String srcUser = "srcUser"; - externalConfigInfoPersistService.createPsForInsertConfigInfo(srcIp, srcUser, configInfo, configAdvanceInfo, - mockConnection, configInfoMapper); + externalConfigInfoPersistService.createPsForInsertConfigInfo(srcIp, srcUser, configInfo, configAdvanceInfo, mockConnection, + configInfoMapper); Mockito.verify(preparedStatement, times(14)).setString(anyInt(), anyString()); Mockito.verify(preparedStatement, times(2)).setTimestamp(anyInt(), any(Timestamp.class)); } @Test - public void testRemoveConfigInfo() { + void testRemoveConfigInfo() { String dataId = "dataId4567"; String group = "group3456789"; String tenant = "tenant4567890"; @@ -491,8 +468,8 @@ public void testRemoveConfigInfo() { configInfoWrapperOld.setMd5("old_md5"); configInfoWrapperOld.setId(12345678765L); configInfoWrapperOld.setEncryptedDataKey("key3456"); - Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(configInfoWrapperOld); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenReturn(configInfoWrapperOld); String srcIp = "srcIp1234"; String srcUser = "srcUser"; externalConfigInfoPersistService.removeConfigInfo(dataId, group, tenant, srcIp, srcUser); @@ -503,13 +480,13 @@ public void testRemoveConfigInfo() { Mockito.verify(jdbcTemplate, times(1)).update(anyString(), eq(configInfoWrapperOld.getId())); //expect insert delete history Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), eq(configInfoWrapperOld), eq(srcIp), - eq(srcUser), any(), eq("D")); + .insertConfigHistoryAtomic(eq(configInfoWrapperOld.getId()), eq(configInfoWrapperOld), eq(srcIp), eq(srcUser), any(), + eq("D")); } @Test - public void testRemoveConfigInfoByIds() { + void testRemoveConfigInfoByIds() { //mock exist config info List configInfos = new ArrayList<>(); @@ -518,8 +495,7 @@ public void testRemoveConfigInfoByIds() { List deleteIds = Arrays.asList(12344L, 3456789L); configInfos.get(0).setId(12344L); configInfos.get(1).setId(3456789L); - Mockito.when(jdbcTemplate.query(anyString(), eq(deleteIds.toArray()), eq(CONFIG_INFO_ROW_MAPPER))) - .thenReturn(configInfos); + Mockito.when(jdbcTemplate.query(anyString(), eq(deleteIds.toArray()), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(configInfos); String srcIp = "srcIp1234"; String srcUser = "srcUser"; externalConfigInfoPersistService.removeConfigInfoByIds(deleteIds, srcIp, srcUser); @@ -531,16 +507,14 @@ public void testRemoveConfigInfoByIds() { Mockito.verify(jdbcTemplate, times(1)).update(anyString(), eq(deleteIds.get(1))); //expect insert delete history Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfos.get(0).getId()), eq(configInfos.get(0)), eq(srcIp), - eq(srcUser), any(), eq("D")); + .insertConfigHistoryAtomic(eq(configInfos.get(0).getId()), eq(configInfos.get(0)), eq(srcIp), eq(srcUser), any(), eq("D")); Mockito.verify(historyConfigInfoPersistService, times(1)) - .insertConfigHistoryAtomic(eq(configInfos.get(1).getId()), eq(configInfos.get(1)), eq(srcIp), - eq(srcUser), any(), eq("D")); + .insertConfigHistoryAtomic(eq(configInfos.get(1).getId()), eq(configInfos.get(1)), eq(srcIp), eq(srcUser), any(), eq("D")); } @Test - public void testBatchInsertOrUpdateOverwrite() throws NacosException { + void testBatchInsertOrUpdateOverwrite() throws NacosException { List configInfoList = new ArrayList<>(); //insert direct configInfoList.add(createMockConfigAllInfo(0)); @@ -556,17 +530,17 @@ public void testBatchInsertOrUpdateOverwrite() throws NacosException { ReflectionTestUtils.setField(externalConfigInfoPersistService, "tjt", transactionTemplateCurrent); //mock add config 1 success,config 2 fail and update success,config 3 success Mockito.when(transactionTemplateCurrent.execute(any())) - .thenReturn(new ConfigOperateResult(true), new ConfigOperateResult(false), - new ConfigOperateResult(true), new ConfigOperateResult(true)); + .thenReturn(new ConfigOperateResult(true), new ConfigOperateResult(false), new ConfigOperateResult(true), + new ConfigOperateResult(true)); - Map stringObjectMap = externalConfigInfoPersistService.batchInsertOrUpdate(configInfoList, - srcUser, srcIp, configAdvanceInfo, SameConfigPolicy.OVERWRITE); - Assert.assertEquals(3, stringObjectMap.get("succCount")); - Assert.assertEquals(0, stringObjectMap.get("skipCount")); + Map stringObjectMap = externalConfigInfoPersistService.batchInsertOrUpdate(configInfoList, srcUser, srcIp, + configAdvanceInfo, SameConfigPolicy.OVERWRITE); + assertEquals(3, stringObjectMap.get("succCount")); + assertEquals(0, stringObjectMap.get("skipCount")); } @Test - public void testBatchInsertOrUpdateSkip() throws NacosException { + void testBatchInsertOrUpdateSkip() throws NacosException { List configInfoList = new ArrayList<>(); //insert direct configInfoList.add(createMockConfigAllInfo(0)); @@ -582,19 +556,17 @@ public void testBatchInsertOrUpdateSkip() throws NacosException { ReflectionTestUtils.setField(externalConfigInfoPersistService, "tjt", transactionTemplateCurrent); //mock add config 1 success,config 2 fail and skip,config 3 success Mockito.when(transactionTemplateCurrent.execute(any())) - .thenReturn(new ConfigOperateResult(true), new ConfigOperateResult(false), - new ConfigOperateResult(true)); + .thenReturn(new ConfigOperateResult(true), new ConfigOperateResult(false), new ConfigOperateResult(true)); - Map stringObjectMap = externalConfigInfoPersistService.batchInsertOrUpdate(configInfoList, - srcUser, srcIp, configAdvanceInfo, SameConfigPolicy.SKIP); - Assert.assertEquals(2, stringObjectMap.get("succCount")); - Assert.assertEquals(1, stringObjectMap.get("skipCount")); - Assert.assertEquals(configInfoList.get(1).getDataId(), - ((List>) stringObjectMap.get("skipData")).get(0).get("dataId")); + Map stringObjectMap = externalConfigInfoPersistService.batchInsertOrUpdate(configInfoList, srcUser, srcIp, + configAdvanceInfo, SameConfigPolicy.SKIP); + assertEquals(2, stringObjectMap.get("succCount")); + assertEquals(1, stringObjectMap.get("skipCount")); + assertEquals(configInfoList.get(1).getDataId(), ((List>) stringObjectMap.get("skipData")).get(0).get("dataId")); } @Test - public void testBatchInsertOrUpdateAbort() throws NacosException { + void testBatchInsertOrUpdateAbort() throws NacosException { List configInfoList = new ArrayList<>(); //insert direct configInfoList.add(createMockConfigAllInfo(0)); @@ -609,19 +581,16 @@ public void testBatchInsertOrUpdateAbort() throws NacosException { TransactionTemplate transactionTemplateCurrent = Mockito.mock(TransactionTemplate.class); ReflectionTestUtils.setField(externalConfigInfoPersistService, "tjt", transactionTemplateCurrent); //mock add config 1 success,config 2 fail and abort,config 3 not operated - Mockito.when(transactionTemplateCurrent.execute(any())) - .thenReturn(new ConfigOperateResult(true), new ConfigOperateResult(false)); + Mockito.when(transactionTemplateCurrent.execute(any())).thenReturn(new ConfigOperateResult(true), new ConfigOperateResult(false)); - Map stringObjectMap = externalConfigInfoPersistService.batchInsertOrUpdate(configInfoList, - srcUser, srcIp, configAdvanceInfo, SameConfigPolicy.ABORT); - Assert.assertEquals(1, stringObjectMap.get("succCount")); - Assert.assertEquals(1, stringObjectMap.get("skipCount")); + Map stringObjectMap = externalConfigInfoPersistService.batchInsertOrUpdate(configInfoList, srcUser, srcIp, + configAdvanceInfo, SameConfigPolicy.ABORT); + assertEquals(1, stringObjectMap.get("succCount")); + assertEquals(1, stringObjectMap.get("skipCount")); // config 2 failed - Assert.assertEquals(configInfoList.get(1).getDataId(), - ((List>) stringObjectMap.get("failData")).get(0).get("dataId")); + assertEquals(configInfoList.get(1).getDataId(), ((List>) stringObjectMap.get("failData")).get(0).get("dataId")); //skip config 3 - Assert.assertEquals(configInfoList.get(2).getDataId(), - ((List>) stringObjectMap.get("skipData")).get(0).get("dataId")); + assertEquals(configInfoList.get(2).getDataId(), ((List>) stringObjectMap.get("skipData")).get(0).get("dataId")); } private ConfigAllInfo createMockConfigAllInfo(long mockId) { @@ -660,45 +629,44 @@ private ConfigInfo createMockConfigInfo(long mockId) { } @Test - public void testFindConfigMaxId() { + void testFindConfigMaxId() { Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(Long.class))).thenReturn(123456L); long configMaxId = externalConfigInfoPersistService.findConfigMaxId(); - Assert.assertEquals(123456L, configMaxId); + assertEquals(123456L, configMaxId); } @Test - public void testFindConfigMaxId0() { + void testFindConfigMaxId0() { Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(Long.class))).thenThrow(new NullPointerException()); long configMaxId = externalConfigInfoPersistService.findConfigMaxId(); - Assert.assertEquals(0, configMaxId); + assertEquals(0, configMaxId); } @Test - public void testFindConfigInfoById() { + void testFindConfigInfoById() { long id = 1234567890876L; ConfigInfo configInfo = new ConfigInfo(); configInfo.setId(id); - Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {id}), eq(CONFIG_INFO_ROW_MAPPER))) - .thenReturn(configInfo); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {id}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(configInfo); ConfigInfo configReturn = externalConfigInfoPersistService.findConfigInfo(id); - Assert.assertEquals(id, configReturn.getId()); + assertEquals(id, configReturn.getId()); } @Test - public void testFindConfigInfoByIdNull() { + void testFindConfigInfoByIdNull() { long id = 1234567890876L; ConfigInfo configInfo = new ConfigInfo(); configInfo.setId(id); Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {id}), eq(CONFIG_INFO_ROW_MAPPER))) .thenThrow(new EmptyResultDataAccessException(1)); ConfigInfo configReturn = externalConfigInfoPersistService.findConfigInfo(id); - Assert.assertEquals(null, configReturn); + assertNull(configReturn); } @Test - public void testFindConfigInfoByIdGetConFail() { + void testFindConfigInfoByIdGetConFail() { long id = 1234567890876L; ConfigInfo configInfo = new ConfigInfo(); configInfo.setId(id); @@ -706,14 +674,14 @@ public void testFindConfigInfoByIdGetConFail() { .thenThrow(new CannotGetJdbcConnectionException("mocked exp")); try { ConfigInfo configReturn = externalConfigInfoPersistService.findConfigInfo(id); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotGetJdbcConnectionException); + assertTrue(e instanceof CannotGetJdbcConnectionException); } } @Test - public void testFindConfigInfoByDataId() { + void testFindConfigInfoByDataId() { String dataId = "dataId4567"; String group = "group3456789"; String tenant = "tenant4567890"; @@ -722,65 +690,64 @@ public void testFindConfigInfoByDataId() { configInfoWrapper.setGroup(group); configInfoWrapper.setTenant(tenant); - Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(configInfoWrapper); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenReturn(configInfoWrapper); ConfigInfo configReturn = externalConfigInfoPersistService.findConfigInfo(dataId, group, tenant); - Assert.assertEquals(dataId, configReturn.getDataId()); + assertEquals(dataId, configReturn.getDataId()); } @Test - public void testFindConfigInfoByDataIdNull() { + void testFindConfigInfoByDataIdNull() { String dataId = "dataId4567"; String group = "group3456789"; String tenant = "tenant4567890"; - Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenThrow(new EmptyResultDataAccessException(1)); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenThrow(new EmptyResultDataAccessException(1)); ConfigInfoWrapper configReturn = externalConfigInfoPersistService.findConfigInfo(dataId, group, tenant); - Assert.assertEquals(null, configReturn); + assertNull(configReturn); } @Test - public void testFindConfigInfoByDataIdGetConFail() { + void testFindConfigInfoByDataIdGetConFail() { String dataId = "dataId4567222"; String group = "group3456789"; String tenant = "tenant4567890"; - Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenThrow(new CannotGetJdbcConnectionException("mocked exp")); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))) + .thenThrow(new CannotGetJdbcConnectionException("mocked exp")); try { externalConfigInfoPersistService.findConfigInfo(dataId, group, tenant); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotGetJdbcConnectionException); + assertTrue(e instanceof CannotGetJdbcConnectionException); } } @Test - public void testFindConfigInfo4Page() { + void testFindConfigInfo4Page() { String dataId = "dataId4567222"; String group = "group3456789"; String tenant = "tenant4567890"; //mock total count - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {tenant, dataId, group}), - eq(Integer.class))).thenReturn(new Integer(9)); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {tenant, dataId, group}), eq(Integer.class))).thenReturn( + new Integer(9)); //mock page list List result = new ArrayList<>(); result.add(createMockConfigInfo(0)); result.add(createMockConfigInfo(1)); result.add(createMockConfigInfo(2)); - when(jdbcTemplate.query(anyString(), eq(new Object[] {tenant, dataId, group}), - eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); + when(jdbcTemplate.query(anyString(), eq(new Object[] {tenant, dataId, group}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); Map configAdvanceInfo = new HashMap<>(); - Page configInfo4Page = externalConfigInfoPersistService.findConfigInfo4Page(1, 3, dataId, group, - tenant, configAdvanceInfo); - Assert.assertEquals(result.size(), configInfo4Page.getPageItems().size()); - Assert.assertEquals(9, configInfo4Page.getTotalCount()); + Page configInfo4Page = externalConfigInfoPersistService.findConfigInfo4Page(1, 3, dataId, group, tenant, + configAdvanceInfo); + assertEquals(result.size(), configInfo4Page.getPageItems().size()); + assertEquals(9, configInfo4Page.getTotalCount()); } @Test - public void testFindConfigInfo4PageWithTags() { + void testFindConfigInfo4PageWithTags() { String dataId = "dataId4567222"; String group = "group3456789"; String tenant = "tenant4567890"; @@ -798,52 +765,51 @@ public void testFindConfigInfo4PageWithTags() { when(jdbcTemplate.query(anyString(), eq(new Object[] {tenant, dataId, group, "tags1", "tags3"}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); - Page configInfo4Page = externalConfigInfoPersistService.findConfigInfo4Page(1, 3, dataId, group, - tenant, configAdvanceInfo); - Assert.assertEquals(result.size(), configInfo4Page.getPageItems().size()); - Assert.assertEquals(9, configInfo4Page.getTotalCount()); + Page configInfo4Page = externalConfigInfoPersistService.findConfigInfo4Page(1, 3, dataId, group, tenant, + configAdvanceInfo); + assertEquals(result.size(), configInfo4Page.getPageItems().size()); + assertEquals(9, configInfo4Page.getTotalCount()); } @Test - public void testConfigInfoCount() { + void testConfigInfoCount() { //mock total count when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(new Integer(9)); int count = externalConfigInfoPersistService.configInfoCount(); - Assert.assertEquals(9, count); + assertEquals(9, count); when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(null); try { externalConfigInfoPersistService.configInfoCount(); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertTrue(e instanceof IllegalArgumentException); + assertTrue(e instanceof IllegalArgumentException); } } @Test - public void testConfigInfoCountByTenant() { + void testConfigInfoCountByTenant() { String tenant = "tenant124"; //mock total count - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {tenant}), eq(Integer.class))).thenReturn( - new Integer(90)); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {tenant}), eq(Integer.class))).thenReturn(new Integer(90)); int count = externalConfigInfoPersistService.configInfoCount(tenant); - Assert.assertEquals(90, count); + assertEquals(90, count); when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {tenant}), eq(Integer.class))).thenReturn(null); try { externalConfigInfoPersistService.configInfoCount(tenant); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertTrue(e instanceof IllegalArgumentException); + assertTrue(e instanceof IllegalArgumentException); } } @Test - public void testFindConfigInfoLike4Page() { + void testFindConfigInfoLike4Page() { String dataId = "dataId4567222*"; String group = "group3456789*"; String tenant = "tenant4567890"; @@ -854,26 +820,26 @@ public void testFindConfigInfoLike4Page() { configAdvanceInfo.put("content", content); //mock total count when(jdbcTemplate.queryForObject(anyString(), - eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, - content}), eq(Integer.class))).thenReturn(new Integer(9)); + eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content}), + eq(Integer.class))).thenReturn(new Integer(9)); //mock page list List result = new ArrayList<>(); result.add(createMockConfigInfo(0)); result.add(createMockConfigInfo(1)); result.add(createMockConfigInfo(2)); when(jdbcTemplate.query(anyString(), - eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, - content}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); + eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content}), + eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); - Page configInfo4Page = externalConfigInfoPersistService.findConfigInfoLike4Page(1, 3, dataId, group, - tenant, configAdvanceInfo); - Assert.assertEquals(result.size(), configInfo4Page.getPageItems().size()); - Assert.assertEquals(9, configInfo4Page.getTotalCount()); + Page configInfo4Page = externalConfigInfoPersistService.findConfigInfoLike4Page(1, 3, dataId, group, tenant, + configAdvanceInfo); + assertEquals(result.size(), configInfo4Page.getPageItems().size()); + assertEquals(9, configInfo4Page.getTotalCount()); } @Test - public void testFindConfigInfoLike4PageWithTags() { + void testFindConfigInfoLike4PageWithTags() { String appName = "appName1234"; String content = "content123"; @@ -886,26 +852,26 @@ public void testFindConfigInfoLike4PageWithTags() { String tenant = "tenant4567890"; //mock total count when(jdbcTemplate.queryForObject(anyString(), - eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content, - "tags", "tag2"}), eq(Integer.class))).thenReturn(new Integer(9)); + eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content, "tags", "tag2"}), + eq(Integer.class))).thenReturn(new Integer(9)); //mock page list List result = new ArrayList<>(); result.add(createMockConfigInfo(0)); result.add(createMockConfigInfo(1)); result.add(createMockConfigInfo(2)); when(jdbcTemplate.query(anyString(), - eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content, - "tags", "tag2"}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); + eq(new Object[] {tenant, dataId.replaceAll("\\*", "%"), group.replaceAll("\\*", "%"), appName, content, "tags", "tag2"}), + eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); - Page configInfo4Page = externalConfigInfoPersistService.findConfigInfoLike4Page(1, 3, dataId, group, - tenant, configAdvanceInfo); - Assert.assertEquals(result.size(), configInfo4Page.getPageItems().size()); - Assert.assertEquals(9, configInfo4Page.getTotalCount()); + Page configInfo4Page = externalConfigInfoPersistService.findConfigInfoLike4Page(1, 3, dataId, group, tenant, + configAdvanceInfo); + assertEquals(result.size(), configInfo4Page.getPageItems().size()); + assertEquals(9, configInfo4Page.getTotalCount()); } @Test - public void testFindChangeConfig() { + void testFindChangeConfig() { //mock page list List result = new ArrayList<>(); @@ -918,13 +884,12 @@ public void testFindChangeConfig() { when(jdbcTemplate.query(anyString(), eq(new Object[] {startTime, lastMaxId, pageSize}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(result); - List configInfo4List = externalConfigInfoPersistService.findChangeConfig(startTime, - lastMaxId, pageSize); - Assert.assertEquals(result.size(), configInfo4List.size()); + List configInfo4List = externalConfigInfoPersistService.findChangeConfig(startTime, lastMaxId, pageSize); + assertEquals(result.size(), configInfo4List.size()); } @Test - public void testFindChangeConfigError() { + void testFindChangeConfigError() { Timestamp startTime = new Timestamp(System.currentTimeMillis() - 1000L); long lastMaxId = 10000L; int pageSize = 30; @@ -932,95 +897,92 @@ public void testFindChangeConfigError() { when(jdbcTemplate.query(anyString(), eq(new Object[] {startTime, lastMaxId, pageSize}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenThrow(new CannotAcquireLockException("mock ex")); try { - List configInfo4List = externalConfigInfoPersistService.findChangeConfig(startTime, - lastMaxId, pageSize); - Assert.assertTrue(false); + List configInfo4List = externalConfigInfoPersistService.findChangeConfig(startTime, lastMaxId, + pageSize); + assertTrue(false); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotAcquireLockException); + assertTrue(e instanceof CannotAcquireLockException); } } @Test - public void testSelectTagByConfig() { + void testSelectTagByConfig() { String dataId = "dataId4567222"; String group = "group3456789"; String tenant = "tenant4567890"; //mock page list List tagStrings = Arrays.asList("", "", ""); - when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(String.class))).thenReturn(tagStrings); + when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))).thenReturn(tagStrings); List configTags = externalConfigInfoPersistService.selectTagByConfig(dataId, group, tenant); - Assert.assertEquals(tagStrings, configTags); + assertEquals(tagStrings, configTags); //mock EmptyResultDataAccessException - when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(String.class))).thenThrow(new EmptyResultDataAccessException(3)); + when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))).thenThrow( + new EmptyResultDataAccessException(3)); List nullResult = externalConfigInfoPersistService.selectTagByConfig(dataId, group, tenant); - Assert.assertTrue(nullResult == null); + assertTrue(nullResult == null); //mock IncorrectResultSizeDataAccessException - when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(String.class))).thenThrow(new IncorrectResultSizeDataAccessException(3)); + when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))).thenThrow( + new IncorrectResultSizeDataAccessException(3)); List nullResult2 = externalConfigInfoPersistService.selectTagByConfig(dataId, group, tenant); - Assert.assertTrue(nullResult2 == null); + assertTrue(nullResult2 == null); //mock IncorrectResultSizeDataAccessException - when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(String.class))).thenThrow(new CannotGetJdbcConnectionException("mock exp")); + when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))).thenThrow( + new CannotGetJdbcConnectionException("mock exp")); try { externalConfigInfoPersistService.selectTagByConfig(dataId, group, tenant); - Assert.assertFalse(true); + assertFalse(true); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotGetJdbcConnectionException); + assertTrue(e instanceof CannotGetJdbcConnectionException); } } @Test - public void testFindConfigInfosByIds() { + void testFindConfigInfosByIds() { //mock page list List result = new ArrayList<>(); result.add(createMockConfigInfo(0)); result.add(createMockConfigInfo(1)); result.add(createMockConfigInfo(2)); - when(jdbcTemplate.query(anyString(), eq(new Object[] {123L, 1232345L}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn( - result); + when(jdbcTemplate.query(anyString(), eq(new Object[] {123L, 1232345L}), eq(CONFIG_INFO_ROW_MAPPER))).thenReturn(result); String ids = "123,1232345"; List configInfosByIds = externalConfigInfoPersistService.findConfigInfosByIds(ids); - Assert.assertEquals(result.size(), configInfosByIds.size()); - Assert.assertEquals(result.get(2).getDataId(), configInfosByIds.get(2).getDataId()); + assertEquals(result.size(), configInfosByIds.size()); + assertEquals(result.get(2).getDataId(), configInfosByIds.get(2).getDataId()); //mock EmptyResultDataAccessException when(jdbcTemplate.query(anyString(), eq(new Object[] {123L, 1232345L}), eq(CONFIG_INFO_ROW_MAPPER))).thenThrow( new EmptyResultDataAccessException(3)); List nullResult2 = externalConfigInfoPersistService.findConfigInfosByIds(ids); - Assert.assertTrue(nullResult2 == null); + assertTrue(nullResult2 == null); //blank ids. List nullResultBlankIds = externalConfigInfoPersistService.findConfigInfosByIds(""); - Assert.assertTrue(nullResultBlankIds == null); + assertTrue(nullResultBlankIds == null); //mock CannotGetJdbcConnectionException when(jdbcTemplate.query(anyString(), eq(new Object[] {123L, 1232345L}), eq(CONFIG_INFO_ROW_MAPPER))).thenThrow( new CannotGetJdbcConnectionException("mock exp")); try { externalConfigInfoPersistService.findConfigInfosByIds(ids); - Assert.assertFalse(true); + assertFalse(true); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotGetJdbcConnectionException); + assertTrue(e instanceof CannotGetJdbcConnectionException); } } @Test - public void testFindConfigAdvanceInfo() { + void testFindConfigAdvanceInfo() { String dataId = "dataId1324"; String group = "group23546"; String tenant = "tenant13245"; //mock select tags List mockTags = Arrays.asList("tag1", "tag2", "tag3"); - when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(String.class))).thenReturn(mockTags); + when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))).thenReturn(mockTags); String schema = "schema12345654"; //mock select config advance @@ -1030,17 +992,16 @@ public void testFindConfigAdvanceInfo() { eq(CONFIG_ADVANCE_INFO_ROW_MAPPER))).thenReturn(mockedAdvance); //execute return mock obj - ConfigAdvanceInfo configAdvanceInfo = externalConfigInfoPersistService.findConfigAdvanceInfo(dataId, group, - tenant); + ConfigAdvanceInfo configAdvanceInfo = externalConfigInfoPersistService.findConfigAdvanceInfo(dataId, group, tenant); //expect check schema & tags. - Assert.assertEquals(mockedAdvance.getSchema(), configAdvanceInfo.getSchema()); - Assert.assertEquals(String.join(",", mockTags), configAdvanceInfo.getConfigTags()); + assertEquals(mockedAdvance.getSchema(), configAdvanceInfo.getSchema()); + assertEquals(String.join(",", mockTags), configAdvanceInfo.getConfigTags()); //mock EmptyResultDataAccessException when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_ADVANCE_INFO_ROW_MAPPER))).thenThrow(new EmptyResultDataAccessException(1)); //expect return null. - Assert.assertNull(externalConfigInfoPersistService.findConfigAdvanceInfo(dataId, group, tenant)); + assertNull(externalConfigInfoPersistService.findConfigAdvanceInfo(dataId, group, tenant)); //mock CannotGetJdbcConnectionException when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), @@ -1048,58 +1009,57 @@ public void testFindConfigAdvanceInfo() { //expect throw exception. try { externalConfigInfoPersistService.findConfigAdvanceInfo(dataId, group, tenant); - Assert.assertFalse(true); + assertFalse(true); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotGetJdbcConnectionException); - Assert.assertTrue(e.getMessage().endsWith("mock exp")); + assertTrue(e instanceof CannotGetJdbcConnectionException); + assertTrue(e.getMessage().endsWith("mock exp")); } } @Test - public void testFindConfigAllInfo() { + void testFindConfigAllInfo() { String dataId = "dataId1324"; String group = "group23546"; String tenant = "tenant13245"; //mock select tags List mockTags = Arrays.asList("tag1", "tag2", "tag3"); - when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(String.class))).thenReturn(mockTags); + when(jdbcTemplate.queryForList(anyString(), eq(new Object[] {dataId, group, tenant}), eq(String.class))).thenReturn(mockTags); String schema = "schema12345654"; //mock select config advance ConfigAllInfo mockedConfig = new ConfigAllInfo(); mockedConfig.setSchema(schema); - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn(mockedConfig); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn( + mockedConfig); //execute return mock obj ConfigAllInfo configAllInfo = externalConfigInfoPersistService.findConfigAllInfo(dataId, group, tenant); //expect check schema & tags. - Assert.assertEquals(mockedConfig.getSchema(), configAllInfo.getSchema()); - Assert.assertEquals(String.join(",", mockTags), configAllInfo.getConfigTags()); + assertEquals(mockedConfig.getSchema(), configAllInfo.getSchema()); + assertEquals(String.join(",", mockTags), configAllInfo.getConfigTags()); //mock EmptyResultDataAccessException - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenThrow(new EmptyResultDataAccessException(1)); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenThrow( + new EmptyResultDataAccessException(1)); //expect return null. - Assert.assertNull(externalConfigInfoPersistService.findConfigAllInfo(dataId, group, tenant)); + assertNull(externalConfigInfoPersistService.findConfigAllInfo(dataId, group, tenant)); //mock CannotGetJdbcConnectionException - when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), - eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenThrow(new CannotGetJdbcConnectionException("mock exp")); + when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenThrow( + new CannotGetJdbcConnectionException("mock exp")); //expect throw exception. try { externalConfigInfoPersistService.findConfigAllInfo(dataId, group, tenant); - Assert.assertFalse(true); + assertFalse(true); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotGetJdbcConnectionException); - Assert.assertTrue(e.getMessage().endsWith("mock exp")); + assertTrue(e instanceof CannotGetJdbcConnectionException); + assertTrue(e.getMessage().endsWith("mock exp")); } } @Test - public void testFindConfigInfoState() { + void testFindConfigInfoState() { String dataId = "dataId1324"; String group = "group23546"; @@ -1113,17 +1073,16 @@ public void testFindConfigInfoState() { eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(mockedConfig); //execute return mock obj - ConfigInfoStateWrapper configInfoStateWrapper = externalConfigInfoPersistService.findConfigInfoState(dataId, - group, tenant); + ConfigInfoStateWrapper configInfoStateWrapper = externalConfigInfoPersistService.findConfigInfoState(dataId, group, tenant); //expect check schema & tags. - Assert.assertEquals(mockedConfig.getId(), configInfoStateWrapper.getId()); - Assert.assertEquals(mockedConfig.getLastModified(), configInfoStateWrapper.getLastModified()); + assertEquals(mockedConfig.getId(), configInfoStateWrapper.getId()); + assertEquals(mockedConfig.getLastModified(), configInfoStateWrapper.getLastModified()); //mock EmptyResultDataAccessException when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenThrow(new EmptyResultDataAccessException(1)); //expect return null. - Assert.assertNull(externalConfigInfoPersistService.findConfigInfoState(dataId, group, tenant)); + assertNull(externalConfigInfoPersistService.findConfigInfoState(dataId, group, tenant)); //mock CannotGetJdbcConnectionException when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), @@ -1131,15 +1090,15 @@ public void testFindConfigInfoState() { //expect throw exception. try { externalConfigInfoPersistService.findConfigInfoState(dataId, group, tenant); - Assert.assertFalse(true); + assertFalse(true); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotGetJdbcConnectionException); - Assert.assertTrue(e.getMessage().endsWith("mock exp")); + assertTrue(e instanceof CannotGetJdbcConnectionException); + assertTrue(e.getMessage().endsWith("mock exp")); } } @Test - public void testFindAllConfigInfo4Export() { + void testFindAllConfigInfo4Export() { //mock select config state List mockConfigs = new ArrayList<>(); @@ -1153,37 +1112,36 @@ public void testFindAllConfigInfo4Export() { String appName = "appName1243"; List ids = Arrays.asList(132L, 1343L, 245L); - when(jdbcTemplate.query(anyString(), eq(new Object[] {132L, 1343L, 245L}), - eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn(mockConfigs); + when(jdbcTemplate.query(anyString(), eq(new Object[] {132L, 1343L, 245L}), eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn(mockConfigs); //execute return mock obj - List configAllInfosIds = externalConfigInfoPersistService.findAllConfigInfo4Export(dataId, group, - tenant, appName, ids); + List configAllInfosIds = externalConfigInfoPersistService.findAllConfigInfo4Export(dataId, group, tenant, appName, + ids); //expect check - Assert.assertEquals(mockConfigs, configAllInfosIds); + assertEquals(mockConfigs, configAllInfosIds); - when(jdbcTemplate.query(anyString(), eq(new Object[] {tenant, dataId, group, appName}), - eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn(mockConfigs); + when(jdbcTemplate.query(anyString(), eq(new Object[] {tenant, dataId, group, appName}), eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenReturn( + mockConfigs); //execute return mock obj - List configAllInfosWithDataId = externalConfigInfoPersistService.findAllConfigInfo4Export(dataId, - group, tenant, appName, null); + List configAllInfosWithDataId = externalConfigInfoPersistService.findAllConfigInfo4Export(dataId, group, tenant, + appName, null); //expect check - Assert.assertEquals(mockConfigs, configAllInfosWithDataId); + assertEquals(mockConfigs, configAllInfosWithDataId); //mock CannotGetJdbcConnectionException - when(jdbcTemplate.query(anyString(), eq(new Object[] {132L, 1343L, 245L}), - eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenThrow(new CannotGetJdbcConnectionException("mock exp11")); + when(jdbcTemplate.query(anyString(), eq(new Object[] {132L, 1343L, 245L}), eq(CONFIG_ALL_INFO_ROW_MAPPER))).thenThrow( + new CannotGetJdbcConnectionException("mock exp11")); //expect throw exception. try { externalConfigInfoPersistService.findAllConfigInfo4Export(dataId, group, tenant, appName, ids); - Assert.assertFalse(true); + assertFalse(true); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotGetJdbcConnectionException); - Assert.assertTrue(e.getMessage().endsWith("mock exp11")); + assertTrue(e instanceof CannotGetJdbcConnectionException); + assertTrue(e.getMessage().endsWith("mock exp11")); } } @Test - public void testQueryConfigInfoByNamespace() { + void testQueryConfigInfoByNamespace() { //mock select config state List mockConfigs = new ArrayList<>(); @@ -1191,22 +1149,19 @@ public void testQueryConfigInfoByNamespace() { mockConfigs.add(createMockConfigInfoWrapper(1)); mockConfigs.add(createMockConfigInfoWrapper(2)); String tenant = "tenant13245"; - when(jdbcTemplate.query(anyString(), eq(new Object[] {tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn( - mockConfigs); + when(jdbcTemplate.query(anyString(), eq(new Object[] {tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(mockConfigs); //execute return mock obj - List configInfoWrappers = externalConfigInfoPersistService.queryConfigInfoByNamespace( - tenant); + List configInfoWrappers = externalConfigInfoPersistService.queryConfigInfoByNamespace(tenant); //expect check - Assert.assertEquals(mockConfigs, configInfoWrappers); + assertEquals(mockConfigs, configInfoWrappers); //mock CannotGetJdbcConnectionException when(jdbcTemplate.query(anyString(), eq(new Object[] {tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenThrow( new EmptyResultDataAccessException(2)); //execute return mock obj - List configInfoWrapperNull = externalConfigInfoPersistService.queryConfigInfoByNamespace( - tenant); + List configInfoWrapperNull = externalConfigInfoPersistService.queryConfigInfoByNamespace(tenant); //expect check - Assert.assertEquals(Collections.EMPTY_LIST, configInfoWrapperNull); + assertEquals(Collections.EMPTY_LIST, configInfoWrapperNull); //mock CannotGetJdbcConnectionException when(jdbcTemplate.query(anyString(), eq(new Object[] {tenant}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenThrow( @@ -1214,15 +1169,15 @@ public void testQueryConfigInfoByNamespace() { //expect throw exception. try { externalConfigInfoPersistService.queryConfigInfoByNamespace(tenant); - Assert.assertFalse(true); + assertFalse(true); } catch (Exception e) { - Assert.assertTrue(e instanceof CannotGetJdbcConnectionException); - Assert.assertTrue(e.getMessage().endsWith("mock exp1111")); + assertTrue(e instanceof CannotGetJdbcConnectionException); + assertTrue(e.getMessage().endsWith("mock exp1111")); } } @Test - public void testGetTenantIdList() { + void testGetTenantIdList() { int page = 10; int pageSize = 100; @@ -1233,11 +1188,11 @@ public void testGetTenantIdList() { List returnTenants = externalConfigInfoPersistService.getTenantIdList(page, pageSize); //expect check - Assert.assertEquals(tenantStrings, returnTenants); + assertEquals(tenantStrings, returnTenants); } @Test - public void testGetGroupIdList() { + void testGetGroupIdList() { int page = 10; int pageSize = 100; @@ -1248,34 +1203,32 @@ public void testGetGroupIdList() { List returnGroups = externalConfigInfoPersistService.getGroupIdList(page, pageSize); //expect check - Assert.assertEquals(groupStrings, returnGroups); + assertEquals(groupStrings, returnGroups); } @Test - public void testFindAllConfigInfoFragment() { + void testFindAllConfigInfoFragment() { //mock page list List mockConfigs = new ArrayList<>(); mockConfigs.add(createMockConfigInfoWrapper(0)); mockConfigs.add(createMockConfigInfoWrapper(1)); mockConfigs.add(createMockConfigInfoWrapper(2)); long lastId = 10111L; - when(jdbcTemplate.query(anyString(), eq(new Object[] {lastId}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn( - mockConfigs); + when(jdbcTemplate.query(anyString(), eq(new Object[] {lastId}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenReturn(mockConfigs); int pageSize = 100; //execute return mock obj - Page returnConfigPage = externalConfigInfoPersistService.findAllConfigInfoFragment(lastId, - pageSize, true); + Page returnConfigPage = externalConfigInfoPersistService.findAllConfigInfoFragment(lastId, pageSize, true); //expect check - Assert.assertEquals(mockConfigs, returnConfigPage.getPageItems()); + assertEquals(mockConfigs, returnConfigPage.getPageItems()); when(jdbcTemplate.query(anyString(), eq(new Object[] {lastId}), eq(CONFIG_INFO_WRAPPER_ROW_MAPPER))).thenThrow( new CannotGetJdbcConnectionException("mock fail")); try { externalConfigInfoPersistService.findAllConfigInfoFragment(lastId, pageSize, true); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("mock fail", e.getMessage()); + assertEquals("mock fail", e.getMessage()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoTagPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoTagPersistServiceImplTest.java index 9dd2771f092..e19fc4224e0 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoTagPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalConfigInfoTagPersistServiceImplTest.java @@ -28,18 +28,17 @@ import com.alibaba.nacos.persistence.datasource.DynamicDataSource; import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.jdbc.CannotGetJdbcConnectionException; import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.support.TransactionTemplate; import java.sql.Timestamp; @@ -49,14 +48,26 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) -public class ExternalConfigInfoTagPersistServiceImplTest { +@ExtendWith(SpringExtension.class) +class ExternalConfigInfoTagPersistServiceImplTest { + + MockedStatic envUtilMockedStatic; + + MockedStatic externalStorageUtilsMockedStatic; + + MockedStatic dynamicDataSourceMockedStatic; + + @Mock + DynamicDataSource dynamicDataSource; private ExternalConfigInfoTagPersistServiceImpl externalConfigInfoTagPersistService; @@ -68,17 +79,8 @@ public class ExternalConfigInfoTagPersistServiceImplTest { private TransactionTemplate transactionTemplate = TestCaseUtils.createMockTransactionTemplate(); - MockedStatic envUtilMockedStatic; - - MockedStatic externalStorageUtilsMockedStatic; - - MockedStatic dynamicDataSourceMockedStatic; - - @Mock - DynamicDataSource dynamicDataSource; - - @Before - public void before() { + @BeforeEach + void before() { dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); externalStorageUtilsMockedStatic = Mockito.mockStatic(ExternalStorageUtils.class); @@ -87,20 +89,19 @@ public void before() { when(dataSourceService.getTransactionTemplate()).thenReturn(transactionTemplate); when(dataSourceService.getJdbcTemplate()).thenReturn(jdbcTemplate); when(dataSourceService.getDataSourceType()).thenReturn("mysql"); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); externalConfigInfoTagPersistService = new ExternalConfigInfoTagPersistServiceImpl(); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); externalStorageUtilsMockedStatic.close(); } @Test - public void testInsertOrUpdateTagOfAdd() { + void testInsertOrUpdateTagOfAdd() { String dataId = "dataId111222"; String group = "group"; String tenant = "tenant"; @@ -119,20 +120,18 @@ public void testInsertOrUpdateTagOfAdd() { .thenReturn(configInfoStateWrapper); String srcIp = "ip345678"; String srcUser = "user1234567"; - ConfigOperateResult configOperateResult = externalConfigInfoTagPersistService.insertOrUpdateTag(configInfo, tag, - srcIp, srcUser); + ConfigOperateResult configOperateResult = externalConfigInfoTagPersistService.insertOrUpdateTag(configInfo, tag, srcIp, srcUser); //verify insert to be invoked Mockito.verify(jdbcTemplate, times(1)) - .update(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag), eq(appName), - eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), - any(Timestamp.class), any(Timestamp.class)); - Assert.assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + .update(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag), eq(appName), eq(configInfo.getContent()), + eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class)); + assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); } @Test - public void testInsertOrUpdateTagOfUpdate() { + void testInsertOrUpdateTagOfUpdate() { String dataId = "dataId111222"; String group = "group"; String tenant = "tenant"; @@ -147,23 +146,21 @@ public void testInsertOrUpdateTagOfUpdate() { configInfoStateWrapper.setId(234567890L); String tag = "tag123"; Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, tag}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()) - .thenReturn(configInfoStateWrapper); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()).thenReturn(configInfoStateWrapper); String srcIp = "ip345678"; String srcUser = "user1234567"; - ConfigOperateResult configOperateResult = externalConfigInfoTagPersistService.insertOrUpdateTag(configInfo, tag, - srcIp, srcUser); + ConfigOperateResult configOperateResult = externalConfigInfoTagPersistService.insertOrUpdateTag(configInfo, tag, srcIp, srcUser); //verify update to be invoked Mockito.verify(jdbcTemplate, times(1)) - .update(anyString(), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag)); - Assert.assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + .update(anyString(), eq(configInfo.getContent()), eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), any(Timestamp.class), + eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag)); + assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); } @Test - public void testInsertOrUpdateTagCasOfAdd() { + void testInsertOrUpdateTagCasOfAdd() { String dataId = "dataId111222"; String group = "group"; String tenant = "tenant"; @@ -183,21 +180,19 @@ public void testInsertOrUpdateTagCasOfAdd() { .thenReturn(configInfoStateWrapper); String srcIp = "ip345678"; String srcUser = "user1234567"; - ConfigOperateResult configOperateResult = externalConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, - tag, srcIp, srcUser); + ConfigOperateResult configOperateResult = externalConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, tag, srcIp, srcUser); //verify insert to be invoked Mockito.verify(jdbcTemplate, times(1)) - .update(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag), eq(appName), - eq(configInfo.getContent()), + .update(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag), eq(appName), eq(configInfo.getContent()), eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class)); - Assert.assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); } @Test - public void testInsertOrUpdateTagCasOfUpdate() { + void testInsertOrUpdateTagCasOfUpdate() { String dataId = "dataId111222"; String group = "group"; String tenant = "tenant"; @@ -213,28 +208,26 @@ public void testInsertOrUpdateTagCasOfUpdate() { configInfoStateWrapper.setId(234567890L); String tag = "tag123"; Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, tag}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()) - .thenReturn(configInfoStateWrapper); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(new ConfigInfoStateWrapper()).thenReturn(configInfoStateWrapper); String srcIp = "ip345678"; String srcUser = "user1234567"; //mock cas update return 1 Mockito.when(jdbcTemplate.update(anyString(), eq(configInfo.getContent()), - eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag), eq(configInfo.getMd5()))) - .thenReturn(1); - ConfigOperateResult configOperateResult = externalConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, - tag, srcIp, srcUser); + eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), + eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag), eq(configInfo.getMd5()))).thenReturn(1); + ConfigOperateResult configOperateResult = externalConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, tag, srcIp, srcUser); //verify update to be invoked - Mockito.verify(jdbcTemplate, times(1)).update(anyString(), eq(configInfo.getContent()), - eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag), eq(configInfo.getMd5())); - Assert.assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); - Assert.assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); + Mockito.verify(jdbcTemplate, times(1)) + .update(anyString(), eq(configInfo.getContent()), eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), + eq(srcIp), eq(srcUser), any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag), + eq(configInfo.getMd5())); + assertEquals(configInfoStateWrapper.getId(), configOperateResult.getId()); + assertEquals(configInfoStateWrapper.getLastModified(), configOperateResult.getLastModified()); } @Test - public void testInsertOrUpdateTagCasOfException() { + void testInsertOrUpdateTagCasOfException() { String dataId = "dataId111222"; String group = "group"; String tenant = "tenant"; @@ -250,47 +243,45 @@ public void testInsertOrUpdateTagCasOfException() { configInfoStateWrapper.setId(234567890L); String tag = "tag123"; Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, tag}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) - .thenThrow(new CannotGetJdbcConnectionException("state query throw exception")); + eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenThrow(new CannotGetJdbcConnectionException("state query throw exception")); String srcIp = "ip345678"; String srcUser = "user1234567"; try { externalConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, tag, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("state query throw exception", e.getMessage()); + assertEquals("state query throw exception", e.getMessage()); } //mock get state return null,and execute add throw CannotGetJdbcConnectionException Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, tag}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(null); - Mockito.when(jdbcTemplate.update(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag), eq(appName), - eq(configInfo.getContent()), eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), - eq(srcIp), eq(srcUser), any(Timestamp.class), any(Timestamp.class))) - .thenThrow(new CannotGetJdbcConnectionException("throw exception add config tag")); + Mockito.when(jdbcTemplate.update(anyString(), eq(dataId), eq(group), eq(tenant), eq(tag), eq(appName), eq(configInfo.getContent()), + eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), + any(Timestamp.class))).thenThrow(new CannotGetJdbcConnectionException("throw exception add config tag")); try { externalConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, tag, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("throw exception add config tag", e.getMessage()); + assertEquals("throw exception add config tag", e.getMessage()); } //mock get state return obj,and execute update throw CannotGetJdbcConnectionException Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, tag}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(configInfoStateWrapper); Mockito.when(jdbcTemplate.update(anyString(), eq(configInfo.getContent()), - eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), - any(Timestamp.class), eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag), eq(configInfo.getMd5()))) + eq(MD5Utils.md5Hex(configInfo.getContent(), Constants.PERSIST_ENCODE)), eq(srcIp), eq(srcUser), any(Timestamp.class), + eq(appName), eq(dataId), eq(group), eq(tenant), eq(tag), eq(configInfo.getMd5()))) .thenThrow(new CannotGetJdbcConnectionException("throw exception update config tag")); try { externalConfigInfoTagPersistService.insertOrUpdateTagCas(configInfo, tag, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("throw exception update config tag", e.getMessage()); + assertEquals("throw exception update config tag", e.getMessage()); } } @Test - public void testRemoveConfigInfoTag() { + void testRemoveConfigInfoTag() { String dataId = "dataId1112222"; String group = "group22"; String tenant = "tenant2"; @@ -307,14 +298,14 @@ public void testRemoveConfigInfoTag() { .thenThrow(new CannotGetJdbcConnectionException("delete fail")); try { externalConfigInfoTagPersistService.removeConfigInfoTag(dataId, group, tenant, tag, srcIp, srcUser); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("delete fail", e.getMessage()); + assertEquals("delete fail", e.getMessage()); } } @Test - public void testFindConfigInfo4Tag() { + void testFindConfigInfo4Tag() { String dataId = "dataId1112222"; String group = "group22"; String tenant = "tenant2"; @@ -326,50 +317,48 @@ public void testFindConfigInfo4Tag() { Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, tag}), eq(CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER))).thenReturn(configInfoTagWrapperMocked); - ConfigInfoTagWrapper configInfo4TagReturn = externalConfigInfoTagPersistService.findConfigInfo4Tag(dataId, - group, tenant, tag); - Assert.assertEquals(configInfoTagWrapperMocked, configInfo4TagReturn); + ConfigInfoTagWrapper configInfo4TagReturn = externalConfigInfoTagPersistService.findConfigInfo4Tag(dataId, group, tenant, tag); + assertEquals(configInfoTagWrapperMocked, configInfo4TagReturn); //mock query tag throw EmptyResultDataAccessException Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, tag}), eq(CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER))).thenThrow(new EmptyResultDataAccessException(1)); - ConfigInfoTagWrapper configInfo4Tag = externalConfigInfoTagPersistService.findConfigInfo4Tag(dataId, group, - tenant, tag); - Assert.assertNull(configInfo4Tag); + ConfigInfoTagWrapper configInfo4Tag = externalConfigInfoTagPersistService.findConfigInfo4Tag(dataId, group, tenant, tag); + assertNull(configInfo4Tag); //mock query tag throw CannotGetJdbcConnectionException Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant, tag}), eq(CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER))).thenThrow(new CannotGetJdbcConnectionException("con error")); try { externalConfigInfoTagPersistService.findConfigInfo4Tag(dataId, group, tenant, tag); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("con error", e.getMessage()); + assertEquals("con error", e.getMessage()); } } @Test - public void testConfigInfoTagCount() { + void testConfigInfoTagCount() { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); //mock count Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(308); //execute & verify int count = externalConfigInfoTagPersistService.configInfoTagCount(); - Assert.assertEquals(308, count); + assertEquals(308, count); //mock count is null Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(null); //execute & verify try { externalConfigInfoTagPersistService.configInfoTagCount(); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("configInfoTagCount error", e.getMessage()); + assertEquals("configInfoTagCount error", e.getMessage()); } } @Test - public void testFindAllConfigInfoTagForDumpAll() { + void testFindAllConfigInfoTagForDumpAll() { //mock count Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))).thenReturn(308); @@ -381,15 +370,13 @@ public void testFindAllConfigInfoTagForDumpAll() { mockTagList.get(1).setLastModified(System.currentTimeMillis()); mockTagList.get(2).setLastModified(System.currentTimeMillis()); //mock query list - Mockito.when(jdbcTemplate.query(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER))) - .thenReturn(mockTagList); + Mockito.when(jdbcTemplate.query(anyString(), eq(new Object[] {}), eq(CONFIG_INFO_TAG_WRAPPER_ROW_MAPPER))).thenReturn(mockTagList); int pageNo = 3; int pageSize = 100; //execute & verify - Page returnTagPage = externalConfigInfoTagPersistService.findAllConfigInfoTagForDumpAll( - pageNo, pageSize); - Assert.assertEquals(308, returnTagPage.getTotalCount()); - Assert.assertEquals(mockTagList, returnTagPage.getPageItems()); + Page returnTagPage = externalConfigInfoTagPersistService.findAllConfigInfoTagForDumpAll(pageNo, pageSize); + assertEquals(308, returnTagPage.getTotalCount()); + assertEquals(mockTagList, returnTagPage.getPageItems()); //mock count CannotGetJdbcConnectionException Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(Integer.class))) @@ -397,14 +384,14 @@ public void testFindAllConfigInfoTagForDumpAll() { //execute & verify try { externalConfigInfoTagPersistService.findAllConfigInfoTagForDumpAll(pageNo, pageSize); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn error111", e.getMessage()); + assertEquals("conn error111", e.getMessage()); } } @Test - public void testFindConfigInfoTags() { + void testFindConfigInfoTags() { String dataId = "dataId1112222"; String group = "group22"; String tenant = "tenant2"; @@ -413,7 +400,7 @@ public void testFindConfigInfoTags() { .thenReturn(mockedTags); List configInfoTags = externalConfigInfoTagPersistService.findConfigInfoTags(dataId, group, tenant); - Assert.assertEquals(mockedTags, configInfoTags); + assertEquals(mockedTags, configInfoTags); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalHistoryConfigInfoPersistServiceImplTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalHistoryConfigInfoPersistServiceImplTest.java index 779f592b6ff..e7509fd31ba 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalHistoryConfigInfoPersistServiceImplTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/repository/extrnal/ExternalHistoryConfigInfoPersistServiceImplTest.java @@ -25,18 +25,17 @@ import com.alibaba.nacos.persistence.datasource.DynamicDataSource; import com.alibaba.nacos.persistence.model.Page; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.jdbc.CannotGetJdbcConnectionException; import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.support.TransactionTemplate; import java.sql.Timestamp; @@ -46,13 +45,25 @@ import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.HISTORY_DETAIL_ROW_MAPPER; import static com.alibaba.nacos.config.server.service.repository.ConfigRowMapperInjector.HISTORY_LIST_ROW_MAPPER; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -@RunWith(SpringJUnit4ClassRunner.class) -public class ExternalHistoryConfigInfoPersistServiceImplTest { +@ExtendWith(SpringExtension.class) +class ExternalHistoryConfigInfoPersistServiceImplTest { + + MockedStatic envUtilMockedStatic; + + MockedStatic externalStorageUtilsMockedStatic; + + MockedStatic dynamicDataSourceMockedStatic; + + @Mock + DynamicDataSource dynamicDataSource; private ExternalHistoryConfigInfoPersistServiceImpl externalHistoryConfigInfoPersistService; @@ -64,17 +75,8 @@ public class ExternalHistoryConfigInfoPersistServiceImplTest { private TransactionTemplate transactionTemplate = TestCaseUtils.createMockTransactionTemplate(); - MockedStatic envUtilMockedStatic; - - MockedStatic externalStorageUtilsMockedStatic; - - MockedStatic dynamicDataSourceMockedStatic; - - @Mock - DynamicDataSource dynamicDataSource; - - @Before - public void before() { + @BeforeEach + void before() { dynamicDataSourceMockedStatic = Mockito.mockStatic(DynamicDataSource.class); envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); externalStorageUtilsMockedStatic = Mockito.mockStatic(ExternalStorageUtils.class); @@ -83,20 +85,19 @@ public void before() { when(dataSourceService.getTransactionTemplate()).thenReturn(transactionTemplate); when(dataSourceService.getJdbcTemplate()).thenReturn(jdbcTemplate); when(dataSourceService.getDataSourceType()).thenReturn("mysql"); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))) - .thenReturn(false); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(anyString(), eq(Boolean.class), eq(false))).thenReturn(false); externalHistoryConfigInfoPersistService = new ExternalHistoryConfigInfoPersistServiceImpl(); } - @After - public void after() { + @AfterEach + void after() { dynamicDataSourceMockedStatic.close(); envUtilMockedStatic.close(); externalStorageUtilsMockedStatic.close(); } @Test - public void testInsertConfigHistoryAtomic() { + void testInsertConfigHistoryAtomic() { String dataId = "dateId243"; String group = "group243"; String tenant = "tenant243"; @@ -110,29 +111,24 @@ public void testInsertConfigHistoryAtomic() { ConfigInfo configInfo = new ConfigInfo(dataId, group, tenant, appName, content); configInfo.setEncryptedDataKey("key23456"); //expect insert success,verify insert invoked - externalHistoryConfigInfoPersistService.insertConfigHistoryAtomic(id, configInfo, srcIp, srcUser, timestamp, - ops); + externalHistoryConfigInfoPersistService.insertConfigHistoryAtomic(id, configInfo, srcIp, srcUser, timestamp, ops); Mockito.verify(jdbcTemplate, times(1)) - .update(anyString(), eq(id), eq(dataId), eq(group), eq(tenant), eq(appName), eq(content), - eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), eq(timestamp), eq(ops), - eq(configInfo.getEncryptedDataKey())); + .update(anyString(), eq(id), eq(dataId), eq(group), eq(tenant), eq(appName), eq(content), eq(configInfo.getMd5()), + eq(srcIp), eq(srcUser), eq(timestamp), eq(ops), eq(configInfo.getEncryptedDataKey())); - Mockito.when( - jdbcTemplate.update(anyString(), eq(id), eq(dataId), eq(group), eq(tenant), eq(appName), eq(content), - eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), eq(timestamp), eq(ops), - eq(configInfo.getEncryptedDataKey()))) + Mockito.when(jdbcTemplate.update(anyString(), eq(id), eq(dataId), eq(group), eq(tenant), eq(appName), eq(content), + eq(configInfo.getMd5()), eq(srcIp), eq(srcUser), eq(timestamp), eq(ops), eq(configInfo.getEncryptedDataKey()))) .thenThrow(new CannotGetJdbcConnectionException("mock ex...")); try { - externalHistoryConfigInfoPersistService.insertConfigHistoryAtomic(id, configInfo, srcIp, srcUser, timestamp, - ops); - Assert.assertTrue(false); + externalHistoryConfigInfoPersistService.insertConfigHistoryAtomic(id, configInfo, srcIp, srcUser, timestamp, ops); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("mock ex...", e.getMessage()); + assertEquals("mock ex...", e.getMessage()); } } @Test - public void testRemoveConfigHistory() { + void testRemoveConfigHistory() { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); int pageSize = 1233; externalHistoryConfigInfoPersistService.removeConfigHistory(timestamp, pageSize); @@ -141,7 +137,7 @@ public void testRemoveConfigHistory() { } @Test - public void testFindDeletedConfig() { + void testFindDeletedConfig() { //mock query list return ConfigInfoStateWrapper mockObj1 = new ConfigInfoStateWrapper(); @@ -162,75 +158,72 @@ public void testFindDeletedConfig() { int pageSize = 1233; long startId = 23456; Timestamp timestamp = new Timestamp(System.currentTimeMillis()); - Mockito.when(jdbcTemplate.query(anyString(), eq(new Object[] {timestamp, startId, pageSize}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))).thenReturn(list); + Mockito.when( + jdbcTemplate.query(anyString(), eq(new Object[] {timestamp, startId, pageSize}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + .thenReturn(list); //execute - List deletedConfig = externalHistoryConfigInfoPersistService.findDeletedConfig( - timestamp, startId, pageSize); + List deletedConfig = externalHistoryConfigInfoPersistService.findDeletedConfig(timestamp, startId, + pageSize); //expect verify - Assert.assertEquals("data_id1", deletedConfig.get(0).getDataId()); - Assert.assertEquals("group_id1", deletedConfig.get(0).getGroup()); - Assert.assertEquals("tenant_id1", deletedConfig.get(0).getTenant()); - Assert.assertEquals(mockObj1.getLastModified(), deletedConfig.get(0).getLastModified()); - Assert.assertEquals("data_id2", deletedConfig.get(1).getDataId()); - Assert.assertEquals("group_id2", deletedConfig.get(1).getGroup()); - Assert.assertEquals("tenant_id2", deletedConfig.get(1).getTenant()); - Assert.assertEquals(mockObj2.getLastModified(), deletedConfig.get(1).getLastModified()); + assertEquals("data_id1", deletedConfig.get(0).getDataId()); + assertEquals("group_id1", deletedConfig.get(0).getGroup()); + assertEquals("tenant_id1", deletedConfig.get(0).getTenant()); + assertEquals(mockObj1.getLastModified(), deletedConfig.get(0).getLastModified()); + assertEquals("data_id2", deletedConfig.get(1).getDataId()); + assertEquals("group_id2", deletedConfig.get(1).getGroup()); + assertEquals("tenant_id2", deletedConfig.get(1).getTenant()); + assertEquals(mockObj2.getLastModified(), deletedConfig.get(1).getLastModified()); //mock exception - Mockito.when(jdbcTemplate.query(anyString(), eq(new Object[] {timestamp, startId, pageSize}), - eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) + Mockito.when( + jdbcTemplate.query(anyString(), eq(new Object[] {timestamp, startId, pageSize}), eq(CONFIG_INFO_STATE_WRAPPER_ROW_MAPPER))) .thenThrow(new CannotGetJdbcConnectionException("conn error")); try { externalHistoryConfigInfoPersistService.findDeletedConfig(timestamp, startId, pageSize); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn error", e.getMessage()); + assertEquals("conn error", e.getMessage()); } } @Test - public void testFindConfigHistory() { + void testFindConfigHistory() { String dataId = "dataId34567"; String group = "group34567"; String tenant = "tenant34567"; //mock count - Mockito.when( - jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))) - .thenReturn(300); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))).thenReturn(300); //mock list List mockList = new ArrayList<>(); mockList.add(createMockConfigHistoryInfo(0)); mockList.add(createMockConfigHistoryInfo(1)); mockList.add(createMockConfigHistoryInfo(2)); - Mockito.when( - jdbcTemplate.query(anyString(), eq(new Object[] {dataId, group, tenant}), eq(HISTORY_LIST_ROW_MAPPER))) + Mockito.when(jdbcTemplate.query(anyString(), eq(new Object[] {dataId, group, tenant}), eq(HISTORY_LIST_ROW_MAPPER))) .thenReturn(mockList); int pageSize = 100; int pageNo = 2; //execute & verify - Page historyReturn = externalHistoryConfigInfoPersistService.findConfigHistory(dataId, group, - tenant, pageNo, pageSize); - Assert.assertEquals(mockList, historyReturn.getPageItems()); - Assert.assertEquals(300, historyReturn.getTotalCount()); + Page historyReturn = externalHistoryConfigInfoPersistService.findConfigHistory(dataId, group, tenant, pageNo, + pageSize); + assertEquals(mockList, historyReturn.getPageItems()); + assertEquals(300, historyReturn.getTotalCount()); //mock exception - Mockito.when( - jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))) + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {dataId, group, tenant}), eq(Integer.class))) .thenThrow(new CannotGetJdbcConnectionException("conn error111")); try { externalHistoryConfigInfoPersistService.findConfigHistory(dataId, group, tenant, pageNo, pageSize); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn error111", e.getMessage()); + assertEquals("conn error111", e.getMessage()); } } @Test - public void testDetailConfigHistory() { + void testDetailConfigHistory() { long nid = 256789; //mock query @@ -239,27 +232,27 @@ public void testDetailConfigHistory() { .thenReturn(mockConfigHistoryInfo); //execute & verify ConfigHistoryInfo historyReturn = externalHistoryConfigInfoPersistService.detailConfigHistory(nid); - Assert.assertEquals(mockConfigHistoryInfo, historyReturn); + assertEquals(mockConfigHistoryInfo, historyReturn); //mock exception EmptyResultDataAccessException Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {nid}), eq(HISTORY_DETAIL_ROW_MAPPER))) .thenThrow(new EmptyResultDataAccessException(1)); ConfigHistoryInfo historyReturnNull = externalHistoryConfigInfoPersistService.detailConfigHistory(nid); - Assert.assertNull(historyReturnNull); + assertNull(historyReturnNull); //mock exception CannotGetJdbcConnectionException Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {nid}), eq(HISTORY_DETAIL_ROW_MAPPER))) .thenThrow(new CannotGetJdbcConnectionException("conn error111")); try { externalHistoryConfigInfoPersistService.detailConfigHistory(nid); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn error111", e.getMessage()); + assertEquals("conn error111", e.getMessage()); } } @Test - public void testDetailPreviousConfigHistory() { + void testDetailPreviousConfigHistory() { long nid = 256789; //mock query ConfigHistoryInfo mockConfigHistoryInfo = createMockConfigHistoryInfo(0); @@ -267,45 +260,43 @@ public void testDetailPreviousConfigHistory() { .thenReturn(mockConfigHistoryInfo); //execute & verify ConfigHistoryInfo historyReturn = externalHistoryConfigInfoPersistService.detailPreviousConfigHistory(nid); - Assert.assertEquals(mockConfigHistoryInfo, historyReturn); + assertEquals(mockConfigHistoryInfo, historyReturn); //mock exception EmptyResultDataAccessException Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {nid}), eq(HISTORY_DETAIL_ROW_MAPPER))) .thenThrow(new EmptyResultDataAccessException(1)); ConfigHistoryInfo historyReturnNull = externalHistoryConfigInfoPersistService.detailPreviousConfigHistory(nid); - Assert.assertNull(historyReturnNull); + assertNull(historyReturnNull); //mock exception CannotGetJdbcConnectionException Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {nid}), eq(HISTORY_DETAIL_ROW_MAPPER))) .thenThrow(new CannotGetJdbcConnectionException("conn error111")); try { externalHistoryConfigInfoPersistService.detailPreviousConfigHistory(nid); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("conn error111", e.getMessage()); + assertEquals("conn error111", e.getMessage()); } } @Test - public void testFindConfigHistoryCountByTime() { + void testFindConfigHistoryCountByTime() { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); //mock count - Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {timestamp}), eq(Integer.class))) - .thenReturn(308); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {timestamp}), eq(Integer.class))).thenReturn(308); //execute & verify int count = externalHistoryConfigInfoPersistService.findConfigHistoryCountByTime(timestamp); - Assert.assertEquals(308, count); + assertEquals(308, count); //mock count is null - Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {timestamp}), eq(Integer.class))) - .thenReturn(null); + Mockito.when(jdbcTemplate.queryForObject(anyString(), eq(new Object[] {timestamp}), eq(Integer.class))).thenReturn(null); //execute & verify try { externalHistoryConfigInfoPersistService.findConfigHistoryCountByTime(timestamp); - Assert.assertTrue(false); + assertTrue(false); } catch (Exception e) { - Assert.assertEquals("findConfigHistoryCountByTime error", e.getMessage()); + assertEquals("findConfigHistoryCountByTime error", e.getMessage()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/AccumulateStatCountTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/AccumulateStatCountTest.java index c12959cccf4..d72b94518b7 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/AccumulateStatCountTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/AccumulateStatCountTest.java @@ -16,28 +16,29 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class AccumulateStatCountTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class AccumulateStatCountTest { @Test - public void testIncrease() { + void testIncrease() { AccumulateStatCount accumulateStatCount = new AccumulateStatCount(); long result = accumulateStatCount.increase(); - Assert.assertEquals(1, result); + assertEquals(1, result); } @Test - public void testStat() { + void testStat() { AccumulateStatCount accumulateStatCount = new AccumulateStatCount(); long stat = accumulateStatCount.stat(); - Assert.assertEquals(0, stat); + assertEquals(0, stat); accumulateStatCount.increase(); stat = accumulateStatCount.stat(); - Assert.assertEquals(1, stat); + assertEquals(1, stat); accumulateStatCount.increase(); stat = accumulateStatCount.stat(); - Assert.assertEquals(1, stat); + assertEquals(1, stat); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/AppNameUtilsTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/AppNameUtilsTest.java index b3df6c87642..e3b42bc6631 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/AppNameUtilsTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/AppNameUtilsTest.java @@ -16,12 +16,13 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.File; -public class AppNameUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class AppNameUtilsTest { private static final String PARAM_MARKING_PROJECT = "project.name"; @@ -44,25 +45,25 @@ public class AppNameUtilsTest { private static final String DEFAULT_APP_NAME = "unknown"; @Test - public void testGetAppName() { + void testGetAppName() { System.setProperty(PARAM_MARKING_PROJECT, SERVER_UNKNOWN); - Assert.assertEquals(SERVER_UNKNOWN, AppNameUtils.getAppName()); + assertEquals(SERVER_UNKNOWN, AppNameUtils.getAppName()); System.clearProperty(PARAM_MARKING_PROJECT); System.setProperty(PARAM_MARKING_JBOSS, LINUX_ADMIN_HOME + SERVER_JBOSS + File.separator); - Assert.assertEquals(SERVER_JBOSS, AppNameUtils.getAppName()); + assertEquals(SERVER_JBOSS, AppNameUtils.getAppName()); System.clearProperty(PARAM_MARKING_JBOSS); System.setProperty(PARAM_MARKING_JETTY, LINUX_ADMIN_HOME + SERVER_JETTY + File.separator); - Assert.assertEquals(SERVER_JETTY, AppNameUtils.getAppName()); + assertEquals(SERVER_JETTY, AppNameUtils.getAppName()); System.clearProperty(PARAM_MARKING_JETTY); System.setProperty(PARAM_MARKING_TOMCAT, LINUX_ADMIN_HOME + SERVER_TOMCAT + File.separator); - Assert.assertEquals(SERVER_TOMCAT, AppNameUtils.getAppName()); + assertEquals(SERVER_TOMCAT, AppNameUtils.getAppName()); System.clearProperty(PARAM_MARKING_TOMCAT); - - Assert.assertEquals(DEFAULT_APP_NAME, AppNameUtils.getAppName()); + + assertEquals(DEFAULT_APP_NAME, AppNameUtils.getAppName()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/ConfigExecutorTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/ConfigExecutorTest.java index b10e3d78d9c..597328efb4d 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/ConfigExecutorTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/ConfigExecutorTest.java @@ -16,16 +16,18 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -public class ConfigExecutorTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ConfigExecutorTest { @Test - public void testScheduleConfigTask() throws InterruptedException { + void testScheduleConfigTask() throws InterruptedException { AtomicInteger atomicInteger = new AtomicInteger(); @@ -35,12 +37,12 @@ public void testScheduleConfigTask() throws InterruptedException { TimeUnit.MILLISECONDS.sleep(10); - Assert.assertTrue(atomicInteger.get() >= 1); + assertTrue(atomicInteger.get() >= 1); } @Test - public void testScheduleCorrectUsageTask() throws InterruptedException { + void testScheduleCorrectUsageTask() throws InterruptedException { AtomicInteger atomicInteger = new AtomicInteger(); @@ -50,12 +52,12 @@ public void testScheduleCorrectUsageTask() throws InterruptedException { TimeUnit.MILLISECONDS.sleep(10); - Assert.assertTrue(atomicInteger.get() >= 1); + assertTrue(atomicInteger.get() >= 1); } @Test - public void testExecuteAsyncNotify() throws InterruptedException { + void testExecuteAsyncNotify() throws InterruptedException { AtomicInteger atomicInteger = new AtomicInteger(); @@ -65,12 +67,12 @@ public void testExecuteAsyncNotify() throws InterruptedException { TimeUnit.MILLISECONDS.sleep(20); - Assert.assertEquals(1, atomicInteger.get()); + assertEquals(1, atomicInteger.get()); } @Test - public void testScheduleAsyncNotify() throws InterruptedException { + void testScheduleAsyncNotify() throws InterruptedException { AtomicInteger atomicInteger = new AtomicInteger(); @@ -78,15 +80,15 @@ public void testScheduleAsyncNotify() throws InterruptedException { ConfigExecutor.scheduleAsyncNotify(runnable, 20, TimeUnit.MILLISECONDS); - Assert.assertEquals(0, atomicInteger.get()); + assertEquals(0, atomicInteger.get()); TimeUnit.MILLISECONDS.sleep(40); - Assert.assertEquals(1, atomicInteger.get()); + assertEquals(1, atomicInteger.get()); } @Test - public void testScheduleLongPollingV1() throws InterruptedException { + void testScheduleLongPollingV1() throws InterruptedException { AtomicInteger atomicInteger = new AtomicInteger(); @@ -96,11 +98,11 @@ public void testScheduleLongPollingV1() throws InterruptedException { TimeUnit.MILLISECONDS.sleep(10); - Assert.assertTrue(atomicInteger.get() >= 1); + assertTrue(atomicInteger.get() >= 1); } @Test - public void testScheduleLongPollingV2() throws InterruptedException { + void testScheduleLongPollingV2() throws InterruptedException { AtomicInteger atomicInteger = new AtomicInteger(); @@ -108,15 +110,15 @@ public void testScheduleLongPollingV2() throws InterruptedException { ConfigExecutor.scheduleLongPolling(runnable, 20, TimeUnit.MILLISECONDS); - Assert.assertEquals(0, atomicInteger.get()); + assertEquals(0, atomicInteger.get()); TimeUnit.MILLISECONDS.sleep(40); - Assert.assertEquals(1, atomicInteger.get()); + assertEquals(1, atomicInteger.get()); } @Test - public void testExecuteLongPolling() throws InterruptedException { + void testExecuteLongPolling() throws InterruptedException { AtomicInteger atomicInteger = new AtomicInteger(); @@ -126,6 +128,6 @@ public void testExecuteLongPolling() throws InterruptedException { TimeUnit.MILLISECONDS.sleep(20); - Assert.assertEquals(1, atomicInteger.get()); + assertEquals(1, atomicInteger.get()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/ContentUtilsTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/ContentUtilsTest.java index 45c0cf6b309..c4cb3ce125c 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/ContentUtilsTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/ContentUtilsTest.java @@ -17,91 +17,94 @@ package com.alibaba.nacos.config.server.utils; import com.alibaba.nacos.config.server.constant.Constants; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ContentUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; + +class ContentUtilsTest { @Test - public void testVerifyIncrementPubContent() { + void testVerifyIncrementPubContent() { String content = ""; try { ContentUtils.verifyIncrementPubContent(content); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { - Assert.assertNotNull(e.toString()); + assertNotNull(e.toString()); } content = "\r"; try { ContentUtils.verifyIncrementPubContent(content); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { - Assert.assertNotNull(e.toString()); + assertNotNull(e.toString()); } content = "\n"; try { ContentUtils.verifyIncrementPubContent(content); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { - Assert.assertNotNull(e.toString()); + assertNotNull(e.toString()); } content = Constants.WORD_SEPARATOR + "test"; try { ContentUtils.verifyIncrementPubContent(content); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { - Assert.assertNotNull(e.toString()); + assertNotNull(e.toString()); } } @Test - public void testGetContentIdentity() { + void testGetContentIdentity() { String content = "abc" + Constants.WORD_SEPARATOR + "edf"; String result = ContentUtils.getContentIdentity(content); - Assert.assertEquals("abc", result); + assertEquals("abc", result); content = "test"; try { ContentUtils.getContentIdentity(content); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { - Assert.assertNotNull(e.toString()); + assertNotNull(e.toString()); } } @Test - public void testGetContent() { + void testGetContent() { String content = "abc" + Constants.WORD_SEPARATOR + "edf"; String result = ContentUtils.getContent(content); - Assert.assertEquals("edf", result); + assertEquals("edf", result); content = "test"; try { ContentUtils.getContent(content); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { - Assert.assertNotNull(e.toString()); + assertNotNull(e.toString()); } } @Test - public void testTruncateContent() { + void testTruncateContent() { String content = "test"; String result = ContentUtils.truncateContent(content); - Assert.assertEquals(content, result); + assertEquals(content, result); String content2 = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"; String result2 = ContentUtils.truncateContent(content2); String expected = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv..."; - Assert.assertEquals(expected, result2); + assertEquals(expected, result2); - Assert.assertEquals("", ContentUtils.truncateContent(null)); + assertEquals("", ContentUtils.truncateContent(null)); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKey2Test.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKey2Test.java index 64eba22b8f1..9ad309c4895 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKey2Test.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKey2Test.java @@ -16,27 +16,27 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; -@RunWith(SpringJUnit4ClassRunner.class) +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.fail; + +@ExtendWith(SpringExtension.class) @WebAppConfiguration -public class GroupKey2Test { - - @Rule - public final ExpectedException thrown = ExpectedException.none(); +class GroupKey2Test { @Test - public void testParseInvalidGroupKey2() { + void testParseInvalidGroupKey2() { String key = "11111+222+333333+444"; try { GroupKey2.parseKey(key); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } @@ -44,7 +44,7 @@ public void testParseInvalidGroupKey2() { key = "11111+"; try { GroupKey2.parseKey(key); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } @@ -52,7 +52,7 @@ public void testParseInvalidGroupKey2() { key = "11111%29+222"; try { GroupKey2.parseKey(key); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } @@ -60,79 +60,82 @@ public void testParseInvalidGroupKey2() { key = "11111%2b+222"; try { GroupKey2.parseKey(key); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } key = "11111%25+222"; String[] pair = GroupKey2.parseKey(key); - Assert.assertEquals("11111%", pair[0]); - Assert.assertEquals("222", pair[1]); + assertEquals("11111%", pair[0]); + assertEquals("222", pair[1]); } @Test - public void testGetKeyByThreeParams() { + void testGetKeyByThreeParams() { // Act final String actual = GroupKey2.getKey(",", ",", "3"); // Assert result - Assert.assertEquals(",+,+3", actual); + assertEquals(",+,+3", actual); } @Test - public void testGetKeyByTwoParams() { + void testGetKeyByTwoParams() { // Act final String actual = GroupKey2.getKey("3", "'"); // Assert result - Assert.assertEquals("3+'", actual); + assertEquals("3+'", actual); } @Test - public void testParseKeyBySingleCharacter() { + void testParseKeyBySingleCharacter() { // Act final String[] actual = GroupKey2.parseKey("/"); // Assert result - Assert.assertArrayEquals(new String[] {null, "/", null}, actual); + assertArrayEquals(new String[] {null, "/", null}, actual); } @Test - public void testParseKeyForPlusIllegalArgumentException() { - - // Act - thrown.expect(IllegalArgumentException.class); - GroupKey2.parseKey("+"); + void testParseKeyForPlusIllegalArgumentException() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey2.parseKey("+"); + + // Method is not expected to return due to exception thrown + }); // Method is not expected to return due to exception thrown } @Test - public void testParseKeyForPercentIllegalArgumentException() { - - // Act - thrown.expect(IllegalArgumentException.class); - GroupKey2.parseKey("%%%5\u0000??????????????"); + void testParseKeyForPercentIllegalArgumentException() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey2.parseKey("%%%5\u0000??????????????"); + + // Method is not expected to return due to exception thrown + }); // Method is not expected to return due to exception thrown } @Test - public void testParseKeyForInvalidStringIndexOutOfBoundsException() { - - // Act - thrown.expect(StringIndexOutOfBoundsException.class); - GroupKey2.parseKey("++%"); + void testParseKeyForInvalidStringIndexOutOfBoundsException() { + assertThrows(StringIndexOutOfBoundsException.class, () -> { + GroupKey2.parseKey("++%"); + + // Method is not expected to return due to exception thrown + }); // Method is not expected to return due to exception thrown } @Test - public void testUrlEncodePlus() { + void testUrlEncodePlus() { // Arrange final StringBuilder sb = new StringBuilder("????"); @@ -141,12 +144,12 @@ public void testUrlEncodePlus() { GroupKey2.urlEncode("+", sb); // Assert side effects - Assert.assertNotNull(sb); - Assert.assertEquals("????%2B", sb.toString()); + assertNotNull(sb); + assertEquals("????%2B", sb.toString()); } @Test - public void testUrlEncodeByPercent() { + void testUrlEncodeByPercent() { // Arrange final StringBuilder sb = new StringBuilder("??????"); @@ -155,16 +158,17 @@ public void testUrlEncodeByPercent() { GroupKey2.urlEncode("%", sb); // Assert side effects - Assert.assertNotNull(sb); - Assert.assertEquals("??????%25", sb.toString()); + assertNotNull(sb); + assertEquals("??????%25", sb.toString()); } @Test - public void testUrlEncodeForNullStringBuilder() { - - // Act - thrown.expect(NullPointerException.class); - GroupKey2.urlEncode("+", null); + void testUrlEncodeForNullStringBuilder() { + assertThrows(NullPointerException.class, () -> { + GroupKey2.urlEncode("+", null); + + // Method is not expected to return due to exception thrown + }); // Method is not expected to return due to exception thrown } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKeyTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKeyTest.java index e7826b597ff..68c65ef52ed 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKeyTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/GroupKeyTest.java @@ -16,27 +16,27 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.web.WebAppConfiguration; -@RunWith(SpringJUnit4ClassRunner.class) +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.fail; + +@ExtendWith(SpringExtension.class) @WebAppConfiguration -public class GroupKeyTest { - - @Rule - public final ExpectedException thrown = ExpectedException.none(); +class GroupKeyTest { @Test - public void testParseInvalidGroupKey() { + void testParseInvalidGroupKey() { String key = "11111+222+333333+444"; try { GroupKey.parseKey(key); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } @@ -44,7 +44,7 @@ public void testParseInvalidGroupKey() { key = "11111+"; try { GroupKey.parseKey(key); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } @@ -52,7 +52,7 @@ public void testParseInvalidGroupKey() { key = "11111%29+222"; try { GroupKey.parseKey(key); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } @@ -60,99 +60,102 @@ public void testParseInvalidGroupKey() { key = "11111%2b+222"; try { GroupKey.parseKey(key); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } key = "11111%25+222"; String[] pair = GroupKey.parseKey(key); - Assert.assertEquals("11111%", pair[0]); - Assert.assertEquals("222", pair[1]); + assertEquals("11111%", pair[0]); + assertEquals("222", pair[1]); } @Test - public void testGetKeyByThreeParams() { + void testGetKeyByThreeParams() { // Act final String actual = GroupKey.getKey(",", ",", "3"); // Assert result - Assert.assertEquals(",+,+3", actual); + assertEquals(",+,+3", actual); } @Test - public void testGetKeyByTwoParams() { + void testGetKeyByTwoParams() { // Act final String actual = GroupKey.getKey("3", "'"); // Assert result - Assert.assertEquals("3+'", actual); + assertEquals("3+'", actual); } @Test - public void testGetKeyTenantByPlusThreeParams() { + void testGetKeyTenantByPlusThreeParams() { // Act final String actual = GroupKey.getKeyTenant("3", "1", ","); // Assert result - Assert.assertEquals("3+1+,", actual); + assertEquals("3+1+,", actual); } @Test - public void testGetKeyTenantByPercentThreeParams() { + void testGetKeyTenantByPercentThreeParams() { // Act final String actual = GroupKey.getKeyTenant("\u0000\u0000", "%+", null); // Assert result - Assert.assertEquals("\u0000\u0000+%25%2B", actual); + assertEquals("\u0000\u0000+%25%2B", actual); } @Test - public void testParseKeyBySingleCharacter() { + void testParseKeyBySingleCharacter() { // Act final String[] actual = GroupKey.parseKey("/"); // Assert result - Assert.assertArrayEquals(new String[] {null, "/", null}, actual); + assertArrayEquals(new String[] {null, "/", null}, actual); } @Test - public void testParseKeyForPlusIllegalArgumentException() { - - // Act - thrown.expect(IllegalArgumentException.class); - GroupKey.parseKey("+"); + void testParseKeyForPlusIllegalArgumentException() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey.parseKey("+"); + + // Method is not expected to return due to exception thrown + }); // Method is not expected to return due to exception thrown } @Test - public void testParseKeyForPercentIllegalArgumentException() { - - // Act - thrown.expect(IllegalArgumentException.class); - GroupKey.parseKey("%%%5\u0000??????????????"); + void testParseKeyForPercentIllegalArgumentException() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey.parseKey("%%%5\u0000??????????????"); + + // Method is not expected to return due to exception thrown + }); // Method is not expected to return due to exception thrown } @Test - public void testParseKeyForInvalidStringIndexOutOfBoundsException() { - - // Act - thrown.expect(StringIndexOutOfBoundsException.class); - GroupKey.parseKey("++%"); + void testParseKeyForInvalidStringIndexOutOfBoundsException() { + assertThrows(StringIndexOutOfBoundsException.class, () -> { + GroupKey.parseKey("++%"); + + // Method is not expected to return due to exception thrown + }); // Method is not expected to return due to exception thrown } @Test - public void testUrlEncodePlus() { + void testUrlEncodePlus() { // Arrange final StringBuilder sb = new StringBuilder("????"); @@ -161,12 +164,12 @@ public void testUrlEncodePlus() { GroupKey.urlEncode("+", sb); // Assert side effects - Assert.assertNotNull(sb); - Assert.assertEquals("????%2B", sb.toString()); + assertNotNull(sb); + assertEquals("????%2B", sb.toString()); } @Test - public void testUrlEncodeByPercent() { + void testUrlEncodeByPercent() { // Arrange final StringBuilder sb = new StringBuilder("??????"); @@ -175,16 +178,17 @@ public void testUrlEncodeByPercent() { GroupKey.urlEncode("%", sb); // Assert side effects - Assert.assertNotNull(sb); - Assert.assertEquals("??????%25", sb.toString()); + assertNotNull(sb); + assertEquals("??????%25", sb.toString()); } @Test - public void testUrlEncodeForNullStringBuilder() { - - // Act - thrown.expect(NullPointerException.class); - GroupKey.urlEncode("+", null); + void testUrlEncodeForNullStringBuilder() { + assertThrows(NullPointerException.class, () -> { + GroupKey.urlEncode("+", null); + + // Method is not expected to return due to exception thrown + }); // Method is not expected to return due to exception thrown } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/LogUtilTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/LogUtilTest.java index c33f009e205..407200e6dd2 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/LogUtilTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/LogUtilTest.java @@ -17,49 +17,50 @@ package com.alibaba.nacos.config.server.utils; import ch.qos.logback.classic.Logger; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class LogUtilTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class LogUtilTest { @Test - public void testSetLogLevel() { + void testSetLogLevel() { LogUtil.setLogLevel("config-server", "INFO"); ch.qos.logback.classic.Logger defaultLog = (Logger) LogUtil.DEFAULT_LOG; - Assert.assertEquals("INFO", defaultLog.getLevel().levelStr); + assertEquals("INFO", defaultLog.getLevel().levelStr); LogUtil.setLogLevel("config-fatal", "INFO"); ch.qos.logback.classic.Logger fatalLog = (Logger) LogUtil.FATAL_LOG; - Assert.assertEquals("INFO", fatalLog.getLevel().levelStr); + assertEquals("INFO", fatalLog.getLevel().levelStr); LogUtil.setLogLevel("config-pull", "INFO"); ch.qos.logback.classic.Logger pullLog = (Logger) LogUtil.PULL_LOG; - Assert.assertEquals("INFO", pullLog.getLevel().levelStr); + assertEquals("INFO", pullLog.getLevel().levelStr); LogUtil.setLogLevel("config-pull-check", "INFO"); ch.qos.logback.classic.Logger pullCheckLog = (Logger) LogUtil.PULL_CHECK_LOG; - Assert.assertEquals("INFO", pullCheckLog.getLevel().levelStr); + assertEquals("INFO", pullCheckLog.getLevel().levelStr); LogUtil.setLogLevel("config-dump", "INFO"); ch.qos.logback.classic.Logger dumpLog = (Logger) LogUtil.DUMP_LOG; - Assert.assertEquals("INFO", dumpLog.getLevel().levelStr); + assertEquals("INFO", dumpLog.getLevel().levelStr); LogUtil.setLogLevel("config-memory", "INFO"); ch.qos.logback.classic.Logger memoryLog = (Logger) LogUtil.MEMORY_LOG; - Assert.assertEquals("INFO", memoryLog.getLevel().levelStr); + assertEquals("INFO", memoryLog.getLevel().levelStr); LogUtil.setLogLevel("config-client-request", "INFO"); ch.qos.logback.classic.Logger clientRequestLog = (Logger) LogUtil.CLIENT_LOG; - Assert.assertEquals("INFO", clientRequestLog.getLevel().levelStr); + assertEquals("INFO", clientRequestLog.getLevel().levelStr); LogUtil.setLogLevel("config-trace", "INFO"); ch.qos.logback.classic.Logger traceLog = (Logger) LogUtil.TRACE_LOG; - Assert.assertEquals("INFO", traceLog.getLevel().levelStr); + assertEquals("INFO", traceLog.getLevel().levelStr); LogUtil.setLogLevel("config-notify", "INFO"); ch.qos.logback.classic.Logger notifyLog = (Logger) LogUtil.NOTIFY_LOG; - Assert.assertEquals("INFO", notifyLog.getLevel().levelStr); + assertEquals("INFO", notifyLog.getLevel().levelStr); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/MD5UtilTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/MD5UtilTest.java index c1798655316..75ba6c1a82e 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/MD5UtilTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/MD5UtilTest.java @@ -18,8 +18,7 @@ import com.alibaba.nacos.config.server.service.ConfigCacheService; import org.apache.commons.io.IOUtils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.springframework.mock.web.MockHttpServletRequest; @@ -37,20 +36,18 @@ import java.util.List; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.when; -public class MD5UtilTest { +class MD5UtilTest { @Test - public void testCompareMd5() { + void testCompareMd5() { - final MockedStatic configCacheServiceMockedStatic = Mockito - .mockStatic(ConfigCacheService.class); + final MockedStatic configCacheServiceMockedStatic = Mockito.mockStatic(ConfigCacheService.class); - when(ConfigCacheService - .isUptodate(anyString(), anyString(), anyString(), anyString())) - .thenReturn(false); + when(ConfigCacheService.isUptodate(anyString(), anyString(), anyString(), anyString())).thenReturn(false); Map clientMd5Map = new HashMap<>(); clientMd5Map.put("test", "test"); @@ -61,14 +58,14 @@ public void testCompareMd5() { List changedGroupKeys = MD5Util.compareMd5(request, response, clientMd5Map); - Assert.assertEquals(1, changedGroupKeys.size()); - Assert.assertEquals("test", changedGroupKeys.get(0)); + assertEquals(1, changedGroupKeys.size()); + assertEquals("test", changedGroupKeys.get(0)); configCacheServiceMockedStatic.close(); } @Test - public void testCompareMd5OldResult() { + void testCompareMd5OldResult() { final MockedStatic groupKey2MockedStatic = Mockito.mockStatic(GroupKey2.class); @@ -83,13 +80,13 @@ public void testCompareMd5OldResult() { String actualValue = MD5Util.compareMd5OldResult(changedGroupKeys); - Assert.assertEquals("test0:test1;", actualValue); + assertEquals("test0:test1;", actualValue); groupKey2MockedStatic.close(); } @Test - public void testCompareMd5ResultString() { + void testCompareMd5ResultString() { final MockedStatic groupKey2MockedStatic = Mockito.mockStatic(GroupKey2.class); @@ -104,7 +101,7 @@ public void testCompareMd5ResultString() { try { String actualValue = MD5Util.compareMd5ResultString(changedGroupKeys); - Assert.assertEquals("test0%02test1%02test2%01", actualValue); + assertEquals("test0%02test1%02test2%01", actualValue); } catch (IOException e) { System.out.println(e.toString()); } @@ -113,55 +110,54 @@ public void testCompareMd5ResultString() { } @Test - public void testGetClientMd5Map() { + void testGetClientMd5Map() { String configKeysString = - "test0" + MD5Util.WORD_SEPARATOR_CHAR + "test1" + MD5Util.WORD_SEPARATOR_CHAR + "test2" - + MD5Util.LINE_SEPARATOR_CHAR; + "test0" + MD5Util.WORD_SEPARATOR_CHAR + "test1" + MD5Util.WORD_SEPARATOR_CHAR + "test2" + MD5Util.LINE_SEPARATOR_CHAR; Map actualValueMap = MD5Util.getClientMd5Map(configKeysString); - Assert.assertEquals("test2", actualValueMap.get("test0+test1")); + assertEquals("test2", actualValueMap.get("test0+test1")); } @Test - public void testGetClientMd5MapForNewProtocol() { + void testGetClientMd5MapForNewProtocol() { String configKeysString = - "test0" + MD5Util.WORD_SEPARATOR_CHAR + "test1" + MD5Util.WORD_SEPARATOR_CHAR + "test2" - + MD5Util.WORD_SEPARATOR_CHAR + "test3" + MD5Util.LINE_SEPARATOR_CHAR; + "test0" + MD5Util.WORD_SEPARATOR_CHAR + "test1" + MD5Util.WORD_SEPARATOR_CHAR + "test2" + MD5Util.WORD_SEPARATOR_CHAR + + "test3" + MD5Util.LINE_SEPARATOR_CHAR; Map actualValueMap = MD5Util.getClientMd5Map(configKeysString); - Assert.assertEquals("test2", actualValueMap.get("test0+test1+test3")); + assertEquals("test2", actualValueMap.get("test0+test1+test3")); } @Test - public void testToStringV1() { + void testToStringV1() { try { InputStream input = IOUtils.toInputStream("test", StandardCharsets.UTF_8); String actualValue = MD5Util.toString(input, "UTF-8"); - Assert.assertEquals("test", actualValue); + assertEquals("test", actualValue); } catch (IOException e) { System.out.println(e.toString()); } } @Test - public void testToStringV2() { + void testToStringV2() { try { Reader reader = new CharArrayReader("test".toCharArray()); String actualValue = MD5Util.toString(reader); - Assert.assertEquals("test", actualValue); + assertEquals("test", actualValue); } catch (IOException e) { System.out.println(e.toString()); } } @Test - public void testCopy() { + void testCopy() { try { String content = "test"; @@ -169,8 +165,8 @@ public void testCopy() { Writer output = new CharArrayWriter(); long actualValue = MD5Util.copy(input, output); - Assert.assertEquals(content.length(), actualValue); - Assert.assertEquals(content, output.toString()); + assertEquals(content.length(), actualValue); + assertEquals(content, output.toString()); } catch (IOException e) { System.out.println(e.toString()); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/ParamUtilsTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/ParamUtilsTest.java index 7672dca5d53..8b9b6c3ae16 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/ParamUtilsTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/ParamUtilsTest.java @@ -17,25 +17,28 @@ package com.alibaba.nacos.config.server.utils; import com.alibaba.nacos.api.exception.NacosException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -public class ParamUtilsTest { +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +class ParamUtilsTest { @Test - public void testIsValid() { - Assert.assertTrue(ParamUtils.isValid("test")); - Assert.assertTrue(ParamUtils.isValid("test1234")); - Assert.assertTrue(ParamUtils.isValid("test_-.:")); - Assert.assertFalse(ParamUtils.isValid("test!")); - Assert.assertFalse(ParamUtils.isValid("test~")); + void testIsValid() { + assertTrue(ParamUtils.isValid("test")); + assertTrue(ParamUtils.isValid("test1234")); + assertTrue(ParamUtils.isValid("test_-.:")); + assertFalse(ParamUtils.isValid("test!")); + assertFalse(ParamUtils.isValid("test~")); } @Test - public void testCheckParamV1() { + void testCheckParamV1() { //dataId is empty String dataId = ""; String group = "test"; @@ -43,7 +46,7 @@ public void testCheckParamV1() { String content = "test"; try { ParamUtils.checkParam(dataId, group, datumId, content); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -54,7 +57,7 @@ public void testCheckParamV1() { content = "test"; try { ParamUtils.checkParam(dataId, group, datumId, content); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -65,7 +68,7 @@ public void testCheckParamV1() { content = "test"; try { ParamUtils.checkParam(dataId, group, datumId, content); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -76,7 +79,7 @@ public void testCheckParamV1() { content = ""; try { ParamUtils.checkParam(dataId, group, datumId, content); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -87,7 +90,7 @@ public void testCheckParamV1() { content = "test"; try { ParamUtils.checkParam(dataId, group, datumId, content); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -98,7 +101,7 @@ public void testCheckParamV1() { content = "test"; try { ParamUtils.checkParam(dataId, group, datumId, content); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -109,7 +112,7 @@ public void testCheckParamV1() { content = "test"; try { ParamUtils.checkParam(dataId, group, datumId, content); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -126,19 +129,19 @@ public void testCheckParamV1() { try { ParamUtils.checkParam(dataId, group, datumId, content); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } } @Test - public void testCheckParamV2() { + void testCheckParamV2() { //tag invalid String tag = "test!"; try { ParamUtils.checkParam(tag); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } @@ -147,7 +150,7 @@ public void testCheckParamV2() { tag = "testtesttesttest1"; try { ParamUtils.checkParam(tag); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } @@ -155,13 +158,13 @@ public void testCheckParamV2() { } @Test - public void testCheckParamV3() { + void testCheckParamV3() { //tag size over 5 Map configAdvanceInfo = new HashMap<>(); configAdvanceInfo.put("config_tags", "test,test,test,test,test,test"); try { ParamUtils.checkParam(configAdvanceInfo); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -174,7 +177,7 @@ public void testCheckParamV3() { configAdvanceInfo.put("config_tags", tagBuilder.toString()); try { ParamUtils.checkParam(configAdvanceInfo); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -188,7 +191,7 @@ public void testCheckParamV3() { configAdvanceInfo.put("desc", descBuilder.toString()); try { ParamUtils.checkParam(configAdvanceInfo); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -202,7 +205,7 @@ public void testCheckParamV3() { configAdvanceInfo.put("use", useBuilder.toString()); try { ParamUtils.checkParam(configAdvanceInfo); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -216,7 +219,7 @@ public void testCheckParamV3() { configAdvanceInfo.put("effect", effectBuilder.toString()); try { ParamUtils.checkParam(configAdvanceInfo); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -230,7 +233,7 @@ public void testCheckParamV3() { configAdvanceInfo.put("type", typeBuilder.toString()); try { ParamUtils.checkParam(configAdvanceInfo); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -244,7 +247,7 @@ public void testCheckParamV3() { configAdvanceInfo.put("schema", schemaBuilder.toString()); try { ParamUtils.checkParam(configAdvanceInfo); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } @@ -254,19 +257,19 @@ public void testCheckParamV3() { configAdvanceInfo.put("test", "test"); try { ParamUtils.checkParam(configAdvanceInfo); - Assert.fail(); + fail(); } catch (NacosException e) { System.out.println(e.toString()); } } @Test - public void testCheckTenant() { + void testCheckTenant() { //tag invalid String tenant = "test!"; try { ParamUtils.checkTenant(tenant); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } @@ -280,7 +283,7 @@ public void testCheckTenant() { tenant = tenantBuilder.toString(); try { ParamUtils.checkTenant(tenant); - Assert.fail(); + fail(); } catch (IllegalArgumentException e) { System.out.println(e.toString()); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/PropertyUtilTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/PropertyUtilTest.java index 0038b8f1405..5224b7c62ea 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/PropertyUtilTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/PropertyUtilTest.java @@ -18,38 +18,38 @@ import com.alibaba.nacos.sys.env.EnvUtil; import org.apache.commons.io.FileUtils; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.springframework.security.util.FieldUtils; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import java.io.File; import java.lang.reflect.Field; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.eq; -@RunWith(SpringJUnit4ClassRunner.class) -public class PropertyUtilTest { +@ExtendWith(SpringExtension.class) +class PropertyUtilTest { MockedStatic envUtilMockedStatic; private String mockMem = "tmpmocklimitfile.txt"; - @Before - public void setUp() { + @BeforeEach + void setUp() { envUtilMockedStatic = Mockito.mockStatic(EnvUtil.class); - envUtilMockedStatic.when(() -> EnvUtil.getProperty(eq("memory_limit_file_path"), - eq("/sys/fs/cgroup/memory/memory.limit_in_bytes"))).thenReturn(mockMem); + envUtilMockedStatic.when(() -> EnvUtil.getProperty(eq("memory_limit_file_path"), eq("/sys/fs/cgroup/memory/memory.limit_in_bytes"))) + .thenReturn(mockMem); } - @After - public void after() { + @AfterEach + void after() { envUtilMockedStatic.close(); File file = new File(mockMem); if (file.exists()) { @@ -58,18 +58,18 @@ public void after() { } @Test - public void testGetPropertyV1() { + void testGetPropertyV1() { envUtilMockedStatic.when(() -> EnvUtil.getProperty(eq("test"))).thenReturn("test"); - Assert.assertEquals("test", new PropertyUtil().getProperty("test")); + assertEquals("test", new PropertyUtil().getProperty("test")); } @Test - public void testGetPropertyV2() { + void testGetPropertyV2() { envUtilMockedStatic.when(() -> EnvUtil.getProperty(eq("test"), eq("default"))).thenReturn("default"); - Assert.assertEquals("default", new PropertyUtil().getProperty("test", "default")); + assertEquals("default", new PropertyUtil().getProperty("test", "default")); } private void clearAllDumpFiled() throws Exception { @@ -79,7 +79,7 @@ private void clearAllDumpFiled() throws Exception { } @Test - public void testGetAllDumpPageSize() throws Exception { + void testGetAllDumpPageSize() throws Exception { clearAllDumpFiled(); File file = new File(mockMem); @@ -89,14 +89,14 @@ public void testGetAllDumpPageSize() throws Exception { FileUtils.writeStringToFile(file, String.valueOf(gb2)); int allDumpPageSizeNormal = PropertyUtil.getAllDumpPageSize(); //expect 2*2*50 - Assert.assertEquals(200, allDumpPageSizeNormal); + assertEquals(200, allDumpPageSizeNormal); clearAllDumpFiled(); // 12G pageSize over 1000 long gb12 = 12L * 1024L * 1024L * 1024L; FileUtils.writeStringToFile(file, String.valueOf(gb12)); int allDumpPageSizeOverMax = PropertyUtil.getAllDumpPageSize(); - Assert.assertEquals(1000, allDumpPageSizeOverMax); + assertEquals(1000, allDumpPageSizeOverMax); clearAllDumpFiled(); //100MB @@ -104,11 +104,11 @@ public void testGetAllDumpPageSize() throws Exception { FileUtils.writeStringToFile(file, String.valueOf(mb100)); int allDumpPageSizeUnderMin = PropertyUtil.getAllDumpPageSize(); - Assert.assertEquals(50, allDumpPageSizeUnderMin); + assertEquals(50, allDumpPageSizeUnderMin); } @Test - public void testGetAllDumpPageSizeWithJvmArgs() throws Exception { + void testGetAllDumpPageSizeWithJvmArgs() throws Exception { File file = new File(mockMem); if (file.exists()) { @@ -118,11 +118,11 @@ public void testGetAllDumpPageSizeWithJvmArgs() throws Exception { long maxMem = Runtime.getRuntime().maxMemory(); long pageSize = maxMem / 1024 / 1024 / 512 * 50; if (pageSize < 50) { - Assert.assertEquals(50, allDumpPageSizeUnderMin); + assertEquals(50, allDumpPageSizeUnderMin); } else if (pageSize > 1000) { - Assert.assertEquals(1000, allDumpPageSizeUnderMin); + assertEquals(1000, allDumpPageSizeUnderMin); } else { - Assert.assertEquals(pageSize, allDumpPageSizeUnderMin); + assertEquals(pageSize, allDumpPageSizeUnderMin); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/ProtocolTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/ProtocolTest.java index b134a31231d..5adb7c23a3f 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/ProtocolTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/ProtocolTest.java @@ -16,20 +16,21 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; -@RunWith(SpringJUnit4ClassRunner.class) -public class ProtocolTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +@ExtendWith(SpringExtension.class) +class ProtocolTest { @Test - public void testGetVersionNumber() { + void testGetVersionNumber() { - Assert.assertEquals(-1, Protocol.getVersionNumber(null)); - Assert.assertEquals(0, Protocol.getVersionNumber("")); - Assert.assertEquals(120, Protocol.getVersionNumber("1.2.0")); - Assert.assertEquals(10, Protocol.getVersionNumber("1.A.0")); + assertEquals(-1, Protocol.getVersionNumber(null)); + assertEquals(0, Protocol.getVersionNumber("")); + assertEquals(120, Protocol.getVersionNumber("1.2.0")); + assertEquals(10, Protocol.getVersionNumber("1.A.0")); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/RegexParserTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/RegexParserTest.java index bc537c09b90..3bbf3231487 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/RegexParserTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/RegexParserTest.java @@ -16,27 +16,31 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class RegexParserTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +class RegexParserTest { @Test - public void testRegexFormat() { + void testRegexFormat() { try { RegexParser.regexFormat(null); - Assert.fail(); + fail(); } catch (NullPointerException e) { System.out.println(e.toString()); } - Assert.assertEquals("^test.*\\!.{1}xxxx$", RegexParser.regexFormat("test*!?xxxx")); + assertEquals("^test.*\\!.{1}xxxx$", RegexParser.regexFormat("test*!?xxxx")); } @Test - public void testContainsWildcard() { - Assert.assertFalse(RegexParser.containsWildcard("test")); - Assert.assertTrue(RegexParser.containsWildcard("?")); - Assert.assertTrue(RegexParser.containsWildcard("*")); + void testContainsWildcard() { + assertFalse(RegexParser.containsWildcard("test")); + assertTrue(RegexParser.containsWildcard("?")); + assertTrue(RegexParser.containsWildcard("*")); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/RequestUtilTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/RequestUtilTest.java index b190799f493..eb25966ab3f 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/RequestUtilTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/RequestUtilTest.java @@ -17,70 +17,68 @@ package com.alibaba.nacos.config.server.utils; import com.alibaba.nacos.api.common.Constants; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.eq; -public class RequestUtilTest { +class RequestUtilTest { private static final String X_REAL_IP = "X-Real-IP"; private static final String X_FORWARDED_FOR = "X-Forwarded-For"; @Test - public void testGetRemoteIp() { + void testGetRemoteIp() { HttpServletRequest request = Mockito.mock(HttpServletRequest.class); Mockito.when(request.getRemoteAddr()).thenReturn("127.0.0.1"); - Assert.assertEquals("127.0.0.1", RequestUtil.getRemoteIp(request)); + assertEquals("127.0.0.1", RequestUtil.getRemoteIp(request)); Mockito.when(request.getHeader(eq(X_REAL_IP))).thenReturn("127.0.0.2"); - Assert.assertEquals("127.0.0.2", RequestUtil.getRemoteIp(request)); + assertEquals("127.0.0.2", RequestUtil.getRemoteIp(request)); Mockito.when(request.getHeader(eq(X_FORWARDED_FOR))).thenReturn("127.0.0.3"); - Assert.assertEquals("127.0.0.3", RequestUtil.getRemoteIp(request)); + assertEquals("127.0.0.3", RequestUtil.getRemoteIp(request)); Mockito.when(request.getHeader(eq(X_FORWARDED_FOR))).thenReturn("127.0.0.3, 127.0.0.4"); - Assert.assertEquals("127.0.0.3", RequestUtil.getRemoteIp(request)); + assertEquals("127.0.0.3", RequestUtil.getRemoteIp(request)); Mockito.when(request.getHeader(eq(X_FORWARDED_FOR))).thenReturn(""); - Assert.assertEquals("127.0.0.2", RequestUtil.getRemoteIp(request)); + assertEquals("127.0.0.2", RequestUtil.getRemoteIp(request)); Mockito.when(request.getHeader(eq(X_REAL_IP))).thenReturn(""); - Assert.assertEquals("127.0.0.1", RequestUtil.getRemoteIp(request)); + assertEquals("127.0.0.1", RequestUtil.getRemoteIp(request)); } @Test - public void testGetAppName() { + void testGetAppName() { HttpServletRequest request = Mockito.mock(HttpServletRequest.class); Mockito.when(request.getHeader(eq(RequestUtil.CLIENT_APPNAME_HEADER))).thenReturn("test"); - Assert.assertEquals("test", RequestUtil.getAppName(request)); + assertEquals("test", RequestUtil.getAppName(request)); } @Test - public void testGetSrcUserNameV1() { + void testGetSrcUserNameV1() { HttpServletRequest request = Mockito.mock(HttpServletRequest.class); HttpSession session = Mockito.mock(HttpSession.class); Mockito.when(request.getSession()).thenReturn(session); - Mockito.when(session.getAttribute(eq(com.alibaba.nacos.plugin.auth.constant.Constants.Identity.IDENTITY_ID))) - .thenReturn("test"); - Assert.assertEquals("test", RequestUtil.getSrcUserName(request)); + Mockito.when(session.getAttribute(eq(com.alibaba.nacos.plugin.auth.constant.Constants.Identity.IDENTITY_ID))).thenReturn("test"); + assertEquals("test", RequestUtil.getSrcUserName(request)); } @Test - public void testGetSrcUserNameV2() { + void testGetSrcUserNameV2() { HttpServletRequest request = Mockito.mock(HttpServletRequest.class); HttpSession session = Mockito.mock(HttpSession.class); Mockito.when(request.getSession()).thenReturn(session); - Mockito.when(session.getAttribute(eq(com.alibaba.nacos.plugin.auth.constant.Constants.Identity.IDENTITY_ID))) - .thenReturn(null); + Mockito.when(session.getAttribute(eq(com.alibaba.nacos.plugin.auth.constant.Constants.Identity.IDENTITY_ID))).thenReturn(null); Mockito.when(request.getParameter(eq(Constants.USERNAME))).thenReturn("parameterName"); - Assert.assertEquals("parameterName", RequestUtil.getSrcUserName(request)); + assertEquals("parameterName", RequestUtil.getSrcUserName(request)); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/ResponseUtilTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/ResponseUtilTest.java index 940b85efa41..92cf48d5f5e 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/ResponseUtilTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/ResponseUtilTest.java @@ -16,23 +16,24 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.mock.web.MockHttpServletResponse; import java.io.UnsupportedEncodingException; -public class ResponseUtilTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ResponseUtilTest { String lineSeparator = System.lineSeparator(); @Test - public void testWriteErrMsg() { + void testWriteErrMsg() { MockHttpServletResponse response = new MockHttpServletResponse(); ResponseUtil.writeErrMsg(response, 404, "test"); - Assert.assertEquals(404, response.getStatus()); + assertEquals(404, response.getStatus()); try { - Assert.assertEquals("test" + lineSeparator, response.getContentAsString()); + assertEquals("test" + lineSeparator, response.getContentAsString()); } catch (UnsupportedEncodingException e) { System.out.println(e.toString()); } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleCacheTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleCacheTest.java index de50c5efaa5..d0415cc7fc7 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleCacheTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleCacheTest.java @@ -16,23 +16,25 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; -public class SimpleCacheTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class SimpleCacheTest { @Test - public void testPutAndGet() throws InterruptedException { + void testPutAndGet() throws InterruptedException { SimpleCache simpleCache = new SimpleCache<>(); simpleCache.put("key", "value", 1000); - Assert.assertEquals("value", simpleCache.get("key")); + assertEquals("value", simpleCache.get("key")); //time expire TimeUnit.MILLISECONDS.sleep(1100); Object value = simpleCache.get("key"); - Assert.assertNull(value); + assertNull(value); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleFlowDataTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleFlowDataTest.java index 031bb99f4a5..a52f91eee92 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleFlowDataTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleFlowDataTest.java @@ -16,62 +16,63 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class SimpleFlowDataTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class SimpleFlowDataTest { @Test - public void testAddAndGet() { + void testAddAndGet() { SimpleFlowData simpleFlowData = new SimpleFlowData(5, 10000); - Assert.assertEquals(10, simpleFlowData.addAndGet(10)); - Assert.assertEquals(20, simpleFlowData.addAndGet(10)); + assertEquals(10, simpleFlowData.addAndGet(10)); + assertEquals(20, simpleFlowData.addAndGet(10)); } @Test - public void testIncrementAndGet() { + void testIncrementAndGet() { SimpleFlowData simpleFlowData = new SimpleFlowData(5, 10000); - Assert.assertEquals(1, simpleFlowData.incrementAndGet()); - Assert.assertEquals(2, simpleFlowData.incrementAndGet()); - Assert.assertEquals(3, simpleFlowData.incrementAndGet()); + assertEquals(1, simpleFlowData.incrementAndGet()); + assertEquals(2, simpleFlowData.incrementAndGet()); + assertEquals(3, simpleFlowData.incrementAndGet()); } @Test - public void testGetSlotInfo() { + void testGetSlotInfo() { SimpleFlowData simpleFlowData = new SimpleFlowData(5, 10000); simpleFlowData.incrementAndGet(); simpleFlowData.incrementAndGet(); simpleFlowData.incrementAndGet(); - Assert.assertEquals("0 0 0 0 3", simpleFlowData.getSlotInfo()); + assertEquals("0 0 0 0 3", simpleFlowData.getSlotInfo()); } @Test - public void testGetSlotInfo2() { + void testGetSlotInfo2() { SimpleFlowData simpleFlowData = new SimpleFlowData(5, 10000); simpleFlowData.incrementAndGet(); simpleFlowData.rotateSlot(); simpleFlowData.addAndGet(9); simpleFlowData.rotateSlot(); simpleFlowData.incrementAndGet(); - Assert.assertEquals("0 0 1 9 1", simpleFlowData.getSlotInfo()); - Assert.assertEquals(1, simpleFlowData.getCurrentCount()); - Assert.assertEquals(2, simpleFlowData.getAverageCount()); - Assert.assertEquals(5, simpleFlowData.getSlotCount()); + assertEquals("0 0 1 9 1", simpleFlowData.getSlotInfo()); + assertEquals(1, simpleFlowData.getCurrentCount()); + assertEquals(2, simpleFlowData.getAverageCount()); + assertEquals(5, simpleFlowData.getSlotCount()); } @Test - public void testGetCount() { + void testGetCount() { SimpleFlowData simpleFlowData = new SimpleFlowData(5, 10000); simpleFlowData.addAndGet(2); simpleFlowData.rotateSlot(); simpleFlowData.addAndGet(3); simpleFlowData.rotateSlot(); simpleFlowData.incrementAndGet(); - Assert.assertEquals("0 0 2 3 1", simpleFlowData.getSlotInfo()); - Assert.assertEquals(2, simpleFlowData.getCount(2)); + assertEquals("0 0 2 3 1", simpleFlowData.getSlotInfo()); + assertEquals(2, simpleFlowData.getCount(2)); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleIpFlowDataTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleIpFlowDataTest.java index 5a9a44816e4..5338222f235 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleIpFlowDataTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleIpFlowDataTest.java @@ -16,33 +16,34 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class SimpleIpFlowDataTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class SimpleIpFlowDataTest { @Test - public void testIncrementAndGet() { + void testIncrementAndGet() { SimpleIpFlowData simpleIpFlowData = new SimpleIpFlowData(5, 10000); - Assert.assertEquals(1, simpleIpFlowData.incrementAndGet("127.0.0.1")); - Assert.assertEquals(2, simpleIpFlowData.incrementAndGet("127.0.0.1")); - Assert.assertEquals(3, simpleIpFlowData.incrementAndGet("127.0.0.1")); - Assert.assertEquals(1, simpleIpFlowData.incrementAndGet("127.0.0.2")); - Assert.assertEquals(2, simpleIpFlowData.incrementAndGet("127.0.0.2")); + assertEquals(1, simpleIpFlowData.incrementAndGet("127.0.0.1")); + assertEquals(2, simpleIpFlowData.incrementAndGet("127.0.0.1")); + assertEquals(3, simpleIpFlowData.incrementAndGet("127.0.0.1")); + assertEquals(1, simpleIpFlowData.incrementAndGet("127.0.0.2")); + assertEquals(2, simpleIpFlowData.incrementAndGet("127.0.0.2")); } @Test - public void testGetCurrentCount() { + void testGetCurrentCount() { SimpleIpFlowData simpleIpFlowData = new SimpleIpFlowData(3, 10000); simpleIpFlowData.incrementAndGet("127.0.0.1"); simpleIpFlowData.incrementAndGet("127.0.0.1"); simpleIpFlowData.incrementAndGet("127.0.0.1"); - Assert.assertEquals(3, simpleIpFlowData.getCurrentCount("127.0.0.1")); + assertEquals(3, simpleIpFlowData.getCurrentCount("127.0.0.1")); simpleIpFlowData.rotateSlot(); - Assert.assertEquals(0, simpleIpFlowData.getCurrentCount("127.0.0.1")); - Assert.assertEquals(1, simpleIpFlowData.getAverageCount()); + assertEquals(0, simpleIpFlowData.getCurrentCount("127.0.0.1")); + assertEquals(1, simpleIpFlowData.getAverageCount()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleReadWriteLockTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleReadWriteLockTest.java index c6ed47423ed..eebed2b93e7 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleReadWriteLockTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/SimpleReadWriteLockTest.java @@ -16,18 +16,18 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.test.context.junit.jupiter.SpringExtension; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(SpringJUnit4ClassRunner.class) -public class SimpleReadWriteLockTest { +@ExtendWith(SpringExtension.class) +class SimpleReadWriteLockTest { @Test - public void testDoubleReadLockByAllReleaseAndWriteLock() { + void testDoubleReadLockByAllReleaseAndWriteLock() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertTrue(lock.tryReadLock()); assertTrue(lock.tryReadLock()); @@ -39,14 +39,14 @@ public void testDoubleReadLockByAllReleaseAndWriteLock() { } @Test - public void testAddWriteLock() { + void testAddWriteLock() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertTrue(lock.tryWriteLock()); lock.releaseWriteLock(); } @Test - public void testDoubleWriteLock() { + void testDoubleWriteLock() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertTrue(lock.tryWriteLock()); @@ -54,7 +54,7 @@ public void testDoubleWriteLock() { } @Test - public void testFirstReadLockThenWriteLock() { + void testFirstReadLockThenWriteLock() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertTrue(lock.tryReadLock()); @@ -62,7 +62,7 @@ public void testFirstReadLockThenWriteLock() { } @Test - public void testFirstWriteLockThenReadLock() { + void testFirstWriteLockThenReadLock() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertTrue(lock.tryWriteLock()); @@ -70,7 +70,7 @@ public void testFirstWriteLockThenReadLock() { } @Test - public void testDoubleReadLockAndOneReleaseOneFailed() { + void testDoubleReadLockAndOneReleaseOneFailed() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertTrue(lock.tryReadLock()); assertTrue(lock.tryReadLock()); diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/SystemConfigTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/SystemConfigTest.java index 21e66d13160..ea291cb2261 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/SystemConfigTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/SystemConfigTest.java @@ -16,15 +16,16 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class SystemConfigTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class SystemConfigTest { @Test - public void testGetHostAddress() { + void testGetHostAddress() { System.setProperty("nacos.server.ip", "127.0.0.1"); - Assert.assertEquals("127.0.0.1", SystemConfig.LOCAL_IP); + assertEquals("127.0.0.1", SystemConfig.LOCAL_IP); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/TimeUtilsTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/TimeUtilsTest.java index ddc6f8817cd..da1723437e5 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/TimeUtilsTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/TimeUtilsTest.java @@ -16,23 +16,24 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; -public class TimeUtilsTest { +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class TimeUtilsTest { @Test - public void testGetCurrentTimeStr() throws ParseException { + void testGetCurrentTimeStr() throws ParseException { Date date1 = new Date(TimeUtils.getCurrentTime().getTime()); - Assert.assertNotNull(date1.toString()); - + assertNotNull(date1.toString()); + Date date2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(TimeUtils.getCurrentTimeStr()); - Assert.assertNotNull(date2.toString()); + assertNotNull(date2.toString()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/TimeoutUtilsTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/TimeoutUtilsTest.java index 9a5e512b9d2..e6c987d2df7 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/TimeoutUtilsTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/TimeoutUtilsTest.java @@ -16,36 +16,39 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class TimeoutUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class TimeoutUtilsTest { @Test - public void testAddTotalTime() { + void testAddTotalTime() { TimeoutUtils timeoutUtils = new TimeoutUtils(10, 1); timeoutUtils.initLastResetTime(); timeoutUtils.addTotalTime(1); - Assert.assertEquals(1L, timeoutUtils.getTotalTime().get()); + assertEquals(1L, timeoutUtils.getTotalTime().get()); } @Test - public void testIsTimeout() { + void testIsTimeout() { TimeoutUtils timeoutUtils = new TimeoutUtils(10, 1); timeoutUtils.initLastResetTime(); timeoutUtils.addTotalTime(1); - Assert.assertFalse(timeoutUtils.isTimeout()); + assertFalse(timeoutUtils.isTimeout()); timeoutUtils.addTotalTime(10); - Assert.assertTrue(timeoutUtils.isTimeout()); + assertTrue(timeoutUtils.isTimeout()); } @Test - public void testResetTotalTime() { + void testResetTotalTime() { TimeoutUtils timeoutUtils = new TimeoutUtils(10, -1); timeoutUtils.initLastResetTime(); timeoutUtils.addTotalTime(1); - Assert.assertEquals(1L, timeoutUtils.getTotalTime().get()); + assertEquals(1L, timeoutUtils.getTotalTime().get()); timeoutUtils.resetTotalTime(); - Assert.assertEquals(0L, timeoutUtils.getTotalTime().get()); + assertEquals(0L, timeoutUtils.getTotalTime().get()); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/TraceLogUtilTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/TraceLogUtilTest.java index 9444554c020..3fde8014eb2 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/TraceLogUtilTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/TraceLogUtilTest.java @@ -16,19 +16,20 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.slf4j.Logger; -public class TraceLogUtilTest { +import static org.junit.jupiter.api.Assertions.assertTrue; +class TraceLogUtilTest { + @Test - public void testRequestLog() { - + void testRequestLog() { + Logger requestLog = TraceLogUtil.requestLog; - Assert.assertTrue(requestLog instanceof Logger); - + assertTrue(requestLog instanceof Logger); + Logger pollingLog = TraceLogUtil.pollingLog; - Assert.assertTrue(pollingLog instanceof Logger); + assertTrue(pollingLog instanceof Logger); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/UrlAnalysisUtilsTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/UrlAnalysisUtilsTest.java index 12eb79c0f95..00c1040b810 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/UrlAnalysisUtilsTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/UrlAnalysisUtilsTest.java @@ -16,21 +16,23 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class UrlAnalysisUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class UrlAnalysisUtilsTest { @Test - public void testGetContentIdentity() { + void testGetContentIdentity() { String url = "http://127.0.0.1:8080/test?paramA=A¶mB=B"; - Assert.assertEquals("http://127.0.0.1:8080", UrlAnalysisUtils.getContentIdentity(url)); + assertEquals("http://127.0.0.1:8080", UrlAnalysisUtils.getContentIdentity(url)); String url2 = "127.0.0.1:8080/test?paramA=A¶mB=B"; - Assert.assertEquals("127.0.0.1:8080", UrlAnalysisUtils.getContentIdentity(url2)); - + assertEquals("127.0.0.1:8080", UrlAnalysisUtils.getContentIdentity(url2)); + String url3 = ""; - Assert.assertNull(UrlAnalysisUtils.getContentIdentity(url3)); + assertNull(UrlAnalysisUtils.getContentIdentity(url3)); } } diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/YamlParserUtilTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/YamlParserUtilTest.java index c371167fa24..c81bcee170e 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/YamlParserUtilTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/YamlParserUtilTest.java @@ -17,27 +17,29 @@ package com.alibaba.nacos.config.server.utils; import com.alibaba.nacos.config.server.model.ConfigMetadata; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.yaml.snakeyaml.constructor.ConstructorException; import java.util.ArrayList; import java.util.List; -public class YamlParserUtilTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class YamlParserUtilTest { private static final String CONFIG_METADATA_STRING = - "metadata:\n" + "- dataId: testData1\n" + " group: testGroup1\n" + " type: text\n" - + "- appName: testAppName\n" + " dataId: testData2\n" + " desc: test desc\n" - + " group: testGroup2\n" + " type: yaml\n"; + "metadata:\n" + "- dataId: testData1\n" + " group: testGroup1\n" + " type: text\n" + "- appName: testAppName\n" + + " dataId: testData2\n" + " desc: test desc\n" + " group: testGroup2\n" + " type: yaml\n"; private ConfigMetadata.ConfigExportItem item1; private ConfigMetadata.ConfigExportItem item2; - @Before - public void setUp() { + @BeforeEach + void setUp() { item1 = new ConfigMetadata.ConfigExportItem(); item1.setDataId("testData1"); item1.setGroup("testGroup1"); @@ -52,7 +54,7 @@ public void setUp() { } @Test - public void testDumpObject() { + void testDumpObject() { ConfigMetadata configMetadata = new ConfigMetadata(); List configMetadataItems = new ArrayList<>(); configMetadataItems.add(item1); @@ -60,26 +62,28 @@ public void testDumpObject() { configMetadata.setMetadata(configMetadataItems); String parseString = YamlParserUtil.dumpObject(configMetadata); - Assert.assertEquals(CONFIG_METADATA_STRING, parseString); + assertEquals(CONFIG_METADATA_STRING, parseString); } @Test - public void testLoadObject() { + void testLoadObject() { ConfigMetadata configMetadata = YamlParserUtil.loadObject(CONFIG_METADATA_STRING, ConfigMetadata.class); - Assert.assertNotNull(configMetadata); + assertNotNull(configMetadata); List metadataList = configMetadata.getMetadata(); - Assert.assertNotNull(metadataList); - Assert.assertEquals(metadataList.size(), 2); + assertNotNull(metadataList); + assertEquals(2, metadataList.size()); ConfigMetadata.ConfigExportItem configExportItem1 = metadataList.get(0); ConfigMetadata.ConfigExportItem configExportItem2 = metadataList.get(1); - Assert.assertEquals(configExportItem1, item1); - Assert.assertEquals(configExportItem2, item2); + assertEquals(configExportItem1, item1); + assertEquals(configExportItem2, item2); } - @Test(expected = ConstructorException.class) - public void testNotSupportType() { - YamlParserUtil.loadObject("name: test", YamlTest.class); + @Test + void testNotSupportType() { + assertThrows(ConstructorException.class, () -> { + YamlParserUtil.loadObject("name: test", YamlTest.class); + }); } private static class YamlTest { diff --git a/config/src/test/java/com/alibaba/nacos/config/server/utils/ZipUtilsTest.java b/config/src/test/java/com/alibaba/nacos/config/server/utils/ZipUtilsTest.java index 50f280983fb..0688ed9278a 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/utils/ZipUtilsTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/utils/ZipUtilsTest.java @@ -16,35 +16,37 @@ package com.alibaba.nacos.config.server.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; -public class ZipUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ZipUtilsTest { @Test - public void testZip() { + void testZip() { List zipItemList = new ArrayList<>(); zipItemList.add(new ZipUtils.ZipItem("test", "content")); byte[] zip = ZipUtils.zip(zipItemList); - Assert.assertTrue(zip != null && zip.length > 0); + assertTrue(zip != null && zip.length > 0); } @Test - public void testUnzip() { + void testUnzip() { List zipItemList = new ArrayList<>(); zipItemList.add(new ZipUtils.ZipItem("test", "content")); byte[] zip = ZipUtils.zip(zipItemList); - Assert.assertTrue(zip != null && zip.length > 0); + assertTrue(zip != null && zip.length > 0); ZipUtils.UnZipResult unZipResult = ZipUtils.unzip(zip); List result = unZipResult.getZipItemList(); - Assert.assertEquals(zipItemList.size(), result.size()); - Assert.assertEquals(zipItemList.get(0).getItemName(), result.get(0).getItemName()); - Assert.assertEquals(zipItemList.get(0).getItemData(), result.get(0).getItemData()); + assertEquals(zipItemList.size(), result.size()); + assertEquals(zipItemList.get(0).getItemName(), result.get(0).getItemName()); + assertEquals(zipItemList.get(0).getItemData(), result.get(0).getItemData()); } } From 35e3994bcb92a3bb96b8e6427c672b458a0f26cd Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Mon, 20 May 2024 11:10:23 +0800 Subject: [PATCH 021/110] [ISSUE #12113] upgrade module naocs-common from junit4 to junit5 (#12116) * upgrade module naocs-common from junit4 to junit5 * fix checkstyle --- .../test/java/ClassUtilsTestMockClass.java | 1 + .../com/alibaba/nacos/common/AppTest.java | 19 +- .../AbstractAbilityControlManagerTest.java | 70 +-- .../NacosAbilityManagerHolderTest.java | 40 +- .../cache/builder/CacheBuilderTest.java | 48 +- .../cache/decorators/AutoExpireCacheTest.java | 42 +- .../common/cache/decorators/LruCacheTest.java | 37 +- .../decorators/SynchronizedCacheTest.java | 23 +- .../common/cache/impl/SimpleCacheTest.java | 26 +- .../nacos/common/codec/Base64Test.java | 59 +- .../event/ServerConfigChangeEventTest.java | 11 +- .../common/executor/ExecutorFactoryTest.java | 139 ++--- .../executor/NameThreadFactoryTest.java | 13 +- .../executor/ThreadPoolManagerTest.java | 31 +- .../AbstractApacheHttpClientFactoryTest.java | 28 +- .../http/AbstractHttpClientFactoryTest.java | 22 +- .../nacos/common/http/BaseHttpMethodTest.java | 60 +- .../common/http/HttpClientBeanHolderTest.java | 57 +- .../common/http/HttpClientConfigTest.java | 33 +- .../nacos/common/http/HttpRestResultTest.java | 10 +- .../nacos/common/http/HttpUtilsTest.java | 152 ++--- .../client/AbstractNacosRestTemplateTest.java | 35 +- .../InterceptingHttpClientRequestTest.java | 44 +- .../client/NacosAsyncRestTemplateTest.java | 54 +- .../http/client/NacosRestTemplateTest.java | 165 +++--- .../handler/BeanResponseHandlerTest.java | 10 +- .../RestResultResponseHandlerTest.java | 8 +- .../DefaultAsyncHttpClientRequestTest.java | 38 +- .../request/DefaultHttpClientRequestTest.java | 43 +- .../request/JdkHttpClientRequestTest.java | 44 +- .../DefaultClientHttpResponseTest.java | 42 +- .../response/JdkClientHttpResponseTest.java | 42 +- .../nacos/common/http/param/HeaderTest.java | 43 +- .../common/http/param/MediaTypeTest.java | 29 +- .../nacos/common/http/param/QueryTest.java | 21 +- .../DefaultLabelsCollectorManagerTest.java | 17 +- .../logging/NacosLoggingPropertiesTest.java | 26 +- .../common/model/RequestHttpEntityTest.java | 32 +- .../nacos/common/model/RestResultTest.java | 12 +- .../common/model/RestResultUtilsTest.java | 26 +- .../common/notify/DefaultPublisherTest.java | 55 +- .../notify/DefaultSharePublisherTest.java | 32 +- .../nacos/common/notify/NotifyCenterTest.java | 104 ++-- .../packagescan/DefaultPackageScanTest.java | 38 +- .../paramcheck/DefaultParamCheckerTest.java | 63 +- .../paramcheck/ParamCheckerManagerTest.java | 14 +- .../pathencoder/PathEncoderManagerTest.java | 42 +- .../pathencoder/WindowsEncoderTest.java | 98 ++-- .../common/remote/ConnectionTypeTest.java | 14 +- .../common/remote/PayloadRegistryTest.java | 23 +- .../nacos/common/remote/TlsConfigTest.java | 14 +- .../common/remote/client/ConnectionTest.java | 30 +- .../remote/client/RpcClientFactoryTest.java | 118 ++-- .../common/remote/client/RpcClientTest.java | 303 +++++----- .../remote/client/RpcClientTlsConfigTest.java | 28 +- .../client/RpcClusterClientTlsConfigTest.java | 28 +- .../remote/client/RpcConstantsTest.java | 8 +- .../grpc/DefaultGrpcClientConfigTest.java | 62 +- .../remote/client/grpc/GrpcClientTest.java | 108 ++-- .../remote/client/grpc/GrpcClientTlsTest.java | 18 +- .../client/grpc/GrpcClusterClientTest.java | 22 +- .../client/grpc/GrpcConnectionTest.java | 123 ++-- .../remote/client/grpc/GrpcConstantsTest.java | 8 +- .../remote/client/grpc/GrpcSdkClientTest.java | 20 +- .../remote/client/grpc/GrpcUtilsTest.java | 39 +- .../remote/exception/RemoteExceptionTest.java | 12 +- .../common/spi/NacosServiceLoaderTest.java | 20 +- .../NacosDelayTaskExecuteEngineTest.java | 44 +- .../NacosExecuteTaskExecuteEngineTest.java | 59 +- .../common/tls/SelfHostnameVerifierTest.java | 34 +- .../common/tls/SelfTrustManagerTest.java | 30 +- .../nacos/common/tls/TlsFileWatcherTest.java | 110 ++-- .../nacos/common/tls/TlsHelperTest.java | 8 +- .../HealthStateChangeTraceEventTest.java | 32 +- .../event/naming/InstanceTraceEventTest.java | 18 +- .../event/naming/NamingTraceEventTest.java | 4 +- .../event/naming/ServiceTraceEventTest.java | 20 +- .../event/naming/SubscribeTraceEventTest.java | 20 +- .../TraceEventPublisherFactoryTest.java | 22 +- .../publisher/TraceEventPublisherTest.java | 30 +- .../trace/publisher/TraceTestEvent.java | 1 + .../nacos/common/utils/ArrayUtilsTest.java | 41 +- .../nacos/common/utils/ByteUtilsTest.java | 44 +- .../nacos/common/utils/ClassUtilsTest.java | 81 +-- .../common/utils/CollectionUtilsTest.java | 407 +++++++------ .../common/utils/ConcurrentHashSetTest.java | 89 +-- .../common/utils/ConnLabelsUtilsTest.java | 13 +- .../nacos/common/utils/ConvertUtilsTest.java | 536 +++++++++--------- .../common/utils/DateFormatUtilsTest.java | 29 +- .../nacos/common/utils/ExceptionUtilTest.java | 24 +- .../utils/InetAddressValidatorTest.java | 43 +- .../common/utils/InternetAddressUtilTest.java | 185 +++--- .../nacos/common/utils/IoUtilsTest.java | 159 +++--- .../nacos/common/utils/JacksonUtilsTest.java | 390 +++++++------ .../nacos/common/utils/LoggerUtilsTest.java | 14 +- .../nacos/common/utils/MD5UtilsTest.java | 24 +- .../nacos/common/utils/MapUtilTest.java | 22 +- .../nacos/common/utils/NamespaceUtilTest.java | 35 +- .../nacos/common/utils/NumberUtilsTest.java | 96 ++-- .../nacos/common/utils/ObservableTest.java | 36 +- .../alibaba/nacos/common/utils/PairTest.java | 8 +- .../nacos/common/utils/PreconditionsTest.java | 67 ++- .../nacos/common/utils/PropertyUtilsTest.java | 21 +- .../nacos/common/utils/RandomUtilsTest.java | 41 +- .../nacos/common/utils/ReflectUtilsTest.java | 141 ++--- .../nacos/common/utils/ResourceUtilsTest.java | 74 +-- .../nacos/common/utils/StringUtilsTest.java | 415 +++++++------- .../utils/ThreadFactoryBuilderTest.java | 114 ++-- .../nacos/common/utils/ThreadUtilsTest.java | 32 +- .../common/utils/TlsTypeResolveTest.java | 27 +- .../nacos/common/utils/TypeUtilsTest.java | 66 ++- .../nacos/common/utils/UuidUtilsTest.java | 6 +- .../nacos/common/utils/VersionUtilsTest.java | 84 +-- .../alibaba/nacos/common/utils/to/User.java | 3 +- 114 files changed, 3590 insertions(+), 3305 deletions(-) diff --git a/common/src/test/java/ClassUtilsTestMockClass.java b/common/src/test/java/ClassUtilsTestMockClass.java index 5183078632f..f031c6d4493 100644 --- a/common/src/test/java/ClassUtilsTestMockClass.java +++ b/common/src/test/java/ClassUtilsTestMockClass.java @@ -15,4 +15,5 @@ */ public class ClassUtilsTestMockClass { + } diff --git a/common/src/test/java/com/alibaba/nacos/common/AppTest.java b/common/src/test/java/com/alibaba/nacos/common/AppTest.java index 75cfed5b962..3e2b245a855 100644 --- a/common/src/test/java/com/alibaba/nacos/common/AppTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/AppTest.java @@ -16,21 +16,14 @@ package com.alibaba.nacos.common; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; +import org.junit.jupiter.api.Test; -public class AppTest extends TestCase { - - public AppTest(String testName) { - super(testName); - } - - public static Test suite() { - return new TestSuite(AppTest.class); - } +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class AppTest { - public void testApp() { + @Test + void testApp() { assertTrue(true); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/ability/AbstractAbilityControlManagerTest.java b/common/src/test/java/com/alibaba/nacos/common/ability/AbstractAbilityControlManagerTest.java index 7da46bfc53e..a25df5c6061 100644 --- a/common/src/test/java/com/alibaba/nacos/common/ability/AbstractAbilityControlManagerTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/ability/AbstractAbilityControlManagerTest.java @@ -22,19 +22,20 @@ import com.alibaba.nacos.common.notify.Event; import com.alibaba.nacos.common.notify.NotifyCenter; import com.alibaba.nacos.common.notify.listener.Subscriber; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class AbstractAbilityControlManagerTest { +class AbstractAbilityControlManagerTest { private AbstractAbilityControlManager abilityControlManager; @@ -46,8 +47,8 @@ public class AbstractAbilityControlManagerTest { private boolean notified = false; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mockSubscriber = new Subscriber() { @Override public void onEvent(AbstractAbilityControlManager.AbilityUpdateEvent event) { @@ -71,15 +72,15 @@ public Class subscribeType() { NotifyCenter.registerSubscriber(mockSubscriber); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { NotifyCenter.deregisterSubscriber(mockSubscriber); assertionError = null; notified = false; } @Test - public void testEnableCurrentNodeAbility() throws InterruptedException { + void testEnableCurrentNodeAbility() throws InterruptedException { isOn = true; abilityControlManager.enableCurrentNodeAbility(AbilityKey.SERVER_TEST_1); TimeUnit.MILLISECONDS.sleep(1100); @@ -90,7 +91,7 @@ public void testEnableCurrentNodeAbility() throws InterruptedException { } @Test - public void testDisableCurrentNodeAbility() throws InterruptedException { + void testDisableCurrentNodeAbility() throws InterruptedException { isOn = false; abilityControlManager.disableCurrentNodeAbility(AbilityKey.SERVER_TEST_1); TimeUnit.MILLISECONDS.sleep(1100); @@ -101,17 +102,14 @@ public void testDisableCurrentNodeAbility() throws InterruptedException { } @Test - public void testIsCurrentNodeAbilityRunning() { - assertEquals(AbilityStatus.SUPPORTED, - abilityControlManager.isCurrentNodeAbilityRunning(AbilityKey.SERVER_TEST_1)); - assertEquals(AbilityStatus.NOT_SUPPORTED, - abilityControlManager.isCurrentNodeAbilityRunning(AbilityKey.SERVER_TEST_2)); - assertEquals(AbilityStatus.UNKNOWN, - abilityControlManager.isCurrentNodeAbilityRunning(AbilityKey.SDK_CLIENT_TEST_1)); + void testIsCurrentNodeAbilityRunning() { + assertEquals(AbilityStatus.SUPPORTED, abilityControlManager.isCurrentNodeAbilityRunning(AbilityKey.SERVER_TEST_1)); + assertEquals(AbilityStatus.NOT_SUPPORTED, abilityControlManager.isCurrentNodeAbilityRunning(AbilityKey.SERVER_TEST_2)); + assertEquals(AbilityStatus.UNKNOWN, abilityControlManager.isCurrentNodeAbilityRunning(AbilityKey.SDK_CLIENT_TEST_1)); } @Test - public void testGetCurrentNodeAbilities() { + void testGetCurrentNodeAbilities() { Map actual = abilityControlManager.getCurrentNodeAbilities(AbilityMode.SERVER); assertEquals(2, actual.size()); assertTrue(actual.containsKey(AbilityKey.SERVER_TEST_1.getName())); @@ -121,24 +119,26 @@ public void testGetCurrentNodeAbilities() { } @Test - public void testGetPriority() { + void testGetPriority() { assertEquals(Integer.MIN_VALUE, abilityControlManager.getPriority()); } - @Test(expected = IllegalStateException.class) - public void testInitFailed() { - abilityControlManager = new AbstractAbilityControlManager() { - @Override - protected Map> initCurrentNodeAbilities() { - Map abilities = Collections.singletonMap(AbilityKey.SDK_CLIENT_TEST_1, true); - return Collections.singletonMap(AbilityMode.SERVER, abilities); - } - - @Override - public int getPriority() { - return 0; - } - }; + @Test + void testInitFailed() { + assertThrows(IllegalStateException.class, () -> { + abilityControlManager = new AbstractAbilityControlManager() { + @Override + protected Map> initCurrentNodeAbilities() { + Map abilities = Collections.singletonMap(AbilityKey.SDK_CLIENT_TEST_1, true); + return Collections.singletonMap(AbilityMode.SERVER, abilities); + } + + @Override + public int getPriority() { + return 0; + } + }; + }); } private static final class MockAbilityControlManager extends AbstractAbilityControlManager { diff --git a/common/src/test/java/com/alibaba/nacos/common/ability/discover/NacosAbilityManagerHolderTest.java b/common/src/test/java/com/alibaba/nacos/common/ability/discover/NacosAbilityManagerHolderTest.java index 6cf8dce7f9d..768ccf1878d 100644 --- a/common/src/test/java/com/alibaba/nacos/common/ability/discover/NacosAbilityManagerHolderTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/ability/discover/NacosAbilityManagerHolderTest.java @@ -16,44 +16,46 @@ package com.alibaba.nacos.common.ability.discover; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; -@RunWith(MockitoJUnitRunner.class) -public class NacosAbilityManagerHolderTest { +@ExtendWith(MockitoExtension.class) +class NacosAbilityManagerHolderTest { - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { NacosAbilityManagerHolder.getInstance(); } - @After - public void tearDown() throws Exception { - Field abilityControlManagerField = NacosAbilityManagerHolder.class - .getDeclaredField("abstractAbilityControlManager"); + @AfterEach + void tearDown() throws Exception { + Field abilityControlManagerField = NacosAbilityManagerHolder.class.getDeclaredField("abstractAbilityControlManager"); abilityControlManagerField.setAccessible(true); abilityControlManagerField.set(null, null); } @Test - public void testGetInstance() { + void testGetInstance() { assertNotNull(NacosAbilityManagerHolder.getInstance()); } @Test - public void testGetInstanceByType() { + void testGetInstanceByType() { assertNotNull(NacosAbilityManagerHolder.getInstance(HigherMockAbilityManager.class)); } - @Test(expected = ClassCastException.class) - public void testGetInstanceByWrongType() { - assertNotNull(NacosAbilityManagerHolder.getInstance(LowerMockAbilityManager.class)); + @Test + void testGetInstanceByWrongType() { + assertThrows(ClassCastException.class, () -> { + assertNotNull(NacosAbilityManagerHolder.getInstance(LowerMockAbilityManager.class)); + }); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/cache/builder/CacheBuilderTest.java b/common/src/test/java/com/alibaba/nacos/common/cache/builder/CacheBuilderTest.java index ad7f31c80d3..0a7ea25196d 100644 --- a/common/src/test/java/com/alibaba/nacos/common/cache/builder/CacheBuilderTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/cache/builder/CacheBuilderTest.java @@ -16,43 +16,45 @@ package com.alibaba.nacos.common.cache.builder; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; -public class CacheBuilderTest { - - @Rule - public ExpectedException exception = ExpectedException.none(); +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class CacheBuilderTest { @Test - public void testNegativeDuration() { - exception.expect(IllegalArgumentException.class); - exception.expectMessage("duration cannot be negative"); - CacheBuilder.builder().expireNanos(-1, TimeUnit.MINUTES).build(); + void testNegativeDuration() { + Throwable exception = assertThrows(IllegalArgumentException.class, () -> { + CacheBuilder.builder().expireNanos(-1, TimeUnit.MINUTES).build(); + }); + assertTrue(exception.getMessage().contains("duration cannot be negative")); } @Test - public void testNullTimeUnit() { - exception.expect(IllegalArgumentException.class); - exception.expectMessage("unit cannot be null"); - CacheBuilder.builder().expireNanos(500, null).build(); + void testNullTimeUnit() { + Throwable exception = assertThrows(IllegalArgumentException.class, () -> { + CacheBuilder.builder().expireNanos(500, null).build(); + }); + assertTrue(exception.getMessage().contains("unit cannot be null")); } @Test - public void testNegativeMaximumSize() { - exception.expect(IllegalArgumentException.class); - exception.expectMessage("size cannot be negative"); - CacheBuilder.builder().maximumSize(-1).build(); + void testNegativeMaximumSize() { + Throwable exception = assertThrows(IllegalArgumentException.class, () -> { + CacheBuilder.builder().maximumSize(-1).build(); + }); + assertTrue(exception.getMessage().contains("size cannot be negative")); } @Test - public void testNegativeInitializeCapacity() { - exception.expect(IllegalArgumentException.class); - exception.expectMessage("initializeCapacity cannot be negative"); - CacheBuilder.builder().initializeCapacity(-1).build(); + void testNegativeInitializeCapacity() { + Throwable exception = assertThrows(IllegalArgumentException.class, () -> { + CacheBuilder.builder().initializeCapacity(-1).build(); + }); + assertTrue(exception.getMessage().contains("initializeCapacity cannot be negative")); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/cache/decorators/AutoExpireCacheTest.java b/common/src/test/java/com/alibaba/nacos/common/cache/decorators/AutoExpireCacheTest.java index a75b70c98c1..92d9118cdee 100644 --- a/common/src/test/java/com/alibaba/nacos/common/cache/decorators/AutoExpireCacheTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/cache/decorators/AutoExpireCacheTest.java @@ -18,47 +18,51 @@ import com.alibaba.nacos.common.cache.Cache; import com.alibaba.nacos.common.cache.builder.CacheBuilder; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; import java.util.stream.IntStream; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + /** * auto expire cache test. + * * @author zzq * @date 2021/8/1 */ -public class AutoExpireCacheTest { +class AutoExpireCacheTest { @Test - public void testBasic() throws Exception { + void testBasic() throws Exception { Cache cache = CacheBuilder.builder().expireNanos(10, TimeUnit.MINUTES).build(); IntStream.range(0, 100).forEach(item -> cache.put(item, item)); - Assert.assertEquals(100, cache.getSize()); - Assert.assertEquals(99, cache.get(99)); - Assert.assertEquals(99, cache.get(99, () -> 100)); + assertEquals(100, cache.getSize()); + assertEquals(99, cache.get(99)); + assertEquals(99, cache.get(99, () -> 100)); Object removed = cache.remove(99); - Assert.assertEquals(99, removed); - Assert.assertEquals(99, cache.getSize()); - Assert.assertEquals(100, cache.get(99, () -> 100)); + assertEquals(99, removed); + assertEquals(99, cache.getSize()); + assertEquals(100, cache.get(99, () -> 100)); cache.clear(); - Assert.assertEquals(0, cache.getSize()); + assertEquals(0, cache.getSize()); } - + @Test - public void testExpire() throws Exception { + void testExpire() throws Exception { Cache cache = CacheBuilder.builder().expireNanos(1, TimeUnit.SECONDS).build(); - cache.put("a", "a"); + cache.put("a", "a"); TimeUnit.SECONDS.sleep(2); - Assert.assertNull(cache.get("a")); + assertNull(cache.get("a")); } - + @Test - public void testGetCache() { + void testGetCache() { Cache cache = CacheBuilder.builder().expireNanos(1, TimeUnit.MINUTES).build(); cache.put("test", "test"); - Assert.assertNotNull(cache.get("test")); - Assert.assertNull(cache.get("test2")); + assertNotNull(cache.get("test")); + assertNull(cache.get("test2")); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/cache/decorators/LruCacheTest.java b/common/src/test/java/com/alibaba/nacos/common/cache/decorators/LruCacheTest.java index bda3b3bbe10..4dbc82cfc05 100644 --- a/common/src/test/java/com/alibaba/nacos/common/cache/decorators/LruCacheTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/cache/decorators/LruCacheTest.java @@ -18,39 +18,42 @@ import com.alibaba.nacos.common.cache.Cache; import com.alibaba.nacos.common.cache.builder.CacheBuilder; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.stream.IntStream; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + /** * lru test . + * * @author zzq * @date 2021/7/30 */ -public class LruCacheTest { - +class LruCacheTest { + @Test - public void testBasic() throws Exception { + void testBasic() throws Exception { int capacity = 10; int start = 0; int end = 99; Cache cache = CacheBuilder.builder().maximumSize(capacity).lru(true).build(); IntStream.range(start, end).forEach(item -> cache.put(item, item)); - Assert.assertEquals(capacity, cache.getSize()); - Assert.assertNull(cache.get(start)); - Assert.assertEquals(89, cache.get(89)); - Assert.assertEquals(94, cache.get(94)); - Assert.assertEquals(94, cache.get(94, () -> 100)); + assertEquals(capacity, cache.getSize()); + assertNull(cache.get(start)); + assertEquals(89, cache.get(89)); + assertEquals(94, cache.get(94)); + assertEquals(94, cache.get(94, () -> 100)); Object removed = cache.remove(98); - Assert.assertEquals(98, removed); - Assert.assertEquals(9, cache.getSize()); + assertEquals(98, removed); + assertEquals(9, cache.getSize()); cache.clear(); - Assert.assertEquals(0, cache.getSize()); + assertEquals(0, cache.getSize()); } - + @Test - public void testLru() { + void testLru() { int capacity = 10; int start = 0; int end = 10; @@ -58,7 +61,7 @@ public void testLru() { IntStream.range(start, end).forEach(item -> cache.put(item, item)); IntStream.range(start, 2).forEach(item -> cache.get(0)); cache.put(100, 100); - Assert.assertEquals(start, cache.get(0)); - Assert.assertNull(cache.get(1)); + assertEquals(start, cache.get(0)); + assertNull(cache.get(1)); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/cache/decorators/SynchronizedCacheTest.java b/common/src/test/java/com/alibaba/nacos/common/cache/decorators/SynchronizedCacheTest.java index c5a4fee35d6..d082d91b6b4 100644 --- a/common/src/test/java/com/alibaba/nacos/common/cache/decorators/SynchronizedCacheTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/cache/decorators/SynchronizedCacheTest.java @@ -18,26 +18,27 @@ import com.alibaba.nacos.common.cache.Cache; import com.alibaba.nacos.common.cache.builder.CacheBuilder; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.stream.IntStream; -public class SynchronizedCacheTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class SynchronizedCacheTest { @Test - public void testSync() throws Exception { + void testSync() throws Exception { Cache cache = CacheBuilder.builder().sync(true).build(); IntStream.range(0, 100).forEach(item -> cache.put(item, item)); - Assert.assertEquals(100, cache.getSize()); - Assert.assertEquals(99, cache.get(99)); - Assert.assertEquals(99, cache.get(99, () -> 100)); + assertEquals(100, cache.getSize()); + assertEquals(99, cache.get(99)); + assertEquals(99, cache.get(99, () -> 100)); Object removed = cache.remove(99); - Assert.assertEquals(99, removed); - Assert.assertEquals(99, cache.getSize()); - Assert.assertEquals(100, cache.get(99, () -> 100)); + assertEquals(99, removed); + assertEquals(99, cache.getSize()); + assertEquals(100, cache.get(99, () -> 100)); cache.clear(); - Assert.assertEquals(0, cache.getSize()); + assertEquals(0, cache.getSize()); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/cache/impl/SimpleCacheTest.java b/common/src/test/java/com/alibaba/nacos/common/cache/impl/SimpleCacheTest.java index 396bb9a9edf..53634a6bb8c 100644 --- a/common/src/test/java/com/alibaba/nacos/common/cache/impl/SimpleCacheTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/cache/impl/SimpleCacheTest.java @@ -18,27 +18,29 @@ import com.alibaba.nacos.common.cache.Cache; import com.alibaba.nacos.common.cache.builder.CacheBuilder; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.stream.IntStream; -public class SimpleCacheTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +class SimpleCacheTest { + @Test - public void test() throws Exception { + void test() throws Exception { Cache cache = CacheBuilder.builder().initializeCapacity(100).build(); IntStream.range(0, 100).forEach(item -> cache.put(item, item)); - Assert.assertEquals(100, cache.getSize()); + assertEquals(100, cache.getSize()); Object item = cache.remove(89); - Assert.assertEquals(89, item); - Assert.assertEquals(99, cache.getSize()); - Assert.assertEquals(null, cache.get(89)); - Assert.assertEquals(99, cache.get(99)); - Assert.assertEquals(99, cache.get(99, () -> 99999)); - Assert.assertEquals(87, cache.get(111, () -> 87)); + assertEquals(89, item); + assertEquals(99, cache.getSize()); + assertNull(cache.get(89)); + assertEquals(99, cache.get(99)); + assertEquals(99, cache.get(99, () -> 99999)); + assertEquals(87, cache.get(111, () -> 87)); cache.clear(); - Assert.assertEquals(0, cache.getSize()); + assertEquals(0, cache.getSize()); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/codec/Base64Test.java b/common/src/test/java/com/alibaba/nacos/common/codec/Base64Test.java index accdd7fe4cd..fbe92dd8aaf 100644 --- a/common/src/test/java/com/alibaba/nacos/common/codec/Base64Test.java +++ b/common/src/test/java/com/alibaba/nacos/common/codec/Base64Test.java @@ -16,81 +16,86 @@ package com.alibaba.nacos.common.codec; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.nio.charset.StandardCharsets; -public class Base64Test { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class Base64Test { @Test - public void test() { + void test() { String origin = "nacos"; String encoded = "bmFjb3M="; byte[] encodeBase64 = Base64.encodeBase64(origin.getBytes(StandardCharsets.UTF_8)); - Assert.assertEquals(encoded, new String(encodeBase64)); + assertEquals(encoded, new String(encodeBase64)); byte[] decodeBase64 = Base64.decodeBase64(encoded.getBytes(StandardCharsets.UTF_8)); - Assert.assertEquals(origin, new String(decodeBase64)); + assertEquals(origin, new String(decodeBase64)); } @Test - public void testEncodeNullOrEmpty() { + void testEncodeNullOrEmpty() { byte[] b1 = Base64.encodeBase64(null); - Assert.assertNull(b1); + assertNull(b1); byte[] b2 = Base64.encodeBase64(new byte[] {}); - Assert.assertEquals(0, b2.length); + assertEquals(0, b2.length); } @Test - public void testDecodeNullOrEmpty() { + void testDecodeNullOrEmpty() { byte[] b1 = Base64.decodeBase64(null); - Assert.assertNull(b1); + assertNull(b1); byte[] b2 = Base64.decodeBase64(new byte[] {}); - Assert.assertEquals(0, b2.length); + assertEquals(0, b2.length); } @Test - public void testChunk() { + void testChunk() { String a = "very large characters to test chunk encoding and see if the result is expected or not"; byte[] b1 = Base64.encodeBase64(a.getBytes(StandardCharsets.UTF_8), false, false, Integer.MAX_VALUE); byte[] b2 = Base64.encodeBase64(a.getBytes(StandardCharsets.UTF_8), true, false, Integer.MAX_VALUE); String s1 = new String(b1); String s2 = new String(b2); - Assert.assertEquals(s1, "dmVyeSBsYXJnZSBjaGFyYWN0ZXJzIHRvIHRlc3QgY2h1bmsgZW5jb2RpbmcgYW5kIHNlZSBpZiB0" + assertEquals(s1, "dmVyeSBsYXJnZSBjaGFyYWN0ZXJzIHRvIHRlc3QgY2h1bmsgZW5jb2RpbmcgYW5kIHNlZSBpZiB0" + "aGUgcmVzdWx0IGlzIGV4cGVjdGVkIG9yIG5vdA=="); - Assert.assertEquals(s2, "dmVyeSBsYXJnZSBjaGFyYWN0ZXJzIHRvIHRlc3QgY2h1bmsgZW5jb2RpbmcgYW5kIHNlZSBpZiB0" + "\r\n" + assertEquals(s2, "dmVyeSBsYXJnZSBjaGFyYWN0ZXJzIHRvIHRlc3QgY2h1bmsgZW5jb2RpbmcgYW5kIHNlZSBpZiB0" + "\r\n" + "aGUgcmVzdWx0IGlzIGV4cGVjdGVkIG9yIG5vdA==" + "\r\n"); - + byte[] c1 = Base64.decodeBase64(b1); byte[] c2 = Base64.decodeBase64(b2); String s3 = new String(c1); String s4 = new String(c2); - Assert.assertEquals(a, s3); - Assert.assertEquals(a, s4); + assertEquals(a, s3); + assertEquals(a, s4); } @Test - public void testUrlSafe() { + void testUrlSafe() { String a = "aa~aa?"; byte[] b1 = Base64.encodeBase64(a.getBytes(StandardCharsets.UTF_8), false, false, Integer.MAX_VALUE); byte[] b2 = Base64.encodeBase64(a.getBytes(StandardCharsets.UTF_8), false, true, Integer.MAX_VALUE); String s1 = new String(b1); String s2 = new String(b2); - Assert.assertEquals("YWF+YWE/", s1); - Assert.assertEquals("YWF-YWE_", s2); + assertEquals("YWF+YWE/", s1); + assertEquals("YWF-YWE_", s2); byte[] c1 = Base64.decodeBase64(b1); byte[] c2 = Base64.decodeBase64(b2); String s3 = new String(c1); String s4 = new String(c2); - Assert.assertEquals("aa~aa?", s3); - Assert.assertEquals("aa~aa?", s4); + assertEquals("aa~aa?", s3); + assertEquals("aa~aa?", s4); } - @Test(expected = IllegalArgumentException.class) - public void testEncodeOverMaxLength() { - String a = "very large characters to test chunk encoding and see if the result is expected or not"; - Base64.encodeBase64(a.getBytes(StandardCharsets.UTF_8), false, false, 10); + @Test + void testEncodeOverMaxLength() { + assertThrows(IllegalArgumentException.class, () -> { + String a = "very large characters to test chunk encoding and see if the result is expected or not"; + Base64.encodeBase64(a.getBytes(StandardCharsets.UTF_8), false, false, 10); + }); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/event/ServerConfigChangeEventTest.java b/common/src/test/java/com/alibaba/nacos/common/event/ServerConfigChangeEventTest.java index e3d8ee681cc..11925b0efe2 100644 --- a/common/src/test/java/com/alibaba/nacos/common/event/ServerConfigChangeEventTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/event/ServerConfigChangeEventTest.java @@ -17,14 +17,15 @@ package com.alibaba.nacos.common.event; import com.alibaba.nacos.common.notify.Event; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ServerConfigChangeEventTest { +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ServerConfigChangeEventTest { @Test - public void test() { + void test() { Event event = ServerConfigChangeEvent.newEvent(); - Assert.assertTrue(event instanceof ServerConfigChangeEvent); + assertTrue(event instanceof ServerConfigChangeEvent); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/executor/ExecutorFactoryTest.java b/common/src/test/java/com/alibaba/nacos/common/executor/ExecutorFactoryTest.java index c8ee903cbfc..5d2fb47d5b1 100644 --- a/common/src/test/java/com/alibaba/nacos/common/executor/ExecutorFactoryTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/executor/ExecutorFactoryTest.java @@ -16,8 +16,7 @@ package com.alibaba.nacos.common.executor; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Map; import java.util.Set; @@ -25,67 +24,71 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor; -public class ExecutorFactoryTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ExecutorFactoryTest { private final NameThreadFactory threadFactory = new NameThreadFactory("test"); @Test - public void test() { + void test() { ExecutorService executorService; ThreadPoolExecutor threadPoolExecutor; executorService = ExecutorFactory.newSingleExecutorService(); - Assert.assertTrue(executorService instanceof ThreadPoolExecutor); + assertTrue(executorService instanceof ThreadPoolExecutor); threadPoolExecutor = (ThreadPoolExecutor) executorService; - Assert.assertEquals(1, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(1, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertNotEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(1, threadPoolExecutor.getCorePoolSize()); + assertEquals(1, threadPoolExecutor.getMaximumPoolSize()); + assertNotEquals(threadFactory, threadPoolExecutor.getThreadFactory()); executorService = ExecutorFactory.newFixedExecutorService(10); - Assert.assertTrue(executorService instanceof ThreadPoolExecutor); + assertTrue(executorService instanceof ThreadPoolExecutor); threadPoolExecutor = (ThreadPoolExecutor) executorService; - Assert.assertEquals(10, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(10, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertNotEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(10, threadPoolExecutor.getCorePoolSize()); + assertEquals(10, threadPoolExecutor.getMaximumPoolSize()); + assertNotEquals(threadFactory, threadPoolExecutor.getThreadFactory()); executorService = ExecutorFactory.newSingleExecutorService(threadFactory); - Assert.assertTrue(executorService instanceof ThreadPoolExecutor); + assertTrue(executorService instanceof ThreadPoolExecutor); threadPoolExecutor = (ThreadPoolExecutor) executorService; - Assert.assertEquals(1, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(1, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(1, threadPoolExecutor.getCorePoolSize()); + assertEquals(1, threadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); executorService = ExecutorFactory.newFixedExecutorService(10, threadFactory); - Assert.assertTrue(executorService instanceof ThreadPoolExecutor); + assertTrue(executorService instanceof ThreadPoolExecutor); threadPoolExecutor = (ThreadPoolExecutor) executorService; - Assert.assertEquals(10, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(10, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); - + assertEquals(10, threadPoolExecutor.getCorePoolSize()); + assertEquals(10, threadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + ScheduledThreadPoolExecutor scheduledThreadPoolExecutor; executorService = ExecutorFactory.newSingleScheduledExecutorService(threadFactory); - Assert.assertTrue(executorService instanceof ScheduledThreadPoolExecutor); + assertTrue(executorService instanceof ScheduledThreadPoolExecutor); scheduledThreadPoolExecutor = (ScheduledThreadPoolExecutor) executorService; - Assert.assertEquals(1, scheduledThreadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(Integer.MAX_VALUE, scheduledThreadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(1, scheduledThreadPoolExecutor.getCorePoolSize()); + assertEquals(Integer.MAX_VALUE, scheduledThreadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); executorService = ExecutorFactory.newScheduledExecutorService(10, threadFactory); - Assert.assertTrue(executorService instanceof ScheduledThreadPoolExecutor); + assertTrue(executorService instanceof ScheduledThreadPoolExecutor); scheduledThreadPoolExecutor = (ScheduledThreadPoolExecutor) executorService; - Assert.assertEquals(10, scheduledThreadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(Integer.MAX_VALUE, scheduledThreadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(10, scheduledThreadPoolExecutor.getCorePoolSize()); + assertEquals(Integer.MAX_VALUE, scheduledThreadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); threadPoolExecutor = ExecutorFactory.newCustomerThreadExecutor(10, 20, 1000, threadFactory); - Assert.assertEquals(10, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(20, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(10, threadPoolExecutor.getCorePoolSize()); + assertEquals(20, threadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); } @Test - public void testManaged() { + void testManaged() { String testGroup = "test"; ExecutorService executorService; ThreadPoolExecutor threadPoolExecutor; @@ -93,59 +96,59 @@ public void testManaged() { final Map>> resourcesManager = manager.getResourcesManager(); executorService = ExecutorFactory.Managed.newSingleExecutorService(testGroup); - Assert.assertTrue(executorService instanceof ThreadPoolExecutor); + assertTrue(executorService instanceof ThreadPoolExecutor); threadPoolExecutor = (ThreadPoolExecutor) executorService; - Assert.assertEquals(1, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(1, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertNotEquals(threadFactory, threadPoolExecutor.getThreadFactory()); - Assert.assertEquals(1, resourcesManager.get("nacos").get(testGroup).size()); + assertEquals(1, threadPoolExecutor.getCorePoolSize()); + assertEquals(1, threadPoolExecutor.getMaximumPoolSize()); + assertNotEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(1, resourcesManager.get("nacos").get(testGroup).size()); executorService = ExecutorFactory.Managed.newFixedExecutorService(testGroup, 10); - Assert.assertTrue(executorService instanceof ThreadPoolExecutor); + assertTrue(executorService instanceof ThreadPoolExecutor); threadPoolExecutor = (ThreadPoolExecutor) executorService; - Assert.assertEquals(10, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(10, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertNotEquals(threadFactory, threadPoolExecutor.getThreadFactory()); - Assert.assertEquals(2, resourcesManager.get("nacos").get(testGroup).size()); + assertEquals(10, threadPoolExecutor.getCorePoolSize()); + assertEquals(10, threadPoolExecutor.getMaximumPoolSize()); + assertNotEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(2, resourcesManager.get("nacos").get(testGroup).size()); executorService = ExecutorFactory.Managed.newSingleExecutorService(testGroup, threadFactory); - Assert.assertTrue(executorService instanceof ThreadPoolExecutor); + assertTrue(executorService instanceof ThreadPoolExecutor); threadPoolExecutor = (ThreadPoolExecutor) executorService; - Assert.assertEquals(1, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(1, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); - Assert.assertEquals(3, resourcesManager.get("nacos").get(testGroup).size()); + assertEquals(1, threadPoolExecutor.getCorePoolSize()); + assertEquals(1, threadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(3, resourcesManager.get("nacos").get(testGroup).size()); executorService = ExecutorFactory.Managed.newFixedExecutorService(testGroup, 10, threadFactory); - Assert.assertTrue(executorService instanceof ThreadPoolExecutor); + assertTrue(executorService instanceof ThreadPoolExecutor); threadPoolExecutor = (ThreadPoolExecutor) executorService; - Assert.assertEquals(10, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(10, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); - Assert.assertEquals(4, resourcesManager.get("nacos").get(testGroup).size()); - + assertEquals(10, threadPoolExecutor.getCorePoolSize()); + assertEquals(10, threadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(4, resourcesManager.get("nacos").get(testGroup).size()); + ScheduledThreadPoolExecutor scheduledThreadPoolExecutor; executorService = ExecutorFactory.Managed.newSingleScheduledExecutorService(testGroup, threadFactory); - Assert.assertTrue(executorService instanceof ScheduledThreadPoolExecutor); + assertTrue(executorService instanceof ScheduledThreadPoolExecutor); scheduledThreadPoolExecutor = (ScheduledThreadPoolExecutor) executorService; - Assert.assertEquals(1, scheduledThreadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(Integer.MAX_VALUE, scheduledThreadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); - Assert.assertEquals(5, resourcesManager.get("nacos").get(testGroup).size()); + assertEquals(1, scheduledThreadPoolExecutor.getCorePoolSize()); + assertEquals(Integer.MAX_VALUE, scheduledThreadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(5, resourcesManager.get("nacos").get(testGroup).size()); executorService = ExecutorFactory.Managed.newScheduledExecutorService(testGroup, 10, threadFactory); - Assert.assertTrue(executorService instanceof ScheduledThreadPoolExecutor); + assertTrue(executorService instanceof ScheduledThreadPoolExecutor); scheduledThreadPoolExecutor = (ScheduledThreadPoolExecutor) executorService; - Assert.assertEquals(10, scheduledThreadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(Integer.MAX_VALUE, scheduledThreadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); - Assert.assertEquals(6, resourcesManager.get("nacos").get(testGroup).size()); + assertEquals(10, scheduledThreadPoolExecutor.getCorePoolSize()); + assertEquals(Integer.MAX_VALUE, scheduledThreadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(6, resourcesManager.get("nacos").get(testGroup).size()); threadPoolExecutor = ExecutorFactory.Managed.newCustomerThreadExecutor(testGroup, 10, 20, 1000, threadFactory); - Assert.assertEquals(10, threadPoolExecutor.getCorePoolSize()); - Assert.assertEquals(20, threadPoolExecutor.getMaximumPoolSize()); - Assert.assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); - Assert.assertEquals(7, resourcesManager.get("nacos").get(testGroup).size()); + assertEquals(10, threadPoolExecutor.getCorePoolSize()); + assertEquals(20, threadPoolExecutor.getMaximumPoolSize()); + assertEquals(threadFactory, threadPoolExecutor.getThreadFactory()); + assertEquals(7, resourcesManager.get("nacos").get(testGroup).size()); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/executor/NameThreadFactoryTest.java b/common/src/test/java/com/alibaba/nacos/common/executor/NameThreadFactoryTest.java index 82a1b80fa3d..de7e6e28be6 100644 --- a/common/src/test/java/com/alibaba/nacos/common/executor/NameThreadFactoryTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/executor/NameThreadFactoryTest.java @@ -16,13 +16,14 @@ package com.alibaba.nacos.common.executor; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class NameThreadFactoryTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class NameThreadFactoryTest { @Test - public void test() { + void test() { NameThreadFactory threadFactory = new NameThreadFactory("test"); Thread t1 = threadFactory.newThread(() -> { @@ -31,8 +32,8 @@ public void test() { }); - Assert.assertEquals(t1.getName(), "test.0"); - Assert.assertEquals(t2.getName(), "test.1"); + assertEquals("test.0", t1.getName()); + assertEquals("test.1", t2.getName()); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/executor/ThreadPoolManagerTest.java b/common/src/test/java/com/alibaba/nacos/common/executor/ThreadPoolManagerTest.java index dbdbf6d37b7..b9ab6baa0ea 100644 --- a/common/src/test/java/com/alibaba/nacos/common/executor/ThreadPoolManagerTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/executor/ThreadPoolManagerTest.java @@ -16,17 +16,18 @@ package com.alibaba.nacos.common.executor; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.concurrent.ExecutorService; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ThreadPoolManagerTest { +class ThreadPoolManagerTest { @Test - public void test() { + void test() { ThreadPoolManager manager = ThreadPoolManager.getInstance(); ExecutorService executor = ExecutorFactory.newSingleExecutorService(); String namespace = "test"; @@ -34,41 +35,41 @@ public void test() { manager.register(namespace, group, executor); assertTrue(manager.getResourcesManager().containsKey(namespace)); - Assert.assertEquals(1, manager.getResourcesManager().get(namespace).get(group).size()); + assertEquals(1, manager.getResourcesManager().get(namespace).get(group).size()); manager.register(namespace, group, ExecutorFactory.newSingleExecutorService()); - Assert.assertEquals(2, manager.getResourcesManager().get(namespace).get(group).size()); + assertEquals(2, manager.getResourcesManager().get(namespace).get(group).size()); manager.destroy(namespace, group); - Assert.assertFalse(manager.getResourcesManager().get(namespace).containsKey(group)); + assertFalse(manager.getResourcesManager().get(namespace).containsKey(group)); manager.register(namespace, group, executor); manager.destroy(namespace); - Assert.assertFalse(manager.getResourcesManager().containsKey(namespace)); + assertFalse(manager.getResourcesManager().containsKey(namespace)); manager.register(namespace, group, executor); manager.deregister(namespace, group, ExecutorFactory.newSingleExecutorService()); - Assert.assertEquals(1, manager.getResourcesManager().get(namespace).get(group).size()); + assertEquals(1, manager.getResourcesManager().get(namespace).get(group).size()); manager.deregister(namespace, group, executor); - Assert.assertEquals(0, manager.getResourcesManager().get(namespace).get(group).size()); + assertEquals(0, manager.getResourcesManager().get(namespace).get(group).size()); manager.register(namespace, group, executor); manager.deregister(namespace, group); - Assert.assertFalse(manager.getResourcesManager().get(namespace).containsKey(group)); + assertFalse(manager.getResourcesManager().get(namespace).containsKey(group)); manager.register(namespace, group, executor); manager.register(namespace, group, ExecutorFactory.newSingleExecutorService()); ThreadPoolManager.shutdown(); - Assert.assertFalse(manager.getResourcesManager().containsKey(namespace)); + assertFalse(manager.getResourcesManager().containsKey(namespace)); manager.destroy(namespace); manager.destroy(namespace, group); - Assert.assertFalse(manager.getResourcesManager().containsKey(namespace)); + assertFalse(manager.getResourcesManager().containsKey(namespace)); } @Test - public void testDestroyWithNull() { + void testDestroyWithNull() { ThreadPoolManager.getInstance().register("t", "g", ExecutorFactory.newFixedExecutorService(1)); try { ThreadPoolManager.getInstance().destroy("null"); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/AbstractApacheHttpClientFactoryTest.java b/common/src/test/java/com/alibaba/nacos/common/http/AbstractApacheHttpClientFactoryTest.java index 97d0cbea3fd..3ba7f83117c 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/AbstractApacheHttpClientFactoryTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/AbstractApacheHttpClientFactoryTest.java @@ -19,35 +19,35 @@ import com.alibaba.nacos.common.http.client.NacosRestTemplate; import com.alibaba.nacos.common.http.client.request.DefaultHttpClientRequest; import com.alibaba.nacos.common.http.client.request.HttpClientRequest; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.slf4j.Logger; import java.lang.reflect.Field; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(MockitoJUnitRunner.class) -public class AbstractApacheHttpClientFactoryTest { +@ExtendWith(MockitoExtension.class) +class AbstractApacheHttpClientFactoryTest { @Mock private Logger logger; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { } @Test - public void testCreateNacosRestTemplate() throws NoSuchFieldException, IllegalAccessException { + void testCreateNacosRestTemplate() throws NoSuchFieldException, IllegalAccessException { HttpClientFactory factory = new AbstractApacheHttpClientFactory() { @Override protected HttpClientConfig buildHttpClientConfig() { diff --git a/common/src/test/java/com/alibaba/nacos/common/http/AbstractHttpClientFactoryTest.java b/common/src/test/java/com/alibaba/nacos/common/http/AbstractHttpClientFactoryTest.java index a934241d055..0cdefebac71 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/AbstractHttpClientFactoryTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/AbstractHttpClientFactoryTest.java @@ -19,28 +19,28 @@ import com.alibaba.nacos.common.http.client.NacosAsyncRestTemplate; import com.alibaba.nacos.common.http.client.NacosRestTemplate; import com.alibaba.nacos.common.tls.TlsSystemConfig; -import org.junit.After; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.slf4j.Logger; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; -@RunWith(MockitoJUnitRunner.class) -public class AbstractHttpClientFactoryTest { +@ExtendWith(MockitoExtension.class) +class AbstractHttpClientFactoryTest { @Mock private Logger logger; - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { TlsSystemConfig.tlsEnable = false; } @Test - public void testCreateNacosRestTemplateWithSsl() throws Exception { + void testCreateNacosRestTemplateWithSsl() throws Exception { TlsSystemConfig.tlsEnable = true; HttpClientFactory httpClientFactory = new DefaultHttpClientFactory(logger); NacosRestTemplate nacosRestTemplate = httpClientFactory.createNacosRestTemplate(); @@ -48,7 +48,7 @@ public void testCreateNacosRestTemplateWithSsl() throws Exception { } @Test - public void testCreateNacosAsyncRestTemplate() { + void testCreateNacosAsyncRestTemplate() { HttpClientFactory httpClientFactory = new AbstractHttpClientFactory() { @Override protected HttpClientConfig buildHttpClientConfig() { diff --git a/common/src/test/java/com/alibaba/nacos/common/http/BaseHttpMethodTest.java b/common/src/test/java/com/alibaba/nacos/common/http/BaseHttpMethodTest.java index 612b561b1dc..df7204fd852 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/BaseHttpMethodTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/BaseHttpMethodTest.java @@ -17,89 +17,93 @@ package com.alibaba.nacos.common.http; import org.apache.http.client.methods.HttpRequestBase; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class BaseHttpMethodTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class BaseHttpMethodTest { @Test - public void testHttpGet() { + void testHttpGet() { BaseHttpMethod method = BaseHttpMethod.GET; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("GET", request.getMethod()); + assertEquals("GET", request.getMethod()); } @Test - public void testHttpGetLarge() { + void testHttpGetLarge() { BaseHttpMethod method = BaseHttpMethod.GET_LARGE; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("GET", request.getMethod()); + assertEquals("GET", request.getMethod()); } @Test - public void testHttpPost() { + void testHttpPost() { BaseHttpMethod method = BaseHttpMethod.POST; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("POST", request.getMethod()); + assertEquals("POST", request.getMethod()); } @Test - public void testHttpPut() { + void testHttpPut() { BaseHttpMethod method = BaseHttpMethod.PUT; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("PUT", request.getMethod()); + assertEquals("PUT", request.getMethod()); } @Test - public void testHttpDelete() { + void testHttpDelete() { BaseHttpMethod method = BaseHttpMethod.DELETE; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("DELETE", request.getMethod()); + assertEquals("DELETE", request.getMethod()); } @Test - public void testHttpDeleteLarge() { + void testHttpDeleteLarge() { BaseHttpMethod method = BaseHttpMethod.DELETE_LARGE; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("DELETE", request.getMethod()); + assertEquals("DELETE", request.getMethod()); } @Test - public void testHttpHead() { + void testHttpHead() { BaseHttpMethod method = BaseHttpMethod.HEAD; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("HEAD", request.getMethod()); + assertEquals("HEAD", request.getMethod()); } @Test - public void testHttpTrace() { + void testHttpTrace() { BaseHttpMethod method = BaseHttpMethod.TRACE; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("TRACE", request.getMethod()); + assertEquals("TRACE", request.getMethod()); } @Test - public void testHttpPatch() { + void testHttpPatch() { BaseHttpMethod method = BaseHttpMethod.PATCH; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("PATCH", request.getMethod()); + assertEquals("PATCH", request.getMethod()); } @Test - public void testHttpOptions() { + void testHttpOptions() { BaseHttpMethod method = BaseHttpMethod.OPTIONS; HttpRequestBase request = method.init("http://example.com"); - Assert.assertEquals("TRACE", request.getMethod()); + assertEquals("TRACE", request.getMethod()); } @Test - public void testSourceOf() { + void testSourceOf() { BaseHttpMethod method = BaseHttpMethod.sourceOf("GET"); - Assert.assertEquals(BaseHttpMethod.GET, method); + assertEquals(BaseHttpMethod.GET, method); } - @Test(expected = IllegalArgumentException.class) - public void testSourceOfNotFound() { - BaseHttpMethod.sourceOf("Not Found"); + @Test + void testSourceOfNotFound() { + assertThrows(IllegalArgumentException.class, () -> { + BaseHttpMethod.sourceOf("Not Found"); + }); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/http/HttpClientBeanHolderTest.java b/common/src/test/java/com/alibaba/nacos/common/http/HttpClientBeanHolderTest.java index 18323a229a6..80172a70c48 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/HttpClientBeanHolderTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/HttpClientBeanHolderTest.java @@ -18,24 +18,29 @@ import com.alibaba.nacos.common.http.client.NacosAsyncRestTemplate; import com.alibaba.nacos.common.http.client.NacosRestTemplate; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import org.slf4j.Logger; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class HttpClientBeanHolderTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class HttpClientBeanHolderTest { private Map cachedRestTemplateMap; @@ -54,8 +59,8 @@ public class HttpClientBeanHolderTest { @Mock private HttpClientFactory mockFactory; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { cachedRestTemplateMap = new HashMap<>(); cachedAsyncRestTemplateMap = new HashMap<>(); restMap = (Map) getCachedMap("SINGLETON_REST"); @@ -68,8 +73,8 @@ public void setUp() throws Exception { when(mockFactory.createNacosAsyncRestTemplate()).thenReturn(mockAsyncRestTemplate); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { restMap.putAll(cachedRestTemplateMap); restAsyncMap.putAll(cachedAsyncRestTemplateMap); cachedRestTemplateMap.clear(); @@ -83,7 +88,7 @@ private Object getCachedMap(String mapName) throws NoSuchFieldException, Illegal } @Test - public void testGetNacosRestTemplateWithDefault() { + void testGetNacosRestTemplateWithDefault() { assertTrue(restMap.isEmpty()); NacosRestTemplate actual = HttpClientBeanHolder.getNacosRestTemplate((Logger) null); assertEquals(1, restMap.size()); @@ -92,13 +97,15 @@ public void testGetNacosRestTemplateWithDefault() { assertEquals(actual, duplicateGet); } - @Test(expected = NullPointerException.class) - public void testGetNacosRestTemplateForNullFactory() { - HttpClientBeanHolder.getNacosRestTemplate((HttpClientFactory) null); + @Test + void testGetNacosRestTemplateForNullFactory() { + assertThrows(NullPointerException.class, () -> { + HttpClientBeanHolder.getNacosRestTemplate((HttpClientFactory) null); + }); } @Test - public void testGetNacosRestTemplateWithCustomFactory() { + void testGetNacosRestTemplateWithCustomFactory() { assertTrue(restMap.isEmpty()); HttpClientBeanHolder.getNacosRestTemplate((Logger) null); assertEquals(1, restMap.size()); @@ -108,7 +115,7 @@ public void testGetNacosRestTemplateWithCustomFactory() { } @Test - public void testGetNacosAsyncRestTemplateWithDefault() { + void testGetNacosAsyncRestTemplateWithDefault() { assertTrue(restAsyncMap.isEmpty()); NacosAsyncRestTemplate actual = HttpClientBeanHolder.getNacosAsyncRestTemplate((Logger) null); assertEquals(1, restAsyncMap.size()); @@ -117,13 +124,15 @@ public void testGetNacosAsyncRestTemplateWithDefault() { assertEquals(actual, duplicateGet); } - @Test(expected = NullPointerException.class) - public void testGetNacosAsyncRestTemplateForNullFactory() { - HttpClientBeanHolder.getNacosAsyncRestTemplate((HttpClientFactory) null); + @Test + void testGetNacosAsyncRestTemplateForNullFactory() { + assertThrows(NullPointerException.class, () -> { + HttpClientBeanHolder.getNacosAsyncRestTemplate((HttpClientFactory) null); + }); } @Test - public void testGetNacosAsyncRestTemplateWithCustomFactory() { + void testGetNacosAsyncRestTemplateWithCustomFactory() { assertTrue(restAsyncMap.isEmpty()); HttpClientBeanHolder.getNacosAsyncRestTemplate((Logger) null); assertEquals(1, restAsyncMap.size()); @@ -133,7 +142,7 @@ public void testGetNacosAsyncRestTemplateWithCustomFactory() { } @Test - public void shutdown() throws Exception { + void shutdown() throws Exception { HttpClientBeanHolder.getNacosRestTemplate((Logger) null); HttpClientBeanHolder.getNacosAsyncRestTemplate((Logger) null); assertEquals(1, restMap.size()); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/HttpClientConfigTest.java b/common/src/test/java/com/alibaba/nacos/common/http/HttpClientConfigTest.java index eaa44f3ab96..e94458d6cc2 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/HttpClientConfigTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/HttpClientConfigTest.java @@ -16,78 +16,77 @@ package com.alibaba.nacos.common.http; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; -public class HttpClientConfigTest { +class HttpClientConfigTest { @Test - public void testGetConTimeOutMillis() { + void testGetConTimeOutMillis() { HttpClientConfig config = HttpClientConfig.builder().setConTimeOutMillis(1000).build(); assertEquals(1000, config.getConTimeOutMillis()); } @Test - public void testGetReadTimeOutMillis() { + void testGetReadTimeOutMillis() { HttpClientConfig config = HttpClientConfig.builder().setReadTimeOutMillis(2000).build(); assertEquals(2000, config.getReadTimeOutMillis()); } @Test - public void testGetConnTimeToLive() { - HttpClientConfig config = HttpClientConfig.builder().setConnectionTimeToLive(3000, TimeUnit.MILLISECONDS) - .build(); + void testGetConnTimeToLive() { + HttpClientConfig config = HttpClientConfig.builder().setConnectionTimeToLive(3000, TimeUnit.MILLISECONDS).build(); assertEquals(3000, config.getConnTimeToLive()); } @Test - public void testGetConnTimeToLiveTimeUnit() { + void testGetConnTimeToLiveTimeUnit() { HttpClientConfig config = HttpClientConfig.builder().setConnectionTimeToLive(4000, TimeUnit.SECONDS).build(); assertEquals(TimeUnit.SECONDS, config.getConnTimeToLiveTimeUnit()); } @Test - public void testGetConnectionRequestTimeout() { + void testGetConnectionRequestTimeout() { HttpClientConfig config = HttpClientConfig.builder().setConnectionRequestTimeout(5000).build(); assertEquals(5000, config.getConnectionRequestTimeout()); } @Test - public void testGetMaxRedirects() { + void testGetMaxRedirects() { HttpClientConfig config = HttpClientConfig.builder().setMaxRedirects(60).build(); assertEquals(60, config.getMaxRedirects()); } @Test - public void testGetMaxConnTotal() { + void testGetMaxConnTotal() { HttpClientConfig config = HttpClientConfig.builder().setMaxConnTotal(70).build(); assertEquals(70, config.getMaxConnTotal()); } @Test - public void testGetMaxConnPerRoute() { + void testGetMaxConnPerRoute() { HttpClientConfig config = HttpClientConfig.builder().setMaxConnPerRoute(80).build(); assertEquals(80, config.getMaxConnPerRoute()); } @Test - public void testGetContentCompressionEnabled() { + void testGetContentCompressionEnabled() { HttpClientConfig config = HttpClientConfig.builder().setContentCompressionEnabled(false).build(); assertFalse(config.getContentCompressionEnabled()); } @Test - public void testGetIoThreadCount() { + void testGetIoThreadCount() { HttpClientConfig config = HttpClientConfig.builder().setIoThreadCount(90).build(); assertEquals(90, config.getIoThreadCount()); } @Test - public void testGetUserAgent() { + void testGetUserAgent() { HttpClientConfig config = HttpClientConfig.builder().setUserAgent("testUserAgent").build(); assertEquals("testUserAgent", config.getUserAgent()); } diff --git a/common/src/test/java/com/alibaba/nacos/common/http/HttpRestResultTest.java b/common/src/test/java/com/alibaba/nacos/common/http/HttpRestResultTest.java index 2d702dd7eb5..62bc6daca53 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/HttpRestResultTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/HttpRestResultTest.java @@ -17,14 +17,14 @@ package com.alibaba.nacos.common.http; import com.alibaba.nacos.common.http.param.Header; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class HttpRestResultTest { +class HttpRestResultTest { @Test - public void testSetHeader() { + void testSetHeader() { HttpRestResult result = new HttpRestResult<>(); result.setData("test data"); Header header = Header.newInstance(); @@ -34,7 +34,7 @@ public void testSetHeader() { } @Test - public void testFullConstructor() { + void testFullConstructor() { Header header = Header.newInstance(); HttpRestResult result = new HttpRestResult<>(header, 200, "test data", "message"); assertEquals(header, result.getHeader()); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/HttpUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/http/HttpUtilsTest.java index 5a6250bee83..8dfdb4aec68 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/HttpUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/HttpUtilsTest.java @@ -25,10 +25,9 @@ import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.conn.ConnectTimeoutException; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.InputStream; import java.io.UnsupportedEncodingException; @@ -43,53 +42,60 @@ import java.util.Map; import java.util.concurrent.TimeoutException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; -@RunWith(MockitoJUnitRunner.class) -public class HttpUtilsTest { +@ExtendWith(MockitoExtension.class) +class HttpUtilsTest { String exceptUrl = "http://127.0.0.1:8080/v1/api/test"; @Test - public void testBuildHttpUrl1() { + void testBuildHttpUrl1() { String targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "/v1/api/test"); - Assert.assertEquals(exceptUrl, targetUrl); + assertEquals(exceptUrl, targetUrl); targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "v1/api/test"); - Assert.assertEquals(exceptUrl, targetUrl); + assertEquals(exceptUrl, targetUrl); targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "/v1", "/api/test"); - Assert.assertEquals(exceptUrl, targetUrl); + assertEquals(exceptUrl, targetUrl); targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "/v1", "/api", "/test"); - Assert.assertEquals(exceptUrl, targetUrl); + assertEquals(exceptUrl, targetUrl); targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "/v1", "/api/", "/test"); - Assert.assertEquals(exceptUrl, targetUrl); + assertEquals(exceptUrl, targetUrl); targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "/v1", "", "/api/", "/test"); - Assert.assertEquals(exceptUrl, targetUrl); + assertEquals(exceptUrl, targetUrl); targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "/v1", "", null, "/api/", "/test"); - Assert.assertEquals(exceptUrl, targetUrl); + assertEquals(exceptUrl, targetUrl); targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "/v1", "/api/", "test"); - Assert.assertEquals(exceptUrl, targetUrl); + assertEquals(exceptUrl, targetUrl); targetUrl = HttpUtils.buildUrl(true, "127.0.0.1:8080", "/v1", "", null, "/api/", "/test"); - Assert.assertEquals("https://127.0.0.1:8080/v1/api/test", targetUrl); + assertEquals("https://127.0.0.1:8080/v1/api/test", targetUrl); } - @Test(expected = IllegalArgumentException.class) - public void testBuildHttpUrl2() { - String targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "//v1/api/test"); - Assert.assertNotEquals(exceptUrl, targetUrl); + @Test + void testBuildHttpUrl2() { + assertThrows(IllegalArgumentException.class, () -> { + String targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "//v1/api/test"); + assertNotEquals(exceptUrl, targetUrl); + }); } - @Test(expected = IllegalArgumentException.class) - public void testBuildHttpUrl3() { - String targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "/v1", "/api//", "test"); - Assert.assertNotEquals(exceptUrl, targetUrl); + @Test + void testBuildHttpUrl3() { + assertThrows(IllegalArgumentException.class, () -> { + String targetUrl = HttpUtils.buildUrl(false, "127.0.0.1:8080", "/v1", "/api//", "test"); + assertNotEquals(exceptUrl, targetUrl); + }); } @Test - public void testInitRequestHeader() { + void testInitRequestHeader() { BaseHttpMethod.HttpGetWithEntity httpRequest = new BaseHttpMethod.HttpGetWithEntity(""); Header header = Header.newInstance(); header.addParam("k", "v"); @@ -97,13 +103,13 @@ public void testInitRequestHeader() { HttpUtils.initRequestHeader(httpRequest, header); org.apache.http.Header[] headers = httpRequest.getHeaders("k"); - Assert.assertEquals(1, headers.length); - Assert.assertEquals("k", headers[0].getName()); - Assert.assertEquals("v", headers[0].getValue()); + assertEquals(1, headers.length); + assertEquals("k", headers[0].getName()); + assertEquals("v", headers[0].getValue()); } @Test - public void testInitRequestEntity1() throws Exception { + void testInitRequestEntity1() throws Exception { BaseHttpMethod.HttpGetWithEntity httpRequest = new BaseHttpMethod.HttpGetWithEntity(""); Header header = Header.newInstance(); header.addParam(HttpHeaderConsts.CONTENT_TYPE, "text/html"); @@ -114,13 +120,13 @@ public void testInitRequestEntity1() throws Exception { InputStream contentStream = entity.getContent(); byte[] bytes = new byte[contentStream.available()]; contentStream.read(bytes); - Assert.assertArrayEquals(new byte[] {0, 1, 0, 1}, bytes); - Assert.assertEquals(HttpHeaderConsts.CONTENT_TYPE, entity.getContentType().getName()); - Assert.assertEquals("text/html; charset=UTF-8", entity.getContentType().getValue()); + assertArrayEquals(new byte[] {0, 1, 0, 1}, bytes); + assertEquals(HttpHeaderConsts.CONTENT_TYPE, entity.getContentType().getName()); + assertEquals("text/html; charset=UTF-8", entity.getContentType().getValue()); } @Test - public void testInitRequestEntity2() throws Exception { + void testInitRequestEntity2() throws Exception { BaseHttpMethod.HttpGetWithEntity httpRequest = new BaseHttpMethod.HttpGetWithEntity(""); Header header = Header.newInstance(); header.addParam(HttpHeaderConsts.CONTENT_TYPE, "text/html"); @@ -131,13 +137,13 @@ public void testInitRequestEntity2() throws Exception { InputStream contentStream = entity.getContent(); byte[] bytes = new byte[contentStream.available()]; contentStream.read(bytes); - Assert.assertEquals("{\"k\":\"v\"}", new String(bytes, Constants.ENCODE)); - Assert.assertEquals(HttpHeaderConsts.CONTENT_TYPE, entity.getContentType().getName()); - Assert.assertEquals("text/html; charset=UTF-8", entity.getContentType().getValue()); + assertEquals("{\"k\":\"v\"}", new String(bytes, Constants.ENCODE)); + assertEquals(HttpHeaderConsts.CONTENT_TYPE, entity.getContentType().getName()); + assertEquals("text/html; charset=UTF-8", entity.getContentType().getValue()); } @Test - public void testInitRequestEntity3() throws Exception { + void testInitRequestEntity3() throws Exception { BaseHttpMethod.HttpGetWithEntity httpRequest = new BaseHttpMethod.HttpGetWithEntity(""); Header header = Header.newInstance(); header.addParam(HttpHeaderConsts.CONTENT_TYPE, "text/html"); @@ -148,35 +154,35 @@ public void testInitRequestEntity3() throws Exception { InputStream contentStream = entity.getContent(); byte[] bytes = new byte[contentStream.available()]; contentStream.read(bytes); - Assert.assertEquals("common text", new String(bytes, Constants.ENCODE)); - Assert.assertEquals(HttpHeaderConsts.CONTENT_TYPE, entity.getContentType().getName()); - Assert.assertEquals("text/html; charset=UTF-8", entity.getContentType().getValue()); + assertEquals("common text", new String(bytes, Constants.ENCODE)); + assertEquals(HttpHeaderConsts.CONTENT_TYPE, entity.getContentType().getName()); + assertEquals("text/html; charset=UTF-8", entity.getContentType().getValue()); } @Test - public void testInitRequestEntity4() throws Exception { + void testInitRequestEntity4() throws Exception { BaseHttpMethod.HttpGetWithEntity httpRequest = new BaseHttpMethod.HttpGetWithEntity(""); HttpUtils.initRequestEntity(httpRequest, null, null); // nothing change - Assert.assertEquals(new BaseHttpMethod.HttpGetWithEntity("").getEntity(), httpRequest.getEntity()); - Assert.assertArrayEquals(new BaseHttpMethod.HttpGetWithEntity("").getAllHeaders(), httpRequest.getAllHeaders()); + assertEquals(new BaseHttpMethod.HttpGetWithEntity("").getEntity(), httpRequest.getEntity()); + assertArrayEquals(new BaseHttpMethod.HttpGetWithEntity("").getAllHeaders(), httpRequest.getAllHeaders()); } @Test - public void testInitRequestEntity5() throws Exception { + void testInitRequestEntity5() throws Exception { HttpDelete httpDelete = new HttpDelete(""); HttpUtils.initRequestEntity(httpDelete, null, null); // nothing change - Assert.assertEquals(new HttpDelete("").getMethod(), httpDelete.getMethod()); - Assert.assertArrayEquals(new HttpDelete("").getAllHeaders(), httpDelete.getAllHeaders()); + assertEquals(new HttpDelete("").getMethod(), httpDelete.getMethod()); + assertArrayEquals(new HttpDelete("").getAllHeaders(), httpDelete.getAllHeaders()); } @Test - public void testInitRequestFromEntity1() throws Exception { + void testInitRequestFromEntity1() throws Exception { BaseHttpMethod.HttpGetWithEntity httpRequest = new BaseHttpMethod.HttpGetWithEntity(""); HttpUtils.initRequestFromEntity(httpRequest, Collections.singletonMap("k", "v"), "UTF-8"); @@ -185,72 +191,72 @@ public void testInitRequestFromEntity1() throws Exception { InputStream contentStream = entity.getContent(); byte[] bytes = new byte[contentStream.available()]; contentStream.read(bytes); - Assert.assertEquals("k=v", new String(bytes, StandardCharsets.UTF_8)); + assertEquals("k=v", new String(bytes, StandardCharsets.UTF_8)); } @Test - public void testInitRequestFromEntity2() throws Exception { + void testInitRequestFromEntity2() throws Exception { BaseHttpMethod.HttpGetWithEntity httpRequest = new BaseHttpMethod.HttpGetWithEntity(""); HttpUtils.initRequestFromEntity(httpRequest, null, "UTF-8"); // nothing change - Assert.assertEquals(new BaseHttpMethod.HttpGetWithEntity("").getEntity(), httpRequest.getEntity()); + assertEquals(new BaseHttpMethod.HttpGetWithEntity("").getEntity(), httpRequest.getEntity()); } @Test - public void testInitRequestFromEntity3() throws Exception { + void testInitRequestFromEntity3() throws Exception { BaseHttpMethod.HttpGetWithEntity httpRequest = new BaseHttpMethod.HttpGetWithEntity(""); HttpUtils.initRequestFromEntity(httpRequest, Collections.emptyMap(), "UTF-8"); // nothing change - Assert.assertEquals(new BaseHttpMethod.HttpGetWithEntity("").getEntity(), httpRequest.getEntity()); + assertEquals(new BaseHttpMethod.HttpGetWithEntity("").getEntity(), httpRequest.getEntity()); } @Test - public void testInitRequestFromEntity4() throws Exception { + void testInitRequestFromEntity4() throws Exception { BaseHttpMethod.HttpGetWithEntity httpRequest = new BaseHttpMethod.HttpGetWithEntity(""); HttpUtils.initRequestFromEntity(mock(HttpRequestBase.class), Collections.emptyMap(), "UTF-8"); // nothing change - Assert.assertEquals(new BaseHttpMethod.HttpGetWithEntity("").getEntity(), httpRequest.getEntity()); + assertEquals(new BaseHttpMethod.HttpGetWithEntity("").getEntity(), httpRequest.getEntity()); } @Test - public void testInitRequestFromEntity5() throws Exception { + void testInitRequestFromEntity5() throws Exception { HttpDelete httpDelete = new HttpDelete(""); HttpUtils.initRequestFromEntity(httpDelete, Collections.singletonMap("k", "v"), "UTF-8"); // nothing change - Assert.assertEquals(new HttpDelete("").getMethod(), httpDelete.getMethod()); - Assert.assertArrayEquals(new HttpDelete("").getAllHeaders(), httpDelete.getAllHeaders()); + assertEquals(new HttpDelete("").getMethod(), httpDelete.getMethod()); + assertArrayEquals(new HttpDelete("").getAllHeaders(), httpDelete.getAllHeaders()); } @Test - public void testTranslateParameterMap() throws Exception { + void testTranslateParameterMap() throws Exception { Map map = Collections.singletonMap("K", new String[] {"V1", "V2"}); Map resultMap = HttpUtils.translateParameterMap(map); - Assert.assertEquals(Collections.singletonMap("K", "V1"), resultMap); + assertEquals(Collections.singletonMap("K", "V1"), resultMap); } @Test - public void testDecode() throws UnsupportedEncodingException { + void testDecode() throws UnsupportedEncodingException { // % - %25, { - %7B, } - %7D - Assert.assertEquals("{k,v}", HttpUtils.decode("%7Bk,v%7D", "UTF-8")); - Assert.assertEquals("{k,v}", HttpUtils.decode("%257Bk,v%257D", "UTF-8")); + assertEquals("{k,v}", HttpUtils.decode("%7Bk,v%7D", "UTF-8")); + assertEquals("{k,v}", HttpUtils.decode("%257Bk,v%257D", "UTF-8")); } @Test - public void testEncodingParamsMapWithNullOrEmpty() throws UnsupportedEncodingException { + void testEncodingParamsMapWithNullOrEmpty() throws UnsupportedEncodingException { assertNull(HttpUtils.encodingParams((Map) null, "UTF-8")); assertNull(HttpUtils.encodingParams(Collections.emptyMap(), "UTF-8")); } @Test - public void testEncodingParamsMap() throws UnsupportedEncodingException { + void testEncodingParamsMap() throws UnsupportedEncodingException { Map params = new LinkedHashMap<>(); params.put("a", ""); params.put("b", "x"); @@ -260,12 +266,12 @@ public void testEncodingParamsMap() throws UnsupportedEncodingException { } @Test - public void testEncodingParamsListWithNull() throws UnsupportedEncodingException { + void testEncodingParamsListWithNull() throws UnsupportedEncodingException { assertNull(HttpUtils.encodingParams((List) null, "UTF-8")); } @Test - public void testEncodingParamsList() throws UnsupportedEncodingException { + void testEncodingParamsList() throws UnsupportedEncodingException { List params = new LinkedList<>(); params.add("a"); params.add(""); @@ -279,7 +285,7 @@ public void testEncodingParamsList() throws UnsupportedEncodingException { } @Test - public void testBuildUriForEmptyQuery() throws URISyntaxException { + void testBuildUriForEmptyQuery() throws URISyntaxException { URI actual = HttpUtils.buildUri("www.aliyun.com", null); assertEquals("www.aliyun.com", actual.toString()); actual = HttpUtils.buildUri("www.aliyun.com", new Query()); @@ -287,7 +293,7 @@ public void testBuildUriForEmptyQuery() throws URISyntaxException { } @Test - public void testBuildUri() throws URISyntaxException { + void testBuildUri() throws URISyntaxException { Query query = new Query(); query.addParam("a", ""); query.addParam("b", "x"); @@ -298,7 +304,7 @@ public void testBuildUri() throws URISyntaxException { } @Test - public void testIsTimeoutException() { + void testIsTimeoutException() { assertFalse(HttpUtils.isTimeoutException(new NacosRuntimeException(0))); assertTrue(HttpUtils.isTimeoutException(new TimeoutException())); assertTrue(HttpUtils.isTimeoutException(new SocketTimeoutException())); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/AbstractNacosRestTemplateTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/AbstractNacosRestTemplateTest.java index 5aa209f330a..3972f1f2039 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/AbstractNacosRestTemplateTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/AbstractNacosRestTemplateTest.java @@ -21,50 +21,49 @@ import com.alibaba.nacos.common.http.client.handler.RestResultResponseHandler; import com.alibaba.nacos.common.http.client.handler.StringResponseHandler; import com.alibaba.nacos.common.model.RestResult; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.slf4j.Logger; import java.lang.reflect.Type; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(MockitoJUnitRunner.class) -public class AbstractNacosRestTemplateTest { +@ExtendWith(MockitoExtension.class) +class AbstractNacosRestTemplateTest { + + MockNacosRestTemplate restTemplate; @Mock private ResponseHandler mockResponseHandler; - MockNacosRestTemplate restTemplate; - - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { restTemplate = new MockNacosRestTemplate(null); restTemplate.registerResponseHandler(MockNacosRestTemplate.class.getName(), mockResponseHandler); } @Test - public void testSelectResponseHandlerForNull() { + void testSelectResponseHandlerForNull() { assertTrue(restTemplate.testFindResponseHandler(null) instanceof StringResponseHandler); } @Test - public void testSelectResponseHandlerForRestResult() { + void testSelectResponseHandlerForRestResult() { assertTrue(restTemplate.testFindResponseHandler(RestResult.class) instanceof RestResultResponseHandler); } @Test - public void testSelectResponseHandlerForDefault() { - assertTrue(restTemplate - .testFindResponseHandler(AbstractNacosRestTemplateTest.class) instanceof BeanResponseHandler); + void testSelectResponseHandlerForDefault() { + assertTrue(restTemplate.testFindResponseHandler(AbstractNacosRestTemplateTest.class) instanceof BeanResponseHandler); } @Test - public void testSelectResponseHandlerForCustom() { + void testSelectResponseHandlerForCustom() { assertEquals(mockResponseHandler, restTemplate.testFindResponseHandler(MockNacosRestTemplate.class)); } diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/InterceptingHttpClientRequestTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/InterceptingHttpClientRequestTest.java index e27941b5858..41aa961aea9 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/InterceptingHttpClientRequestTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/InterceptingHttpClientRequestTest.java @@ -21,23 +21,29 @@ import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.common.http.param.Query; import com.alibaba.nacos.common.model.RequestHttpEntity; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.net.URI; import java.util.LinkedList; import java.util.List; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class InterceptingHttpClientRequestTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class InterceptingHttpClientRequestTest { + + InterceptingHttpClientRequest clientRequest; @Mock private HttpClientRequest httpClientRequest; @@ -51,10 +57,8 @@ public class InterceptingHttpClientRequestTest { @Mock private HttpClientResponse httpClientResponse; - InterceptingHttpClientRequest clientRequest; - - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { List interceptorList = new LinkedList<>(); interceptorList.add(interceptor); clientRequest = new InterceptingHttpClientRequest(httpClientRequest, interceptorList.listIterator()); @@ -62,23 +66,23 @@ public void setUp() throws Exception { when(httpClientRequest.execute(any(), any(), any())).thenReturn(httpClientResponse); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { clientRequest.close(); } @Test - public void testExecuteIntercepted() throws Exception { + void testExecuteIntercepted() throws Exception { when(interceptor.isIntercept(any(), any(), any())).thenReturn(true); - HttpClientResponse response = clientRequest - .execute(URI.create("http://example.com"), "GET", new RequestHttpEntity(Header.EMPTY, Query.EMPTY)); + HttpClientResponse response = clientRequest.execute(URI.create("http://example.com"), "GET", + new RequestHttpEntity(Header.EMPTY, Query.EMPTY)); assertEquals(interceptorResponse, response); } @Test - public void testExecuteNotIntercepted() throws Exception { - HttpClientResponse response = clientRequest - .execute(URI.create("http://example.com"), "GET", new RequestHttpEntity(Header.EMPTY, Query.EMPTY)); + void testExecuteNotIntercepted() throws Exception { + HttpClientResponse response = clientRequest.execute(URI.create("http://example.com"), "GET", + new RequestHttpEntity(Header.EMPTY, Query.EMPTY)); assertEquals(httpClientResponse, response); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/NacosAsyncRestTemplateTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/NacosAsyncRestTemplateTest.java index a3749a8e694..ecb2bc7016b 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/NacosAsyncRestTemplateTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/NacosAsyncRestTemplateTest.java @@ -22,25 +22,25 @@ import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.common.http.param.MediaType; import com.alibaba.nacos.common.http.param.Query; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.slf4j.Logger; import java.util.HashMap; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class NacosAsyncRestTemplateTest { +@ExtendWith(MockitoExtension.class) +class NacosAsyncRestTemplateTest { private static final String TEST_URL = "http://127.0.0.1:8848/nacos/test"; @@ -55,25 +55,25 @@ public class NacosAsyncRestTemplateTest { private NacosAsyncRestTemplate restTemplate; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { restTemplate = new NacosAsyncRestTemplate(logger, requestClient); when(logger.isDebugEnabled()).thenReturn(true); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { restTemplate.close(); } @Test - public void testGet() throws Exception { + void testGet() throws Exception { restTemplate.get(TEST_URL, Header.EMPTY, Query.EMPTY, String.class, mockCallback); verify(requestClient).execute(any(), eq("GET"), any(), any(), eq(mockCallback)); } @Test - public void testGetWithException() throws Exception { + void testGetWithException() throws Exception { doThrow(new RuntimeException("test")).when(requestClient).execute(any(), any(), any(), any(), any()); restTemplate.get(TEST_URL, Header.EMPTY, Query.EMPTY, String.class, mockCallback); verify(requestClient).execute(any(), eq("GET"), any(), any(), eq(mockCallback)); @@ -81,31 +81,31 @@ public void testGetWithException() throws Exception { } @Test - public void testGetLarge() throws Exception { + void testGetLarge() throws Exception { restTemplate.getLarge(TEST_URL, Header.EMPTY, Query.EMPTY, new Object(), String.class, mockCallback); verify(requestClient).execute(any(), eq("GET-LARGE"), any(), any(), eq(mockCallback)); } @Test - public void testDeleteWithBody() throws Exception { + void testDeleteWithBody() throws Exception { restTemplate.delete(TEST_URL, Header.EMPTY, Query.EMPTY, String.class, mockCallback); verify(requestClient).execute(any(), eq("DELETE"), any(), any(), eq(mockCallback)); } @Test - public void testDeleteLarge() throws Exception { + void testDeleteLarge() throws Exception { restTemplate.delete(TEST_URL, Header.EMPTY, "body", String.class, mockCallback); verify(requestClient).execute(any(), eq("DELETE_LARGE"), any(), any(), eq(mockCallback)); } @Test - public void testPut() throws Exception { + void testPut() throws Exception { restTemplate.put(TEST_URL, Header.EMPTY, Query.EMPTY, "body", String.class, mockCallback); verify(requestClient).execute(any(), eq("PUT"), any(), any(), eq(mockCallback)); } @Test - public void testPutJson() throws Exception { + void testPutJson() throws Exception { Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); restTemplate.putJson(TEST_URL, header, "body", String.class, mockCallback); verify(requestClient).execute(any(), eq("PUT"), any(), any(), eq(mockCallback)); @@ -113,7 +113,7 @@ public void testPutJson() throws Exception { } @Test - public void testPutJsonWithQuery() throws Exception { + void testPutJsonWithQuery() throws Exception { Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); restTemplate.putJson(TEST_URL, header, Query.EMPTY, "body", String.class, mockCallback); verify(requestClient).execute(any(), eq("PUT"), any(), any(), eq(mockCallback)); @@ -121,7 +121,7 @@ public void testPutJsonWithQuery() throws Exception { } @Test - public void testPutForm() throws Exception { + void testPutForm() throws Exception { Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); restTemplate.putForm(TEST_URL, header, new HashMap<>(), String.class, mockCallback); verify(requestClient).execute(any(), eq("PUT"), any(), any(), eq(mockCallback)); @@ -129,7 +129,7 @@ public void testPutForm() throws Exception { } @Test - public void testPutFormWithQuery() throws Exception { + void testPutFormWithQuery() throws Exception { Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); restTemplate.putForm(TEST_URL, header, Query.EMPTY, new HashMap<>(), String.class, mockCallback); verify(requestClient).execute(any(), eq("PUT"), any(), any(), eq(mockCallback)); @@ -137,13 +137,13 @@ public void testPutFormWithQuery() throws Exception { } @Test - public void testPost() throws Exception { + void testPost() throws Exception { restTemplate.post(TEST_URL, Header.EMPTY, Query.EMPTY, "body", String.class, mockCallback); verify(requestClient).execute(any(), eq("POST"), any(), any(), eq(mockCallback)); } @Test - public void testPostJson() throws Exception { + void testPostJson() throws Exception { Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); restTemplate.postJson(TEST_URL, header, "body", String.class, mockCallback); verify(requestClient).execute(any(), eq("POST"), any(), any(), eq(mockCallback)); @@ -151,7 +151,7 @@ public void testPostJson() throws Exception { } @Test - public void testPostJsonWithQuery() throws Exception { + void testPostJsonWithQuery() throws Exception { Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); restTemplate.postJson(TEST_URL, header, Query.EMPTY, "body", String.class, mockCallback); verify(requestClient).execute(any(), eq("POST"), any(), any(), eq(mockCallback)); @@ -159,7 +159,7 @@ public void testPostJsonWithQuery() throws Exception { } @Test - public void testPostForm() throws Exception { + void testPostForm() throws Exception { Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); restTemplate.postForm(TEST_URL, header, new HashMap<>(), String.class, mockCallback); verify(requestClient).execute(any(), eq("POST"), any(), any(), eq(mockCallback)); @@ -167,7 +167,7 @@ public void testPostForm() throws Exception { } @Test - public void testPostFormWithQuery() throws Exception { + void testPostFormWithQuery() throws Exception { Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); restTemplate.postForm(TEST_URL, header, Query.EMPTY, new HashMap<>(), String.class, mockCallback); verify(requestClient).execute(any(), eq("POST"), any(), any(), eq(mockCallback)); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/NacosRestTemplateTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/NacosRestTemplateTest.java index 4682b680370..b4979a45465 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/NacosRestTemplateTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/NacosRestTemplateTest.java @@ -24,27 +24,32 @@ import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.common.http.param.MediaType; import com.alibaba.nacos.common.http.param.Query; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import org.slf4j.Logger; import java.io.ByteArrayInputStream; import java.util.Collections; import java.util.HashMap; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class NacosRestTemplateTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class NacosRestTemplateTest { @Mock private HttpClientRequest requestClient; @@ -60,8 +65,8 @@ public class NacosRestTemplateTest { private NacosRestTemplate restTemplate; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { restTemplate = new NacosRestTemplate(logger, requestClient); when(logger.isDebugEnabled()).thenReturn(true); when(mockResponse.getHeaders()).thenReturn(Header.EMPTY); @@ -69,111 +74,112 @@ public void setUp() throws Exception { when(interceptor.intercept()).thenReturn(mockResponse); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { restTemplate.close(); } @Test - public void testGetWithDefaultConfig() throws Exception { + void testGetWithDefaultConfig() throws Exception { when(requestClient.execute(any(), eq("GET"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); - HttpRestResult result = restTemplate - .get("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, String.class); + HttpRestResult result = restTemplate.get("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); } @Test - public void testGetWithCustomConfig() throws Exception { + void testGetWithCustomConfig() throws Exception { when(requestClient.execute(any(), eq("GET"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); HttpClientConfig config = HttpClientConfig.builder().setConTimeOutMillis(1000).build(); - HttpRestResult result = restTemplate - .get("http://127.0.0.1:8848/nacos/test", config, Header.EMPTY, Query.EMPTY, String.class); + HttpRestResult result = restTemplate.get("http://127.0.0.1:8848/nacos/test", config, Header.EMPTY, Query.EMPTY, + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); } @Test - public void testGetWithInterceptor() throws Exception { + void testGetWithInterceptor() throws Exception { when(mockResponse.getStatusCode()).thenReturn(300); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test interceptor".getBytes())); restTemplate.setInterceptors(Collections.singletonList(interceptor)); - HttpRestResult result = restTemplate - .get("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, String.class); + HttpRestResult result = restTemplate.get("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, + String.class); assertFalse(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test interceptor", result.getMessage()); } - @Test(expected = RuntimeException.class) - public void testGetWithException() throws Exception { - when(requestClient.execute(any(), eq("GET"), any())).thenThrow(new RuntimeException("test")); - restTemplate.get("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, String.class); + @Test + void testGetWithException() throws Exception { + assertThrows(RuntimeException.class, () -> { + when(requestClient.execute(any(), eq("GET"), any())).thenThrow(new RuntimeException("test")); + restTemplate.get("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, String.class); + }); } @Test - public void testGetLarge() throws Exception { + void testGetLarge() throws Exception { when(requestClient.execute(any(), eq("GET-LARGE"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); - HttpRestResult result = restTemplate - .getLarge("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, new Object(), String.class); + HttpRestResult result = restTemplate.getLarge("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, + new Object(), String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); } @Test - public void testDeleteWithDefaultConfig() throws Exception { + void testDeleteWithDefaultConfig() throws Exception { when(requestClient.execute(any(), eq("DELETE"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); - HttpRestResult result = restTemplate - .delete("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, String.class); + HttpRestResult result = restTemplate.delete("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); } @Test - public void testDeleteWithCustomConfig() throws Exception { + void testDeleteWithCustomConfig() throws Exception { when(requestClient.execute(any(), eq("DELETE"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); HttpClientConfig config = HttpClientConfig.builder().setConTimeOutMillis(1000).build(); - HttpRestResult result = restTemplate - .delete("http://127.0.0.1:8848/nacos/test", config, Header.EMPTY, Query.EMPTY, String.class); + HttpRestResult result = restTemplate.delete("http://127.0.0.1:8848/nacos/test", config, Header.EMPTY, Query.EMPTY, + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); } @Test - public void testPut() throws Exception { + void testPut() throws Exception { when(requestClient.execute(any(), eq("PUT"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); - HttpRestResult result = restTemplate - .put("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, new Object(), String.class); + HttpRestResult result = restTemplate.put("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, + new Object(), String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); } @Test - public void testPutJson() throws Exception { + void testPutJson() throws Exception { when(requestClient.execute(any(), eq("PUT"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .putJson("http://127.0.0.1:8848/nacos/test", header, "body", String.class); + HttpRestResult result = restTemplate.putJson("http://127.0.0.1:8848/nacos/test", header, "body", String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -181,13 +187,13 @@ public void testPutJson() throws Exception { } @Test - public void testPutJsonWithQuery() throws Exception { + void testPutJsonWithQuery() throws Exception { when(requestClient.execute(any(), eq("PUT"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .putJson("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, "body", String.class); + HttpRestResult result = restTemplate.putJson("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, "body", + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -195,13 +201,13 @@ public void testPutJsonWithQuery() throws Exception { } @Test - public void testPutForm() throws Exception { + void testPutForm() throws Exception { when(requestClient.execute(any(), eq("PUT"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .putForm("http://127.0.0.1:8848/nacos/test", header, new HashMap<>(), String.class); + HttpRestResult result = restTemplate.putForm("http://127.0.0.1:8848/nacos/test", header, new HashMap<>(), + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -209,13 +215,13 @@ public void testPutForm() throws Exception { } @Test - public void testPutFormWithQuery() throws Exception { + void testPutFormWithQuery() throws Exception { when(requestClient.execute(any(), eq("PUT"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .putForm("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, new HashMap<>(), String.class); + HttpRestResult result = restTemplate.putForm("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, + new HashMap<>(), String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -223,14 +229,14 @@ public void testPutFormWithQuery() throws Exception { } @Test - public void testPutFormWithConfig() throws Exception { + void testPutFormWithConfig() throws Exception { when(requestClient.execute(any(), eq("PUT"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); HttpClientConfig config = HttpClientConfig.builder().setConTimeOutMillis(1000).build(); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .putForm("http://127.0.0.1:8848/nacos/test", config, header, new HashMap<>(), String.class); + HttpRestResult result = restTemplate.putForm("http://127.0.0.1:8848/nacos/test", config, header, new HashMap<>(), + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -238,25 +244,24 @@ public void testPutFormWithConfig() throws Exception { } @Test - public void testPost() throws Exception { + void testPost() throws Exception { when(requestClient.execute(any(), eq("POST"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); - HttpRestResult result = restTemplate - .post("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, new Object(), String.class); + HttpRestResult result = restTemplate.post("http://127.0.0.1:8848/nacos/test", Header.EMPTY, Query.EMPTY, + new Object(), String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); } @Test - public void testPostJson() throws Exception { + void testPostJson() throws Exception { when(requestClient.execute(any(), eq("POST"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .postJson("http://127.0.0.1:8848/nacos/test", header, "body", String.class); + HttpRestResult result = restTemplate.postJson("http://127.0.0.1:8848/nacos/test", header, "body", String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -264,13 +269,13 @@ public void testPostJson() throws Exception { } @Test - public void testPostJsonWithQuery() throws Exception { + void testPostJsonWithQuery() throws Exception { when(requestClient.execute(any(), eq("POST"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .postJson("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, "body", String.class); + HttpRestResult result = restTemplate.postJson("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, "body", + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -278,13 +283,13 @@ public void testPostJsonWithQuery() throws Exception { } @Test - public void testPostForm() throws Exception { + void testPostForm() throws Exception { when(requestClient.execute(any(), eq("POST"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .postForm("http://127.0.0.1:8848/nacos/test", header, new HashMap<>(), String.class); + HttpRestResult result = restTemplate.postForm("http://127.0.0.1:8848/nacos/test", header, new HashMap<>(), + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -292,13 +297,13 @@ public void testPostForm() throws Exception { } @Test - public void testPostFormWithQuery() throws Exception { + void testPostFormWithQuery() throws Exception { when(requestClient.execute(any(), eq("POST"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .postForm("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, new HashMap<>(), String.class); + HttpRestResult result = restTemplate.postForm("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, + new HashMap<>(), String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -306,14 +311,14 @@ public void testPostFormWithQuery() throws Exception { } @Test - public void testPostFormWithConfig() throws Exception { + void testPostFormWithConfig() throws Exception { when(requestClient.execute(any(), eq("POST"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); HttpClientConfig config = HttpClientConfig.builder().setConTimeOutMillis(1000).build(); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .postForm("http://127.0.0.1:8848/nacos/test", config, header, new HashMap<>(), String.class); + HttpRestResult result = restTemplate.postForm("http://127.0.0.1:8848/nacos/test", config, header, new HashMap<>(), + String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -321,14 +326,13 @@ public void testPostFormWithConfig() throws Exception { } @Test - public void testExchangeForm() throws Exception { + void testExchangeForm() throws Exception { when(requestClient.execute(any(), eq("PUT"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML); - HttpRestResult result = restTemplate - .exchangeForm("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, new HashMap<>(), "PUT", - String.class); + HttpRestResult result = restTemplate.exchangeForm("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY, + new HashMap<>(), "PUT", String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); @@ -336,21 +340,20 @@ public void testExchangeForm() throws Exception { } @Test - public void testExchange() throws Exception { + void testExchange() throws Exception { when(requestClient.execute(any(), eq("PUT"), any())).thenReturn(mockResponse); when(mockResponse.getStatusCode()).thenReturn(200); when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes())); HttpClientConfig config = HttpClientConfig.builder().setConTimeOutMillis(1000).build(); - HttpRestResult result = restTemplate - .exchange("http://127.0.0.1:8848/nacos/test", config, Header.EMPTY, Query.EMPTY, new Object(), "PUT", - String.class); + HttpRestResult result = restTemplate.exchange("http://127.0.0.1:8848/nacos/test", config, Header.EMPTY, + Query.EMPTY, new Object(), "PUT", String.class); assertTrue(result.ok()); assertEquals(Header.EMPTY, result.getHeader()); assertEquals("test", result.getData()); } @Test - public void testGetInterceptors() { + void testGetInterceptors() { assertTrue(restTemplate.getInterceptors().isEmpty()); restTemplate.setInterceptors(Collections.singletonList(interceptor)); assertEquals(1, restTemplate.getInterceptors().size()); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/handler/BeanResponseHandlerTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/handler/BeanResponseHandlerTest.java index 7d6fe48ce62..2c33f80244e 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/handler/BeanResponseHandlerTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/handler/BeanResponseHandlerTest.java @@ -20,22 +20,22 @@ import com.alibaba.nacos.common.http.client.response.HttpClientResponse; import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.common.utils.JacksonUtils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.LinkedList; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class BeanResponseHandlerTest { +class BeanResponseHandlerTest { @Test - public void testConvertResult() throws Exception { + void testConvertResult() throws Exception { List testCase = new LinkedList<>(); for (int i = 0; i < 10; i++) { testCase.add(i); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/handler/RestResultResponseHandlerTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/handler/RestResultResponseHandlerTest.java index 19e85fc4065..35a940b7af7 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/handler/RestResultResponseHandlerTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/handler/RestResultResponseHandlerTest.java @@ -21,19 +21,19 @@ import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.common.model.RestResult; import com.alibaba.nacos.common.utils.JacksonUtils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.ByteArrayInputStream; import java.io.InputStream; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class RestResultResponseHandlerTest { +class RestResultResponseHandlerTest { @Test - public void testConvertResult() throws Exception { + void testConvertResult() throws Exception { RestResult testCase = RestResult.builder().withCode(200).withData("ok").withMsg("msg").build(); InputStream inputStream = new ByteArrayInputStream(JacksonUtils.toJsonBytes(testCase)); HttpClientResponse response = mock(HttpClientResponse.class); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/request/DefaultAsyncHttpClientRequestTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/request/DefaultAsyncHttpClientRequestTest.java index 9d1df552c94..31028b8caf4 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/request/DefaultAsyncHttpClientRequestTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/request/DefaultAsyncHttpClientRequestTest.java @@ -28,12 +28,12 @@ import org.apache.http.impl.nio.client.CloseableHttpAsyncClient; import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor; import org.apache.http.impl.nio.reactor.ExceptionEvent; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.net.URI; import java.util.Collections; @@ -41,14 +41,16 @@ import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class DefaultAsyncHttpClientRequestTest { +@ExtendWith(MockitoExtension.class) +class DefaultAsyncHttpClientRequestTest { + + DefaultAsyncHttpClientRequest httpClientRequest; @Mock private CloseableHttpAsyncClient client; @@ -64,24 +66,22 @@ public class DefaultAsyncHttpClientRequestTest { private RequestConfig defaultConfig; - DefaultAsyncHttpClientRequest httpClientRequest; - private URI uri; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { defaultConfig = RequestConfig.DEFAULT; httpClientRequest = new DefaultAsyncHttpClientRequest(client, ioReactor, defaultConfig); uri = URI.create("http://127.0.0.1:8080"); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { httpClientRequest.close(); } @Test - public void testExecuteOnFail() throws Exception { + void testExecuteOnFail() throws Exception { Header header = Header.newInstance(); Map body = new HashMap<>(); body.put("test", "test"); @@ -96,7 +96,7 @@ public void testExecuteOnFail() throws Exception { } @Test - public void testExecuteOnCancel() throws Exception { + void testExecuteOnCancel() throws Exception { Header header = Header.newInstance(); Map body = new HashMap<>(); body.put("test", "test"); @@ -110,7 +110,7 @@ public void testExecuteOnCancel() throws Exception { } @Test - public void testExecuteOnComplete() throws Exception { + void testExecuteOnComplete() throws Exception { Header header = Header.newInstance(); Map body = new HashMap<>(); body.put("test", "test"); @@ -127,7 +127,7 @@ public void testExecuteOnComplete() throws Exception { } @Test - public void testExecuteOnCompleteWithException() throws Exception { + void testExecuteOnCompleteWithException() throws Exception { Header header = Header.newInstance(); Map body = new HashMap<>(); body.put("test", "test"); @@ -144,7 +144,7 @@ public void testExecuteOnCompleteWithException() throws Exception { } @Test - public void testExecuteException() throws Exception { + void testExecuteException() throws Exception { Header header = Header.newInstance(); Map body = new HashMap<>(); body.put("test", "test"); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/request/DefaultHttpClientRequestTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/request/DefaultHttpClientRequestTest.java index 8fdcf2a084c..4af22b43a21 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/request/DefaultHttpClientRequestTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/request/DefaultHttpClientRequestTest.java @@ -29,24 +29,26 @@ import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.impl.client.CloseableHttpClient; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; import java.net.URI; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class DefaultHttpClientRequestTest { +@ExtendWith(MockitoExtension.class) +class DefaultHttpClientRequestTest { + + DefaultHttpClientRequest httpClientRequest; @Mock private CloseableHttpClient client; @@ -56,16 +58,14 @@ public class DefaultHttpClientRequestTest { private RequestConfig defaultConfig; - DefaultHttpClientRequest httpClientRequest; - private boolean isForm; private boolean withConfig; private URI uri; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { defaultConfig = RequestConfig.DEFAULT; httpClientRequest = new DefaultHttpClientRequest(client, defaultConfig); when(client.execute(argThat(httpUriRequest -> { @@ -81,18 +81,17 @@ public void setUp() throws Exception { } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { isForm = false; withConfig = false; httpClientRequest.close(); } @Test - public void testExecuteForFormWithoutConfig() throws Exception { + void testExecuteForFormWithoutConfig() throws Exception { isForm = true; - Header header = Header.newInstance() - .addParam(HttpHeaderConsts.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); + Header header = Header.newInstance().addParam(HttpHeaderConsts.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); Map body = new HashMap<>(); body.put("test", "test"); RequestHttpEntity httpEntity = new RequestHttpEntity(header, Query.EMPTY, body); @@ -101,21 +100,19 @@ public void testExecuteForFormWithoutConfig() throws Exception { } @Test - public void testExecuteForFormWithConfig() throws Exception { + void testExecuteForFormWithConfig() throws Exception { isForm = true; withConfig = true; - Header header = Header.newInstance() - .addParam(HttpHeaderConsts.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); + Header header = Header.newInstance().addParam(HttpHeaderConsts.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); Map body = new HashMap<>(); body.put("test", "test"); - RequestHttpEntity httpEntity = new RequestHttpEntity(HttpClientConfig.builder().build(), header, Query.EMPTY, - body); + RequestHttpEntity httpEntity = new RequestHttpEntity(HttpClientConfig.builder().build(), header, Query.EMPTY, body); HttpClientResponse actual = httpClientRequest.execute(uri, "PUT", httpEntity); assertEquals(response, getActualResponse(actual)); } @Test - public void testExecuteForOther() throws Exception { + void testExecuteForOther() throws Exception { Header header = Header.newInstance(); RequestHttpEntity httpEntity = new RequestHttpEntity(header, Query.EMPTY, "body"); HttpClientResponse actual = httpClientRequest.execute(uri, "PUT", httpEntity); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/request/JdkHttpClientRequestTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/request/JdkHttpClientRequestTest.java index 674ec69565e..1208fe89414 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/request/JdkHttpClientRequestTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/request/JdkHttpClientRequestTest.java @@ -23,12 +23,14 @@ import com.alibaba.nacos.common.http.param.MediaType; import com.alibaba.nacos.common.http.param.Query; import com.alibaba.nacos.common.model.RequestHttpEntity; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.io.OutputStream; import java.lang.reflect.Field; @@ -39,7 +41,7 @@ import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; @@ -47,8 +49,12 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class JdkHttpClientRequestTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class JdkHttpClientRequestTest { + + JdkHttpClientRequest httpClientRequest; @Mock private HttpURLConnection connection; @@ -62,12 +68,10 @@ public class JdkHttpClientRequestTest { @Mock private OutputStream outputStream; - JdkHttpClientRequest httpClientRequest; - private HttpClientConfig httpClientConfig; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { when(uri.toURL()).thenReturn(url); when(url.openConnection()).thenReturn(connection); when(connection.getOutputStream()).thenReturn(outputStream); @@ -75,13 +79,13 @@ public void setUp() throws Exception { httpClientRequest = new JdkHttpClientRequest(httpClientConfig); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { httpClientRequest.close(); } @Test - public void testExecuteNormal() throws Exception { + void testExecuteNormal() throws Exception { Header header = Header.newInstance(); HttpClientConfig config = HttpClientConfig.builder().build(); RequestHttpEntity httpEntity = new RequestHttpEntity(config, header, Query.EMPTY, "a=bo&dy"); @@ -92,7 +96,7 @@ public void testExecuteNormal() throws Exception { } @Test - public void testExecuteForm() throws Exception { + void testExecuteForm() throws Exception { Header header = Header.newInstance(); header.setContentType(MediaType.APPLICATION_FORM_URLENCODED); HttpClientConfig config = HttpClientConfig.builder().build(); @@ -100,14 +104,13 @@ public void testExecuteForm() throws Exception { body.put("a", "bo&dy"); RequestHttpEntity httpEntity = new RequestHttpEntity(config, header, Query.EMPTY, body); HttpClientResponse response = httpClientRequest.execute(uri, "GET", httpEntity); - byte[] writeBytes = HttpUtils.encodingParams(body, StandardCharsets.UTF_8.name()) - .getBytes(StandardCharsets.UTF_8); + byte[] writeBytes = HttpUtils.encodingParams(body, StandardCharsets.UTF_8.name()).getBytes(StandardCharsets.UTF_8); verify(outputStream).write(writeBytes, 0, writeBytes.length); assertEquals(connection, getActualConnection(response)); } @Test - public void testExecuteEmptyBody() throws Exception { + void testExecuteEmptyBody() throws Exception { Header header = Header.newInstance(); RequestHttpEntity httpEntity = new RequestHttpEntity(header, Query.EMPTY); HttpClientResponse response = httpClientRequest.execute(uri, "GET", httpEntity); @@ -116,8 +119,7 @@ public void testExecuteEmptyBody() throws Exception { } - private HttpURLConnection getActualConnection(HttpClientResponse actual) - throws IllegalAccessException, NoSuchFieldException { + private HttpURLConnection getActualConnection(HttpClientResponse actual) throws IllegalAccessException, NoSuchFieldException { Field field = actual.getClass().getDeclaredField("conn"); field.setAccessible(true); return (HttpURLConnection) field.get(actual); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/response/DefaultClientHttpResponseTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/response/DefaultClientHttpResponseTest.java index 7c10f841a41..463b9204ff2 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/response/DefaultClientHttpResponseTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/response/DefaultClientHttpResponseTest.java @@ -20,21 +20,27 @@ import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.StatusLine; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.io.IOException; import java.io.InputStream; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class DefaultClientHttpResponseTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class DefaultClientHttpResponseTest { + + DefaultClientHttpResponse clientHttpResponse; @Mock private HttpResponse response; @@ -51,10 +57,8 @@ public class DefaultClientHttpResponseTest { @Mock private Header header; - DefaultClientHttpResponse clientHttpResponse; - - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { when(httpEntity.getContent()).thenReturn(inputStream); when(response.getEntity()).thenReturn(httpEntity); when(response.getStatusLine()).thenReturn(statusLine); @@ -64,36 +68,36 @@ public void setUp() throws Exception { clientHttpResponse = new DefaultClientHttpResponse(response); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { clientHttpResponse.close(); } @Test - public void testGetStatusCode() { + void testGetStatusCode() { when(statusLine.getStatusCode()).thenReturn(200); assertEquals(200, clientHttpResponse.getStatusCode()); } @Test - public void testGetStatusText() { + void testGetStatusText() { when(statusLine.getReasonPhrase()).thenReturn("test"); assertEquals("test", clientHttpResponse.getStatusText()); } @Test - public void testGetHeaders() { + void testGetHeaders() { assertEquals(3, clientHttpResponse.getHeaders().getHeader().size()); assertEquals("testValue", clientHttpResponse.getHeaders().getValue("testName")); } @Test - public void testGetBody() throws IOException { + void testGetBody() throws IOException { assertEquals(inputStream, clientHttpResponse.getBody()); } @Test - public void testCloseResponseWithException() { + void testCloseResponseWithException() { when(response.getEntity()).thenThrow(new RuntimeException("test")); clientHttpResponse.close(); } diff --git a/common/src/test/java/com/alibaba/nacos/common/http/client/response/JdkClientHttpResponseTest.java b/common/src/test/java/com/alibaba/nacos/common/http/client/response/JdkClientHttpResponseTest.java index 438f783b5ef..f25c9835a08 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/client/response/JdkClientHttpResponseTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/client/response/JdkClientHttpResponseTest.java @@ -18,12 +18,14 @@ import com.alibaba.nacos.common.constant.HttpHeaderConsts; import com.alibaba.nacos.common.utils.IoUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -35,11 +37,15 @@ import java.util.List; import java.util.Map; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class JdkClientHttpResponseTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class JdkClientHttpResponseTest { + + JdkHttpClientResponse clientHttpResponse; @Mock private HttpURLConnection connection; @@ -49,47 +55,45 @@ public class JdkClientHttpResponseTest { private Map> headers; - JdkHttpClientResponse clientHttpResponse; - - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { headers = new HashMap<>(); headers.put("testName", Collections.singletonList("testValue")); when(connection.getHeaderFields()).thenReturn(headers); clientHttpResponse = new JdkHttpClientResponse(connection); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { clientHttpResponse.close(); } @Test - public void testGetStatusCode() throws IOException { + void testGetStatusCode() throws IOException { when(connection.getResponseCode()).thenReturn(200); assertEquals(200, clientHttpResponse.getStatusCode()); } @Test - public void testGetStatusText() throws IOException { + void testGetStatusText() throws IOException { when(connection.getResponseMessage()).thenReturn("test"); assertEquals("test", clientHttpResponse.getStatusText()); } @Test - public void testGetHeaders() { + void testGetHeaders() { assertEquals(3, clientHttpResponse.getHeaders().getHeader().size()); assertEquals("testValue", clientHttpResponse.getHeaders().getValue("testName")); } @Test - public void testGetBody() throws IOException { + void testGetBody() throws IOException { when(connection.getInputStream()).thenReturn(inputStream); assertEquals(inputStream, clientHttpResponse.getBody()); } @Test - public void testGetBodyWithGzip() throws IOException { + void testGetBodyWithGzip() throws IOException { byte[] testCase = IoUtils.tryCompress("test", StandardCharsets.UTF_8.name()); ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(testCase); when(connection.getInputStream()).thenReturn(byteArrayInputStream); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/param/HeaderTest.java b/common/src/test/java/com/alibaba/nacos/common/http/param/HeaderTest.java index 9205c0045bb..02ffef1df26 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/param/HeaderTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/param/HeaderTest.java @@ -17,7 +17,7 @@ package com.alibaba.nacos.common.http.param; import com.alibaba.nacos.common.constant.HttpHeaderConsts; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Collections; @@ -25,13 +25,14 @@ import java.util.List; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class HeaderTest { +class HeaderTest { @Test - public void testSetContentType() { + void testSetContentType() { Header header = Header.newInstance(); header.setContentType(null); assertEquals(MediaType.APPLICATION_JSON, header.getValue(HttpHeaderConsts.CONTENT_TYPE)); @@ -40,14 +41,14 @@ public void testSetContentType() { } @Test - public void testHeaderKyeIgnoreCase() { + void testHeaderKyeIgnoreCase() { Header header = Header.newInstance(); header.addParam("Content-Encoding", "gzip"); assertEquals("gzip", header.getValue("content-encoding")); } @Test - public void testToList() { + void testToList() { Header header = Header.newInstance(); List list = header.toList(); assertTrue(list.contains(HttpHeaderConsts.CONTENT_TYPE)); @@ -59,7 +60,7 @@ public void testToList() { } @Test - public void testAddAllForMap() { + void testAddAllForMap() { Map map = new HashMap<>(); map.put("test1", "test2"); map.put("test3", "test4"); @@ -71,7 +72,7 @@ public void testAddAllForMap() { } @Test - public void testAddAllForList() { + void testAddAllForList() { List list = new ArrayList<>(4); list.add("test1"); list.add("test2"); @@ -84,18 +85,20 @@ public void testAddAllForList() { assertEquals(4, header.getHeader().size()); } - @Test(expected = IllegalArgumentException.class) - public void testAddAllForListWithWrongLength() { - List list = new ArrayList<>(3); - list.add("test1"); - list.add("test2"); - list.add("test3"); - Header header = Header.newInstance(); - header.addAll(list); + @Test + void testAddAllForListWithWrongLength() { + assertThrows(IllegalArgumentException.class, () -> { + List list = new ArrayList<>(3); + list.add("test1"); + list.add("test2"); + list.add("test3"); + Header header = Header.newInstance(); + header.addAll(list); + }); } @Test - public void testAddOriginalResponseHeader() { + void testAddOriginalResponseHeader() { List list = new ArrayList<>(4); list.add("test1"); list.add("test2"); @@ -109,7 +112,7 @@ public void testAddOriginalResponseHeader() { } @Test - public void testGetCharset() { + void testGetCharset() { Header header = Header.newInstance(); assertEquals("UTF-8", header.getCharset()); header.addParam(HttpHeaderConsts.ACCEPT_CHARSET, null); @@ -124,7 +127,7 @@ public void testGetCharset() { } @Test - public void testClear() { + void testClear() { Header header = Header.newInstance(); header.addOriginalResponseHeader("test", Collections.singletonList("test")); assertEquals(3, header.getHeader().size()); diff --git a/common/src/test/java/com/alibaba/nacos/common/http/param/MediaTypeTest.java b/common/src/test/java/com/alibaba/nacos/common/http/param/MediaTypeTest.java index 86493082e2a..a4ae8f1b494 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/param/MediaTypeTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/param/MediaTypeTest.java @@ -16,19 +16,20 @@ package com.alibaba.nacos.common.http.param; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; /** * MediaTypeTest. * * @author mai.jh */ -public class MediaTypeTest { +class MediaTypeTest { @Test - public void testValueOf() { + void testValueOf() { MediaType mediaType = MediaType.valueOf(MediaType.APPLICATION_FORM_URLENCODED); String type = "application/x-www-form-urlencoded"; String charset = "UTF-8"; @@ -38,7 +39,7 @@ public void testValueOf() { } @Test - public void testValueOf2() { + void testValueOf2() { MediaType mediaType = MediaType.valueOf(MediaType.APPLICATION_FORM_URLENCODED, "ISO-8859-1"); String type = "application/x-www-form-urlencoded"; String charset = "ISO-8859-1"; @@ -49,7 +50,7 @@ public void testValueOf2() { } @Test - public void testValueOf3() { + void testValueOf3() { MediaType mediaType = MediaType.valueOf("application/x-www-form-urlencoded", "ISO-8859-1"); String type = "application/x-www-form-urlencoded"; String charset = "ISO-8859-1"; @@ -59,13 +60,17 @@ public void testValueOf3() { assertEquals(excepted, mediaType.toString()); } - @Test(expected = IllegalArgumentException.class) - public void testValueOfWithEmpty() { - MediaType.valueOf(""); + @Test + void testValueOfWithEmpty() { + assertThrows(IllegalArgumentException.class, () -> { + MediaType.valueOf(""); + }); } - @Test(expected = IllegalArgumentException.class) - public void testValueOfWithEmpty2() { - MediaType.valueOf("", "UTF-8"); + @Test + void testValueOfWithEmpty2() { + assertThrows(IllegalArgumentException.class, () -> { + MediaType.valueOf("", "UTF-8"); + }); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/http/param/QueryTest.java b/common/src/test/java/com/alibaba/nacos/common/http/param/QueryTest.java index d3196160f2a..6f85fd7e0c3 100644 --- a/common/src/test/java/com/alibaba/nacos/common/http/param/QueryTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/http/param/QueryTest.java @@ -17,21 +17,21 @@ package com.alibaba.nacos.common.http.param; import com.alibaba.nacos.api.naming.CommonParams; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.LinkedHashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class QueryTest { +class QueryTest { @Test - public void testInitParams() { + void testInitParams() { Map parameters = new LinkedHashMap(); parameters.put(CommonParams.NAMESPACE_ID, "namespace"); parameters.put(CommonParams.SERVICE_NAME, "service"); @@ -48,17 +48,18 @@ public void testInitParams() { } @Test - public void testAddParams() throws Exception { + void testAddParams() throws Exception { Query query = Query.newInstance().addParam("key-1", "value-1").addParam("key-2", "value-2"); String s1 = query.toQueryUrl(); - String s2 = "key-1=" + URLEncoder.encode("value-1", StandardCharsets.UTF_8.name()) + "&key-2=" + URLEncoder - .encode("value-2", StandardCharsets.UTF_8.name()); + String s2 = + "key-1=" + URLEncoder.encode("value-1", StandardCharsets.UTF_8.name()) + "&key-2=" + URLEncoder.encode("value-2", + StandardCharsets.UTF_8.name()); assertEquals(s2, s1); assertEquals("value-1", query.getValue("key-1")); } @Test - public void testClear() { + void testClear() { Query query = Query.newInstance().addParam("key-1", "value-1").addParam("key-2", "value-2"); assertFalse(query.isEmpty()); assertEquals("value-1", query.getValue("key-1")); diff --git a/common/src/test/java/com/alibaba/nacos/common/labels/impl/DefaultLabelsCollectorManagerTest.java b/common/src/test/java/com/alibaba/nacos/common/labels/impl/DefaultLabelsCollectorManagerTest.java index f011438c523..f624436412f 100644 --- a/common/src/test/java/com/alibaba/nacos/common/labels/impl/DefaultLabelsCollectorManagerTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/labels/impl/DefaultLabelsCollectorManagerTest.java @@ -17,38 +17,39 @@ package com.alibaba.nacos.common.labels.impl; import com.alibaba.nacos.api.common.Constants; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Map; import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * description. * * @author rong * @date 2024-02-29 20:13 */ -public class DefaultLabelsCollectorManagerTest { +class DefaultLabelsCollectorManagerTest { @Test - public void tagV2LabelsCollectorTest() { + void tagV2LabelsCollectorTest() { Properties properties = new Properties(); properties.put(Constants.APP_CONN_LABELS_KEY, "k1=v1,gray=properties_pre"); properties.put(Constants.CONFIG_GRAY_LABEL, "properties_after"); DefaultLabelsCollectorManager defaultLabelsCollectorManager = new DefaultLabelsCollectorManager(); Map labels = defaultLabelsCollectorManager.getLabels(properties); - Assert.assertEquals("properties_after", labels.get(Constants.CONFIG_GRAY_LABEL)); - Assert.assertEquals("v1", labels.get("k1")); + assertEquals("properties_after", labels.get(Constants.CONFIG_GRAY_LABEL)); + assertEquals("v1", labels.get("k1")); } @Test - public void tagV2LabelsCollectorOrderTest() { + void tagV2LabelsCollectorOrderTest() { Properties properties = new Properties(); DefaultLabelsCollectorManager defaultLabelsCollectorManager = new DefaultLabelsCollectorManager(); Map labels = defaultLabelsCollectorManager.getLabels(properties); String test = labels.get("test"); - Assert.assertEquals("test2", test); + assertEquals("test2", test); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/logging/NacosLoggingPropertiesTest.java b/common/src/test/java/com/alibaba/nacos/common/logging/NacosLoggingPropertiesTest.java index e823da97797..1224832cdc7 100644 --- a/common/src/test/java/com/alibaba/nacos/common/logging/NacosLoggingPropertiesTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/logging/NacosLoggingPropertiesTest.java @@ -16,58 +16,58 @@ package com.alibaba.nacos.common.logging; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Properties; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class NacosLoggingPropertiesTest { +class NacosLoggingPropertiesTest { NacosLoggingProperties loggingProperties; Properties properties; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { properties = new Properties(); loggingProperties = new NacosLoggingProperties("classpath:test.xml", properties); } @Test - public void testGetLocationWithDefault() { + void testGetLocationWithDefault() { assertEquals("classpath:test.xml", loggingProperties.getLocation()); } @Test - public void testGetLocationWithoutDefault() { + void testGetLocationWithoutDefault() { properties.setProperty("nacos.logging.default.config.enabled", "false"); assertNull(loggingProperties.getLocation()); } @Test - public void testGetLocationForSpecified() { + void testGetLocationForSpecified() { properties.setProperty("nacos.logging.config", "classpath:specified-test.xml"); properties.setProperty("nacos.logging.default.config.enabled", "false"); assertEquals("classpath:specified-test.xml", loggingProperties.getLocation()); } @Test - public void testGetLocationForSpecifiedWithDefault() { + void testGetLocationForSpecifiedWithDefault() { properties.setProperty("nacos.logging.config", "classpath:specified-test.xml"); assertEquals("classpath:specified-test.xml", loggingProperties.getLocation()); } @Test - public void testGetReloadInternal() { + void testGetReloadInternal() { properties.setProperty("nacos.logging.reload.interval.seconds", "50000"); assertEquals(50000L, loggingProperties.getReloadInternal()); } @Test - public void testGetValue() { + void testGetValue() { properties.setProperty("test.key", "test.value"); assertEquals("test.value", loggingProperties.getValue("test.key", "default.value")); properties.clear(); diff --git a/common/src/test/java/com/alibaba/nacos/common/model/RequestHttpEntityTest.java b/common/src/test/java/com/alibaba/nacos/common/model/RequestHttpEntityTest.java index 3abfaeead32..e1d0b438625 100644 --- a/common/src/test/java/com/alibaba/nacos/common/model/RequestHttpEntityTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/model/RequestHttpEntityTest.java @@ -19,20 +19,20 @@ import com.alibaba.nacos.common.http.HttpClientConfig; import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.common.http.param.Query; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.HashMap; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(MockitoJUnitRunner.class) -public class RequestHttpEntityTest { +@ExtendWith(MockitoExtension.class) +class RequestHttpEntityTest { Header header; @@ -42,8 +42,8 @@ public class RequestHttpEntityTest { Object body; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { header = Header.newInstance(); header.addParam("testHeader", "test"); query = Query.newInstance(); @@ -53,7 +53,7 @@ public void setUp() throws Exception { } @Test - public void testConstructWithoutConfigAndBody() { + void testConstructWithoutConfigAndBody() { RequestHttpEntity entity = new RequestHttpEntity(header, query); assertTrue(entity.isEmptyBody()); assertNull(entity.getHttpClientConfig()); @@ -63,7 +63,7 @@ public void testConstructWithoutConfigAndBody() { } @Test - public void testConstructWithoutConfigAndQuery() { + void testConstructWithoutConfigAndQuery() { RequestHttpEntity entity = new RequestHttpEntity(header, body); assertFalse(entity.isEmptyBody()); assertNull(entity.getHttpClientConfig()); @@ -73,7 +73,7 @@ public void testConstructWithoutConfigAndQuery() { } @Test - public void testConstructWithoutConfig() { + void testConstructWithoutConfig() { RequestHttpEntity entity = new RequestHttpEntity(header, query, body); assertFalse(entity.isEmptyBody()); assertNull(entity.getHttpClientConfig()); @@ -83,7 +83,7 @@ public void testConstructWithoutConfig() { } @Test - public void testConstructFull() { + void testConstructFull() { RequestHttpEntity entity = new RequestHttpEntity(clientConfig, header, query, body); assertFalse(entity.isEmptyBody()); assertEquals(clientConfig, entity.getHttpClientConfig()); diff --git a/common/src/test/java/com/alibaba/nacos/common/model/RestResultTest.java b/common/src/test/java/com/alibaba/nacos/common/model/RestResultTest.java index 4e66227d050..b82bed6236c 100644 --- a/common/src/test/java/com/alibaba/nacos/common/model/RestResultTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/model/RestResultTest.java @@ -17,15 +17,15 @@ package com.alibaba.nacos.common.model; import com.alibaba.nacos.common.utils.JacksonUtils; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class RestResultTest { +class RestResultTest { @Test - public void testSerialization() { + void testSerialization() { RestResult result = new RestResult<>(200, "test", "content"); String json = JacksonUtils.toJson(result); assertTrue(json.contains("\"code\":200")); @@ -34,7 +34,7 @@ public void testSerialization() { } @Test - public void testDeserialization() { + void testDeserialization() { String json = "{\"code\":200,\"message\":\"test\",\"data\":\"content\"}"; RestResult restResult = JacksonUtils.toObj(json, RestResult.class); assertEquals(200, restResult.getCode()); diff --git a/common/src/test/java/com/alibaba/nacos/common/model/RestResultUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/model/RestResultUtilsTest.java index 076f4afe5f7..3d0aa35e8f2 100644 --- a/common/src/test/java/com/alibaba/nacos/common/model/RestResultUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/model/RestResultUtilsTest.java @@ -17,68 +17,68 @@ package com.alibaba.nacos.common.model; import com.alibaba.nacos.common.model.core.IResultCode; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class RestResultUtilsTest { +class RestResultUtilsTest { @Test - public void testSuccessWithDefault() { + void testSuccessWithDefault() { RestResult restResult = RestResultUtils.success(); assertRestResult(restResult, 200, null, null, true); } @Test - public void testSuccessWithData() { + void testSuccessWithData() { RestResult restResult = RestResultUtils.success("content"); assertRestResult(restResult, 200, null, "content", true); } @Test - public void testSuccessWithMsg() { + void testSuccessWithMsg() { RestResult restResult = RestResultUtils.success("test", "content"); assertRestResult(restResult, 200, "test", "content", true); } @Test - public void testSuccessWithCode() { + void testSuccessWithCode() { RestResult restResult = RestResultUtils.success(203, "content"); assertRestResult(restResult, 203, null, "content", false); } @Test - public void testFailedWithDefault() { + void testFailedWithDefault() { RestResult restResult = RestResultUtils.failed(); assertRestResult(restResult, 500, null, null, false); } @Test - public void testFailedWithMsg() { + void testFailedWithMsg() { RestResult restResult = RestResultUtils.failed("test"); assertRestResult(restResult, 500, "test", null, false); } @Test - public void testFailedWithCode() { + void testFailedWithCode() { RestResult restResult = RestResultUtils.failed(400, "content"); assertRestResult(restResult, 400, null, "content", false); } @Test - public void testSuccessWithFull() { + void testSuccessWithFull() { RestResult restResult = RestResultUtils.failed(400, "content", "test"); assertRestResult(restResult, 400, "test", "content", false); } @Test - public void testFailedWithMsgMethod() { + void testFailedWithMsgMethod() { RestResult restResult = RestResultUtils.failedWithMsg(400, "content"); assertRestResult(restResult, 400, "content", null, false); } @Test - public void testBuildResult() { + void testBuildResult() { IResultCode mockCode = new IResultCode() { @Override public int getCode() { diff --git a/common/src/test/java/com/alibaba/nacos/common/notify/DefaultPublisherTest.java b/common/src/test/java/com/alibaba/nacos/common/notify/DefaultPublisherTest.java index 53ac32dfaec..ccc1a676abd 100644 --- a/common/src/test/java/com/alibaba/nacos/common/notify/DefaultPublisherTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/notify/DefaultPublisherTest.java @@ -17,18 +17,19 @@ package com.alibaba.nacos.common.notify; import com.alibaba.nacos.common.notify.listener.Subscriber; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; @@ -37,22 +38,22 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class DefaultPublisherTest { +@ExtendWith(MockitoExtension.class) +class DefaultPublisherTest { private DefaultPublisher publisher; @Mock private Subscriber subscriber; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { publisher = new DefaultPublisher(); publisher.init(MockEvent.class, 1); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { try { publisher.shutdown(); } catch (Exception ignored) { @@ -60,29 +61,31 @@ public void tearDown() throws Exception { } @Test - public void testInitWithIllegalSize() { + void testInitWithIllegalSize() { publisher.shutdown(); publisher = new DefaultPublisher(); publisher.init(MockEvent.class, -1); assertTrue(publisher.isInitialized()); } - @Test(expected = IllegalStateException.class) - public void testCheckIsStart() { - publisher.shutdown(); - publisher = new DefaultPublisher(); - publisher.checkIsStart(); + @Test + void testCheckIsStart() { + assertThrows(IllegalStateException.class, () -> { + publisher.shutdown(); + publisher = new DefaultPublisher(); + publisher.checkIsStart(); + }); } @Test - public void testCurrentEventSize() { + void testCurrentEventSize() { assertEquals(0, publisher.currentEventSize()); publisher.publish(new MockEvent()); assertEquals(1, publisher.currentEventSize()); } @Test - public void testRemoveSubscriber() { + void testRemoveSubscriber() { publisher.addSubscriber(subscriber); assertEquals(1, publisher.getSubscribers().size()); publisher.removeSubscriber(subscriber); @@ -90,7 +93,7 @@ public void testRemoveSubscriber() { } @Test - public void publishEventWhenQueueFull() { + void publishEventWhenQueueFull() { // Stop the publisher thread to mock queue full. publisher.shutdown(); publisher.publish(new MockEvent()); @@ -109,7 +112,7 @@ public void publishEventWhenQueueFull() { } @Test - public void publishEventQueueNotFull() throws InterruptedException { + void publishEventQueueNotFull() throws InterruptedException { when(subscriber.scopeMatches(any(MockEvent.class))).thenReturn(true); MockEvent mockEvent = new MockEvent(); // Make sure Publisher entry waiting subscribers. @@ -131,7 +134,7 @@ public void publishEventQueueNotFull() throws InterruptedException { } @Test - public void testHandleEventWithThrowable() throws InterruptedException { + void testHandleEventWithThrowable() throws InterruptedException { when(subscriber.scopeMatches(any(MockEvent.class))).thenReturn(true); doThrow(new RuntimeException("test")).when(subscriber).onEvent(any(MockEvent.class)); publisher.addSubscriber(subscriber); @@ -141,7 +144,7 @@ public void testHandleEventWithThrowable() throws InterruptedException { } @Test - public void testHandleEventWithExecutor() throws InterruptedException { + void testHandleEventWithExecutor() throws InterruptedException { Executor executor = mock(Executor.class); when(subscriber.scopeMatches(any(MockEvent.class))).thenReturn(true); when(subscriber.executor()).thenReturn(executor); @@ -152,7 +155,7 @@ public void testHandleEventWithExecutor() throws InterruptedException { } @Test - public void testReceiveEventWithException() throws InterruptedException { + void testReceiveEventWithException() throws InterruptedException { Executor executor = mock(Executor.class); when(subscriber.scopeMatches(any(MockEvent.class))).thenReturn(true); when(subscriber.executor()).thenThrow(new RuntimeException("test")); diff --git a/common/src/test/java/com/alibaba/nacos/common/notify/DefaultSharePublisherTest.java b/common/src/test/java/com/alibaba/nacos/common/notify/DefaultSharePublisherTest.java index 585c9d55e6e..3d297743186 100644 --- a/common/src/test/java/com/alibaba/nacos/common/notify/DefaultSharePublisherTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/notify/DefaultSharePublisherTest.java @@ -17,25 +17,25 @@ package com.alibaba.nacos.common.notify; import com.alibaba.nacos.common.notify.listener.SmartSubscriber; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class DefaultSharePublisherTest { +@ExtendWith(MockitoExtension.class) +class DefaultSharePublisherTest { private static final AtomicLong TEST_SEQUENCE = new AtomicLong(); @@ -47,19 +47,19 @@ public class DefaultSharePublisherTest { @Mock SmartSubscriber smartSubscriber2; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { defaultSharePublisher = new DefaultSharePublisher(); defaultSharePublisher.init(SlowEvent.class, 2); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { defaultSharePublisher.shutdown(); } @Test - public void testRemoveSubscribers() { + void testRemoveSubscribers() { defaultSharePublisher.addSubscriber(smartSubscriber1, MockSlowEvent1.class); defaultSharePublisher.addSubscriber(smartSubscriber1, MockSlowEvent2.class); defaultSharePublisher.addSubscriber(smartSubscriber2, MockSlowEvent2.class); @@ -71,7 +71,7 @@ public void testRemoveSubscribers() { } @Test - public void testReceiveEventWithoutSubscriber() { + void testReceiveEventWithoutSubscriber() { defaultSharePublisher.addSubscriber(smartSubscriber1, MockSlowEvent1.class); defaultSharePublisher.addSubscriber(smartSubscriber2, MockSlowEvent2.class); defaultSharePublisher.receiveEvent(new SlowEvent() { @@ -87,7 +87,7 @@ public long sequence() { } @Test - public void testReceiveEventWithSubscriber() { + void testReceiveEventWithSubscriber() { defaultSharePublisher.addSubscriber(smartSubscriber1, MockSlowEvent1.class); defaultSharePublisher.addSubscriber(smartSubscriber2, MockSlowEvent2.class); defaultSharePublisher.receiveEvent(new MockSlowEvent1()); @@ -99,7 +99,7 @@ public void testReceiveEventWithSubscriber() { } @Test - public void testIgnoreExpiredEvent() throws InterruptedException { + void testIgnoreExpiredEvent() throws InterruptedException { MockSlowEvent1 mockSlowEvent1 = new MockSlowEvent1(); MockSlowEvent2 mockSlowEvent2 = new MockSlowEvent2(); defaultSharePublisher.addSubscriber(smartSubscriber1, MockSlowEvent1.class); diff --git a/common/src/test/java/com/alibaba/nacos/common/notify/NotifyCenterTest.java b/common/src/test/java/com/alibaba/nacos/common/notify/NotifyCenterTest.java index aed060a2cff..cc1c255486e 100644 --- a/common/src/test/java/com/alibaba/nacos/common/notify/NotifyCenterTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/notify/NotifyCenterTest.java @@ -20,13 +20,12 @@ import com.alibaba.nacos.common.notify.listener.SmartSubscriber; import com.alibaba.nacos.common.notify.listener.Subscriber; import com.alibaba.nacos.common.utils.ThreadUtils; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.Collections; import java.util.LinkedList; @@ -36,23 +35,24 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class NotifyCenterTest { +@ExtendWith(MockitoExtension.class) +class NotifyCenterTest { + + private static AtomicInteger count; static { System.setProperty("nacos.core.notify.share-buffer-size", "8"); } - private static AtomicInteger count; - SmartSubscriber smartSubscriber; Subscriber subscriber; @@ -60,8 +60,8 @@ public class NotifyCenterTest { @Mock ShardedEventPublisher shardedEventPublisher; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { count = new AtomicInteger(); NotifyCenter.registerToSharePublisher(TestSlowEvent.class); NotifyCenter.registerToPublisher(TestSlowEvent1.class, 10); @@ -70,8 +70,8 @@ public void setUp() throws Exception { NotifyCenter.registerToPublisher(SharedEvent.class, shardedEventPublisher); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { if (null != smartSubscriber) { NotifyCenter.deregisterSubscriber(smartSubscriber); } @@ -83,45 +83,45 @@ public void tearDown() throws Exception { } @Test - public void testRegisterNullPublisher() { + void testRegisterNullPublisher() { int originalSize = NotifyCenter.getPublisherMap().size(); NotifyCenter.registerToPublisher(NoPublisherEvent.class, null); assertEquals(originalSize, NotifyCenter.getPublisherMap().size()); } @Test - public void testGetPublisher() { + void testGetPublisher() { assertEquals(NotifyCenter.getSharePublisher(), NotifyCenter.getPublisher(TestSlowEvent.class)); assertTrue(NotifyCenter.getPublisher(TestEvent.class) instanceof DefaultPublisher); } @Test - public void testEventsCanBeSubscribed() { + void testEventsCanBeSubscribed() { subscriber = new MockSubscriber<>(TestEvent.class, false); smartSubscriber = new MockSmartSubscriber(Collections.singletonList(TestSlowEvent.class)); NotifyCenter.registerSubscriber(subscriber); NotifyCenter.registerSubscriber(smartSubscriber); - Assert.assertTrue(NotifyCenter.publishEvent(new TestEvent())); - Assert.assertTrue(NotifyCenter.publishEvent(new TestSlowEvent())); + assertTrue(NotifyCenter.publishEvent(new TestEvent())); + assertTrue(NotifyCenter.publishEvent(new TestSlowEvent())); ThreadUtils.sleep(2000L); assertEquals(2, count.get()); } @Test - public void testCanIgnoreExpireEvent() throws Exception { + void testCanIgnoreExpireEvent() throws Exception { NotifyCenter.registerToPublisher(ExpireEvent.class, 16); CountDownLatch latch = new CountDownLatch(3); subscriber = new MockSubscriber<>(ExpireEvent.class, true, latch); NotifyCenter.registerSubscriber(subscriber); for (int i = 0; i < 3; i++) { - Assert.assertTrue(NotifyCenter.publishEvent(new ExpireEvent(3 - i))); + assertTrue(NotifyCenter.publishEvent(new ExpireEvent(3 - i))); } latch.await(5000L, TimeUnit.MILLISECONDS); assertEquals(1, count.get()); } @Test - public void testSharePublishEvent() throws InterruptedException { + void testSharePublishEvent() throws InterruptedException { CountDownLatch latch = new CountDownLatch(20); Subscriber subscriber = new MockSubscriber<>(TestSlowEvent.class, false, latch); Subscriber subscriber1 = new MockSubscriber<>(TestSlowEvent1.class, false, latch); @@ -129,8 +129,8 @@ public void testSharePublishEvent() throws InterruptedException { NotifyCenter.registerSubscriber(subscriber); NotifyCenter.registerSubscriber(subscriber1); for (int i = 0; i < 10; i++) { - Assert.assertTrue(NotifyCenter.publishEvent(new TestSlowEvent())); - Assert.assertTrue(NotifyCenter.publishEvent(new TestSlowEvent1())); + assertTrue(NotifyCenter.publishEvent(new TestSlowEvent())); + assertTrue(NotifyCenter.publishEvent(new TestSlowEvent1())); } latch.await(5000L, TimeUnit.MILLISECONDS); assertEquals(20, count.get()); @@ -141,7 +141,7 @@ public void testSharePublishEvent() throws InterruptedException { } @Test - public void testMutipleSlowEventsListenedBySmartSubscriber() throws Exception { + void testMutipleSlowEventsListenedBySmartSubscriber() throws Exception { List> subscribedEvents = new LinkedList<>(); subscribedEvents.add(TestSlowEvent.class); subscribedEvents.add(TestSlowEvent1.class); @@ -149,15 +149,15 @@ public void testMutipleSlowEventsListenedBySmartSubscriber() throws Exception { smartSubscriber = new MockSmartSubscriber(subscribedEvents, latch); NotifyCenter.registerSubscriber(smartSubscriber); for (int i = 0; i < 3; i++) { - Assert.assertTrue(NotifyCenter.publishEvent(new TestSlowEvent())); - Assert.assertTrue(NotifyCenter.publishEvent(new TestSlowEvent1())); + assertTrue(NotifyCenter.publishEvent(new TestSlowEvent())); + assertTrue(NotifyCenter.publishEvent(new TestSlowEvent1())); } latch.await(5000L, TimeUnit.MILLISECONDS); assertEquals(6, count.get()); } @Test - public void testMutipleKindsEventsCanListenBySmartsubscriber() throws Exception { + void testMutipleKindsEventsCanListenBySmartsubscriber() throws Exception { List> subscribedEvents = new LinkedList<>(); subscribedEvents.add(TestEvent.class); subscribedEvents.add(TestSlowEvent.class); @@ -165,29 +165,29 @@ public void testMutipleKindsEventsCanListenBySmartsubscriber() throws Exception smartSubscriber = new MockSmartSubscriber(subscribedEvents, latch); NotifyCenter.registerSubscriber(smartSubscriber); for (int i = 0; i < 3; i++) { - Assert.assertTrue(NotifyCenter.publishEvent(new TestEvent())); - Assert.assertTrue(NotifyCenter.publishEvent(new TestSlowEvent())); + assertTrue(NotifyCenter.publishEvent(new TestEvent())); + assertTrue(NotifyCenter.publishEvent(new TestSlowEvent())); } latch.await(5000L, TimeUnit.MILLISECONDS); assertEquals(6, count.get()); } @Test - public void testPublishEventByNoPublisher() { + void testPublishEventByNoPublisher() { for (int i = 0; i < 3; i++) { - Assert.assertFalse(NotifyCenter.publishEvent(new NoPublisherEvent())); + assertFalse(NotifyCenter.publishEvent(new NoPublisherEvent())); } } @Test - public void testPublishEventByPluginEvent() { + void testPublishEventByPluginEvent() { for (int i = 0; i < 3; i++) { - Assert.assertTrue(NotifyCenter.publishEvent(new PluginEvent())); + assertTrue(NotifyCenter.publishEvent(new PluginEvent())); } } @Test - public void testDeregisterPublisherWithException() throws NacosException { + void testDeregisterPublisherWithException() throws NacosException { final int originalSize = NotifyCenter.getPublisherMap().size(); doThrow(new RuntimeException("test")).when(shardedEventPublisher).shutdown(); NotifyCenter.getPublisherMap().put(SharedEvent.class.getCanonicalName(), shardedEventPublisher); @@ -196,14 +196,14 @@ public void testDeregisterPublisherWithException() throws NacosException { } @Test - public void testPublishEventWithException() { + void testPublishEventWithException() { when(shardedEventPublisher.publish(any(Event.class))).thenThrow(new RuntimeException("test")); NotifyCenter.getPublisherMap().put(SharedEvent.class.getCanonicalName(), shardedEventPublisher); assertFalse(NotifyCenter.publishEvent(new SharedEvent())); } @Test - public void testOperateSubscriberForShardedPublisher() { + void testOperateSubscriberForShardedPublisher() { subscriber = new MockSubscriber(SharedEvent.class, false); NotifyCenter.getPublisherMap().put(SharedEvent.class.getCanonicalName(), shardedEventPublisher); NotifyCenter.registerSubscriber(subscriber); @@ -212,14 +212,16 @@ public void testOperateSubscriberForShardedPublisher() { verify(shardedEventPublisher).removeSubscriber(subscriber, SharedEvent.class); } - @Test(expected = NoSuchElementException.class) - public void testDeregisterNonExistSubscriber() { - try { - subscriber = new MockSubscriber(NoPublisherEvent.class, false); - NotifyCenter.deregisterSubscriber(subscriber); - } finally { - subscriber = null; - } + @Test + void testDeregisterNonExistSubscriber() { + assertThrows(NoSuchElementException.class, () -> { + try { + subscriber = new MockSubscriber(NoPublisherEvent.class, false); + NotifyCenter.deregisterSubscriber(subscriber); + } finally { + subscriber = null; + } + }); } private static class MockSubscriber extends Subscriber { @@ -314,14 +316,14 @@ private static class NoPublisherEvent extends Event { } private static class SharedEvent extends Event { - + private static final long serialVersionUID = 7648766983252000074L; } private static class PluginEvent extends Event { - + private static final long serialVersionUID = -7787588724415976798L; - + @Override public boolean isPluginEvent() { return true; diff --git a/common/src/test/java/com/alibaba/nacos/common/packagescan/DefaultPackageScanTest.java b/common/src/test/java/com/alibaba/nacos/common/packagescan/DefaultPackageScanTest.java index 6eb7e07318d..07734e6c371 100644 --- a/common/src/test/java/com/alibaba/nacos/common/packagescan/DefaultPackageScanTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/packagescan/DefaultPackageScanTest.java @@ -21,11 +21,11 @@ import com.alibaba.nacos.common.packagescan.mock.TestScan; import com.alibaba.nacos.common.packagescan.resource.PathMatchingResourcePatternResolver; import com.alibaba.nacos.common.packagescan.resource.Resource; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -33,44 +33,44 @@ import java.lang.reflect.Field; import java.util.Set; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class DefaultPackageScanTest { +@ExtendWith(MockitoExtension.class) +class DefaultPackageScanTest { @Mock PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver; DefaultPackageScan packageScan; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { packageScan = new DefaultPackageScan(); } @Test - public void testGetSubTypesOf() { + void testGetSubTypesOf() { packageScan = new DefaultPackageScan(); - Set> subTypesOf = packageScan - .getSubTypesOf(AnnotationClass.class.getPackage().getName(), MockClass.class); + Set> subTypesOf = packageScan.getSubTypesOf(AnnotationClass.class.getPackage().getName(), + MockClass.class); assertEquals(3, subTypesOf.size()); } @Test - public void testGetTypesAnnotatedWith() { + void testGetTypesAnnotatedWith() { packageScan = new DefaultPackageScan(); - Set> actual = packageScan - .getTypesAnnotatedWith(AnnotationClass.class.getPackage().getName(), TestScan.class); + Set> actual = packageScan.getTypesAnnotatedWith(AnnotationClass.class.getPackage().getName(), + TestScan.class); assertEquals(1, actual.size()); assertEquals(AnnotationClass.class, actual.iterator().next()); } @Test - public void testGetSubTypesOfWithException() throws NoSuchFieldException, IllegalAccessException, IOException { + void testGetSubTypesOfWithException() throws NoSuchFieldException, IllegalAccessException, IOException { setResolver(); String path = AnnotationClass.class.getPackage().getName(); when(pathMatchingResourcePatternResolver.getResources(anyString())).thenThrow(new IOException("test")); @@ -79,7 +79,7 @@ public void testGetSubTypesOfWithException() throws NoSuchFieldException, Illega } @Test - public void testGetTypesAnnotatedWithException() throws NoSuchFieldException, IllegalAccessException, IOException { + void testGetTypesAnnotatedWithException() throws NoSuchFieldException, IllegalAccessException, IOException { setResolver(); String path = AnnotationClass.class.getPackage().getName(); when(pathMatchingResourcePatternResolver.getResources(anyString())).thenThrow(new IOException("test")); @@ -88,7 +88,7 @@ public void testGetTypesAnnotatedWithException() throws NoSuchFieldException, Il } @Test - public void testClassVersionNotMatch() throws NoSuchFieldException, IllegalAccessException, IOException { + void testClassVersionNotMatch() throws NoSuchFieldException, IllegalAccessException, IOException { setResolver(); Resource resource = mock(Resource.class); byte[] testCase = new byte[8]; diff --git a/common/src/test/java/com/alibaba/nacos/common/paramcheck/DefaultParamCheckerTest.java b/common/src/test/java/com/alibaba/nacos/common/paramcheck/DefaultParamCheckerTest.java index e31d494f148..ee97e42e645 100644 --- a/common/src/test/java/com/alibaba/nacos/common/paramcheck/DefaultParamCheckerTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/paramcheck/DefaultParamCheckerTest.java @@ -16,34 +16,34 @@ package com.alibaba.nacos.common.paramcheck; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class DefaultParamCheckerTest { +class DefaultParamCheckerTest { DefaultParamChecker paramChecker; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { paramChecker = new DefaultParamChecker(); } @Test - public void testCheckerType() { + void testCheckerType() { assertEquals("default", paramChecker.getCheckerType()); } @Test - public void testCheckEmptyParamInfoList() { + void testCheckEmptyParamInfoList() { ParamCheckResponse actual = paramChecker.checkParamInfoList(null); assertTrue(actual.isSuccess()); actual = paramChecker.checkParamInfoList(Collections.emptyList()); @@ -51,7 +51,7 @@ public void testCheckEmptyParamInfoList() { } @Test - public void testCheckEmptyParamInfo() { + void testCheckEmptyParamInfo() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -61,7 +61,7 @@ public void testCheckEmptyParamInfo() { } @Test - public void testCheckParamInfoForNamespaceShowName() { + void testCheckParamInfoForNamespaceShowName() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -70,8 +70,7 @@ public void testCheckParamInfoForNamespaceShowName() { paramInfo.setNamespaceShowName(namespaceShowName); ParamCheckResponse actual = paramChecker.checkParamInfoList(paramInfos); assertFalse(actual.isSuccess()); - assertEquals("Param 'namespaceShowName' is illegal, the param length should not exceed 256.", - actual.getMessage()); + assertEquals("Param 'namespaceShowName' is illegal, the param length should not exceed 256.", actual.getMessage()); // Pattern paramInfo.setNamespaceShowName("hsbfkj@$!#khdkad"); actual = paramChecker.checkParamInfoList(paramInfos); @@ -85,7 +84,7 @@ public void testCheckParamInfoForNamespaceShowName() { } @Test - public void testCheckParamInfoForNamespaceId() { + void testCheckParamInfoForNamespaceId() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -94,8 +93,7 @@ public void testCheckParamInfoForNamespaceId() { paramInfo.setNamespaceId(namespaceId); ParamCheckResponse actual = paramChecker.checkParamInfoList(paramInfos); assertFalse(actual.isSuccess()); - assertEquals("Param 'namespaceId/tenant' is illegal, the param length should not exceed 64.", - actual.getMessage()); + assertEquals("Param 'namespaceId/tenant' is illegal, the param length should not exceed 64.", actual.getMessage()); // Pattern paramInfo.setNamespaceId("hsbfkj@$!#khdkad"); actual = paramChecker.checkParamInfoList(paramInfos); @@ -109,7 +107,7 @@ public void testCheckParamInfoForNamespaceId() { } @Test - public void testCheckParamInfoForDataId() { + void testCheckParamInfoForDataId() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -123,8 +121,7 @@ public void testCheckParamInfoForDataId() { paramInfo.setDataId("hsbfkj@$!#khdkad"); actual = paramChecker.checkParamInfoList(paramInfos); assertFalse(actual.isSuccess()); - assertEquals("Param 'dataId' is illegal, illegal characters should not appear in the param.", - actual.getMessage()); + assertEquals("Param 'dataId' is illegal, illegal characters should not appear in the param.", actual.getMessage()); // Success paramInfo.setDataId("a-zA-Z0-9-_:."); actual = paramChecker.checkParamInfoList(paramInfos); @@ -132,7 +129,7 @@ public void testCheckParamInfoForDataId() { } @Test - public void testCheckParamInfoForServiceName() { + void testCheckParamInfoForServiceName() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -146,8 +143,7 @@ public void testCheckParamInfoForServiceName() { paramInfo.setServiceName("@hsbfkj$@@!#khdkad啊"); actual = paramChecker.checkParamInfoList(paramInfos); assertFalse(actual.isSuccess()); - assertEquals("Param 'serviceName' is illegal, illegal characters should not appear in the param.", - actual.getMessage()); + assertEquals("Param 'serviceName' is illegal, illegal characters should not appear in the param.", actual.getMessage()); // Success paramInfo.setServiceName("com.aaa@bbb#_{}-b:v1.2.2"); actual = paramChecker.checkParamInfoList(paramInfos); @@ -155,7 +151,7 @@ public void testCheckParamInfoForServiceName() { } @Test - public void testCheckParamInfoForGroup() { + void testCheckParamInfoForGroup() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -169,8 +165,7 @@ public void testCheckParamInfoForGroup() { paramInfo.setGroup("@hsbfkj$@@!#khdkad啊@@"); actual = paramChecker.checkParamInfoList(paramInfos); assertFalse(actual.isSuccess()); - assertEquals("Param 'group' is illegal, illegal characters should not appear in the param.", - actual.getMessage()); + assertEquals("Param 'group' is illegal, illegal characters should not appear in the param.", actual.getMessage()); // Success paramInfo.setGroup("a-zA-Z0-9-_:."); actual = paramChecker.checkParamInfoList(paramInfos); @@ -178,7 +173,7 @@ public void testCheckParamInfoForGroup() { } @Test - public void testCheckParamInfoForClusters() { + void testCheckParamInfoForClusters() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -192,8 +187,7 @@ public void testCheckParamInfoForClusters() { paramInfo.setClusters("@hsbfkj$@@!#khdkad啊@@"); actual = paramChecker.checkParamInfoList(paramInfos); assertFalse(actual.isSuccess()); - assertEquals("Param 'cluster' is illegal, illegal characters should not appear in the param.", - actual.getMessage()); + assertEquals("Param 'cluster' is illegal, illegal characters should not appear in the param.", actual.getMessage()); // Success paramInfo.setClusters("0-9a-zA-Z-_,DEFAULT_abc-100"); actual = paramChecker.checkParamInfoList(paramInfos); @@ -201,7 +195,7 @@ public void testCheckParamInfoForClusters() { } @Test - public void testCheckParamInfoForCluster() { + void testCheckParamInfoForCluster() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -215,8 +209,7 @@ public void testCheckParamInfoForCluster() { paramInfo.setCluster("@hsbfkj$@@!#khdkad啊@@"); actual = paramChecker.checkParamInfoList(paramInfos); assertFalse(actual.isSuccess()); - assertEquals("Param 'cluster' is illegal, illegal characters should not appear in the param.", - actual.getMessage()); + assertEquals("Param 'cluster' is illegal, illegal characters should not appear in the param.", actual.getMessage()); // Success paramInfo.setCluster("0-9a-zA-Z-_"); actual = paramChecker.checkParamInfoList(paramInfos); @@ -224,7 +217,7 @@ public void testCheckParamInfoForCluster() { } @Test - public void testCheckParamInfoForIp() { + void testCheckParamInfoForIp() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -246,7 +239,7 @@ public void testCheckParamInfoForIp() { } @Test - public void testCheckParamInfoForPort() { + void testCheckParamInfoForPort() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); @@ -272,7 +265,7 @@ public void testCheckParamInfoForPort() { } @Test - public void testCheckParamInfoForMetadata() { + void testCheckParamInfoForMetadata() { ParamInfo paramInfo = new ParamInfo(); ArrayList paramInfos = new ArrayList<>(); paramInfos.add(paramInfo); diff --git a/common/src/test/java/com/alibaba/nacos/common/paramcheck/ParamCheckerManagerTest.java b/common/src/test/java/com/alibaba/nacos/common/paramcheck/ParamCheckerManagerTest.java index a776de9d46f..d9252290a3d 100644 --- a/common/src/test/java/com/alibaba/nacos/common/paramcheck/ParamCheckerManagerTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/paramcheck/ParamCheckerManagerTest.java @@ -16,30 +16,30 @@ package com.alibaba.nacos.common.paramcheck; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ParamCheckerManagerTest { +class ParamCheckerManagerTest { @Test - public void testGetParamCheckerNonExistType() { + void testGetParamCheckerNonExistType() { assertTrue(ParamCheckerManager.getInstance().getParamChecker("non") instanceof DefaultParamChecker); } @Test - public void testGetParamCheckerNull() { + void testGetParamCheckerNull() { assertTrue(ParamCheckerManager.getInstance().getParamChecker("") instanceof DefaultParamChecker); assertTrue(ParamCheckerManager.getInstance().getParamChecker(null) instanceof DefaultParamChecker); } @Test - public void testGetParamCheckerDefault() { + void testGetParamCheckerDefault() { assertTrue(ParamCheckerManager.getInstance().getParamChecker("default") instanceof DefaultParamChecker); } @Test - public void testGetParamCheckerOther() { + void testGetParamCheckerOther() { assertTrue(ParamCheckerManager.getInstance().getParamChecker("mock") instanceof MockParamChecker); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/pathencoder/PathEncoderManagerTest.java b/common/src/test/java/com/alibaba/nacos/common/pathencoder/PathEncoderManagerTest.java index d3892abc782..3b4fffff880 100644 --- a/common/src/test/java/com/alibaba/nacos/common/pathencoder/PathEncoderManagerTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/pathencoder/PathEncoderManagerTest.java @@ -17,21 +17,23 @@ package com.alibaba.nacos.common.pathencoder; import com.alibaba.nacos.common.pathencoder.impl.WindowsEncoder; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.nio.charset.Charset; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; -public class PathEncoderManagerTest { +class PathEncoderManagerTest { private String cachedOsName; @@ -39,64 +41,64 @@ public class PathEncoderManagerTest { private Object cachedEncoder; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { cachedOsName = System.getProperty("os.name"); targetEncoder = PathEncoderManager.class.getDeclaredField("targetEncoder"); targetEncoder.setAccessible(true); cachedEncoder = targetEncoder.get(PathEncoderManager.getInstance()); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { System.setProperty("os.name", cachedOsName); targetEncoder.set(PathEncoderManager.getInstance(), cachedEncoder); } @Test - public void testInitWithWindows() + void testInitWithWindows() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { Constructor constructor = PathEncoderManager.class.getDeclaredConstructor(); constructor.setAccessible(true); System.setProperty("os.name", "window"); PathEncoderManager instance = constructor.newInstance(); - Assert.assertTrue(targetEncoder.get(instance) instanceof WindowsEncoder); + assertTrue(targetEncoder.get(instance) instanceof WindowsEncoder); } /** * test expose method. */ @Test - public void testWindowsEncode() throws Exception { + void testWindowsEncode() throws Exception { // load static PathEncoderManager instance = PathEncoderManager.getInstance(); String case1 = "aa||a"; String case2 = "aa%A9%%A9%a"; // try to encode if in windows targetEncoder.set(instance, new WindowsEncoder()); - Assert.assertEquals(PathEncoderManager.getInstance().encode(case1), case2); - Assert.assertEquals(PathEncoderManager.getInstance().decode(case2), case1); + assertEquals(PathEncoderManager.getInstance().encode(case1), case2); + assertEquals(PathEncoderManager.getInstance().decode(case2), case1); } @Test - public void testEncodeWithNonExistOs() throws Exception { + void testEncodeWithNonExistOs() throws Exception { // load static PathEncoderManager instance = PathEncoderManager.getInstance(); // remove impl targetEncoder.set(instance, null); // try to encode, non windows String case1 = "aa||a"; - Assert.assertEquals(PathEncoderManager.getInstance().encode(case1), case1); + assertEquals(PathEncoderManager.getInstance().encode(case1), case1); String case2 = "aa%A9%%A9%a"; - Assert.assertEquals(PathEncoderManager.getInstance().decode(case2), case2); + assertEquals(PathEncoderManager.getInstance().decode(case2), case2); } @Test - public void testEncodeForNull() throws IllegalAccessException { + void testEncodeForNull() throws IllegalAccessException { PathEncoder mockPathEncoder = mock(PathEncoder.class); targetEncoder.set(PathEncoderManager.getInstance(), mockPathEncoder); - Assert.assertNull(PathEncoderManager.getInstance().encode(null)); - Assert.assertNull(PathEncoderManager.getInstance().decode(null)); + assertNull(PathEncoderManager.getInstance().encode(null)); + assertNull(PathEncoderManager.getInstance().decode(null)); verify(mockPathEncoder, never()).encode(null, Charset.defaultCharset().name()); verify(mockPathEncoder, never()).decode(null, Charset.defaultCharset().name()); } diff --git a/common/src/test/java/com/alibaba/nacos/common/pathencoder/WindowsEncoderTest.java b/common/src/test/java/com/alibaba/nacos/common/pathencoder/WindowsEncoderTest.java index f35e2fcc5a1..6c35b7823f3 100644 --- a/common/src/test/java/com/alibaba/nacos/common/pathencoder/WindowsEncoderTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/pathencoder/WindowsEncoderTest.java @@ -17,106 +17,112 @@ package com.alibaba.nacos.common.pathencoder; import com.alibaba.nacos.common.pathencoder.impl.WindowsEncoder; -import junit.framework.TestCase; -import org.junit.Assert; +import org.junit.jupiter.api.Test; import java.nio.charset.Charset; -public class WindowsEncoderTest extends TestCase { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +class WindowsEncoderTest { + WindowsEncoder windowsEncoder = new WindowsEncoder(); - + /** * test encode. */ - public void testEncode() { + @Test + void testEncode() { String charset = Charset.defaultCharset().name(); String case1 = "aaaadsaknkf"; - Assert.assertEquals(windowsEncoder.encode(case1, charset), case1); + assertEquals(windowsEncoder.encode(case1, charset), case1); // matches one String case2 = "aaaa\\dsaknkf"; - Assert.assertEquals(windowsEncoder.encode(case2, charset), "aaaa%A1%dsaknkf"); + assertEquals("aaaa%A1%dsaknkf", windowsEncoder.encode(case2, charset)); String case3 = "aaaa/dsaknkf"; - Assert.assertEquals(windowsEncoder.encode(case3, charset), "aaaa%A2%dsaknkf"); + assertEquals("aaaa%A2%dsaknkf", windowsEncoder.encode(case3, charset)); String case4 = "aaaa:dsaknkf"; - Assert.assertEquals(windowsEncoder.encode(case4, charset), "aaaa%A3%dsaknkf"); + assertEquals("aaaa%A3%dsaknkf", windowsEncoder.encode(case4, charset)); String case5 = "aaaa*dsaknkf"; - Assert.assertEquals(windowsEncoder.encode(case5, charset), "aaaa%A4%dsaknkf"); + assertEquals("aaaa%A4%dsaknkf", windowsEncoder.encode(case5, charset)); String case6 = "aaaa?dsaknkf"; - Assert.assertEquals(windowsEncoder.encode(case6, charset), "aaaa%A5%dsaknkf"); + assertEquals("aaaa%A5%dsaknkf", windowsEncoder.encode(case6, charset)); String case7 = "aaaa\"dsaknkf"; - Assert.assertEquals(windowsEncoder.encode(case7, charset), "aaaa%A6%dsaknkf"); + assertEquals("aaaa%A6%dsaknkf", windowsEncoder.encode(case7, charset)); String case8 = "aaaadsaknkf"); + assertEquals("aaaa>dsaknkf", windowsEncoder.decode(case9, charset)); String case10 = "aaaa%A9%dsaknkf"; - Assert.assertEquals(windowsEncoder.decode(case10, charset), "aaaa|dsaknkf"); - + assertEquals("aaaa|dsaknkf", windowsEncoder.decode(case10, charset)); + // matches more String case11 = "aaaa%A7%dsa%A7%%A8%%A8%knkf"; - Assert.assertEquals(windowsEncoder.decode(case11, charset), "aaaa>knkf"); + assertEquals("aaaa>knkf", windowsEncoder.decode(case11, charset)); String case12 = "aaaa%A6%dsa%A6%%A1%%A1%knkf"; - Assert.assertEquals(windowsEncoder.decode(case12, charset), "aaaa\"dsa\"\\\\knkf"); + assertEquals("aaaa\"dsa\"\\\\knkf", windowsEncoder.decode(case12, charset)); } - + /** * test needEncode. */ - public void testNeedEncode() { - String case1 = "aaaadsaknkf"; + @Test + void testNeedEncode() { // / : ? " < > | \ + assertFalse(windowsEncoder.needEncode(null)); + String case1 = "aaaadsaknkf"; + assertFalse(windowsEncoder.needEncode(case1)); String case2 = "?asda"; + assertTrue(windowsEncoder.needEncode(case2)); String case3 = "/asdasd"; + assertTrue(windowsEncoder.needEncode(case3)); String case4 = "as\\dasda"; + assertTrue(windowsEncoder.needEncode(case4)); String case5 = "asd::as"; + assertTrue(windowsEncoder.needEncode(case5)); String case6 = "sda\"sda"; + assertTrue(windowsEncoder.needEncode(case6)); String case7 = "asdas { + PayloadRegistry.register("ErrorResponse", ErrorResponse.class); + }); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/TlsConfigTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/TlsConfigTest.java index 5d08786f84c..ffaa43496f4 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/TlsConfigTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/TlsConfigTest.java @@ -16,17 +16,17 @@ package com.alibaba.nacos.common.remote; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class TlsConfigTest { +class TlsConfigTest { @Test - public void testTlsConfig() { + void testTlsConfig() { TlsConfig tlsConfig = new TlsConfig(); assertFalse(tlsConfig.getEnableTls()); assertFalse(tlsConfig.getMutualAuthEnable()); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/ConnectionTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/ConnectionTest.java index 05c69d0a6c8..3ee29056841 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/ConnectionTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/ConnectionTest.java @@ -23,23 +23,23 @@ import com.alibaba.nacos.api.remote.RequestFuture; import com.alibaba.nacos.api.remote.request.Request; import com.alibaba.nacos.api.remote.response.Response; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConnectionTest { +class ConnectionTest { Connection connection; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { connection = new Connection(new RpcClient.ServerInfo("127.0.0.1", 8848)) { @Override public Response request(Request request, long timeoutMills) throws NacosException { @@ -61,20 +61,20 @@ public void close() { }; } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { connection.close(); } @Test - public void testSetConnectionId() { + void testSetConnectionId() { assertNull(connection.getConnectionId()); connection.setConnectionId("testConnectionId"); assertEquals("testConnectionId", connection.getConnectionId()); } @Test - public void testGetConnectionAbility() { + void testGetConnectionAbility() { assertFalse(connection.isAbilitiesSet()); assertEquals(AbilityStatus.UNKNOWN, connection.getConnectionAbility(AbilityKey.SDK_CLIENT_TEST_1)); connection.setAbilityTable(Collections.singletonMap(AbilityKey.SERVER_TEST_2.getName(), true)); @@ -86,7 +86,7 @@ public void testGetConnectionAbility() { } @Test - public void testSetAbandon() { + void testSetAbandon() { assertFalse(connection.isAbandon()); connection.setAbandon(true); assertTrue(connection.isAbandon()); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientFactoryTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientFactoryTest.java index 4b81a36de3d..c07878e2702 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientFactoryTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientFactoryTest.java @@ -19,14 +19,13 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.common.remote.ConnectionType; import com.alibaba.nacos.common.utils.CollectionUtils; -import org.junit.After; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; import java.lang.reflect.Modifier; @@ -35,12 +34,16 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -@RunWith(MockitoJUnitRunner.class) -public class RpcClientFactoryTest { +@ExtendWith(MockitoExtension.class) +class RpcClientFactoryTest { static Field clientMapField; @@ -53,8 +56,8 @@ public class RpcClientFactoryTest { @Mock(lenient = true) RpcClientTlsConfig rpcClientTlsConfig; - @BeforeClass - public static void setUpBeforeClass() throws NoSuchFieldException, IllegalAccessException { + @BeforeAll + static void setUpBeforeClass() throws NoSuchFieldException, IllegalAccessException { clientMapField = RpcClientFactory.class.getDeclaredField("CLIENT_MAP"); clientMapField.setAccessible(true); Field modifiersField1 = Field.class.getDeclaredField("modifiers"); @@ -62,136 +65,135 @@ public static void setUpBeforeClass() throws NoSuchFieldException, IllegalAccess modifiersField1.setInt(clientMapField, clientMapField.getModifiers() & ~Modifier.FINAL); } - @After - public void tearDown() throws IllegalAccessException { + @AfterEach + void tearDown() throws IllegalAccessException { clientMapField.set(null, new ConcurrentHashMap<>()); } @Test - public void testGetAllClientEntries() throws IllegalAccessException { - Assert.assertTrue(RpcClientFactory.getAllClientEntries().isEmpty()); + void testGetAllClientEntries() throws IllegalAccessException { + assertTrue(RpcClientFactory.getAllClientEntries().isEmpty()); clientMapField.set(null, Collections.singletonMap("testClient", rpcClient)); - Assert.assertEquals(1, RpcClientFactory.getAllClientEntries().size()); + assertEquals(1, RpcClientFactory.getAllClientEntries().size()); } @Test - public void testDestroyClientWhenClientExistThenRemoveAndShutDownRpcClient() - throws IllegalAccessException, NacosException { + void testDestroyClientWhenClientExistThenRemoveAndShutDownRpcClient() throws IllegalAccessException, NacosException { clientMapField.set(null, new ConcurrentHashMap<>(Collections.singletonMap("testClient", rpcClient))); RpcClientFactory.destroyClient("testClient"); - Assert.assertTrue(RpcClientFactory.getAllClientEntries().isEmpty()); + assertTrue(RpcClientFactory.getAllClientEntries().isEmpty()); verify(rpcClient).shutdown(); } @Test - public void testDestroyClientWhenClientNotExistThenDoNothing() throws IllegalAccessException, NacosException { + void testDestroyClientWhenClientNotExistThenDoNothing() throws IllegalAccessException, NacosException { clientMapField.set(null, new ConcurrentHashMap<>(Collections.singletonMap("testClient", rpcClient))); RpcClientFactory.destroyClient("notExistClientName"); Map.Entry element = CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()); - Assert.assertEquals("testClient", element.getKey()); - Assert.assertEquals(rpcClient, element.getValue()); + assertEquals("testClient", element.getKey()); + assertEquals(rpcClient, element.getValue()); verify(rpcClient, times(0)).shutdown(); } @Test - public void testGetClient() throws IllegalAccessException { + void testGetClient() throws IllegalAccessException { // may be null - Assert.assertNull(RpcClientFactory.getClient("notExistClientName")); + assertNull(RpcClientFactory.getClient("notExistClientName")); clientMapField.set(null, new ConcurrentHashMap<>(Collections.singletonMap("testClient", rpcClient))); - Assert.assertEquals(rpcClient, RpcClientFactory.getClient("testClient")); + assertEquals(rpcClient, RpcClientFactory.getClient("testClient")); } @Test - public void testCreateClientWhenNotCreatedThenCreate() { + void testCreateClientWhenNotCreatedThenCreate() { RpcClient client = RpcClientFactory.createClient("testClient", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue")); Map labesMap = new HashMap<>(); labesMap.put("labelKey", "labelValue"); labesMap.put("tls.enable", "false"); - Assert.assertEquals(labesMap, client.rpcClientConfig.labels()); - Assert.assertEquals(ConnectionType.GRPC, client.getConnectionType()); - Assert.assertEquals("testClient", - CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()).getKey()); + assertEquals(labesMap, client.rpcClientConfig.labels()); + assertEquals(ConnectionType.GRPC, client.getConnectionType()); + assertEquals("testClient", CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()).getKey()); } @Test - public void testCreateClientWhenAlreadyCreatedThenNotCreateAgain() { + void testCreateClientWhenAlreadyCreatedThenNotCreateAgain() { RpcClient client1 = RpcClientFactory.createClient("testClient", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue")); RpcClient client2 = RpcClientFactory.createClient("testClient", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue")); - Assert.assertEquals(client1, client2); - Assert.assertEquals(1, RpcClientFactory.getAllClientEntries().size()); + assertEquals(client1, client2); + assertEquals(1, RpcClientFactory.getAllClientEntries().size()); } - @Test(expected = Exception.class) - public void testCreatedClientWhenConnectionTypeNotMappingThenThrowException() { - RpcClientFactory.createClient("testClient", mock(ConnectionType.class), - Collections.singletonMap("labelKey", "labelValue")); + @Test + void testCreatedClientWhenConnectionTypeNotMappingThenThrowException() { + assertThrows(Exception.class, () -> { + RpcClientFactory.createClient("testClient", mock(ConnectionType.class), + Collections.singletonMap("labelKey", "labelValue")); + }); } @Test - public void testCreateClusterClientWhenNotCreatedThenCreate() { + void testCreateClusterClientWhenNotCreatedThenCreate() { RpcClient client = RpcClientFactory.createClusterClient("testClient", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue")); Map labesMap = new HashMap<>(); labesMap.put("labelKey", "labelValue"); labesMap.put("tls.enable", "false"); - Assert.assertEquals(labesMap, client.rpcClientConfig.labels()); - Assert.assertEquals(ConnectionType.GRPC, client.getConnectionType()); - Assert.assertEquals("testClient", - CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()).getKey()); + assertEquals(labesMap, client.rpcClientConfig.labels()); + assertEquals(ConnectionType.GRPC, client.getConnectionType()); + assertEquals("testClient", CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()).getKey()); } @Test - public void testCreateClusterClientWhenAlreadyCreatedThenNotCreateAgain() { + void testCreateClusterClientWhenAlreadyCreatedThenNotCreateAgain() { RpcClient client1 = RpcClientFactory.createClusterClient("testClient", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue")); RpcClient client2 = RpcClientFactory.createClusterClient("testClient", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue")); - Assert.assertEquals(client1, client2); - Assert.assertEquals(1, RpcClientFactory.getAllClientEntries().size()); + assertEquals(client1, client2); + assertEquals(1, RpcClientFactory.getAllClientEntries().size()); } - @Test(expected = Exception.class) - public void testCreatedClusterClientWhenConnectionTypeNotMappingThenThrowException() { - RpcClientFactory.createClusterClient("testClient", mock(ConnectionType.class), - Collections.singletonMap("labelKey", "labelValue")); + @Test + void testCreatedClusterClientWhenConnectionTypeNotMappingThenThrowException() { + assertThrows(Exception.class, () -> { + RpcClientFactory.createClusterClient("testClient", mock(ConnectionType.class), + Collections.singletonMap("labelKey", "labelValue")); + }); } @Test - public void testCreateClusterClientTsl() { + void testCreateClusterClientTsl() { Mockito.when(clusterClientTlsConfig.getEnableTls()).thenReturn(true); RpcClient client = RpcClientFactory.createClusterClient("testClient", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), clusterClientTlsConfig); Map labesMap = new HashMap<>(); labesMap.put("labelKey", "labelValue"); labesMap.put("tls.enable", "true"); - Assert.assertEquals(labesMap, client.rpcClientConfig.labels()); - Assert.assertEquals(ConnectionType.GRPC, client.getConnectionType()); - Assert.assertEquals("testClient", - CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()).getKey()); + assertEquals(labesMap, client.rpcClientConfig.labels()); + assertEquals(ConnectionType.GRPC, client.getConnectionType()); + assertEquals("testClient", CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()).getKey()); } @Test - public void testCreateClientTsl() { + void testCreateClientTsl() { Mockito.when(rpcClientTlsConfig.getEnableTls()).thenReturn(true); RpcClient client = RpcClientFactory.createClient("testClient", ConnectionType.GRPC, Collections.singletonMap("labelKey", "labelValue"), rpcClientTlsConfig); Map labesMap = new HashMap<>(); labesMap.put("labelKey", "labelValue"); labesMap.put("tls.enable", "true"); - Assert.assertEquals(labesMap, client.rpcClientConfig.labels()); - Assert.assertEquals(ConnectionType.GRPC, client.getConnectionType()); - Assert.assertEquals("testClient", - CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()).getKey()); + assertEquals(labesMap, client.rpcClientConfig.labels()); + assertEquals(ConnectionType.GRPC, client.getConnectionType()); + assertEquals("testClient", CollectionUtils.getOnlyElement(RpcClientFactory.getAllClientEntries()).getKey()); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTest.java index 763c1416dc2..817fb2e34da 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTest.java @@ -32,13 +32,12 @@ import com.alibaba.nacos.common.remote.ConnectionType; import com.alibaba.nacos.common.remote.client.grpc.DefaultGrpcClientConfig; import com.alibaba.nacos.common.remote.client.grpc.GrpcConnection; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.stubbing.Answer; import java.lang.reflect.Field; @@ -57,11 +56,12 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.Mockito.atLeastOnce; @@ -74,8 +74,8 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class RpcClientTest { +@ExtendWith(MockitoExtension.class) +class RpcClientTest { RpcClient rpcClient; @@ -99,8 +99,8 @@ public class RpcClientTest { RpcClientConfig rpcClientConfig; - @Before - public void setUp() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException { + @BeforeEach + void setUp() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException { rpcClientConfig = spy(new RpcClientConfig() { @Override public String name() { @@ -178,8 +178,8 @@ public Connection connectToServer(ServerInfo serverInfo) { notInvoke = invocationOnMock -> null; } - @After - public void tearDown() throws IllegalAccessException, NacosException { + @AfterEach + void tearDown() throws IllegalAccessException, NacosException { rpcClientConfig.labels().clear(); rpcClient.rpcClientStatus.set(RpcClientStatus.WAIT_INIT); serverListFactoryField.set(rpcClient, null); @@ -191,7 +191,7 @@ public void tearDown() throws IllegalAccessException, NacosException { } @Test - public void testInitServerListFactory() { + void testInitServerListFactory() { rpcClient.rpcClientStatus.set(RpcClientStatus.WAIT_INIT); rpcClient.serverListFactory(serverListFactory); assertEquals(RpcClientStatus.INITIALIZED, rpcClient.rpcClientStatus.get()); @@ -273,7 +273,7 @@ public Connection connectToServer(ServerInfo serverInfo) { } @Test - public void testLabels() { + void testLabels() { when(rpcClientConfig.labels()).thenReturn(Collections.singletonMap("labelKey1", "labelValue1")); Map.Entry element = rpcClient.getLabels().entrySet().iterator().next(); assertEquals("labelKey1", element.getKey()); @@ -288,7 +288,7 @@ public void testLabels() { } @Test - public void testOnServerListChangeWhenCurrentConnectionIsNullThenDoNothing() throws IllegalAccessException { + void testOnServerListChangeWhenCurrentConnectionIsNullThenDoNothing() throws IllegalAccessException { int beforeSize = ((Queue) reconnectionSignalField.get(rpcClient)).size(); rpcClient.serverListFactory(serverListFactory); @@ -299,7 +299,7 @@ public void testOnServerListChangeWhenCurrentConnectionIsNullThenDoNothing() thr } @Test - public void testOnServerListChangeWhenServiceInfoIsNullThenDoNothing() throws IllegalAccessException { + void testOnServerListChangeWhenServiceInfoIsNullThenDoNothing() throws IllegalAccessException { int beforeSize = ((Queue) reconnectionSignalField.get(rpcClient)).size(); rpcClient.currentConnection = mock(Connection.class); @@ -310,8 +310,7 @@ public void testOnServerListChangeWhenServiceInfoIsNullThenDoNothing() throws Il } @Test - public void testOnServerListChangeWhenCurrentConnectionIsNotInServerListThenSwitchServerAsync() - throws IllegalAccessException { + void testOnServerListChangeWhenCurrentConnectionIsNotInServerListThenSwitchServerAsync() throws IllegalAccessException { final int beforeSize = ((Queue) reconnectionSignalField.get(rpcClient)).size(); rpcClient.serverListFactory(serverListFactory); rpcClient.currentConnection = new GrpcConnection(new RpcClient.ServerInfo("10.10.10.10", 8848), null); @@ -324,7 +323,7 @@ public void testOnServerListChangeWhenCurrentConnectionIsNotInServerListThenSwit } @Test - public void testOnServerListChangeWhenCurrentConnectionIsInServerListThenDoNothing() throws IllegalAccessException { + void testOnServerListChangeWhenCurrentConnectionIsInServerListThenDoNothing() throws IllegalAccessException { final int beforeSize = ((Queue) reconnectionSignalField.get(rpcClient)).size(); rpcClient.serverListFactory(serverListFactory); rpcClient.currentConnection = new GrpcConnection(new RpcClient.ServerInfo("10.10.10.10", 8848), null); @@ -336,33 +335,30 @@ public void testOnServerListChangeWhenCurrentConnectionIsInServerListThenDoNothi } @Test - public void testResolveServerInfo1() throws InvocationTargetException, IllegalAccessException { + void testResolveServerInfo1() throws InvocationTargetException, IllegalAccessException { assertEquals("10.10.10.10:8848", ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "10.10.10.10::8848")).getAddress()); assertEquals("10.10.10.10:8848", ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "10.10.10.10:8848")).getAddress()); assertEquals("10.10.10.10:8848", - ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "http://10.10.10.10:8848")) - .getAddress()); + ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "http://10.10.10.10:8848")).getAddress()); assertEquals("10.10.10.10:8848", - ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "http://10.10.10.10::8848")) - .getAddress()); + ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "http://10.10.10.10::8848")).getAddress()); assertEquals("10.10.10.10:8848", ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "http://10.10.10.10")).getAddress()); assertEquals("10.10.10.10:8848", - ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "https://10.10.10.10::8848")) - .getAddress()); + ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "https://10.10.10.10::8848")).getAddress()); } @Test - public void testResolveServerInfo2() throws InvocationTargetException, IllegalAccessException { + void testResolveServerInfo2() throws InvocationTargetException, IllegalAccessException { System.setProperty("nacos.server.port", "4424"); assertEquals("10.10.10.10:4424", ((RpcClient.ServerInfo) resolveServerInfoMethod.invoke(rpcClient, "http://10.10.10.10")).getAddress()); } @Test - public void testRequestSuccess() throws NacosException, NoSuchFieldException, IllegalAccessException { + void testRequestSuccess() throws NacosException, NoSuchFieldException, IllegalAccessException { rpcClient.currentConnection = connection; rpcClient.rpcClientStatus.set(RpcClientStatus.RUNNING); when(connection.request(any(), anyLong())).thenReturn(new HealthCheckResponse()); @@ -374,37 +370,45 @@ public void testRequestSuccess() throws NacosException, NoSuchFieldException, Il assertTrue(lastActiveTimeStamp <= (long) lastActiveTimeStampField.get(rpcClient)); } - @Test(expected = NacosException.class) - public void testRequestWithoutAnyTry() throws NacosException { - when(rpcClientConfig.retryTimes()).thenReturn(-1); - rpcClient.request(null); + @Test + void testRequestWithoutAnyTry() throws NacosException { + assertThrows(NacosException.class, () -> { + when(rpcClientConfig.retryTimes()).thenReturn(-1); + rpcClient.request(null); + }); } - @Test(expected = NacosException.class) - public void testRequestWhenClientAlreadyShutDownThenThrowException() throws NacosException { - rpcClient.rpcClientStatus.set(RpcClientStatus.SHUTDOWN); - rpcClient.currentConnection = connection; - rpcClient.request(null); + @Test + void testRequestWhenClientAlreadyShutDownThenThrowException() throws NacosException { + assertThrows(NacosException.class, () -> { + rpcClient.rpcClientStatus.set(RpcClientStatus.SHUTDOWN); + rpcClient.currentConnection = connection; + rpcClient.request(null); + }); } - @Test(expected = NacosException.class) - public void testRequestWhenTimeoutThenThrowException() throws NacosException { - rpcClient.rpcClientStatus.set(RpcClientStatus.RUNNING); - rpcClient.currentConnection = connection; - doReturn(null).when(connection).request(any(), anyLong()); - rpcClient.request(null, 10000); + @Test + void testRequestWhenTimeoutThenThrowException() throws NacosException { + assertThrows(NacosException.class, () -> { + rpcClient.rpcClientStatus.set(RpcClientStatus.RUNNING); + rpcClient.currentConnection = connection; + doReturn(null).when(connection).request(any(), anyLong()); + rpcClient.request(null, 10000); + }); } - @Test(expected = NacosException.class) - public void testRequestWhenResponseErrorThenThrowException() throws NacosException { - rpcClient.rpcClientStatus.set(RpcClientStatus.RUNNING); - rpcClient.currentConnection = connection; - doReturn(new ErrorResponse()).when(connection).request(any(), anyLong()); - rpcClient.request(null, 10000); + @Test + void testRequestWhenResponseErrorThenThrowException() throws NacosException { + assertThrows(NacosException.class, () -> { + rpcClient.rpcClientStatus.set(RpcClientStatus.RUNNING); + rpcClient.currentConnection = connection; + doReturn(new ErrorResponse()).when(connection).request(any(), anyLong()); + rpcClient.request(null, 10000); + }); } @Test - public void testRequestWhenResponseUnregisterThenSwitchServer() throws NacosException { + void testRequestWhenResponseUnregisterThenSwitchServer() throws NacosException { rpcClient.rpcClientStatus.set(RpcClientStatus.RUNNING); rpcClient.currentConnection = connection; ErrorResponse errorResponse = new ErrorResponse(); @@ -420,11 +424,11 @@ public void testRequestWhenResponseUnregisterThenSwitchServer() throws NacosExce assertEquals(RpcClientStatus.UNHEALTHY, rpcClient.rpcClientStatus.get()); verify(rpcClient).switchServerAsync(); - Assert.assertNotNull(exception); + assertNotNull(exception); } @Test - public void testAsyncRequestSuccess() throws NacosException { + void testAsyncRequestSuccess() throws NacosException { rpcClient.currentConnection = connection; rpcClient.rpcClientStatus.set(RpcClientStatus.RUNNING); RequestCallBack requestCallBack = mock(RequestCallBack.class); @@ -433,23 +437,27 @@ public void testAsyncRequestSuccess() throws NacosException { verify(connection).asyncRequest(any(), any()); } - @Test(expected = NacosException.class) - public void testAsyncRequestWithoutAnyTry() throws NacosException { - when(rpcClientConfig.retryTimes()).thenReturn(-1); - rpcClient.asyncRequest(null, null); + @Test + void testAsyncRequestWithoutAnyTry() throws NacosException { + assertThrows(NacosException.class, () -> { + when(rpcClientConfig.retryTimes()).thenReturn(-1); + rpcClient.asyncRequest(null, null); + }); } - @Test(expected = NacosException.class) - public void testAsyncRequestWhenClientAlreadyShutDownThenThrowException() throws NacosException { - rpcClient.rpcClientStatus.set(RpcClientStatus.SHUTDOWN); - rpcClient.currentConnection = connection; - RequestCallBack requestCallBack = mock(RequestCallBack.class); - doReturn(10000L).when(requestCallBack).getTimeout(); - rpcClient.asyncRequest(null, requestCallBack); + @Test + void testAsyncRequestWhenClientAlreadyShutDownThenThrowException() throws NacosException { + assertThrows(NacosException.class, () -> { + rpcClient.rpcClientStatus.set(RpcClientStatus.SHUTDOWN); + rpcClient.currentConnection = connection; + RequestCallBack requestCallBack = mock(RequestCallBack.class); + doReturn(10000L).when(requestCallBack).getTimeout(); + rpcClient.asyncRequest(null, requestCallBack); + }); } @Test - public void testAsyncRequestWhenSendRequestFailedMannyTimesThenSwitchServer() throws NacosException { + void testAsyncRequestWhenSendRequestFailedMannyTimesThenSwitchServer() throws NacosException { rpcClient.rpcClientStatus.set(RpcClientStatus.RUNNING); rpcClient.currentConnection = connection; doThrow(new NacosException()).when(connection).asyncRequest(any(), any()); @@ -465,25 +473,29 @@ public void testAsyncRequestWhenSendRequestFailedMannyTimesThenSwitchServer() th verify(connection, atLeastOnce()).asyncRequest(any(), any()); verify(rpcClient).switchServerAsyncOnRequestFail(); - Assert.assertNotNull(exception); + assertNotNull(exception); assertEquals(RpcClientStatus.UNHEALTHY, rpcClient.rpcClientStatus.get()); } - @Test(expected = NacosException.class) - public void testRequestFutureWithoutAnyTry() throws NacosException { - when(rpcClientConfig.retryTimes()).thenReturn(-1); - rpcClient.requestFuture(null); + @Test + void testRequestFutureWithoutAnyTry() throws NacosException { + assertThrows(NacosException.class, () -> { + when(rpcClientConfig.retryTimes()).thenReturn(-1); + rpcClient.requestFuture(null); + }); } - @Test(expected = NacosException.class) - public void testRequestFutureWhenClientAlreadyShutDownThenThrowException() throws NacosException { - rpcClient.rpcClientStatus.set(RpcClientStatus.SHUTDOWN); - rpcClient.currentConnection = connection; - rpcClient.requestFuture(null); + @Test + void testRequestFutureWhenClientAlreadyShutDownThenThrowException() throws NacosException { + assertThrows(NacosException.class, () -> { + rpcClient.rpcClientStatus.set(RpcClientStatus.SHUTDOWN); + rpcClient.currentConnection = connection; + rpcClient.requestFuture(null); + }); } @Test - public void testRequestFutureWhenRetryReachMaxRetryTimesThenSwitchServer() throws NacosException { + void testRequestFutureWhenRetryReachMaxRetryTimesThenSwitchServer() throws NacosException { when(rpcClientConfig.timeOutMills()).thenReturn(5000L); when(rpcClientConfig.retryTimes()).thenReturn(3); rpcClient.rpcClientStatus.set(RpcClientStatus.RUNNING); @@ -499,12 +511,12 @@ public void testRequestFutureWhenRetryReachMaxRetryTimesThenSwitchServer() throw verify(connection, times(4)).requestFuture(any()); verify(rpcClient).switchServerAsyncOnRequestFail(); - Assert.assertNotNull(exception); + assertNotNull(exception); assertEquals(RpcClientStatus.UNHEALTHY, rpcClient.rpcClientStatus.get()); } @Test - public void testRpcClientShutdownWhenClientDidntStart() throws NacosException { + void testRpcClientShutdownWhenClientDidntStart() throws NacosException { RpcClient rpcClient = new RpcClient(new RpcClientConfig() { @Override public String name() { @@ -562,7 +574,7 @@ public Connection connectToServer(ServerInfo serverInfo) { } @Test - public void testHealthCheck() throws IllegalAccessException, NacosException { + void testHealthCheck() throws IllegalAccessException, NacosException { Random random = new Random(); int retry = random.nextInt(10); when(rpcClientConfig.healthCheckRetryTimes()).thenReturn(retry); @@ -578,7 +590,7 @@ public void testHealthCheck() throws IllegalAccessException, NacosException { } @Test - public void testNextRpcServerForIpv4WithPort() { + void testNextRpcServerForIpv4WithPort() { RpcClient rpcClient = buildTestNextRpcServerClient(); rpcClient.serverListFactory(serverListFactory); when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:7777"); @@ -589,7 +601,7 @@ public void testNextRpcServerForIpv4WithPort() { } @Test - public void testNextRpcServerForIpv4WithoutPort() { + void testNextRpcServerForIpv4WithoutPort() { RpcClient rpcClient = buildTestNextRpcServerClient(); rpcClient.serverListFactory(serverListFactory); when(serverListFactory.genNextServer()).thenReturn("127.0.0.1"); @@ -600,7 +612,7 @@ public void testNextRpcServerForIpv4WithoutPort() { } @Test - public void testNextRpcServerForIpv6WithPort() { + void testNextRpcServerForIpv6WithPort() { RpcClient rpcClient = buildTestNextRpcServerClient(); rpcClient.serverListFactory(serverListFactory); when(serverListFactory.genNextServer()).thenReturn("[fe80::35ba:6827:c5ff:d161%11]:7777"); @@ -611,7 +623,7 @@ public void testNextRpcServerForIpv6WithPort() { } @Test - public void testNextRpcServerForIpv6WithoutPort() { + void testNextRpcServerForIpv6WithoutPort() { RpcClient rpcClient = buildTestNextRpcServerClient(); rpcClient.serverListFactory(serverListFactory); when(serverListFactory.genNextServer()).thenReturn("[fe80::35ba:6827:c5ff:d161%11]"); @@ -622,7 +634,7 @@ public void testNextRpcServerForIpv6WithoutPort() { } @Test - public void testNextRpcServerForDomainWithPort() { + void testNextRpcServerForDomainWithPort() { RpcClient rpcClient = buildTestNextRpcServerClient(); rpcClient.serverListFactory(serverListFactory); when(serverListFactory.genNextServer()).thenReturn("nacos.io:7777"); @@ -633,7 +645,7 @@ public void testNextRpcServerForDomainWithPort() { } @Test - public void testNextRpcServerForDomainWithoutPort() { + void testNextRpcServerForDomainWithoutPort() { RpcClient rpcClient = buildTestNextRpcServerClient(); rpcClient.serverListFactory(serverListFactory); when(serverListFactory.genNextServer()).thenReturn("nacos.io"); @@ -644,7 +656,7 @@ public void testNextRpcServerForDomainWithoutPort() { } @Test - public void testNextRpcServerForLocalhostWithPort() { + void testNextRpcServerForLocalhostWithPort() { RpcClient rpcClient = buildTestNextRpcServerClient(); rpcClient.serverListFactory(serverListFactory); when(serverListFactory.genNextServer()).thenReturn("localhost:7777"); @@ -655,7 +667,7 @@ public void testNextRpcServerForLocalhostWithPort() { } @Test - public void testNextRpcServerForLocalhostWithoutPort() { + void testNextRpcServerForLocalhostWithoutPort() { RpcClient rpcClient = buildTestNextRpcServerClient(); rpcClient.serverListFactory(serverListFactory); when(serverListFactory.genNextServer()).thenReturn("localhost"); @@ -665,12 +677,14 @@ public void testNextRpcServerForLocalhostWithoutPort() { assertEquals(8848, actual.getServerPort()); } - @Test(expected = IllegalArgumentException.class) - public void testNextRpcServerForEmpty() { - RpcClient rpcClient = buildTestNextRpcServerClient(); - rpcClient.serverListFactory(serverListFactory); - when(serverListFactory.genNextServer()).thenReturn(""); - rpcClient.nextRpcServer(); + @Test + void testNextRpcServerForEmpty() { + assertThrows(IllegalArgumentException.class, () -> { + RpcClient rpcClient = buildTestNextRpcServerClient(); + rpcClient.serverListFactory(serverListFactory); + when(serverListFactory.genNextServer()).thenReturn(""); + rpcClient.nextRpcServer(); + }); } private RpcClient buildTestNextRpcServerClient() { @@ -697,29 +711,31 @@ public ServerInfo nextRpcServer() { }; } - @Test(expected = RuntimeException.class) - public void testHandleServerRequestWhenExceptionThenThrowException() throws RuntimeException { - RpcClient rpcClient = buildTestNextRpcServerClient(); - Request request = new Request() { - @Override - public String getModule() { - return null; - } - }; - rpcClient.serverRequestHandlers.add((req, conn) -> { - throw new RuntimeException(); + @Test + void testHandleServerRequestWhenExceptionThenThrowException() throws RuntimeException { + assertThrows(RuntimeException.class, () -> { + RpcClient rpcClient = buildTestNextRpcServerClient(); + Request request = new Request() { + @Override + public String getModule() { + return null; + } + }; + rpcClient.serverRequestHandlers.add((req, conn) -> { + throw new RuntimeException(); + }); + rpcClient.handleServerRequest(request); }); - rpcClient.handleServerRequest(request); } @Test - public void testNotifyDisConnectedForEmpty() { + void testNotifyDisConnectedForEmpty() { rpcClient.notifyDisConnected(null); verify(rpcClientConfig, never()).name(); } @Test - public void testNotifyDisConnected() { + void testNotifyDisConnected() { ConnectionEventListener listener = mock(ConnectionEventListener.class); rpcClient.registerConnectionListener(listener); rpcClient.notifyDisConnected(null); @@ -728,7 +744,7 @@ public void testNotifyDisConnected() { } @Test - public void testNotifyDisConnectedException() { + void testNotifyDisConnectedException() { ConnectionEventListener listener = mock(ConnectionEventListener.class); rpcClient.registerConnectionListener(listener); doThrow(new RuntimeException("test")).when(listener).onDisConnect(null); @@ -737,13 +753,13 @@ public void testNotifyDisConnectedException() { } @Test - public void testNotifyConnectedForEmpty() { + void testNotifyConnectedForEmpty() { rpcClient.notifyConnected(null); verify(rpcClientConfig, never()).name(); } @Test - public void testNotifyConnected() { + void testNotifyConnected() { ConnectionEventListener listener = mock(ConnectionEventListener.class); rpcClient.registerConnectionListener(listener); rpcClient.notifyConnected(null); @@ -752,7 +768,7 @@ public void testNotifyConnected() { } @Test - public void testNotifyConnectedException() { + void testNotifyConnectedException() { ConnectionEventListener listener = mock(ConnectionEventListener.class); rpcClient.registerConnectionListener(listener); doThrow(new RuntimeException("test")).when(listener).onConnected(null); @@ -761,7 +777,7 @@ public void testNotifyConnectedException() { } @Test - public void testStartClient() throws NacosException { + void testStartClient() throws NacosException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848"); connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); RpcClient rpcClient = buildTestStartClient(new Function() { @@ -786,7 +802,7 @@ public Connection apply(RpcClient.ServerInfo serverInfo) { } @Test - public void testStartClientWithFailed() throws NacosException, InterruptedException { + void testStartClientWithFailed() throws NacosException, InterruptedException { RpcClient rpcClient = buildTestStartClient(serverInfo -> null); try { rpcClient.start(); @@ -798,7 +814,7 @@ public void testStartClientWithFailed() throws NacosException, InterruptedExcept } @Test - public void testStartClientAfterShutdown() throws NacosException { + void testStartClientAfterShutdown() throws NacosException { RpcClient rpcClient = buildTestStartClient(serverInfo -> null); rpcClient.shutdown(); rpcClient.start(); @@ -806,7 +822,7 @@ public void testStartClientAfterShutdown() throws NacosException { } @Test - public void testDisConnectionEventAfterStart() throws NacosException, InterruptedException { + void testDisConnectionEventAfterStart() throws NacosException, InterruptedException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848"); connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); RpcClient rpcClient = buildTestStartClient(serverInfo -> connection); @@ -824,7 +840,7 @@ public void testDisConnectionEventAfterStart() throws NacosException, Interrupte } @Test - public void testReconnectContextAfterStartWithNullConnection() throws NacosException, InterruptedException { + void testReconnectContextAfterStartWithNullConnection() throws NacosException, InterruptedException { RpcClient rpcClient = buildTestStartClient(serverInfo -> null); try { when(rpcClientConfig.connectionKeepAlive()).thenReturn(-1L); @@ -837,8 +853,7 @@ public void testReconnectContextAfterStartWithNullConnection() throws NacosExcep } @Test - public void testReconnectContextAfterStartWithConnectionHealthCheckFail() - throws NacosException, InterruptedException { + void testReconnectContextAfterStartWithConnectionHealthCheckFail() throws NacosException, InterruptedException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848"); connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); RpcClient rpcClient = buildTestStartClient(new Function() { @@ -865,7 +880,7 @@ public Connection apply(RpcClient.ServerInfo serverInfo) { } @Test - public void testReconnectContextAfterStartWithConnectionHealthCheckSuccess() + void testReconnectContextAfterStartWithConnectionHealthCheckSuccess() throws NacosException, InterruptedException, NoSuchFieldException, IllegalAccessException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848"); connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); @@ -887,7 +902,7 @@ public void testReconnectContextAfterStartWithConnectionHealthCheckSuccess() } @Test - public void testReconnectContextAfterStartWithActiveTimeIsNew() + void testReconnectContextAfterStartWithActiveTimeIsNew() throws NacosException, InterruptedException, NoSuchFieldException, IllegalAccessException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848"); connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); @@ -909,16 +924,15 @@ public void testReconnectContextAfterStartWithActiveTimeIsNew() } @Test - public void testReconnectContextAfterStartWithOldServiceInfo() - throws NacosException, InterruptedException, IllegalAccessException { + void testReconnectContextAfterStartWithOldServiceInfo() throws NacosException, InterruptedException, IllegalAccessException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848"); when(serverListFactory.getServerList()).thenReturn(Collections.singletonList("127.0.0.1:8848")); connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); RpcClient rpcClient = buildTestStartClient(serverInfo -> connection); try { rpcClient.start(); - RpcClient.ReconnectContext reconnectContext = new RpcClient.ReconnectContext( - new RpcClient.ServerInfo("127.0.0.1", 0), false); + RpcClient.ReconnectContext reconnectContext = new RpcClient.ReconnectContext(new RpcClient.ServerInfo("127.0.0.1", 0), + false); ((BlockingQueue) reconnectionSignalField.get(rpcClient)).put(reconnectContext); TimeUnit.MILLISECONDS.sleep(100); assertEquals(RpcClientStatus.RUNNING, rpcClient.rpcClientStatus.get()); @@ -929,16 +943,15 @@ public void testReconnectContextAfterStartWithOldServiceInfo() } @Test - public void testReconnectContextAfterStartWithNewServiceInfo() - throws NacosException, InterruptedException, IllegalAccessException { + void testReconnectContextAfterStartWithNewServiceInfo() throws NacosException, InterruptedException, IllegalAccessException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848"); when(serverListFactory.getServerList()).thenReturn(Collections.singletonList("1.1.1.1:8848")); connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); RpcClient rpcClient = buildTestStartClient(serverInfo -> connection); try { rpcClient.start(); - RpcClient.ReconnectContext reconnectContext = new RpcClient.ReconnectContext( - new RpcClient.ServerInfo("127.0.0.1", 0), false); + RpcClient.ReconnectContext reconnectContext = new RpcClient.ReconnectContext(new RpcClient.ServerInfo("127.0.0.1", 0), + false); ((BlockingQueue) reconnectionSignalField.get(rpcClient)).put(reconnectContext); TimeUnit.MILLISECONDS.sleep(100); assertEquals(RpcClientStatus.RUNNING, rpcClient.rpcClientStatus.get()); @@ -949,7 +962,7 @@ public void testReconnectContextAfterStartWithNewServiceInfo() } @Test - public void testHandleConnectionResetRequestWithoutServer() throws NacosException, InterruptedException { + void testHandleConnectionResetRequestWithoutServer() throws NacosException, InterruptedException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848", "1.1.1.1:8848"); connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); RpcClient rpcClient = buildTestStartClient(serverInfo -> { @@ -968,7 +981,7 @@ public void testHandleConnectionResetRequestWithoutServer() throws NacosExceptio } @Test - public void testHandleConnectionResetRequestWithServer() throws NacosException, InterruptedException { + void testHandleConnectionResetRequestWithServer() throws NacosException, InterruptedException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848", "1.1.1.1:8848"); List serverList = new LinkedList<>(); serverList.add("127.0.0.1:8848"); @@ -995,7 +1008,7 @@ public void testHandleConnectionResetRequestWithServer() throws NacosException, } @Test - public void testHandleConnectionResetRequestWithException() throws NacosException, InterruptedException { + void testHandleConnectionResetRequestWithException() throws NacosException, InterruptedException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848", "1.1.1.1:8848"); connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); RpcClient rpcClient = buildTestStartClient(serverInfo -> { @@ -1017,7 +1030,7 @@ public void testHandleConnectionResetRequestWithException() throws NacosExceptio } @Test - public void testHandleClientDetectionRequest() throws NacosException { + void testHandleClientDetectionRequest() throws NacosException { RpcClient rpcClient = buildTestStartClient(serverInfo -> null); try { rpcClient.start(); @@ -1029,7 +1042,7 @@ public void testHandleClientDetectionRequest() throws NacosException { } @Test - public void testHandleOtherRequest() throws NacosException { + void testHandleOtherRequest() throws NacosException { RpcClient rpcClient = buildTestStartClient(serverInfo -> null); try { rpcClient.start(); @@ -1041,7 +1054,7 @@ public void testHandleOtherRequest() throws NacosException { } @Test - public void testReconnectForRequestFailButHealthCheckOK() throws NacosException { + void testReconnectForRequestFailButHealthCheckOK() throws NacosException { RpcClient rpcClient = buildTestStartClient(serverInfo -> null); rpcClient.currentConnection = connection; connection.serverInfo = new RpcClient.ServerInfo("127.0.0.1", 8848); @@ -1051,7 +1064,7 @@ public void testReconnectForRequestFailButHealthCheckOK() throws NacosException } @Test - public void testReconnectFailTimes() throws NacosException { + void testReconnectFailTimes() throws NacosException { when(serverListFactory.genNextServer()).thenReturn("127.0.0.1:8848"); when(serverListFactory.getServerList()).thenReturn(Collections.singletonList("127.0.0.1:8848")); final AtomicInteger count = new AtomicInteger(0); @@ -1068,7 +1081,7 @@ public void testReconnectFailTimes() throws NacosException { } @Test - public void testGetCurrentServer() { + void testGetCurrentServer() { assertNull(rpcClient.getCurrentServer()); rpcClient.currentConnection = connection; rpcClient.serverListFactory(serverListFactory); @@ -1077,7 +1090,7 @@ public void testGetCurrentServer() { } @Test - public void testCurrentRpcServer() throws IllegalAccessException { + void testCurrentRpcServer() throws IllegalAccessException { when(serverListFactory.getCurrentServer()).thenReturn("127.0.0.1:8848"); serverListFactoryField.set(rpcClient, serverListFactory); RpcClient.ServerInfo serverInfo = rpcClient.currentRpcServer(); @@ -1107,7 +1120,7 @@ public Connection connectToServer(ServerInfo serverInfo) { } @Test - public void testServerInfoSet() { + void testServerInfoSet() { RpcClient.ServerInfo serverInfo = new RpcClient.ServerInfo(); String ip = "127.0.0.1"; int port = 80; @@ -1121,7 +1134,7 @@ public void testServerInfoSet() { } @Test - public void testSetTenant() { + void testSetTenant() { String tenant = "testTenant"; assertNull(rpcClient.getTenant()); rpcClient.setTenant(tenant); @@ -1129,13 +1142,13 @@ public void testSetTenant() { } @Test - public void testGetConnectionAbilityWithNullConnection() { + void testGetConnectionAbilityWithNullConnection() { AbilityStatus abilityStatus = rpcClient.getConnectionAbility(AbilityKey.SERVER_TEST_1); assertNull(abilityStatus); } @Test - public void testGetConnectionAbilityWithReadyConnection() { + void testGetConnectionAbilityWithReadyConnection() { when(connection.getConnectionAbility(AbilityKey.SERVER_TEST_1)).thenReturn(AbilityStatus.SUPPORTED); rpcClient.currentConnection = connection; AbilityStatus abilityStatus = rpcClient.getConnectionAbility(AbilityKey.SERVER_TEST_1); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigTest.java index 31aba66baef..e60b19dc0b7 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClientTlsConfigTest.java @@ -16,17 +16,17 @@ package com.alibaba.nacos.common.remote.client; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Properties; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class RpcClientTlsConfigTest { +class RpcClientTlsConfigTest { @Test - public void testEnableTls() { + void testEnableTls() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_ENABLE, "true"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); @@ -34,7 +34,7 @@ public void testEnableTls() { } @Test - public void testSslProvider() { + void testSslProvider() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_PROVIDER, "provider"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); @@ -42,7 +42,7 @@ public void testSslProvider() { } @Test - public void testMutualAuthEnable() { + void testMutualAuthEnable() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_MUTUAL_AUTH, "true"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); @@ -50,7 +50,7 @@ public void testMutualAuthEnable() { } @Test - public void testProtocols() { + void testProtocols() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_PROTOCOLS, "protocols"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); @@ -58,7 +58,7 @@ public void testProtocols() { } @Test - public void testCiphers() { + void testCiphers() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_CIPHERS, "ciphers"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); @@ -66,7 +66,7 @@ public void testCiphers() { } @Test - public void testTrustCollectionCertFile() { + void testTrustCollectionCertFile() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_COLLECTION_CHAIN_PATH, "trustCollectionCertFile"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); @@ -74,7 +74,7 @@ public void testTrustCollectionCertFile() { } @Test - public void testCertChainFile() { + void testCertChainFile() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_CHAIN_PATH, "certChainFile"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); @@ -82,7 +82,7 @@ public void testCertChainFile() { } @Test - public void testCertPrivateKey() { + void testCertPrivateKey() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_CERT_KEY, "certPrivateKey"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); @@ -90,7 +90,7 @@ public void testCertPrivateKey() { } @Test - public void testTrustAll() { + void testTrustAll() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_ALL, "true"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); @@ -98,7 +98,7 @@ public void testTrustAll() { } @Test - public void testCertPrivateKeyPassword() { + void testCertPrivateKeyPassword() { Properties properties = new Properties(); properties.setProperty(RpcConstants.RPC_CLIENT_TLS_TRUST_PWD, "trustPwd"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createSdkConfig(properties); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClusterClientTlsConfigTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClusterClientTlsConfigTest.java index 4f211428f89..605b53cd5eb 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClusterClientTlsConfigTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcClusterClientTlsConfigTest.java @@ -16,7 +16,7 @@ package com.alibaba.nacos.common.remote.client; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Properties; @@ -31,13 +31,13 @@ import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_TRUST_ALL; import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_TRUST_COLLECTION_CHAIN_PATH; import static com.alibaba.nacos.common.remote.client.RpcConstants.ServerSuffix.TLS_TRUST_PWD; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class RpcClusterClientTlsConfigTest { +class RpcClusterClientTlsConfigTest { @Test - public void testEnableTls() { + void testEnableTls() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); RpcClientTlsConfig tlsConfig = RpcClientTlsConfigFactory.getInstance().createClusterConfig(properties); @@ -45,7 +45,7 @@ public void testEnableTls() { } @Test - public void testSslProvider() { + void testSslProvider() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); properties.setProperty(NACOS_PEER_RPC + TLS_PROVIDER, "provider"); @@ -54,7 +54,7 @@ public void testSslProvider() { } @Test - public void testMutualAuthEnable() { + void testMutualAuthEnable() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); properties.setProperty(NACOS_PEER_RPC + MUTUAL_AUTH, "true"); @@ -63,7 +63,7 @@ public void testMutualAuthEnable() { } @Test - public void testProtocols() { + void testProtocols() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); properties.setProperty(NACOS_PEER_RPC + TLS_PROTOCOLS, "protocols"); @@ -72,7 +72,7 @@ public void testProtocols() { } @Test - public void testCiphers() { + void testCiphers() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); properties.setProperty(NACOS_PEER_RPC + TLS_CIPHERS, "ciphers"); @@ -81,7 +81,7 @@ public void testCiphers() { } @Test - public void testTrustCollectionCertFile() { + void testTrustCollectionCertFile() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); properties.setProperty(NACOS_PEER_RPC + TLS_TRUST_COLLECTION_CHAIN_PATH, "trustCollectionCertFile"); @@ -90,7 +90,7 @@ public void testTrustCollectionCertFile() { } @Test - public void testCertChainFile() { + void testCertChainFile() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); properties.setProperty(NACOS_PEER_RPC + TLS_CERT_CHAIN_PATH, "certChainFile"); @@ -99,7 +99,7 @@ public void testCertChainFile() { } @Test - public void testCertPrivateKey() { + void testCertPrivateKey() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); properties.setProperty(NACOS_PEER_RPC + TLS_CERT_KEY, "certPrivateKey"); @@ -108,7 +108,7 @@ public void testCertPrivateKey() { } @Test - public void testTrustAll() { + void testTrustAll() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); properties.setProperty(NACOS_PEER_RPC + TLS_TRUST_ALL, "true"); @@ -117,7 +117,7 @@ public void testTrustAll() { } @Test - public void testCertPrivateKeyPassword() { + void testCertPrivateKeyPassword() { Properties properties = new Properties(); properties.setProperty(NACOS_PEER_RPC + TLS_ENABLE, "true"); properties.setProperty(NACOS_PEER_RPC + TLS_TRUST_PWD, "trustPwd"); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcConstantsTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcConstantsTest.java index c5565393cd6..7a99fc9f641 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcConstantsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/RpcConstantsTest.java @@ -16,16 +16,16 @@ package com.alibaba.nacos.common.remote.client; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class RpcConstantsTest { +class RpcConstantsTest { @Test - public void testGetRpcParams() { + void testGetRpcParams() { Field[] declaredFields = RpcConstants.class.getDeclaredFields(); int i = 0; for (Field declaredField : declaredFields) { diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfigTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfigTest.java index 1e1a88af4b2..0a54ffe242f 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfigTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/DefaultGrpcClientConfigTest.java @@ -17,33 +17,33 @@ package com.alibaba.nacos.common.remote.client.grpc; import com.alibaba.nacos.common.remote.client.RpcClientTlsConfig; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; -public class DefaultGrpcClientConfigTest { +class DefaultGrpcClientConfigTest { - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { System.setProperty("nacos.common.processors", "2"); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { System.clearProperty("nacos.common.processors"); } @Test - public void testDefault() { + void testDefault() { DefaultGrpcClientConfig config = (DefaultGrpcClientConfig) DefaultGrpcClientConfig.newBuilder().build(); assertNull(config.name()); assertEquals(3, config.retryTimes()); @@ -65,7 +65,7 @@ public void testDefault() { } @Test - public void testFromProperties() { + void testFromProperties() { Properties properties = new Properties(); properties.setProperty(GrpcConstants.GRPC_NAME, "test"); properties.setProperty(GrpcConstants.GRPC_RETRY_TIMES, "3"); @@ -106,7 +106,7 @@ public void testFromProperties() { } @Test - public void testName() { + void testName() { String name = "test"; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setName(name); @@ -115,7 +115,7 @@ public void testName() { } @Test - public void testSetRetryTimes() { + void testSetRetryTimes() { int retryTimes = 3; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setRetryTimes(retryTimes); @@ -124,7 +124,7 @@ public void testSetRetryTimes() { } @Test - public void testSetTimeOutMills() { + void testSetTimeOutMills() { long timeOutMills = 3000; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setTimeOutMills(timeOutMills); @@ -133,7 +133,7 @@ public void testSetTimeOutMills() { } @Test - public void testSetConnectionKeepAlive() { + void testSetConnectionKeepAlive() { long connectionKeepAlive = 5000; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setConnectionKeepAlive(connectionKeepAlive); @@ -142,7 +142,7 @@ public void testSetConnectionKeepAlive() { } @Test - public void testSetThreadPoolKeepAlive() { + void testSetThreadPoolKeepAlive() { long threadPoolKeepAlive = 10000; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setThreadPoolKeepAlive(threadPoolKeepAlive); @@ -151,7 +151,7 @@ public void testSetThreadPoolKeepAlive() { } @Test - public void testSetThreadPoolCoreSize() { + void testSetThreadPoolCoreSize() { int threadPoolCoreSize = 2; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setThreadPoolCoreSize(threadPoolCoreSize); @@ -160,7 +160,7 @@ public void testSetThreadPoolCoreSize() { } @Test - public void testSetThreadPoolMaxSize() { + void testSetThreadPoolMaxSize() { int threadPoolMaxSize = 8; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setThreadPoolMaxSize(threadPoolMaxSize); @@ -169,7 +169,7 @@ public void testSetThreadPoolMaxSize() { } @Test - public void testSetServerCheckTimeOut() { + void testSetServerCheckTimeOut() { long serverCheckTimeOut = 3000; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setServerCheckTimeOut(serverCheckTimeOut); @@ -178,7 +178,7 @@ public void testSetServerCheckTimeOut() { } @Test - public void testSetThreadPoolQueueSize() { + void testSetThreadPoolQueueSize() { int threadPoolQueueSize = 10000; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setThreadPoolQueueSize(threadPoolQueueSize); @@ -187,7 +187,7 @@ public void testSetThreadPoolQueueSize() { } @Test - public void testSetMaxInboundMessageSize() { + void testSetMaxInboundMessageSize() { int maxInboundMessageSize = 10485760; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setMaxInboundMessageSize(maxInboundMessageSize); @@ -196,7 +196,7 @@ public void testSetMaxInboundMessageSize() { } @Test - public void testSetChannelKeepAlive() { + void testSetChannelKeepAlive() { int channelKeepAlive = 60000; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setChannelKeepAlive(channelKeepAlive); @@ -205,7 +205,7 @@ public void testSetChannelKeepAlive() { } @Test - public void testSetChannelKeepAliveTimeout() { + void testSetChannelKeepAliveTimeout() { int channelKeepAliveTimeout = 20000; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setChannelKeepAliveTimeout(channelKeepAliveTimeout); @@ -214,7 +214,7 @@ public void testSetChannelKeepAliveTimeout() { } @Test - public void testSetCapabilityNegotiationTimeout() { + void testSetCapabilityNegotiationTimeout() { long capabilityNegotiationTimeout = 5000; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setCapabilityNegotiationTimeout(capabilityNegotiationTimeout); @@ -223,7 +223,7 @@ public void testSetCapabilityNegotiationTimeout() { } @Test - public void testSetHealthCheckRetryTimes() { + void testSetHealthCheckRetryTimes() { int healthCheckRetryTimes = 3; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setHealthCheckRetryTimes(healthCheckRetryTimes); @@ -232,7 +232,7 @@ public void testSetHealthCheckRetryTimes() { } @Test - public void testSetHealthCheckTimeOut() { + void testSetHealthCheckTimeOut() { long healthCheckTimeOut = 3000; DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setHealthCheckTimeOut(healthCheckTimeOut); @@ -241,7 +241,7 @@ public void testSetHealthCheckTimeOut() { } @Test - public void testSetLabels() { + void testSetLabels() { Map labels = new HashMap<>(); labels.put("key1", "value1"); labels.put("key2", "value2"); @@ -254,7 +254,7 @@ public void testSetLabels() { } @Test - public void testSetTlsConfig() { + void testSetTlsConfig() { RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); builder.setTlsConfig(tlsConfig); @@ -263,7 +263,7 @@ public void testSetTlsConfig() { } @Test - public void testSetTlsConfigDirectly() { + void testSetTlsConfigDirectly() { RpcClientTlsConfig tlsConfig = new RpcClientTlsConfig(); DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder(); DefaultGrpcClientConfig config = (DefaultGrpcClientConfig) builder.build(); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTest.java index 726a3e0c48f..474d585955a 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTest.java @@ -38,12 +38,14 @@ import io.grpc.ClientCall; import io.grpc.ManagedChannel; import io.grpc.stub.StreamObserver; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import org.mockito.stubbing.Answer; import java.lang.reflect.Field; @@ -55,11 +57,11 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicReference; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyMap; import static org.mockito.Mockito.doReturn; @@ -70,23 +72,25 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class GrpcClientTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class GrpcClientTest { protected GrpcClient grpcClient; - @Mock - RpcClientTlsConfig tlsConfig; - protected RpcClient.ServerInfo serverInfo; protected GrpcClientConfig clientConfig; - @Before - public void setUp() throws Exception { - clientConfig = DefaultGrpcClientConfig.newBuilder().setServerCheckTimeOut(100L) - .setCapabilityNegotiationTimeout(100L).setChannelKeepAliveTimeout((int) TimeUnit.SECONDS.toMillis(3L)) - .setChannelKeepAlive(1000).setName("testClient").build(); + @Mock + RpcClientTlsConfig tlsConfig; + + @BeforeEach + void setUp() throws Exception { + clientConfig = DefaultGrpcClientConfig.newBuilder().setServerCheckTimeOut(100L).setCapabilityNegotiationTimeout(100L) + .setChannelKeepAliveTimeout((int) TimeUnit.SECONDS.toMillis(3L)).setChannelKeepAlive(1000).setName("testClient") + .build(); clientConfig.setTlsConfig(tlsConfig); grpcClient = spy(new GrpcClient(clientConfig) { @Override @@ -102,29 +106,29 @@ public int rpcPortOffset() { serverInfo = new RpcClient.ServerInfo("10.10.10.10", 8848); } - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { grpcClient.shutdown(); } @Test - public void testGetConnectionType() { + void testGetConnectionType() { assertEquals(ConnectionType.GRPC, grpcClient.getConnectionType()); } @Test - public void testConnectToServerFailed() { + void testConnectToServerFailed() { assertNull(grpcClient.connectToServer(serverInfo)); } @Test - public void testConnectToServerException() { + void testConnectToServerException() { doThrow(new RuntimeException("test")).when(grpcClient).createNewChannelStub(any(ManagedChannel.class)); assertNull(grpcClient.connectToServer(serverInfo)); } @Test - public void testConnectToServerMockSuccess() throws ExecutionException, InterruptedException, TimeoutException { + void testConnectToServerMockSuccess() throws ExecutionException, InterruptedException, TimeoutException { RequestGrpc.RequestFutureStub stub = mockStub(new ServerCheckResponse(), null); doReturn(stub).when(grpcClient).createNewChannelStub(any(ManagedChannel.class)); Connection connection = grpcClient.connectToServer(serverInfo); @@ -134,8 +138,7 @@ public void testConnectToServerMockSuccess() throws ExecutionException, Interrup } @Test - public void testConnectToServerMockSuccessWithAbility() - throws ExecutionException, InterruptedException, TimeoutException { + void testConnectToServerMockSuccessWithAbility() throws ExecutionException, InterruptedException, TimeoutException { ServerCheckResponse response = new ServerCheckResponse(); response.setSupportAbilityNegotiation(true); RequestGrpc.RequestFutureStub stub = mockStub(response, null); @@ -145,8 +148,7 @@ public void testConnectToServerMockSuccessWithAbility() } @Test - public void testConnectToServerMockHealthCheckFailed() - throws ExecutionException, InterruptedException, TimeoutException { + void testConnectToServerMockHealthCheckFailed() throws ExecutionException, InterruptedException, TimeoutException { RequestGrpc.RequestFutureStub stub = mockStub(null, new RuntimeException("test")); doReturn(stub).when(grpcClient).createNewChannelStub(any(ManagedChannel.class)); Connection connection = grpcClient.connectToServer(serverInfo); @@ -171,13 +173,12 @@ private RequestGrpc.RequestFutureStub mockStub(ServerCheckResponse response, Thr } @Test - public void testBindRequestStreamOnNextSetupAckRequest() + void testBindRequestStreamOnNextSetupAckRequest() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); when(stub.requestBiStream(any())).thenAnswer((Answer>) invocationOnMock -> { - ((StreamObserver) invocationOnMock.getArgument(0)).onNext( - GrpcUtils.convert(new SetupAckRequest())); + ((StreamObserver) invocationOnMock.getArgument(0)).onNext(GrpcUtils.convert(new SetupAckRequest())); return null; }); setCurrentConnection(grpcConnection, grpcClient); @@ -186,13 +187,12 @@ public void testBindRequestStreamOnNextSetupAckRequest() } @Test - public void testBindRequestStreamOnNextOtherRequest() + void testBindRequestStreamOnNextOtherRequest() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); when(stub.requestBiStream(any())).thenAnswer((Answer>) invocationOnMock -> { - ((StreamObserver) invocationOnMock.getArgument(0)).onNext( - GrpcUtils.convert(new ConnectResetRequest())); + ((StreamObserver) invocationOnMock.getArgument(0)).onNext(GrpcUtils.convert(new ConnectResetRequest())); return null; }); grpcClient.registerServerRequestHandler((request, connection) -> { @@ -207,13 +207,12 @@ public void testBindRequestStreamOnNextOtherRequest() } @Test - public void testBindRequestStreamOnNextNoRequest() + void testBindRequestStreamOnNextNoRequest() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); when(stub.requestBiStream(any())).thenAnswer((Answer>) invocationOnMock -> { - ((StreamObserver) invocationOnMock.getArgument(0)).onNext( - GrpcUtils.convert(new ConnectResetRequest())); + ((StreamObserver) invocationOnMock.getArgument(0)).onNext(GrpcUtils.convert(new ConnectResetRequest())); return null; }); grpcClient.registerServerRequestHandler((request, connection) -> null); @@ -223,13 +222,12 @@ public void testBindRequestStreamOnNextNoRequest() } @Test - public void testBindRequestStreamOnNextHandleException() + void testBindRequestStreamOnNextHandleException() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); when(stub.requestBiStream(any())).thenAnswer((Answer>) invocationOnMock -> { - ((StreamObserver) invocationOnMock.getArgument(0)).onNext( - GrpcUtils.convert(new ConnectResetRequest())); + ((StreamObserver) invocationOnMock.getArgument(0)).onNext(GrpcUtils.convert(new ConnectResetRequest())); return null; }); grpcClient.registerServerRequestHandler((request, connection) -> { @@ -241,7 +239,7 @@ public void testBindRequestStreamOnNextHandleException() } @Test - public void testBindRequestStreamOnNextParseException() + void testBindRequestStreamOnNextParseException() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); @@ -255,7 +253,7 @@ public void testBindRequestStreamOnNextParseException() } @Test - public void testBindRequestStreamOnErrorFromRunning() + void testBindRequestStreamOnErrorFromRunning() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); @@ -271,7 +269,7 @@ public void testBindRequestStreamOnErrorFromRunning() } @Test - public void testBindRequestStreamOnErrorFromNotRunning() + void testBindRequestStreamOnErrorFromNotRunning() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); @@ -289,7 +287,7 @@ public void testBindRequestStreamOnErrorFromNotRunning() } @Test - public void testBindRequestStreamOnCompletedFromRunning() + void testBindRequestStreamOnCompletedFromRunning() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); @@ -305,7 +303,7 @@ public void testBindRequestStreamOnCompletedFromRunning() } @Test - public void testBindRequestStreamOnCompletedFromNotRunning() + void testBindRequestStreamOnCompletedFromNotRunning() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { BiRequestStreamGrpc.BiRequestStreamStub stub = mock(BiRequestStreamGrpc.BiRequestStreamStub.class); GrpcConnection grpcConnection = mock(GrpcConnection.class); @@ -323,8 +321,7 @@ public void testBindRequestStreamOnCompletedFromNotRunning() } private void invokeBindRequestStream(GrpcClient grpcClient, BiRequestStreamGrpc.BiRequestStreamStub stub, - GrpcConnection grpcConnection) - throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { + GrpcConnection grpcConnection) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Method bindRequestStreamMethod = GrpcClient.class.getDeclaredMethod("bindRequestStream", BiRequestStreamGrpc.BiRequestStreamStub.class, GrpcConnection.class); bindRequestStreamMethod.setAccessible(true); @@ -338,15 +335,14 @@ private void setCurrentConnection(GrpcConnection connection, GrpcClient client) connectionField.set(client, connection); } - private void setStatus(GrpcClient grpcClient, RpcClientStatus status) - throws IllegalAccessException, NoSuchFieldException { + private void setStatus(GrpcClient grpcClient, RpcClientStatus status) throws IllegalAccessException, NoSuchFieldException { Field statusField = RpcClient.class.getDeclaredField("rpcClientStatus"); statusField.setAccessible(true); statusField.set(grpcClient, new AtomicReference<>(status)); } @Test - public void testAfterReset() throws NoSuchFieldException, IllegalAccessException { + void testAfterReset() throws NoSuchFieldException, IllegalAccessException { Field recAbilityContextField = GrpcClient.class.getDeclaredField("recAbilityContext"); recAbilityContextField.setAccessible(true); GrpcClient.RecAbilityContext context = mock(GrpcClient.RecAbilityContext.class); @@ -356,7 +352,7 @@ public void testAfterReset() throws NoSuchFieldException, IllegalAccessException } @Test - public void testAppendRecAbilityContext() { + void testAppendRecAbilityContext() { GrpcClient.RecAbilityContext context = new GrpcClient.RecAbilityContext(null); GrpcConnection connection = mock(GrpcConnection.class); context.reset(connection); @@ -370,7 +366,7 @@ public void testAppendRecAbilityContext() { } @Test - public void testSendResponseWithException() + void testSendResponseWithException() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException { GrpcConnection connection = mock(GrpcConnection.class); setCurrentConnection(connection, grpcClient); @@ -382,7 +378,7 @@ public void testSendResponseWithException() } @Test - public void testConstructorWithServerListFactory() { + void testConstructorWithServerListFactory() { ServerListFactory serverListFactory = mock(ServerListFactory.class); GrpcClient grpcClient = new GrpcClient(clientConfig, serverListFactory) { @Override @@ -399,7 +395,7 @@ public int rpcPortOffset() { } @Test - public void testConstructorWithoutServerListFactory() { + void testConstructorWithoutServerListFactory() { GrpcClient grpcClient = new GrpcClient("testNoFactory", 2, 2, Collections.emptyMap()) { @Override protected AbilityMode abilityMode() { diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTlsTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTlsTest.java index 801ead87003..d5cff6bd529 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTlsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClientTlsTest.java @@ -16,18 +16,18 @@ package com.alibaba.nacos.common.remote.client.grpc; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.when; /** * Currently not good way to test tls relative codes, and it's a optional feature, single test first. */ -public class GrpcClientTlsTest extends GrpcClientTest { +class GrpcClientTlsTest extends GrpcClientTest { @Test - public void testGrpcEnableTlsAndTrustPart() throws Exception { + void testGrpcEnableTlsAndTrustPart() throws Exception { when(tlsConfig.getEnableTls()).thenReturn(true); when(tlsConfig.getTrustCollectionCertFile()).thenReturn("ca-cert.pem"); when(tlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-RSA-AES256-GCM-SHA384"); @@ -36,7 +36,7 @@ public void testGrpcEnableTlsAndTrustPart() throws Exception { } @Test - public void testGrpcEnableTlsAndTrustAll() throws Exception { + void testGrpcEnableTlsAndTrustAll() throws Exception { when(tlsConfig.getEnableTls()).thenReturn(true); when(tlsConfig.getTrustCollectionCertFile()).thenReturn("ca-cert.pem"); when(tlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-RSA-AES256-GCM-SHA384"); @@ -46,7 +46,7 @@ public void testGrpcEnableTlsAndTrustAll() throws Exception { } @Test - public void testGrpcEnableTlsAndEnableMutualAuth() throws Exception { + void testGrpcEnableTlsAndEnableMutualAuth() throws Exception { when(tlsConfig.getEnableTls()).thenReturn(true); when(tlsConfig.getTrustCollectionCertFile()).thenReturn("ca-cert.pem"); when(tlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-RSA-AES256-GCM-SHA384"); @@ -58,7 +58,7 @@ public void testGrpcEnableTlsAndEnableMutualAuth() throws Exception { } @Test - public void testGrpcSslProvider() { + void testGrpcSslProvider() { when(tlsConfig.getEnableTls()).thenReturn(true); when(tlsConfig.getTrustCollectionCertFile()).thenReturn("ca-cert.pem"); when(tlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-RSA-AES256-GCM-SHA384"); @@ -71,7 +71,7 @@ public void testGrpcSslProvider() { } @Test - public void testGrpcEmptyTrustCollectionCertFile() { + void testGrpcEmptyTrustCollectionCertFile() { when(tlsConfig.getEnableTls()).thenReturn(true); when(tlsConfig.getTrustCollectionCertFile()).thenReturn(""); when(tlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-RSA-AES256-GCM-SHA384"); @@ -80,7 +80,7 @@ public void testGrpcEmptyTrustCollectionCertFile() { } @Test - public void testGrpcMutualAuth() { + void testGrpcMutualAuth() { when(tlsConfig.getEnableTls()).thenReturn(true); when(tlsConfig.getCiphers()).thenReturn("ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-RSA-AES256-GCM-SHA384"); when(tlsConfig.getProtocols()).thenReturn("TLSv1.2,TLSv1.3"); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClientTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClientTest.java index 7bd2c8d6538..3ccda6bfd33 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClientTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcClusterClientTest.java @@ -18,20 +18,20 @@ import com.alibaba.nacos.api.ability.constant.AbilityMode; import com.alibaba.nacos.api.exception.NacosException; -import org.junit.After; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.Properties; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class GrpcClusterClientTest { +class GrpcClusterClientTest { GrpcClusterClient grpcClusterClient; - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { System.clearProperty(GrpcConstants.NACOS_SERVER_GRPC_PORT_OFFSET_KEY); if (grpcClusterClient != null) { grpcClusterClient.shutdown(); @@ -39,28 +39,28 @@ public void tearDown() throws NacosException { } @Test - public void testAbilityMode() { + void testAbilityMode() { grpcClusterClient = new GrpcClusterClient("test"); assertEquals(AbilityMode.CLUSTER_CLIENT, grpcClusterClient.abilityMode()); } @Test - public void testRpcPortOffsetDefault() { + void testRpcPortOffsetDefault() { DefaultGrpcClientConfig.Builder builder = DefaultGrpcClientConfig.newBuilder() .buildClusterFromProperties(new Properties()); - grpcClusterClient = new GrpcClusterClient(builder.build()); + grpcClusterClient = new GrpcClusterClient(builder.build()); assertEquals(1001, grpcClusterClient.rpcPortOffset()); } @Test - public void testRpcPortOffsetFromSystemProperty() { + void testRpcPortOffsetFromSystemProperty() { System.setProperty(GrpcConstants.NACOS_SERVER_GRPC_PORT_OFFSET_KEY, "10001"); grpcClusterClient = new GrpcClusterClient("test", 8, 8, Collections.emptyMap()); assertEquals(10001, grpcClusterClient.rpcPortOffset()); } @Test - public void testGrpcClientByConfig() { + void testGrpcClientByConfig() { GrpcClientConfig config = DefaultGrpcClientConfig.newBuilder().setName("test111").build(); grpcClusterClient = new GrpcClusterClient(config); assertEquals("test111", grpcClusterClient.getName()); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcConnectionTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcConnectionTest.java index 65468cfb127..fb312fed736 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcConnectionTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcConnectionTest.java @@ -34,13 +34,15 @@ import com.google.protobuf.UnsafeByteOperations; import io.grpc.ManagedChannel; import io.grpc.stub.StreamObserver; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; @@ -48,8 +50,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doAnswer; @@ -58,8 +61,19 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class GrpcConnectionTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class GrpcConnectionTest { + + @Mock + ListenableFuture future; + + Payload responsePayload; + + Payload errorResponsePayload; + + GrpcConnection connection; @Mock private Executor executor; @@ -73,22 +87,13 @@ public class GrpcConnectionTest { @Mock private RequestGrpc.RequestFutureStub requestFutureStub; - @Mock - ListenableFuture future; - - Payload responsePayload; - - Payload errorResponsePayload; - - GrpcConnection connection; - - @BeforeClass - public static void setUpBeforeClass() { + @BeforeAll + static void setUpBeforeClass() { PayloadRegistry.init(); } - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { connection = new GrpcConnection(new RpcClient.ServerInfo(), executor); connection.setChannel(channel); connection.setPayloadStreamObserver(payloadStreamObserver); @@ -101,38 +106,40 @@ public void setUp() throws Exception { when(future.isDone()).thenReturn(true); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { connection.close(); } @Test - public void testGetAll() { + void testGetAll() { assertEquals(channel, connection.getChannel()); assertEquals(payloadStreamObserver, connection.getPayloadStreamObserver()); assertEquals(requestFutureStub, connection.getGrpcFutureServiceStub()); } @Test - public void testRequestSuccessSync() throws NacosException { + void testRequestSuccessSync() throws NacosException { Response response = connection.request(new HealthCheckRequest(), -1); assertTrue(response instanceof HealthCheckResponse); } @Test - public void testRequestSuccessAsync() throws NacosException { + void testRequestSuccessAsync() throws NacosException { Response response = connection.request(new HealthCheckRequest(), 100); assertTrue(response instanceof HealthCheckResponse); } - @Test(expected = NacosException.class) - public void testRequestTimeout() throws InterruptedException, ExecutionException, TimeoutException, NacosException { - when(future.get(100L, TimeUnit.MILLISECONDS)).thenThrow(new TimeoutException("test")); - connection.request(new HealthCheckRequest(), 100); + @Test + void testRequestTimeout() throws InterruptedException, ExecutionException, TimeoutException, NacosException { + assertThrows(NacosException.class, () -> { + when(future.get(100L, TimeUnit.MILLISECONDS)).thenThrow(new TimeoutException("test")); + connection.request(new HealthCheckRequest(), 100); + }); } @Test - public void testRequestFuture() throws Exception { + void testRequestFuture() throws Exception { RequestFuture requestFuture = connection.requestFuture(new HealthCheckRequest()); assertTrue(requestFuture.isDone()); Response response = requestFuture.get(); @@ -140,43 +147,47 @@ public void testRequestFuture() throws Exception { } @Test - public void testRequestFutureWithTimeout() throws Exception { + void testRequestFutureWithTimeout() throws Exception { RequestFuture requestFuture = connection.requestFuture(new HealthCheckRequest()); assertTrue(requestFuture.isDone()); Response response = requestFuture.get(100L); assertTrue(response instanceof HealthCheckResponse); } - @Test(expected = NacosException.class) - public void testRequestFutureFailure() throws Exception { - when(future.get()).thenReturn(errorResponsePayload); - RequestFuture requestFuture = connection.requestFuture(new HealthCheckRequest()); - assertTrue(requestFuture.isDone()); - requestFuture.get(); + @Test + void testRequestFutureFailure() throws Exception { + assertThrows(NacosException.class, () -> { + when(future.get()).thenReturn(errorResponsePayload); + RequestFuture requestFuture = connection.requestFuture(new HealthCheckRequest()); + assertTrue(requestFuture.isDone()); + requestFuture.get(); + }); } - @Test(expected = NacosException.class) - public void testRequestFutureWithTimeoutFailure() throws Exception { - when(future.get(100L, TimeUnit.MILLISECONDS)).thenReturn(errorResponsePayload); - RequestFuture requestFuture = connection.requestFuture(new HealthCheckRequest()); - assertTrue(requestFuture.isDone()); - requestFuture.get(100L); + @Test + void testRequestFutureWithTimeoutFailure() throws Exception { + assertThrows(NacosException.class, () -> { + when(future.get(100L, TimeUnit.MILLISECONDS)).thenReturn(errorResponsePayload); + RequestFuture requestFuture = connection.requestFuture(new HealthCheckRequest()); + assertTrue(requestFuture.isDone()); + requestFuture.get(100L); + }); } @Test - public void testSendResponse() { + void testSendResponse() { connection.sendResponse(new HealthCheckResponse()); verify(payloadStreamObserver).onNext(any(Payload.class)); } @Test - public void testSendRequest() { + void testSendRequest() { connection.sendRequest(new HealthCheckRequest()); verify(payloadStreamObserver).onNext(any(Payload.class)); } @Test - public void testAsyncRequestSuccess() throws NacosException { + void testAsyncRequestSuccess() throws NacosException { doAnswer(invocationOnMock -> { ((Runnable) invocationOnMock.getArgument(0)).run(); return null; @@ -187,7 +198,7 @@ public void testAsyncRequestSuccess() throws NacosException { } @Test - public void testAsyncRequestError() throws NacosException, ExecutionException, InterruptedException { + void testAsyncRequestError() throws NacosException, ExecutionException, InterruptedException { when(future.get()).thenReturn(errorResponsePayload); doAnswer(invocationOnMock -> { ((Runnable) invocationOnMock.getArgument(0)).run(); @@ -199,12 +210,12 @@ public void testAsyncRequestError() throws NacosException, ExecutionException, I } @Test - public void testAsyncRequestNullResponse() throws NacosException, ExecutionException, InterruptedException { + void testAsyncRequestNullResponse() throws NacosException, ExecutionException, InterruptedException { byte[] jsonBytes = JacksonUtils.toJsonBytes(null); Metadata.Builder metaBuilder = Metadata.newBuilder().setType(HealthCheckResponse.class.getSimpleName()); Payload nullResponsePayload = Payload.newBuilder() - .setBody(Any.newBuilder().setValue(UnsafeByteOperations.unsafeWrap(jsonBytes))) - .setMetadata(metaBuilder.build()).build(); + .setBody(Any.newBuilder().setValue(UnsafeByteOperations.unsafeWrap(jsonBytes))).setMetadata(metaBuilder.build()) + .build(); when(future.get()).thenReturn(nullResponsePayload); doAnswer(invocationOnMock -> { ((Runnable) invocationOnMock.getArgument(0)).run(); @@ -216,7 +227,7 @@ public void testAsyncRequestNullResponse() throws NacosException, ExecutionExcep } @Test - public void testAsyncRequestWithCancelException() throws NacosException, ExecutionException, InterruptedException { + void testAsyncRequestWithCancelException() throws NacosException, ExecutionException, InterruptedException { when(future.get()).thenThrow(new CancellationException("test")); doAnswer(invocationOnMock -> { ((Runnable) invocationOnMock.getArgument(0)).run(); @@ -228,7 +239,7 @@ public void testAsyncRequestWithCancelException() throws NacosException, Executi } @Test - public void testAsyncRequestWithOtherException() throws NacosException, ExecutionException, InterruptedException { + void testAsyncRequestWithOtherException() throws NacosException, ExecutionException, InterruptedException { when(future.get()).thenThrow(new RuntimeException("test")); doAnswer(invocationOnMock -> { ((Runnable) invocationOnMock.getArgument(0)).run(); @@ -240,7 +251,7 @@ public void testAsyncRequestWithOtherException() throws NacosException, Executio } @Test - public void testCloseWithException() { + void testCloseWithException() { doThrow(new RuntimeException("test")).when(payloadStreamObserver).onCompleted(); when(channel.shutdownNow()).thenThrow(new RuntimeException("test")); connection.close(); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcConstantsTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcConstantsTest.java index f74adfdd9ee..65140c8335a 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcConstantsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcConstantsTest.java @@ -16,16 +16,16 @@ package com.alibaba.nacos.common.remote.client.grpc; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class GrpcConstantsTest { +class GrpcConstantsTest { @Test - public void testGetRpcParams() { + void testGetRpcParams() { Class clazz = GrpcConstants.class; Field[] declaredFields = clazz.getDeclaredFields(); int i = 0; diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClientTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClientTest.java index 1f518230b90..ea875b7b751 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClientTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcSdkClientTest.java @@ -18,19 +18,19 @@ import com.alibaba.nacos.api.ability.constant.AbilityMode; import com.alibaba.nacos.api.exception.NacosException; -import org.junit.After; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class GrpcSdkClientTest { +class GrpcSdkClientTest { GrpcSdkClient grpcSdkClient; - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { System.clearProperty(GrpcConstants.NACOS_SERVER_GRPC_PORT_OFFSET_KEY); if (grpcSdkClient != null) { grpcSdkClient.shutdown(); @@ -38,26 +38,26 @@ public void tearDown() throws NacosException { } @Test - public void testAbilityMode() { + void testAbilityMode() { grpcSdkClient = new GrpcSdkClient("test"); assertEquals(AbilityMode.SDK_CLIENT, grpcSdkClient.abilityMode()); } @Test - public void testRpcPortOffsetDefault() { + void testRpcPortOffsetDefault() { grpcSdkClient = new GrpcSdkClient("test"); assertEquals(1000, grpcSdkClient.rpcPortOffset()); } @Test - public void testRpcPortOffsetFromSystemProperty() { + void testRpcPortOffsetFromSystemProperty() { System.setProperty(GrpcConstants.NACOS_SERVER_GRPC_PORT_OFFSET_KEY, "10000"); grpcSdkClient = new GrpcSdkClient("test", 8, 8, Collections.emptyMap()); assertEquals(10000, grpcSdkClient.rpcPortOffset()); } @Test - public void testGrpcClientByConfig() { + void testGrpcClientByConfig() { GrpcClientConfig config = DefaultGrpcClientConfig.newBuilder().setName("test111").build(); grpcSdkClient = new GrpcSdkClient(config); assertEquals("test111", grpcSdkClient.getName()); diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcUtilsTest.java index 37560eeb8c1..7e18107641b 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/client/grpc/GrpcUtilsTest.java @@ -25,23 +25,24 @@ import com.alibaba.nacos.api.remote.request.RequestMeta; import com.alibaba.nacos.common.remote.PayloadRegistry; import com.alibaba.nacos.common.remote.exception.RemoteException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.HashMap; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class GrpcUtilsTest { +class GrpcUtilsTest { private ServiceQueryRequest request; private ClientConfigMetricResponse response; - @Before - public void setup() { + @BeforeEach + void setup() { PayloadRegistry.init(); this.request = createRequest(); this.response = createResponse(); @@ -73,7 +74,7 @@ private ServiceQueryRequest createRequest() { } @Test - public void testConvertRequest() { + void testConvertRequest() { Payload convert = GrpcUtils.convert(request); assertEquals(request.getClass().getSimpleName(), convert.getMetadata().getType()); assertEquals("v1", convert.getMetadata().getHeadersMap().get("h1")); @@ -82,7 +83,7 @@ public void testConvertRequest() { } @Test - public void testConvertRequestWithMeta() { + void testConvertRequestWithMeta() { RequestMeta meta = new RequestMeta(); Payload convert = GrpcUtils.convert(request, meta); assertEquals(request.getClass().getSimpleName(), convert.getMetadata().getType()); @@ -92,32 +93,34 @@ public void testConvertRequestWithMeta() { } @Test - public void testConvertResponse() { + void testConvertResponse() { Payload convert = GrpcUtils.convert(response); assertEquals(response.getClass().getSimpleName(), convert.getMetadata().getType()); } @Test - public void testParse() { + void testParse() { Payload requestPayload = GrpcUtils.convert(request); - + ServiceQueryRequest request = (ServiceQueryRequest) GrpcUtils.parse(requestPayload); assertEquals(this.request.getHeaders(), request.getHeaders()); assertEquals(this.request.getCluster(), request.getCluster()); assertEquals(this.request.isHealthyOnly(), request.isHealthyOnly()); assertEquals(this.request.getNamespace(), request.getNamespace()); - + Payload responsePayload = GrpcUtils.convert(response); ClientConfigMetricResponse response = (ClientConfigMetricResponse) GrpcUtils.parse(responsePayload); assertEquals(this.response.getMetrics(), response.getMetrics()); } - @Test(expected = RemoteException.class) - public void testParseNullType() { - Payload mockPayload = mock(Payload.class); - Metadata mockMetadata = mock(Metadata.class); - when(mockPayload.getMetadata()).thenReturn(mockMetadata); - GrpcUtils.parse(mockPayload); + @Test + void testParseNullType() { + assertThrows(RemoteException.class, () -> { + Payload mockPayload = mock(Payload.class); + Metadata mockMetadata = mock(Metadata.class); + when(mockPayload.getMetadata()).thenReturn(mockMetadata); + GrpcUtils.parse(mockPayload); + }); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/exception/RemoteExceptionTest.java b/common/src/test/java/com/alibaba/nacos/common/remote/exception/RemoteExceptionTest.java index 138a28cea66..676a1c669c0 100644 --- a/common/src/test/java/com/alibaba/nacos/common/remote/exception/RemoteExceptionTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/remote/exception/RemoteExceptionTest.java @@ -16,15 +16,15 @@ package com.alibaba.nacos.common.remote.exception; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class RemoteExceptionTest { +class RemoteExceptionTest { @Test - public void testConnectionAlreadyClosedException() { + void testConnectionAlreadyClosedException() { ConnectionAlreadyClosedException exception = new ConnectionAlreadyClosedException("test message"); assertEquals(600, exception.getErrCode()); @@ -45,7 +45,7 @@ public void testConnectionAlreadyClosedException() { } @Test - public void testConnectionBusyException() { + void testConnectionBusyException() { String msg = "Connection is busy"; ConnectionBusyException exception = new ConnectionBusyException(msg); diff --git a/common/src/test/java/com/alibaba/nacos/common/spi/NacosServiceLoaderTest.java b/common/src/test/java/com/alibaba/nacos/common/spi/NacosServiceLoaderTest.java index fba646bcaf1..7f395e65947 100644 --- a/common/src/test/java/com/alibaba/nacos/common/spi/NacosServiceLoaderTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/spi/NacosServiceLoaderTest.java @@ -16,30 +16,30 @@ package com.alibaba.nacos.common.spi; -import org.junit.After; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import java.util.Collection; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; -public class NacosServiceLoaderTest { +class NacosServiceLoaderTest { - @After - public void tearDown() { + @AfterEach + void tearDown() { SpiTestImpl.newInstanceException = false; } @Test - public void testLoad() { + void testLoad() { Collection actual = NacosServiceLoader.load(SpiTestInterface.class); assertEquals(1, actual.size()); assertEquals(SpiTestImpl.class, actual.iterator().next().getClass()); } @Test - public void newServiceInstances() { + void newServiceInstances() { SpiTestInterface loadInstance = NacosServiceLoader.load(SpiTestInterface.class).iterator().next(); Collection actual = NacosServiceLoader.newServiceInstances(SpiTestInterface.class); assertEquals(1, actual.size()); @@ -48,7 +48,7 @@ public void newServiceInstances() { } @Test - public void newServiceInstancesWithException() { + void newServiceInstancesWithException() { NacosServiceLoader.load(SpiTestInterface.class); SpiTestImpl.newInstanceException = true; try { diff --git a/common/src/test/java/com/alibaba/nacos/common/task/engine/NacosDelayTaskExecuteEngineTest.java b/common/src/test/java/com/alibaba/nacos/common/task/engine/NacosDelayTaskExecuteEngineTest.java index 485645d189d..73a77b16f0b 100644 --- a/common/src/test/java/com/alibaba/nacos/common/task/engine/NacosDelayTaskExecuteEngineTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/task/engine/NacosDelayTaskExecuteEngineTest.java @@ -18,25 +18,25 @@ import com.alibaba.nacos.common.task.AbstractDelayTask; import com.alibaba.nacos.common.task.NacosTaskProcessor; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.internal.verification.Times; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class NacosDelayTaskExecuteEngineTest { +@ExtendWith(MockitoExtension.class) +class NacosDelayTaskExecuteEngineTest { private NacosDelayTaskExecuteEngine nacosDelayTaskExecuteEngine; @@ -48,8 +48,8 @@ public class NacosDelayTaskExecuteEngineTest { private AbstractDelayTask abstractTask; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { nacosDelayTaskExecuteEngine = new NacosDelayTaskExecuteEngine(NacosDelayTaskExecuteEngineTest.class.getName()); nacosDelayTaskExecuteEngine.setDefaultTaskProcessor(taskProcessor); abstractTask = new AbstractDelayTask() { @@ -59,13 +59,13 @@ public void merge(AbstractDelayTask task) { }; } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { nacosDelayTaskExecuteEngine.shutdown(); } @Test - public void testSize() { + void testSize() { assertEquals(0, nacosDelayTaskExecuteEngine.size()); nacosDelayTaskExecuteEngine.addTask("test", abstractTask); assertEquals(1, nacosDelayTaskExecuteEngine.size()); @@ -74,7 +74,7 @@ public void testSize() { } @Test - public void testIsEmpty() { + void testIsEmpty() { assertTrue(nacosDelayTaskExecuteEngine.isEmpty()); nacosDelayTaskExecuteEngine.addTask("test", abstractTask); assertFalse(nacosDelayTaskExecuteEngine.isEmpty()); @@ -83,7 +83,7 @@ public void testIsEmpty() { } @Test - public void testAddProcessor() throws InterruptedException { + void testAddProcessor() throws InterruptedException { when(testTaskProcessor.process(abstractTask)).thenReturn(true); nacosDelayTaskExecuteEngine.addProcessor("test", testTaskProcessor); nacosDelayTaskExecuteEngine.addTask("test", abstractTask); @@ -94,7 +94,7 @@ public void testAddProcessor() throws InterruptedException { } @Test - public void testRemoveProcessor() throws InterruptedException { + void testRemoveProcessor() throws InterruptedException { when(taskProcessor.process(abstractTask)).thenReturn(true); nacosDelayTaskExecuteEngine.addProcessor("test", testTaskProcessor); nacosDelayTaskExecuteEngine.removeProcessor("test"); @@ -105,7 +105,7 @@ public void testRemoveProcessor() throws InterruptedException { } @Test - public void testRetryTaskAfterFail() throws InterruptedException { + void testRetryTaskAfterFail() throws InterruptedException { when(taskProcessor.process(abstractTask)).thenReturn(false, true); nacosDelayTaskExecuteEngine.addTask("test", abstractTask); TimeUnit.MILLISECONDS.sleep(300); @@ -113,7 +113,7 @@ public void testRetryTaskAfterFail() throws InterruptedException { } @Test - public void testProcessorWithException() throws InterruptedException { + void testProcessorWithException() throws InterruptedException { when(taskProcessor.process(abstractTask)).thenThrow(new RuntimeException("test")); nacosDelayTaskExecuteEngine.addProcessor("test", testTaskProcessor); nacosDelayTaskExecuteEngine.removeProcessor("test"); @@ -123,7 +123,7 @@ public void testProcessorWithException() throws InterruptedException { } @Test - public void testTaskShouldNotExecute() throws InterruptedException { + void testTaskShouldNotExecute() throws InterruptedException { nacosDelayTaskExecuteEngine.addProcessor("test", testTaskProcessor); nacosDelayTaskExecuteEngine.addTask("test", abstractTask); abstractTask.setTaskInterval(10000L); @@ -134,7 +134,7 @@ public void testTaskShouldNotExecute() throws InterruptedException { } @Test - public void testTaskMerge() { + void testTaskMerge() { nacosDelayTaskExecuteEngine.addProcessor("test", testTaskProcessor); nacosDelayTaskExecuteEngine.addTask("test", abstractTask); nacosDelayTaskExecuteEngine.addTask("test", new AbstractDelayTask() { diff --git a/common/src/test/java/com/alibaba/nacos/common/task/engine/NacosExecuteTaskExecuteEngineTest.java b/common/src/test/java/com/alibaba/nacos/common/task/engine/NacosExecuteTaskExecuteEngineTest.java index 43a926b57e3..8855390820c 100644 --- a/common/src/test/java/com/alibaba/nacos/common/task/engine/NacosExecuteTaskExecuteEngineTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/task/engine/NacosExecuteTaskExecuteEngineTest.java @@ -19,47 +19,48 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.common.task.AbstractExecuteTask; import com.alibaba.nacos.common.task.NacosTaskProcessor; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.verify; -@RunWith(MockitoJUnitRunner.class) -public class NacosExecuteTaskExecuteEngineTest { - - private NacosExecuteTaskExecuteEngine executeTaskExecuteEngine; +@ExtendWith(MockitoExtension.class) +class NacosExecuteTaskExecuteEngineTest { @Mock NacosTaskProcessor taskProcessor; String cachedProcessor; - @Before - public void setUp() { + private NacosExecuteTaskExecuteEngine executeTaskExecuteEngine; + + @Mock + private AbstractExecuteTask task; + + @BeforeEach + void setUp() { cachedProcessor = System.getProperty("nacos.common.processors"); System.setProperty("nacos.common.processors", "1"); executeTaskExecuteEngine = new NacosExecuteTaskExecuteEngine("TEST", null); } - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { System.setProperty("nacos.common.processors", null == cachedProcessor ? "" : cachedProcessor); executeTaskExecuteEngine.shutdown(); } - @Mock - private AbstractExecuteTask task; - @Test - public void testAddTask() throws InterruptedException { + void testAddTask() throws InterruptedException { executeTaskExecuteEngine.addTask("test", task); TimeUnit.SECONDS.sleep(1); verify(task).run(); @@ -68,7 +69,7 @@ public void testAddTask() throws InterruptedException { } @Test - public void testAddTaskByProcessor() throws InterruptedException { + void testAddTaskByProcessor() throws InterruptedException { executeTaskExecuteEngine.addProcessor("test", taskProcessor); executeTaskExecuteEngine.addTask("test", task); verify(taskProcessor).process(task); @@ -76,18 +77,22 @@ public void testAddTaskByProcessor() throws InterruptedException { assertEquals(0, executeTaskExecuteEngine.size()); } - @Test(expected = UnsupportedOperationException.class) - public void testRemoveTask() { - executeTaskExecuteEngine.removeTask(task); + @Test + void testRemoveTask() { + assertThrows(UnsupportedOperationException.class, () -> { + executeTaskExecuteEngine.removeTask(task); + }); } - @Test(expected = UnsupportedOperationException.class) - public void testGetAllTaskKeys() { - executeTaskExecuteEngine.getAllTaskKeys(); + @Test + void testGetAllTaskKeys() { + assertThrows(UnsupportedOperationException.class, () -> { + executeTaskExecuteEngine.getAllTaskKeys(); + }); } @Test - public void testWorkersStatus() { + void testWorkersStatus() { assertEquals("TEST_0%1, pending tasks: 0\n", executeTaskExecuteEngine.workersStatus()); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/tls/SelfHostnameVerifierTest.java b/common/src/test/java/com/alibaba/nacos/common/tls/SelfHostnameVerifierTest.java index c08fe7d71c0..4242eee67c9 100644 --- a/common/src/test/java/com/alibaba/nacos/common/tls/SelfHostnameVerifierTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/tls/SelfHostnameVerifierTest.java @@ -16,16 +16,17 @@ package com.alibaba.nacos.common.tls; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLSession; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; @@ -33,8 +34,9 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -@RunWith(MockitoJUnitRunner.class) -public class SelfHostnameVerifierTest { +@ExtendWith(MockitoExtension.class) +class SelfHostnameVerifierTest { + @Mock HostnameVerifier hostnameVerifier; @@ -43,22 +45,22 @@ public class SelfHostnameVerifierTest { SelfHostnameVerifier selfHostnameVerifier; - @Before - public void setUp() { + @BeforeEach + void setUp() { selfHostnameVerifier = new SelfHostnameVerifier(hostnameVerifier); doReturn(false).when(hostnameVerifier).verify(anyString(), eq(sslSession)); } @Test - public void testVerify() { - Assert.assertTrue(selfHostnameVerifier.verify("localhost", sslSession)); - Assert.assertTrue(selfHostnameVerifier.verify("127.0.0.1", sslSession)); - Assert.assertTrue(selfHostnameVerifier.verify("10.10.10.10", sslSession)); + void testVerify() { + assertTrue(selfHostnameVerifier.verify("localhost", sslSession)); + assertTrue(selfHostnameVerifier.verify("127.0.0.1", sslSession)); + assertTrue(selfHostnameVerifier.verify("10.10.10.10", sslSession)); // hit cache - Assert.assertTrue(selfHostnameVerifier.verify("10.10.10.10", sslSession)); + assertTrue(selfHostnameVerifier.verify("10.10.10.10", sslSession)); - Assert.assertFalse(selfHostnameVerifier.verify("", sslSession)); - Assert.assertFalse(selfHostnameVerifier.verify(null, sslSession)); + assertFalse(selfHostnameVerifier.verify("", sslSession)); + assertFalse(selfHostnameVerifier.verify(null, sslSession)); verify(hostnameVerifier, times(2)).verify(any(), eq(sslSession)); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/tls/SelfTrustManagerTest.java b/common/src/test/java/com/alibaba/nacos/common/tls/SelfTrustManagerTest.java index fa18a635d83..3c3b4e81650 100644 --- a/common/src/test/java/com/alibaba/nacos/common/tls/SelfTrustManagerTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/tls/SelfTrustManagerTest.java @@ -16,9 +16,9 @@ package com.alibaba.nacos.common.tls; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; @@ -26,24 +26,24 @@ import java.security.cert.CertificateException; import java.security.cert.X509Certificate; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class SelfTrustManagerTest { +class SelfTrustManagerTest { - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { } @Test - public void testTrustManagerSuccess() throws CertificateException { + void testTrustManagerSuccess() throws CertificateException { URL url = SelfTrustManagerTest.class.getClassLoader().getResource("test-tls-cert.pem"); String path = url.getPath(); TrustManager[] actual = SelfTrustManager.trustManager(true, path); @@ -59,7 +59,7 @@ public void testTrustManagerSuccess() throws CertificateException { } @Test - public void testTrustManagerNonExist() throws CertificateException { + void testTrustManagerNonExist() throws CertificateException { TrustManager[] actual = SelfTrustManager.trustManager(true, "non-exist-cert.pem"); assertNotNull(actual); assertEquals(1, actual.length); diff --git a/common/src/test/java/com/alibaba/nacos/common/tls/TlsFileWatcherTest.java b/common/src/test/java/com/alibaba/nacos/common/tls/TlsFileWatcherTest.java index f974d955c80..2425aeb959d 100644 --- a/common/src/test/java/com/alibaba/nacos/common/tls/TlsFileWatcherTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/tls/TlsFileWatcherTest.java @@ -16,14 +16,15 @@ package com.alibaba.nacos.common.tls; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import org.mockito.stubbing.Answer; import java.io.File; @@ -35,14 +36,19 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -@RunWith(MockitoJUnitRunner.class) -public class TlsFileWatcherTest { +@ExtendWith(MockitoExtension.class) +// todo remove this +@MockitoSettings(strictness = Strictness.LENIENT) +class TlsFileWatcherTest { static Field watchFilesMapField; @@ -57,23 +63,23 @@ public class TlsFileWatcherTest { @Mock ScheduledExecutorService executorService; - @BeforeClass - public static void setUpBeforeClass() throws NoSuchFieldException, IllegalAccessException { + @BeforeAll + static void setUpBeforeClass() throws NoSuchFieldException, IllegalAccessException { watchFilesMapField = TlsFileWatcher.getInstance().getClass().getDeclaredField("watchFilesMap"); watchFilesMapField.setAccessible(true); Field modifiersField1 = Field.class.getDeclaredField("modifiers"); modifiersField1.setAccessible(true); modifiersField1.setInt(watchFilesMapField, watchFilesMapField.getModifiers() & ~Modifier.FINAL); - + fileMd5MapField = TlsFileWatcher.getInstance().getClass().getDeclaredField("fileMd5Map"); fileMd5MapField.setAccessible(true); - + serviceField = TlsFileWatcher.getInstance().getClass().getDeclaredField("service"); serviceField.setAccessible(true); Field modifiersField2 = Field.class.getDeclaredField("modifiers"); modifiersField2.setAccessible(true); modifiersField2.setInt(watchFilesMapField, watchFilesMapField.getModifiers() & ~Modifier.FINAL); - + startedField = TlsFileWatcher.getInstance().getClass().getDeclaredField("started"); startedField.setAccessible(true); Field modifiersField3 = Field.class.getDeclaredField("modifiers"); @@ -81,8 +87,8 @@ public static void setUpBeforeClass() throws NoSuchFieldException, IllegalAccess modifiersField3.setInt(watchFilesMapField, watchFilesMapField.getModifiers() & ~Modifier.FINAL); } - @Before - public void setUp() throws IOException, IllegalAccessException { + @BeforeEach + void setUp() throws IOException, IllegalAccessException { tempFile = new File("test.txt"); tempFile.createNewFile(); serviceField.set(TlsFileWatcher.getInstance(), executorService); @@ -95,86 +101,74 @@ public void setUp() throws IOException, IllegalAccessException { doAnswer(answer).when(executorService).scheduleAtFixedRate(any(), anyLong(), anyLong(), any()); } - @After - public void tearDown() throws IllegalAccessException { + @AfterEach + void tearDown() throws IllegalAccessException { ((Map) watchFilesMapField.get(TlsFileWatcher.getInstance())).clear(); ((Map) fileMd5MapField.get(TlsFileWatcher.getInstance())).clear(); tempFile.deleteOnExit(); } @Test - public void testAddFileChangeListener1() throws IOException, IllegalAccessException { - TlsFileWatcher.getInstance().addFileChangeListener( - filePath -> { }, - "not/exist/path" - ); - - Assert.assertTrue(((Map) watchFilesMapField.get(TlsFileWatcher.getInstance())).isEmpty()); - Assert.assertTrue(((Map) fileMd5MapField.get(TlsFileWatcher.getInstance())).isEmpty()); + void testAddFileChangeListener1() throws IOException, IllegalAccessException { + TlsFileWatcher.getInstance().addFileChangeListener(filePath -> { + }, "not/exist/path"); + + assertTrue(((Map) watchFilesMapField.get(TlsFileWatcher.getInstance())).isEmpty()); + assertTrue(((Map) fileMd5MapField.get(TlsFileWatcher.getInstance())).isEmpty()); } @Test - public void testAddFileChangeListener2() throws IOException, IllegalAccessException { - TlsFileWatcher.getInstance().addFileChangeListener( - filePath -> { }, - (String) null - ); + void testAddFileChangeListener2() throws IOException, IllegalAccessException { + TlsFileWatcher.getInstance().addFileChangeListener(filePath -> { + }, (String) null); - Assert.assertTrue(((Map) watchFilesMapField.get(TlsFileWatcher.getInstance())).isEmpty()); - Assert.assertTrue(((Map) fileMd5MapField.get(TlsFileWatcher.getInstance())).isEmpty()); + assertTrue(((Map) watchFilesMapField.get(TlsFileWatcher.getInstance())).isEmpty()); + assertTrue(((Map) fileMd5MapField.get(TlsFileWatcher.getInstance())).isEmpty()); } @Test - public void testAddFileChangeListener3() throws IOException, IllegalAccessException { - TlsFileWatcher.getInstance().addFileChangeListener( - filePath -> { }, - tempFile.getPath() - ); + void testAddFileChangeListener3() throws IOException, IllegalAccessException { + TlsFileWatcher.getInstance().addFileChangeListener(filePath -> { + }, tempFile.getPath()); - Assert.assertEquals(1, ((Map) watchFilesMapField.get(TlsFileWatcher.getInstance())).size()); - Assert.assertEquals(1, ((Map) fileMd5MapField.get(TlsFileWatcher.getInstance())).size()); + assertEquals(1, ((Map) watchFilesMapField.get(TlsFileWatcher.getInstance())).size()); + assertEquals(1, ((Map) fileMd5MapField.get(TlsFileWatcher.getInstance())).size()); } @Test - public void testStartGivenTlsFileNotChangeThenNoNotify() throws IllegalAccessException, InterruptedException, IOException { + void testStartGivenTlsFileNotChangeThenNoNotify() throws IllegalAccessException, InterruptedException, IOException { // given AtomicBoolean notified = new AtomicBoolean(false); - TlsFileWatcher.getInstance().addFileChangeListener( - filePath -> notified.set(true), - tempFile.getPath() - ); + TlsFileWatcher.getInstance().addFileChangeListener(filePath -> notified.set(true), tempFile.getPath()); // when TlsFileWatcher.getInstance().start(); // then - Assert.assertFalse(notified.get()); + assertFalse(notified.get()); } @Test - public void testStartGivenTlsFileChangeThenNotifyTheChangeFilePath() throws IllegalAccessException, IOException { + void testStartGivenTlsFileChangeThenNotifyTheChangeFilePath() throws IllegalAccessException, IOException { // given AtomicBoolean notified = new AtomicBoolean(false); AtomicReference changedFilePath = new AtomicReference<>(); - TlsFileWatcher.getInstance().addFileChangeListener( - filePath -> { - notified.set(true); - changedFilePath.set(filePath); - }, - tempFile.getPath() - ); + TlsFileWatcher.getInstance().addFileChangeListener(filePath -> { + notified.set(true); + changedFilePath.set(filePath); + }, tempFile.getPath()); ((Map) fileMd5MapField.get(TlsFileWatcher.getInstance())).put("test.txt", ""); - + // when TlsFileWatcher.getInstance().start(); // then - Assert.assertTrue(notified.get()); - Assert.assertEquals("test.txt", changedFilePath.get()); + assertTrue(notified.get()); + assertEquals("test.txt", changedFilePath.get()); } @Test - public void testStartGivenTaskIsAlreadyRunThenNotRunAgain() { + void testStartGivenTaskIsAlreadyRunThenNotRunAgain() { TlsFileWatcher.getInstance().start(); TlsFileWatcher.getInstance().start(); diff --git a/common/src/test/java/com/alibaba/nacos/common/tls/TlsHelperTest.java b/common/src/test/java/com/alibaba/nacos/common/tls/TlsHelperTest.java index 211f170c713..e2980e8dd39 100644 --- a/common/src/test/java/com/alibaba/nacos/common/tls/TlsHelperTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/tls/TlsHelperTest.java @@ -16,18 +16,18 @@ package com.alibaba.nacos.common.tls; -import org.junit.Test; +import org.junit.jupiter.api.Test; import javax.net.ssl.SSLContext; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; -public class TlsHelperTest { +class TlsHelperTest { @Test - public void testBuildSslContext() throws KeyManagementException, NoSuchAlgorithmException { + void testBuildSslContext() throws KeyManagementException, NoSuchAlgorithmException { SSLContext actual = TlsHelper.buildSslContext(true); assertNotNull(actual); } diff --git a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/HealthStateChangeTraceEventTest.java b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/HealthStateChangeTraceEventTest.java index a9d6d9e2e63..36c7d8d3861 100644 --- a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/HealthStateChangeTraceEventTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/HealthStateChangeTraceEventTest.java @@ -17,17 +17,17 @@ package com.alibaba.nacos.common.trace.event.naming; import com.alibaba.nacos.common.trace.HealthCheckType; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; -public class HealthStateChangeTraceEventTest extends NamingTraceEventTest { +class HealthStateChangeTraceEventTest extends NamingTraceEventTest { @Test - public void testHealthStateChangeTraceEventForClientBeat() { - HealthStateChangeTraceEvent healthStateChangeTraceEvent = new HealthStateChangeTraceEvent(TIME, NAMESPACE_ID, - GROUP_NAME, SERVICE_NAME, IP, PORT, false, "client_beat"); + void testHealthStateChangeTraceEventForClientBeat() { + HealthStateChangeTraceEvent healthStateChangeTraceEvent = new HealthStateChangeTraceEvent(TIME, NAMESPACE_ID, GROUP_NAME, + SERVICE_NAME, IP, PORT, false, "client_beat"); assertBasicInfo(healthStateChangeTraceEvent); assertHealthChangeInfo(healthStateChangeTraceEvent); assertEquals(HealthCheckType.CLIENT_BEAT, healthStateChangeTraceEvent.getHealthCheckType()); @@ -35,9 +35,9 @@ public void testHealthStateChangeTraceEventForClientBeat() { } @Test - public void testHealthStateChangeTraceEventForTcp() { - HealthStateChangeTraceEvent healthStateChangeTraceEvent = new HealthStateChangeTraceEvent(TIME, NAMESPACE_ID, - GROUP_NAME, SERVICE_NAME, IP, PORT, false, "tcp:unable2connect:"); + void testHealthStateChangeTraceEventForTcp() { + HealthStateChangeTraceEvent healthStateChangeTraceEvent = new HealthStateChangeTraceEvent(TIME, NAMESPACE_ID, GROUP_NAME, + SERVICE_NAME, IP, PORT, false, "tcp:unable2connect:"); assertBasicInfo(healthStateChangeTraceEvent); assertHealthChangeInfo(healthStateChangeTraceEvent); assertEquals(HealthCheckType.TCP_SUPER_SENSE, healthStateChangeTraceEvent.getHealthCheckType()); @@ -45,9 +45,9 @@ public void testHealthStateChangeTraceEventForTcp() { } @Test - public void testHealthStateChangeTraceEventForHttp() { - HealthStateChangeTraceEvent healthStateChangeTraceEvent = new HealthStateChangeTraceEvent(TIME, NAMESPACE_ID, - GROUP_NAME, SERVICE_NAME, IP, PORT, false, "http:error:"); + void testHealthStateChangeTraceEventForHttp() { + HealthStateChangeTraceEvent healthStateChangeTraceEvent = new HealthStateChangeTraceEvent(TIME, NAMESPACE_ID, GROUP_NAME, + SERVICE_NAME, IP, PORT, false, "http:error:"); assertBasicInfo(healthStateChangeTraceEvent); assertHealthChangeInfo(healthStateChangeTraceEvent); assertEquals(HealthCheckType.HTTP_HEALTH_CHECK, healthStateChangeTraceEvent.getHealthCheckType()); @@ -55,9 +55,9 @@ public void testHealthStateChangeTraceEventForHttp() { } @Test - public void testHealthStateChangeTraceEventForMysql() { - HealthStateChangeTraceEvent healthStateChangeTraceEvent = new HealthStateChangeTraceEvent(TIME, NAMESPACE_ID, - GROUP_NAME, SERVICE_NAME, IP, PORT, false, "mysql:timeout:"); + void testHealthStateChangeTraceEventForMysql() { + HealthStateChangeTraceEvent healthStateChangeTraceEvent = new HealthStateChangeTraceEvent(TIME, NAMESPACE_ID, GROUP_NAME, + SERVICE_NAME, IP, PORT, false, "mysql:timeout:"); assertBasicInfo(healthStateChangeTraceEvent); assertHealthChangeInfo(healthStateChangeTraceEvent); assertEquals(HealthCheckType.MYSQL_HEALTH_CHECK, healthStateChangeTraceEvent.getHealthCheckType()); diff --git a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/InstanceTraceEventTest.java b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/InstanceTraceEventTest.java index 6123a8aea83..f72b3058fb3 100644 --- a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/InstanceTraceEventTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/InstanceTraceEventTest.java @@ -17,18 +17,18 @@ package com.alibaba.nacos.common.trace.event.naming; import com.alibaba.nacos.common.trace.DeregisterInstanceReason; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class InstanceTraceEventTest extends NamingTraceEventTest { +class InstanceTraceEventTest extends NamingTraceEventTest { @Test - public void testRegisterInstanceTraceEvent() { + void testRegisterInstanceTraceEvent() { RegisterInstanceTraceEvent registerInstanceTraceEvent = new RegisterInstanceTraceEvent(TIME, CLIENT_IP, true, NAMESPACE_ID, GROUP_NAME, SERVICE_NAME, IP, PORT); assertBasicInfo(registerInstanceTraceEvent); @@ -41,9 +41,9 @@ public void testRegisterInstanceTraceEvent() { } @Test - public void testDeregisterInstanceTraceEvent() { - DeregisterInstanceTraceEvent deregisterInstanceTraceEvent = new DeregisterInstanceTraceEvent(TIME, CLIENT_IP, - true, DeregisterInstanceReason.NATIVE_DISCONNECTED, NAMESPACE_ID, GROUP_NAME, SERVICE_NAME, IP, PORT); + void testDeregisterInstanceTraceEvent() { + DeregisterInstanceTraceEvent deregisterInstanceTraceEvent = new DeregisterInstanceTraceEvent(TIME, CLIENT_IP, true, + DeregisterInstanceReason.NATIVE_DISCONNECTED, NAMESPACE_ID, GROUP_NAME, SERVICE_NAME, IP, PORT); assertBasicInfo(deregisterInstanceTraceEvent); assertEquals("DEREGISTER_INSTANCE_TRACE_EVENT", deregisterInstanceTraceEvent.getType()); assertEquals(CLIENT_IP, deregisterInstanceTraceEvent.getClientIp()); @@ -55,7 +55,7 @@ public void testDeregisterInstanceTraceEvent() { } @Test - public void testUpdateInstanceTraceEvent() { + void testUpdateInstanceTraceEvent() { Map metadata = new HashMap<>(); metadata.put("test1", "testValue"); UpdateInstanceTraceEvent updateInstanceTraceEvent = new UpdateInstanceTraceEvent(TIME, CLIENT_IP, NAMESPACE_ID, diff --git a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/NamingTraceEventTest.java b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/NamingTraceEventTest.java index f7d15840d2f..ea25444eddd 100644 --- a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/NamingTraceEventTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/NamingTraceEventTest.java @@ -16,8 +16,8 @@ package com.alibaba.nacos.common.trace.event.naming; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; public class NamingTraceEventTest { diff --git a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/ServiceTraceEventTest.java b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/ServiceTraceEventTest.java index 7ab0c2d98cd..02610a62249 100644 --- a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/ServiceTraceEventTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/ServiceTraceEventTest.java @@ -16,33 +16,33 @@ package com.alibaba.nacos.common.trace.event.naming; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class ServiceTraceEventTest extends NamingTraceEventTest { +class ServiceTraceEventTest extends NamingTraceEventTest { @Test - public void testRegisterInstanceTraceEvent() { - RegisterServiceTraceEvent registerServiceTraceEvent = new RegisterServiceTraceEvent(TIME, NAMESPACE_ID, - GROUP_NAME, SERVICE_NAME); + void testRegisterInstanceTraceEvent() { + RegisterServiceTraceEvent registerServiceTraceEvent = new RegisterServiceTraceEvent(TIME, NAMESPACE_ID, GROUP_NAME, + SERVICE_NAME); assertBasicInfo(registerServiceTraceEvent); assertEquals("REGISTER_SERVICE_TRACE_EVENT", registerServiceTraceEvent.getType()); } @Test - public void testDeregisterInstanceTraceEvent() { - DeregisterServiceTraceEvent deregisterServiceTraceEvent = new DeregisterServiceTraceEvent(TIME, NAMESPACE_ID, - GROUP_NAME, SERVICE_NAME); + void testDeregisterInstanceTraceEvent() { + DeregisterServiceTraceEvent deregisterServiceTraceEvent = new DeregisterServiceTraceEvent(TIME, NAMESPACE_ID, GROUP_NAME, + SERVICE_NAME); assertBasicInfo(deregisterServiceTraceEvent); assertEquals("DEREGISTER_SERVICE_TRACE_EVENT", deregisterServiceTraceEvent.getType()); } @Test - public void testUpdateInstanceTraceEvent() { + void testUpdateInstanceTraceEvent() { Map metadata = new HashMap<>(); metadata.put("test1", "testValue"); UpdateServiceTraceEvent updateServiceTraceEvent = new UpdateServiceTraceEvent(TIME, NAMESPACE_ID, GROUP_NAME, diff --git a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/SubscribeTraceEventTest.java b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/SubscribeTraceEventTest.java index 9adfb214c5f..8aecdc957d1 100644 --- a/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/SubscribeTraceEventTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/trace/event/naming/SubscribeTraceEventTest.java @@ -16,23 +16,23 @@ package com.alibaba.nacos.common.trace.event.naming; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class SubscribeTraceEventTest extends NamingTraceEventTest { +class SubscribeTraceEventTest extends NamingTraceEventTest { @Test - public void testRegisterInstanceTraceEvent() { - SubscribeServiceTraceEvent subscribeServiceTraceEvent = new SubscribeServiceTraceEvent(TIME, CLIENT_IP, - NAMESPACE_ID, GROUP_NAME, SERVICE_NAME); + void testRegisterInstanceTraceEvent() { + SubscribeServiceTraceEvent subscribeServiceTraceEvent = new SubscribeServiceTraceEvent(TIME, CLIENT_IP, NAMESPACE_ID, + GROUP_NAME, SERVICE_NAME); assertBasicInfo(subscribeServiceTraceEvent); assertEquals("SUBSCRIBE_SERVICE_TRACE_EVENT", subscribeServiceTraceEvent.getType()); assertEquals(CLIENT_IP, subscribeServiceTraceEvent.getClientIp()); } @Test - public void testDeregisterInstanceTraceEvent() { + void testDeregisterInstanceTraceEvent() { UnsubscribeServiceTraceEvent unsubscribeServiceTraceEvent = new UnsubscribeServiceTraceEvent(TIME, CLIENT_IP, NAMESPACE_ID, GROUP_NAME, SERVICE_NAME); assertBasicInfo(unsubscribeServiceTraceEvent); @@ -41,9 +41,9 @@ public void testDeregisterInstanceTraceEvent() { } @Test - public void testPushServiceTraceEvent() { - PushServiceTraceEvent pushServiceTraceEvent = new PushServiceTraceEvent(TIME, 10, 510, 510, CLIENT_IP, - NAMESPACE_ID, GROUP_NAME, SERVICE_NAME, 100); + void testPushServiceTraceEvent() { + PushServiceTraceEvent pushServiceTraceEvent = new PushServiceTraceEvent(TIME, 10, 510, 510, CLIENT_IP, NAMESPACE_ID, + GROUP_NAME, SERVICE_NAME, 100); assertBasicInfo(pushServiceTraceEvent); assertEquals("PUSH_SERVICE_TRACE_EVENT", pushServiceTraceEvent.getType()); assertEquals(CLIENT_IP, pushServiceTraceEvent.getClientIp()); diff --git a/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceEventPublisherFactoryTest.java b/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceEventPublisherFactoryTest.java index 2d996eacc76..7a373203092 100644 --- a/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceEventPublisherFactoryTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceEventPublisherFactoryTest.java @@ -18,22 +18,22 @@ import com.alibaba.nacos.common.notify.EventPublisher; import com.alibaba.nacos.common.notify.NotifyCenter; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class TraceEventPublisherFactoryTest { +class TraceEventPublisherFactoryTest { private Map originalEventPublisherMap; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { originalEventPublisherMap = new HashMap<>(NotifyCenter.getPublisherMap()); NotifyCenter.getPublisherMap().clear(); // Protect other unit test publisher affect this case. @@ -43,15 +43,15 @@ public void setUp() throws Exception { map.clear(); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { NotifyCenter.getPublisherMap().clear(); NotifyCenter.getPublisherMap().putAll(originalEventPublisherMap); originalEventPublisherMap = null; } @Test - public void testApply() { + void testApply() { TraceEventPublisherFactory.getInstance().apply(TraceTestEvent.TraceTestEvent1.class, Byte.SIZE); TraceEventPublisherFactory.getInstance().apply(TraceTestEvent.TraceTestEvent2.class, Byte.SIZE); TraceEventPublisherFactory.getInstance().apply(TraceTestEvent.class, Byte.SIZE); @@ -61,7 +61,7 @@ public void testApply() { } @Test - public void testApplyAfterAddEventType() { + void testApplyAfterAddEventType() { TraceEventPublisherFactory.getInstance().addPublisherEvent(TraceTestEvent.class); TraceEventPublisherFactory.getInstance().apply(TraceTestEvent.TraceTestEvent1.class, Byte.SIZE); TraceEventPublisherFactory.getInstance().apply(TraceTestEvent.TraceTestEvent2.class, Byte.SIZE); diff --git a/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceEventPublisherTest.java b/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceEventPublisherTest.java index 86ab30e1648..824a3a3f505 100644 --- a/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceEventPublisherTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceEventPublisherTest.java @@ -20,22 +20,22 @@ import com.alibaba.nacos.common.notify.listener.SmartSubscriber; import com.alibaba.nacos.common.notify.listener.Subscriber; import com.alibaba.nacos.common.utils.ThreadUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class TraceEventPublisherTest { +@ExtendWith(MockitoExtension.class) +class TraceEventPublisherTest { @Mock private Subscriber subscriber; @@ -45,19 +45,19 @@ public class TraceEventPublisherTest { private TraceEventPublisher traceEventPublisher; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { traceEventPublisher = new TraceEventPublisher(); traceEventPublisher.init(TraceTestEvent.class, Byte.SIZE); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { traceEventPublisher.shutdown(); } @Test - public void testAddSubscriber() { + void testAddSubscriber() { when(subscriber.subscribeType()).thenReturn(TraceTestEvent.TraceTestEvent1.class); traceEventPublisher.addSubscriber(subscriber); traceEventPublisher.addSubscriber(smartSubscriber, TraceTestEvent.TraceTestEvent2.class); @@ -71,7 +71,7 @@ public void testAddSubscriber() { } @Test - public void testRemoveSubscriber() { + void testRemoveSubscriber() { traceEventPublisher.addSubscriber(subscriber, TraceTestEvent.TraceTestEvent1.class); traceEventPublisher.addSubscriber(smartSubscriber, TraceTestEvent.TraceTestEvent1.class); TraceTestEvent.TraceTestEvent1 traceTestEvent1 = new TraceTestEvent.TraceTestEvent1(); @@ -95,7 +95,7 @@ public void testRemoveSubscriber() { } @Test - public void getStatus() throws NacosException { + void getStatus() throws NacosException { traceEventPublisher.publish(new TraceTestEvent()); traceEventPublisher.publish(new TraceTestEvent.TraceTestEvent1()); traceEventPublisher.publish(new TraceTestEvent.TraceTestEvent2()); diff --git a/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceTestEvent.java b/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceTestEvent.java index c239bc2d156..2813c728973 100644 --- a/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceTestEvent.java +++ b/common/src/test/java/com/alibaba/nacos/common/trace/publisher/TraceTestEvent.java @@ -19,6 +19,7 @@ import com.alibaba.nacos.common.notify.Event; public class TraceTestEvent extends Event { + private static final long serialVersionUID = 8568231862586636388L; static class TraceTestEvent1 extends TraceTestEvent { diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ArrayUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ArrayUtilsTest.java index 48ec56a0a34..d456e1c79d0 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ArrayUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ArrayUtilsTest.java @@ -16,37 +16,40 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * Test ArrayUtils. + * * @author zzq */ -public class ArrayUtilsTest { +class ArrayUtilsTest { Integer[] nullArr = null; - Integer[] nothingArr = new Integer[]{}; + Integer[] nothingArr = new Integer[] {}; @Test - public void testisEmpty() { - Integer[] arr = new Integer[]{1, 2}; - Assert.assertTrue(ArrayUtils.isEmpty(nullArr)); - Assert.assertTrue(ArrayUtils.isEmpty(nothingArr)); - Assert.assertFalse(ArrayUtils.isEmpty(arr)); + void testisEmpty() { + Integer[] arr = new Integer[] {1, 2}; + assertTrue(ArrayUtils.isEmpty(nullArr)); + assertTrue(ArrayUtils.isEmpty(nothingArr)); + assertFalse(ArrayUtils.isEmpty(arr)); } @Test - public void contains() { - Integer[] arr = new Integer[]{1, 2, 3}; - Integer[] arr1 = new Integer[]{1, 2, 3, null}; - Assert.assertFalse(ArrayUtils.contains(nullArr, "a")); - Assert.assertFalse(ArrayUtils.contains(nullArr, null)); - Assert.assertFalse(ArrayUtils.contains(nothingArr, "b")); - Assert.assertFalse(ArrayUtils.contains(arr, null)); - Assert.assertTrue(ArrayUtils.contains(arr1, null)); - Assert.assertTrue(ArrayUtils.contains(arr, 1)); - Assert.assertFalse(ArrayUtils.contains(arr, "1")); + void contains() { + assertFalse(ArrayUtils.contains(nullArr, "a")); + assertFalse(ArrayUtils.contains(nullArr, null)); + assertFalse(ArrayUtils.contains(nothingArr, "b")); + Integer[] arr = new Integer[] {1, 2, 3}; + assertFalse(ArrayUtils.contains(arr, null)); + Integer[] arr1 = new Integer[] {1, 2, 3, null}; + assertTrue(ArrayUtils.contains(arr1, null)); + assertTrue(ArrayUtils.contains(arr, 1)); + assertFalse(ArrayUtils.contains(arr, "1")); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ByteUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ByteUtilsTest.java index 153291d6f8e..ab00c287758 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ByteUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ByteUtilsTest.java @@ -17,8 +17,12 @@ package com.alibaba.nacos.common.utils; import com.alibaba.nacos.common.utils.to.User; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * ByteUtils Test. @@ -27,51 +31,51 @@ * @Author: ChenHao26 * @Date: 2022/8/22 10:58 */ -public class ByteUtilsTest { +class ByteUtilsTest { @Test - public void objectToByte() { + void objectToByte() { User user = new User(1, "google"); byte[] bytes = ByteUtils.toBytes(user); - Assert.assertNotNull(bytes); + assertNotNull(bytes); } @Test - public void stringToByte() { + void stringToByte() { byte[] bytes = ByteUtils.toBytes("google"); - Assert.assertNotNull(bytes); + assertNotNull(bytes); } @Test - public void toStringTest() { + void toStringTest() { byte[] bytes = ByteUtils.toBytes("google"); String str = ByteUtils.toString(bytes); - Assert.assertEquals(str, "google"); + assertEquals("google", str); } @Test - public void testForInputNull() { - Assert.assertEquals(0, ByteUtils.toBytes(null).length); - Assert.assertEquals(0, ByteUtils.toBytes((Object) null).length); - Assert.assertEquals("", ByteUtils.toString(null)); + void testForInputNull() { + assertEquals(0, ByteUtils.toBytes(null).length); + assertEquals(0, ByteUtils.toBytes((Object) null).length); + assertEquals("", ByteUtils.toString(null)); } @Test - public void isEmpty() { + void isEmpty() { byte[] bytes = ByteUtils.toBytes(""); - Assert.assertTrue(ByteUtils.isEmpty(bytes)); + assertTrue(ByteUtils.isEmpty(bytes)); byte[] byte2 = new byte[1024]; - Assert.assertFalse(ByteUtils.isEmpty(byte2)); + assertFalse(ByteUtils.isEmpty(byte2)); byte[] byte3 = null; - Assert.assertTrue(ByteUtils.isEmpty(byte3)); + assertTrue(ByteUtils.isEmpty(byte3)); } @Test - public void isNotEmpty() { + void isNotEmpty() { byte[] bytes = ByteUtils.toBytes("google"); - Assert.assertTrue(ByteUtils.isNotEmpty(bytes)); + assertTrue(ByteUtils.isNotEmpty(bytes)); byte[] bytes2 = ByteUtils.toBytes(""); - Assert.assertFalse(ByteUtils.isNotEmpty(bytes2)); + assertFalse(ByteUtils.isNotEmpty(bytes2)); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ClassUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ClassUtilsTest.java index b7068dacf4c..31dbcefb0c5 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ClassUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ClassUtilsTest.java @@ -17,94 +17,99 @@ package com.alibaba.nacos.common.utils; import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.util.Map; -public class ClassUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ClassUtilsTest { @Test - public void testFindClassByName1() { + void testFindClassByName1() { Class clazz = ClassUtils.findClassByName("java.lang.Integer"); - Assert.assertEquals("java.lang.Integer", clazz.getName()); + assertEquals("java.lang.Integer", clazz.getName()); } - @Test(expected = NacosRuntimeException.class) - public void testFindClassByName2() { - ClassUtils.findClassByName("not.exist.Class"); + @Test + void testFindClassByName2() { + assertThrows(NacosRuntimeException.class, () -> { + ClassUtils.findClassByName("not.exist.Class"); + }); } @Test - public void testGetName() { + void testGetName() { final String name = "java.lang.Integer"; Integer val = 1; - Assert.assertEquals(name, ClassUtils.getName(val)); - Assert.assertEquals(name, ClassUtils.getName(Integer.class)); + assertEquals(name, ClassUtils.getName(val)); + assertEquals(name, ClassUtils.getName(Integer.class)); - Assert.assertEquals(name, ClassUtils.getCanonicalName(val)); - Assert.assertEquals(name, ClassUtils.getCanonicalName(Integer.class)); + assertEquals(name, ClassUtils.getCanonicalName(val)); + assertEquals(name, ClassUtils.getCanonicalName(Integer.class)); - Assert.assertEquals("Integer", ClassUtils.getSimpleName(val)); - Assert.assertEquals("Integer", ClassUtils.getSimpleName(Integer.class)); + assertEquals("Integer", ClassUtils.getSimpleName(val)); + assertEquals("Integer", ClassUtils.getSimpleName(Integer.class)); } @Test - public void testIsAssignableFrom() { - Assert.assertTrue(ClassUtils.isAssignableFrom(Object.class, Integer.class)); + void testIsAssignableFrom() { + assertTrue(ClassUtils.isAssignableFrom(Object.class, Integer.class)); } @Test - public void testForNameArray() throws ClassNotFoundException { + void testForNameArray() throws ClassNotFoundException { Class clazz = ClassUtils.forName("[Lcom.alibaba.nacos.common.utils.ClassUtilsTest;", null); - Assert.assertEquals("[Lcom.alibaba.nacos.common.utils.ClassUtilsTest;", clazz.getName()); + assertEquals("[Lcom.alibaba.nacos.common.utils.ClassUtilsTest;", clazz.getName()); clazz = ClassUtils.forName("java.lang.String[]", null); - Assert.assertEquals("[Ljava.lang.String;", clazz.getName()); + assertEquals("[Ljava.lang.String;", clazz.getName()); clazz = ClassUtils.forName("[[Ljava.lang.String;", null); - Assert.assertEquals("[[Ljava.lang.String;", clazz.getName()); + assertEquals("[[Ljava.lang.String;", clazz.getName()); } - @Test(expected = ClassNotFoundException.class) - public void testForNameNonExist() throws ClassNotFoundException { - ClassUtils.forName("com.alibaba.nacos.common.NonExistClass", null); + @Test + void testForNameNonExist() throws ClassNotFoundException { + assertThrows(ClassNotFoundException.class, () -> { + ClassUtils.forName("com.alibaba.nacos.common.NonExistClass", null); + }); } @Test - public void testForNameFromPrimitive() throws NoSuchFieldException, IllegalAccessException, ClassNotFoundException { + void testForNameFromPrimitive() throws NoSuchFieldException, IllegalAccessException, ClassNotFoundException { Field field = ClassUtils.class.getDeclaredField("PRIMITIVE_TYPE_NAME_MAP"); field.setAccessible(true); Map> map = (Map>) field.get(null); map.put("Test", ClassUtilsTest.class); - Assert.assertEquals(ClassUtilsTest.class, ClassUtils.forName("Test", null)); + assertEquals(ClassUtilsTest.class, ClassUtils.forName("Test", null)); } @Test - public void testGetDefaultClassLoader() { + void testGetDefaultClassLoader() { ClassLoader cachedClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(null); - Assert.assertNotNull(ClassUtils.getDefaultClassLoader()); + assertNotNull(ClassUtils.getDefaultClassLoader()); } finally { Thread.currentThread().setContextClassLoader(cachedClassLoader); } } @Test - public void testClassPackageAsResourcePath() throws ClassNotFoundException { + void testClassPackageAsResourcePath() throws ClassNotFoundException { Class noPackageClass = ClassUtils.forName("ClassUtilsTestMockClass", null); - Assert.assertEquals("", ClassUtils.classPackageAsResourcePath(null)); - Assert.assertEquals("", ClassUtils.classPackageAsResourcePath(noPackageClass)); - Assert.assertEquals("com/alibaba/nacos/common/utils", - ClassUtils.classPackageAsResourcePath(ClassUtilsTest.class)); + assertEquals("", ClassUtils.classPackageAsResourcePath(null)); + assertEquals("", ClassUtils.classPackageAsResourcePath(noPackageClass)); + assertEquals("com/alibaba/nacos/common/utils", ClassUtils.classPackageAsResourcePath(ClassUtilsTest.class)); } @Test - public void testConvertClassNameAndClassPath() { + void testConvertClassNameAndClassPath() { String name = ClassUtilsTest.class.getName(); - Assert.assertEquals("com/alibaba/nacos/common/utils/ClassUtilsTest", - ClassUtils.convertClassNameToResourcePath(name)); - Assert.assertEquals(name, - ClassUtils.resourcePathToConvertClassName("com/alibaba/nacos/common/utils/ClassUtilsTest")); + assertEquals("com/alibaba/nacos/common/utils/ClassUtilsTest", ClassUtils.convertClassNameToResourcePath(name)); + assertEquals(name, ClassUtils.resourcePathToConvertClassName("com/alibaba/nacos/common/utils/ClassUtilsTest")); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/CollectionUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/CollectionUtilsTest.java index 8531c1c6138..6aea046f3a7 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/CollectionUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/CollectionUtilsTest.java @@ -16,8 +16,7 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Arrays; @@ -36,277 +35,323 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Unit test of CollectionUtil. * * @author sunjifeng */ -public class CollectionUtilsTest { +class CollectionUtilsTest { - @Test(expected = IndexOutOfBoundsException.class) - public void testGetList1() { - CollectionUtils.get(Collections.emptyList(), -1); + @Test + void testGetList1() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(Collections.emptyList(), -1); + }); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetList2() { - CollectionUtils.get(Collections.emptyList(), 1); + @Test + void testGetList2() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(Collections.emptyList(), 1); + }); } @Test - public void testGetList3() { - Assert.assertEquals("element", CollectionUtils.get(Collections.singletonList("element"), 0)); - Assert.assertEquals("element2", CollectionUtils.get(Arrays.asList("element1", "element2"), 1)); + void testGetList3() { + assertEquals("element", CollectionUtils.get(Collections.singletonList("element"), 0)); + assertEquals("element2", CollectionUtils.get(Arrays.asList("element1", "element2"), 1)); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetMap1() { - Map map = new HashMap<>(); - map.put("key1", "value1"); - CollectionUtils.get(map, -1); + @Test + void testGetMap1() { + assertThrows(IndexOutOfBoundsException.class, () -> { + Map map = new HashMap<>(); + map.put("key1", "value1"); + CollectionUtils.get(map, -1); + }); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetMap2() { - Map map = new HashMap<>(); - map.put("key1", "value1"); - CollectionUtils.get(map, -1); - CollectionUtils.get(map, 1); + @Test + void testGetMap2() { + assertThrows(IndexOutOfBoundsException.class, () -> { + Map map = new HashMap<>(); + map.put("key1", "value1"); + CollectionUtils.get(map, -1); + CollectionUtils.get(map, 1); + }); } @Test - public void testGetMap3() { + void testGetMap3() { Map map1 = new LinkedHashMap(1); Map map2 = new LinkedHashMap(2); map1.put("key", "value"); map2.put("key1", "value1"); map2.put("key2", "value2"); Iterator> iter = map1.entrySet().iterator(); - Assert.assertEquals(iter.next(), CollectionUtils.get(map1, 0)); + assertEquals(iter.next(), CollectionUtils.get(map1, 0)); Iterator> iter2 = map2.entrySet().iterator(); iter2.next(); Map.Entry second = iter2.next(); - Assert.assertEquals(second, CollectionUtils.get(map2, 1)); + assertEquals(second, CollectionUtils.get(map2, 1)); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetArray1() { - CollectionUtils.get(new Object[] {}, -1); + @Test + void testGetArray1() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(new Object[] {}, -1); + }); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetArray2() { - CollectionUtils.get(new Object[] {}, 0); + @Test + void testGetArray2() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(new Object[] {}, 0); + }); } @Test - public void testGetArray3() { - Assert.assertEquals("1", CollectionUtils.get(new Object[] {"1"}, 0)); - Assert.assertEquals("2", CollectionUtils.get(new Object[] {"1", "2"}, 1)); + void testGetArray3() { + assertEquals("1", CollectionUtils.get(new Object[] {"1"}, 0)); + assertEquals("2", CollectionUtils.get(new Object[] {"1", "2"}, 1)); } - @Test(expected = ArrayIndexOutOfBoundsException.class) - public void testGetArray4() { - CollectionUtils.get(new int[] {}, 0); + @Test + void testGetArray4() { + assertThrows(ArrayIndexOutOfBoundsException.class, () -> { + CollectionUtils.get(new int[] {}, 0); + }); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetArray5() { - CollectionUtils.get(new int[] {}, -1); + @Test + void testGetArray5() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(new int[] {}, -1); + }); } @Test - public void testGetArray6() { - Assert.assertEquals(1, CollectionUtils.get(new int[] {1, 2}, 0)); - Assert.assertEquals(2, CollectionUtils.get(new int[] {1, 2}, 1)); + void testGetArray6() { + assertEquals(1, CollectionUtils.get(new int[] {1, 2}, 0)); + assertEquals(2, CollectionUtils.get(new int[] {1, 2}, 1)); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetIterator1() { - CollectionUtils.get(Collections.emptyIterator(), 0); + @Test + void testGetIterator1() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(Collections.emptyIterator(), 0); + }); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetIterator2() { - CollectionUtils.get(Collections.emptyIterator(), -1); + @Test + void testGetIterator2() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(Collections.emptyIterator(), -1); + }); } @Test - public void testGetIterator3() { - Assert.assertEquals("1", CollectionUtils.get(Collections.singleton("1").iterator(), 0)); - Assert.assertEquals("2", CollectionUtils.get(Arrays.asList("1", "2").iterator(), 1)); + void testGetIterator3() { + assertEquals("1", CollectionUtils.get(Collections.singleton("1").iterator(), 0)); + assertEquals("2", CollectionUtils.get(Arrays.asList("1", "2").iterator(), 1)); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetCollection1() { - CollectionUtils.get(Collections.emptySet(), 0); + @Test + void testGetCollection1() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(Collections.emptySet(), 0); + }); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetCollection2() { - CollectionUtils.get(Collections.emptySet(), -1); + @Test + void testGetCollection2() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(Collections.emptySet(), -1); + }); } @Test - public void testGetCollection3() { - Assert.assertEquals("1", CollectionUtils.get(Collections.singleton("1"), 0)); - Assert.assertEquals("2", CollectionUtils.get(CollectionUtils.set("1", "2"), 1)); + void testGetCollection3() { + assertEquals("1", CollectionUtils.get(Collections.singleton("1"), 0)); + assertEquals("2", CollectionUtils.get(CollectionUtils.set("1", "2"), 1)); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetEnumeration1() { - CollectionUtils.get(asEnumeration(Collections.emptyIterator()), 0); + @Test + void testGetEnumeration1() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(asEnumeration(Collections.emptyIterator()), 0); + }); } - @Test(expected = IndexOutOfBoundsException.class) - public void testGetEnumeration2() { - CollectionUtils.get(asEnumeration(Collections.emptyIterator()), -1); + @Test + void testGetEnumeration2() { + assertThrows(IndexOutOfBoundsException.class, () -> { + CollectionUtils.get(asEnumeration(Collections.emptyIterator()), -1); + }); } @Test - public void testGetEnumeration3() { + void testGetEnumeration3() { Vector vector = new Vector<>(); vector.add("1"); vector.add("2"); - Assert.assertEquals("1", CollectionUtils.get(vector.elements(), 0)); - Assert.assertEquals("2", CollectionUtils.get(vector.elements(), 1)); + assertEquals("1", CollectionUtils.get(vector.elements(), 0)); + assertEquals("2", CollectionUtils.get(vector.elements(), 1)); } - @Test(expected = IllegalArgumentException.class) - public void testGet1() { - CollectionUtils.get(null, 0); + @Test + void testGet1() { + assertThrows(IllegalArgumentException.class, () -> { + CollectionUtils.get(null, 0); + }); } - @Test(expected = IllegalArgumentException.class) - public void testGet2() { - CollectionUtils.get("string", 0); + @Test + void testGet2() { + assertThrows(IllegalArgumentException.class, () -> { + CollectionUtils.get("string", 0); + }); } @Test - public void testSize() { + void testSize() { // collection - Assert.assertEquals(0, CollectionUtils.size(Collections.emptyList())); - Assert.assertEquals(1, CollectionUtils.size(Collections.singletonList(""))); - Assert.assertEquals(10, CollectionUtils.size(IntStream.range(0, 10).boxed().collect(Collectors.toList()))); + assertEquals(0, CollectionUtils.size(Collections.emptyList())); + assertEquals(1, CollectionUtils.size(Collections.singletonList(""))); + assertEquals(10, CollectionUtils.size(IntStream.range(0, 10).boxed().collect(Collectors.toList()))); // map Map map = new HashMap<>(); map.put("key1", "value1"); - Assert.assertEquals(1, CollectionUtils.size(map)); + assertEquals(1, CollectionUtils.size(map)); map.put("key2", "value2"); - Assert.assertEquals(2, CollectionUtils.size(map)); + assertEquals(2, CollectionUtils.size(map)); map.put("key3", "value3"); - Assert.assertEquals(3, CollectionUtils.size(map)); + assertEquals(3, CollectionUtils.size(map)); // array - Assert.assertEquals(1, CollectionUtils.size(new Object[] {"1"})); - Assert.assertEquals(2, CollectionUtils.size(new Object[] {"1", "2"})); - Assert.assertEquals(6, CollectionUtils.size(new Object[] {"1", "2", "3", "4", "5", "6"})); - Assert.assertEquals(1000, CollectionUtils.size(IntStream.range(0, 1000).boxed().toArray())); + assertEquals(1, CollectionUtils.size(new Object[] {"1"})); + assertEquals(2, CollectionUtils.size(new Object[] {"1", "2"})); + assertEquals(6, CollectionUtils.size(new Object[] {"1", "2", "3", "4", "5", "6"})); + assertEquals(1000, CollectionUtils.size(IntStream.range(0, 1000).boxed().toArray())); // primitive array - Assert.assertEquals(1, CollectionUtils.size(new int[] {1})); - Assert.assertEquals(2, CollectionUtils.size(new int[] {1, 2})); - Assert.assertEquals(6, CollectionUtils.size(new int[] {1, 2, 3, 4, 5, 6})); - Assert.assertEquals(1000, CollectionUtils.size(IntStream.range(0, 1000).toArray())); + assertEquals(1, CollectionUtils.size(new int[] {1})); + assertEquals(2, CollectionUtils.size(new int[] {1, 2})); + assertEquals(6, CollectionUtils.size(new int[] {1, 2, 3, 4, 5, 6})); + assertEquals(1000, CollectionUtils.size(IntStream.range(0, 1000).toArray())); // iterator - Assert.assertEquals(1, CollectionUtils.size(Collections.singleton("1").iterator())); - Assert.assertEquals(2, CollectionUtils.size(Arrays.asList("1", "2").iterator())); + assertEquals(1, CollectionUtils.size(Collections.singleton("1").iterator())); + assertEquals(2, CollectionUtils.size(Arrays.asList("1", "2").iterator())); // enumeration - Assert.assertEquals(0, CollectionUtils.size(asEnumeration(Collections.emptyIterator()))); - Assert.assertEquals(1, CollectionUtils.size(asEnumeration(Collections.singleton("").iterator()))); + assertEquals(0, CollectionUtils.size(asEnumeration(Collections.emptyIterator()))); + assertEquals(1, CollectionUtils.size(asEnumeration(Collections.singleton("").iterator()))); } - @Test(expected = IllegalArgumentException.class) - public void testSize1() { - CollectionUtils.size(null); + @Test + void testSize1() { + assertThrows(IllegalArgumentException.class, () -> { + CollectionUtils.size(null); + }); } - @Test(expected = IllegalArgumentException.class) - public void testSize2() { - CollectionUtils.size("string"); + @Test + void testSize2() { + assertThrows(IllegalArgumentException.class, () -> { + CollectionUtils.size("string"); + }); } @Test - public void testSizeIsEmpty() { + void testSizeIsEmpty() { // collection - Assert.assertTrue(CollectionUtils.sizeIsEmpty(Collections.emptyList())); - Assert.assertFalse(CollectionUtils.sizeIsEmpty(Collections.singletonList(""))); + assertTrue(CollectionUtils.sizeIsEmpty(Collections.emptyList())); + assertFalse(CollectionUtils.sizeIsEmpty(Collections.singletonList(""))); // map Map map = new HashMap<>(); map.put("key1", "value1"); map.put("key2", "value2"); - Assert.assertTrue(CollectionUtils.sizeIsEmpty(Collections.emptyMap())); - Assert.assertFalse(CollectionUtils.sizeIsEmpty(map)); + assertTrue(CollectionUtils.sizeIsEmpty(Collections.emptyMap())); + assertFalse(CollectionUtils.sizeIsEmpty(map)); // array - Assert.assertTrue(CollectionUtils.sizeIsEmpty(new Object[] {})); - Assert.assertFalse(CollectionUtils.sizeIsEmpty(new Object[] {"1", "2"})); + assertTrue(CollectionUtils.sizeIsEmpty(new Object[] {})); + assertFalse(CollectionUtils.sizeIsEmpty(new Object[] {"1", "2"})); // primitive array - Assert.assertTrue(CollectionUtils.sizeIsEmpty(new int[] {})); - Assert.assertFalse(CollectionUtils.sizeIsEmpty(new int[] {1, 2})); + assertTrue(CollectionUtils.sizeIsEmpty(new int[] {})); + assertFalse(CollectionUtils.sizeIsEmpty(new int[] {1, 2})); // iterator - Assert.assertTrue(CollectionUtils.sizeIsEmpty(Collections.emptyIterator())); - Assert.assertFalse(CollectionUtils.sizeIsEmpty(Arrays.asList("1", "2").iterator())); + assertTrue(CollectionUtils.sizeIsEmpty(Collections.emptyIterator())); + assertFalse(CollectionUtils.sizeIsEmpty(Arrays.asList("1", "2").iterator())); // enumeration - Assert.assertTrue(CollectionUtils.sizeIsEmpty(asEnumeration(Collections.emptyIterator()))); - Assert.assertFalse(CollectionUtils.sizeIsEmpty(asEnumeration(Collections.singleton("").iterator()))); + assertTrue(CollectionUtils.sizeIsEmpty(asEnumeration(Collections.emptyIterator()))); + assertFalse(CollectionUtils.sizeIsEmpty(asEnumeration(Collections.singleton("").iterator()))); } - @Test(expected = IllegalArgumentException.class) - public void testSizeIsEmpty1() { - CollectionUtils.sizeIsEmpty(null); + @Test + void testSizeIsEmpty1() { + assertThrows(IllegalArgumentException.class, () -> { + CollectionUtils.sizeIsEmpty(null); + }); } - @Test(expected = IllegalArgumentException.class) - public void testSizeIsEmpty2() { - CollectionUtils.sizeIsEmpty("string"); + @Test + void testSizeIsEmpty2() { + assertThrows(IllegalArgumentException.class, () -> { + CollectionUtils.sizeIsEmpty("string"); + }); } @Test - public void testContains() { - Assert.assertTrue(CollectionUtils.contains(Collections.singletonList("target"), "target")); - Assert.assertFalse(CollectionUtils.contains(Collections.emptyList(), "target")); + void testContains() { + assertTrue(CollectionUtils.contains(Collections.singletonList("target"), "target")); + assertFalse(CollectionUtils.contains(Collections.emptyList(), "target")); } @Test - public void testIsEmpty() { - Assert.assertFalse(CollectionUtils.isEmpty(Collections.singletonList("target"))); - Assert.assertTrue(CollectionUtils.isEmpty(Collections.emptyList())); - Assert.assertTrue(CollectionUtils.isEmpty(null)); + void testIsEmpty() { + assertFalse(CollectionUtils.isEmpty(Collections.singletonList("target"))); + assertTrue(CollectionUtils.isEmpty(Collections.emptyList())); + assertTrue(CollectionUtils.isEmpty(null)); } @Test - public void testIsNotEmpty() { - Assert.assertTrue(CollectionUtils.isNotEmpty(Collections.singletonList("target"))); - Assert.assertFalse(CollectionUtils.isNotEmpty(Collections.emptyList())); - Assert.assertFalse(CollectionUtils.isNotEmpty(null)); + void testIsNotEmpty() { + assertTrue(CollectionUtils.isNotEmpty(Collections.singletonList("target"))); + assertFalse(CollectionUtils.isNotEmpty(Collections.emptyList())); + assertFalse(CollectionUtils.isNotEmpty(null)); } @Test - public void testGetOrDefault() { - Assert.assertEquals("default", CollectionUtils.getOrDefault(Collections.emptyList(), 1, "default")); - Assert.assertEquals("element", - CollectionUtils.getOrDefault(Collections.singletonList("element"), 0, "default")); + void testGetOrDefault() { + assertEquals("default", CollectionUtils.getOrDefault(Collections.emptyList(), 1, "default")); + assertEquals("element", CollectionUtils.getOrDefault(Collections.singletonList("element"), 0, "default")); } @Test - public void testList() { - Assert.assertEquals(Arrays.asList(null, null, null), CollectionUtils.list(null, null, null)); - Assert.assertEquals(Arrays.asList("", "a", "b"), CollectionUtils.list("", "a", "b")); - Assert.assertEquals(new ArrayList(), CollectionUtils.list()); + void testList() { + assertEquals(Arrays.asList(null, null, null), CollectionUtils.list(null, null, null)); + assertEquals(Arrays.asList("", "a", "b"), CollectionUtils.list("", "a", "b")); + assertEquals(new ArrayList(), CollectionUtils.list()); } - @Test(expected = IllegalArgumentException.class) - public void testListNullPointerException() { - CollectionUtils.list(null); + @Test + void testListNullPointerException() { + assertThrows(IllegalArgumentException.class, () -> { + CollectionUtils.list(null); + }); } private Enumeration asEnumeration(final Iterator iterator) { @@ -325,71 +370,79 @@ public T nextElement() { } @Test - public void testSet() { + void testSet() { Set set = new HashSet<>(); set.add(null); - Assert.assertEquals(set, CollectionUtils.set(null, null, null)); - Assert.assertEquals(new LinkedHashSet(Arrays.asList("", "a", "b")), CollectionUtils.set("", "a", "b")); - Assert.assertEquals(new HashSet(), CollectionUtils.set()); + assertEquals(set, CollectionUtils.set(null, null, null)); + assertEquals(new LinkedHashSet(Arrays.asList("", "a", "b")), CollectionUtils.set("", "a", "b")); + assertEquals(new HashSet(), CollectionUtils.set()); } - @Test(expected = IllegalArgumentException.class) - public void testSetNullPointerException() { - CollectionUtils.set(null); + @Test + void testSetNullPointerException() { + assertThrows(IllegalArgumentException.class, () -> { + CollectionUtils.set(null); + }); } - @Test(expected = IllegalArgumentException.class) - public void testGetOnlyElementIllegalArgumentException() { - List list = Arrays.asList(1, 2, 3, 4, 5, 6); - CollectionUtils.getOnlyElement(list); + @Test + void testGetOnlyElementIllegalArgumentException() { + assertThrows(IllegalArgumentException.class, () -> { + List list = Arrays.asList(1, 2, 3, 4, 5, 6); + CollectionUtils.getOnlyElement(list); + }); } - @Test(expected = IllegalArgumentException.class) - public void testGetOnlyElementIllegalArgumentException2() { - CollectionUtils.getOnlyElement(null); + @Test + void testGetOnlyElementIllegalArgumentException2() { + assertThrows(IllegalArgumentException.class, () -> { + CollectionUtils.getOnlyElement(null); + }); } - @Test(expected = NoSuchElementException.class) - public void testGetOnlyElementNoSuchElementException() { - List list = new ArrayList<>(); - CollectionUtils.getOnlyElement(list); + @Test + void testGetOnlyElementNoSuchElementException() { + assertThrows(NoSuchElementException.class, () -> { + List list = new ArrayList<>(); + CollectionUtils.getOnlyElement(list); + }); } @Test - public void testGetOnly() { + void testGetOnly() { List list = Arrays.asList(1); int element = CollectionUtils.getOnlyElement(list); - Assert.assertEquals(1, element); + assertEquals(1, element); } @Test - public void testIsListEqualForNull() { - Assert.assertTrue(CollectionUtils.isListEqual(null, null)); - Assert.assertFalse(CollectionUtils.isListEqual(Collections.emptyList(), null)); - Assert.assertFalse(CollectionUtils.isListEqual(null, Collections.emptyList())); + void testIsListEqualForNull() { + assertTrue(CollectionUtils.isListEqual(null, null)); + assertFalse(CollectionUtils.isListEqual(Collections.emptyList(), null)); + assertFalse(CollectionUtils.isListEqual(null, Collections.emptyList())); } @Test - public void testIsListEqualForEquals() { + void testIsListEqualForEquals() { List list1 = Arrays.asList("1", "2", "3"); List list2 = Arrays.asList("1", "2", "3"); - Assert.assertTrue(CollectionUtils.isListEqual(list1, list1)); - Assert.assertTrue(CollectionUtils.isListEqual(list1, list2)); - Assert.assertTrue(CollectionUtils.isListEqual(list2, list1)); + assertTrue(CollectionUtils.isListEqual(list1, list1)); + assertTrue(CollectionUtils.isListEqual(list1, list2)); + assertTrue(CollectionUtils.isListEqual(list2, list1)); } @Test - public void testIsListEqualForNotEquals() { + void testIsListEqualForNotEquals() { List list1 = Arrays.asList("1", "2", "3"); List list2 = Arrays.asList("1", "2", "3", "4"); List list3 = Arrays.asList("1", "2", "3", "5"); - Assert.assertFalse(CollectionUtils.isListEqual(list1, list2)); - Assert.assertFalse(CollectionUtils.isListEqual(list2, list3)); + assertFalse(CollectionUtils.isListEqual(list1, list2)); + assertFalse(CollectionUtils.isListEqual(list2, list3)); } @Test - public void testIsMapEmpty() { - Assert.assertTrue(CollectionUtils.isMapEmpty(null)); - Assert.assertTrue(CollectionUtils.isMapEmpty(Collections.emptyMap())); + void testIsMapEmpty() { + assertTrue(CollectionUtils.isMapEmpty(null)); + assertTrue(CollectionUtils.isMapEmpty(Collections.emptyMap())); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ConcurrentHashSetTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ConcurrentHashSetTest.java index 752390de823..663a4b9b225 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ConcurrentHashSetTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ConcurrentHashSetTest.java @@ -16,55 +16,60 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; + import java.util.ConcurrentModificationException; import java.util.HashSet; import java.util.Random; import java.util.Set; import java.util.concurrent.TimeUnit; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * ConcurrentHashSet Test. + * * @ClassName: ConcurrentHashSetTest * @Author: ChenHao26 * @Date: 2022/8/22 11:21 */ -public class ConcurrentHashSetTest { +class ConcurrentHashSetTest { @Test - public void testBasicOps() { + void testBasicOps() { Set set = new ConcurrentHashSet<>(); // addition - Assert.assertTrue(set.add(0)); - Assert.assertTrue(set.add(1)); - Assert.assertTrue(set.contains(0)); - Assert.assertTrue(set.contains(1)); - Assert.assertFalse(set.contains(-1)); - Assert.assertEquals(2, set.size()); + assertTrue(set.add(0)); + assertTrue(set.add(1)); + assertTrue(set.contains(0)); + assertTrue(set.contains(1)); + assertFalse(set.contains(-1)); + assertEquals(2, set.size()); // iter for (int i : set) { - Assert.assertTrue(i == 0 || i == 1); + assertTrue(i == 0 || i == 1); } // removal - Assert.assertTrue(set.remove(0)); - Assert.assertFalse(set.remove(0)); - Assert.assertFalse(set.contains(0)); - Assert.assertTrue(set.contains(1)); - Assert.assertEquals(1, set.size()); - + assertTrue(set.remove(0)); + assertFalse(set.remove(0)); + assertFalse(set.contains(0)); + assertTrue(set.contains(1)); + assertEquals(1, set.size()); + // clear - Assert.assertFalse(set.isEmpty()); + assertFalse(set.isEmpty()); set.clear(); - Assert.assertEquals(0, set.size()); - Assert.assertTrue(set.isEmpty()); + assertEquals(0, set.size()); + assertTrue(set.isEmpty()); } @Test - public void testMultiThread() throws Exception { + void testMultiThread() throws Exception { int count = 5; SetMultiThreadChecker hashSetChecker = new SetMultiThreadChecker(new HashSet<>()); hashSetChecker.start(); @@ -75,8 +80,8 @@ public void testMultiThread() throws Exception { } count--; } - Assert.assertTrue(hashSetChecker.hasConcurrentError()); - + assertTrue(hashSetChecker.hasConcurrentError()); + count = 5; SetMultiThreadChecker concurrentSetChecker = new SetMultiThreadChecker(new ConcurrentHashSet<>()); concurrentSetChecker.start(); @@ -87,17 +92,17 @@ public void testMultiThread() throws Exception { } count--; } - Assert.assertFalse(concurrentSetChecker.hasConcurrentError()); + assertFalse(concurrentSetChecker.hasConcurrentError()); } static class SetMultiThreadChecker { - + private final AddDataThread addThread; private final DeleteDataThread deleteThread; - + private final IteratorThread iteratorThread; - + public SetMultiThreadChecker(Set setToCheck) { for (int i = 0; i < 1000; i++) { setToCheck.add(i); @@ -120,7 +125,7 @@ public boolean hasConcurrentError() { public boolean isRunning() { return addThread.isRunning() || deleteThread.isRunning() || iteratorThread.isRunning(); } - + public void stop() { addThread.stop(); deleteThread.stop(); @@ -130,17 +135,17 @@ public void stop() { } abstract static class ConcurrentCheckThread implements Runnable { - + protected final Set hashSet; - + protected boolean concurrentError = false; protected boolean finish = false; - + public ConcurrentCheckThread(Set hashSet) { this.hashSet = hashSet; } - + public boolean hasConcurrentError() { return concurrentError; } @@ -148,11 +153,11 @@ public boolean hasConcurrentError() { public void stop() { finish = true; } - + public boolean isRunning() { return !finish; } - + @Override public void run() { try { @@ -165,17 +170,17 @@ public void run() { finish = true; } } - + protected abstract void process(); } //add data thread static class AddDataThread extends ConcurrentCheckThread implements Runnable { - + public AddDataThread(Set hashSet) { super(hashSet); } - + @Override protected void process() { int random = new Random().nextInt(1000); @@ -186,11 +191,11 @@ protected void process() { // delete data thread static class DeleteDataThread extends ConcurrentCheckThread implements Runnable { - + public DeleteDataThread(Set hashSet) { super(hashSet); } - + @Override protected void process() { int random = new Random().nextInt(1000); @@ -200,11 +205,11 @@ protected void process() { } static class IteratorThread extends ConcurrentCheckThread implements Runnable { - + public IteratorThread(Set hashSet) { super(hashSet); } - + @Override public void run() { System.out.println("start -- hashSet.size() : " + hashSet.size()); @@ -223,7 +228,7 @@ public void run() { System.out.println("finished at " + f); System.out.println("end -- hashSet.size() : " + hashSet.size()); } - + @Override protected void process() { } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ConnLabelsUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ConnLabelsUtilsTest.java index 5bfe3256516..2f945da1853 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ConnLabelsUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ConnLabelsUtilsTest.java @@ -16,13 +16,14 @@ package com.alibaba.nacos.common.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Map; import java.util.Properties; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * description. @@ -30,10 +31,10 @@ * @author rong * @date 2024-03-01 15:10 */ -public class ConnLabelsUtilsTest { +class ConnLabelsUtilsTest { @Test - public void testParsePropertyValue2Map() { + void testParsePropertyValue2Map() { Properties properties = new Properties(); String property = "property"; String rawValue = "k1 = v1, k2 = v2"; @@ -50,7 +51,7 @@ public void testParsePropertyValue2Map() { Map m1 = ConnLabelsUtils.parsePropertyValue2Map(properties, property1); assertEquals(1, m1.size()); assertEquals("v11", m1.get("k11")); - assertEquals(null, m1.get("kk2")); + assertNull(m1.get("kk2")); m = ConnLabelsUtils.mergeMapByOrder(m, m1); assertEquals(3, m.size()); diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ConvertUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ConvertUtilsTest.java index 9239c5079bb..708408f11a2 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ConvertUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ConvertUtilsTest.java @@ -16,306 +16,310 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * Unit test of ConvertUtils. * * @author sunjifeng */ -public class ConvertUtilsTest { +class ConvertUtilsTest { @Test - public void testToInt() { + void testToInt() { // ConvertUtils.toInt(String) - Assert.assertEquals(0, ConvertUtils.toInt("0")); - Assert.assertEquals(-1, ConvertUtils.toInt("-1")); - Assert.assertEquals(10, ConvertUtils.toInt("10")); - Assert.assertEquals(Integer.MAX_VALUE, ConvertUtils.toInt(String.valueOf(Integer.MAX_VALUE))); - Assert.assertEquals(Integer.MIN_VALUE, ConvertUtils.toInt(String.valueOf(Integer.MIN_VALUE))); - Assert.assertEquals(0, ConvertUtils.toInt("notIntValue")); + assertEquals(0, ConvertUtils.toInt("0")); + assertEquals(-1, ConvertUtils.toInt("-1")); + assertEquals(10, ConvertUtils.toInt("10")); + assertEquals(Integer.MAX_VALUE, ConvertUtils.toInt(String.valueOf(Integer.MAX_VALUE))); + assertEquals(Integer.MIN_VALUE, ConvertUtils.toInt(String.valueOf(Integer.MIN_VALUE))); + assertEquals(0, ConvertUtils.toInt("notIntValue")); // ConvertUtils.toInt(String, Integer) - Assert.assertEquals(0, ConvertUtils.toInt("0", 100)); - Assert.assertEquals(100, ConvertUtils.toInt(null, 100)); - Assert.assertEquals(100, ConvertUtils.toInt("null", 100)); - Assert.assertEquals(100, ConvertUtils.toInt("notIntValue", 100)); + assertEquals(0, ConvertUtils.toInt("0", 100)); + assertEquals(100, ConvertUtils.toInt(null, 100)); + assertEquals(100, ConvertUtils.toInt("null", 100)); + assertEquals(100, ConvertUtils.toInt("notIntValue", 100)); } @Test - public void testToLong() { + void testToLong() { // ConvertUtils.toLong(Object) - Assert.assertEquals(0L, ConvertUtils.toLong(new ArrayList<>())); - Assert.assertEquals(10L, ConvertUtils.toLong((Object) 10L)); + assertEquals(0L, ConvertUtils.toLong(new ArrayList<>())); + assertEquals(10L, ConvertUtils.toLong((Object) 10L)); // ConvertUtils.toLong(String) - Assert.assertEquals(0L, ConvertUtils.toLong("0")); - Assert.assertEquals(-1L, ConvertUtils.toLong("-1")); - Assert.assertEquals(10L, ConvertUtils.toLong("10")); - Assert.assertEquals(Long.MAX_VALUE, ConvertUtils.toLong(String.valueOf(Long.MAX_VALUE))); - Assert.assertEquals(Long.MIN_VALUE, ConvertUtils.toLong(String.valueOf(Long.MIN_VALUE))); - Assert.assertEquals(0L, ConvertUtils.toLong("notIntValue")); + assertEquals(0L, ConvertUtils.toLong("0")); + assertEquals(-1L, ConvertUtils.toLong("-1")); + assertEquals(10L, ConvertUtils.toLong("10")); + assertEquals(Long.MAX_VALUE, ConvertUtils.toLong(String.valueOf(Long.MAX_VALUE))); + assertEquals(Long.MIN_VALUE, ConvertUtils.toLong(String.valueOf(Long.MIN_VALUE))); + assertEquals(0L, ConvertUtils.toLong("notIntValue")); // ConvertUtils.toLong(String, Integer) - Assert.assertEquals(0L, ConvertUtils.toLong("0", 100L)); - Assert.assertEquals(100L, ConvertUtils.toLong(null, 100L)); - Assert.assertEquals(100L, ConvertUtils.toLong("null", 100L)); - Assert.assertEquals(100L, ConvertUtils.toLong("notIntValue", 100L)); + assertEquals(0L, ConvertUtils.toLong("0", 100L)); + assertEquals(100L, ConvertUtils.toLong(null, 100L)); + assertEquals(100L, ConvertUtils.toLong("null", 100L)); + assertEquals(100L, ConvertUtils.toLong("notIntValue", 100L)); } @Test - public void testToBoolean() { + void testToBoolean() { // ConvertUtils.toBoolean(String) - Assert.assertTrue(ConvertUtils.toBoolean("true")); - Assert.assertTrue(ConvertUtils.toBoolean("True")); - Assert.assertTrue(ConvertUtils.toBoolean("TRUE")); - Assert.assertFalse(ConvertUtils.toBoolean("false")); - Assert.assertFalse(ConvertUtils.toBoolean("False")); - Assert.assertFalse(ConvertUtils.toBoolean("FALSE")); - Assert.assertFalse(ConvertUtils.toBoolean(null)); - Assert.assertFalse(ConvertUtils.toBoolean("notBoolean")); + assertTrue(ConvertUtils.toBoolean("true")); + assertTrue(ConvertUtils.toBoolean("True")); + assertTrue(ConvertUtils.toBoolean("TRUE")); + assertFalse(ConvertUtils.toBoolean("false")); + assertFalse(ConvertUtils.toBoolean("False")); + assertFalse(ConvertUtils.toBoolean("FALSE")); + assertFalse(ConvertUtils.toBoolean(null)); + assertFalse(ConvertUtils.toBoolean("notBoolean")); // ConvertUtils.toBoolean(String, boolean) - Assert.assertFalse(ConvertUtils.toBoolean("", false)); - Assert.assertFalse(ConvertUtils.toBoolean(null, false)); - Assert.assertFalse(ConvertUtils.toBoolean("notBoolean", false)); - Assert.assertTrue(ConvertUtils.toBoolean("true", false)); + assertFalse(ConvertUtils.toBoolean("", false)); + assertFalse(ConvertUtils.toBoolean(null, false)); + assertFalse(ConvertUtils.toBoolean("notBoolean", false)); + assertTrue(ConvertUtils.toBoolean("true", false)); } @Test - public void testToBooleanObject() { - Assert.assertTrue(ConvertUtils.toBooleanObject("T")); - Assert.assertTrue(ConvertUtils.toBooleanObject("t")); - Assert.assertTrue(ConvertUtils.toBooleanObject("Y")); - Assert.assertTrue(ConvertUtils.toBooleanObject("y")); - Assert.assertFalse(ConvertUtils.toBooleanObject("f")); - Assert.assertFalse(ConvertUtils.toBooleanObject("F")); - Assert.assertFalse(ConvertUtils.toBooleanObject("n")); - Assert.assertFalse(ConvertUtils.toBooleanObject("N")); - Assert.assertNull(ConvertUtils.toBooleanObject("a")); + void testToBooleanObject() { + assertTrue(ConvertUtils.toBooleanObject("T")); + assertTrue(ConvertUtils.toBooleanObject("t")); + assertTrue(ConvertUtils.toBooleanObject("Y")); + assertTrue(ConvertUtils.toBooleanObject("y")); + assertFalse(ConvertUtils.toBooleanObject("f")); + assertFalse(ConvertUtils.toBooleanObject("F")); + assertFalse(ConvertUtils.toBooleanObject("n")); + assertFalse(ConvertUtils.toBooleanObject("N")); + assertNull(ConvertUtils.toBooleanObject("a")); - Assert.assertTrue(ConvertUtils.toBooleanObject("on")); - Assert.assertTrue(ConvertUtils.toBooleanObject("oN")); - Assert.assertTrue(ConvertUtils.toBooleanObject("On")); - Assert.assertTrue(ConvertUtils.toBooleanObject("ON")); - Assert.assertFalse(ConvertUtils.toBooleanObject("No")); - Assert.assertFalse(ConvertUtils.toBooleanObject("NO")); - Assert.assertNull(ConvertUtils.toBooleanObject("an")); - Assert.assertNull(ConvertUtils.toBooleanObject("aN")); - Assert.assertNull(ConvertUtils.toBooleanObject("oa")); - Assert.assertNull(ConvertUtils.toBooleanObject("Oa")); - Assert.assertNull(ConvertUtils.toBooleanObject("Na")); - Assert.assertNull(ConvertUtils.toBooleanObject("na")); - Assert.assertNull(ConvertUtils.toBooleanObject("aO")); - Assert.assertNull(ConvertUtils.toBooleanObject("ao")); + assertTrue(ConvertUtils.toBooleanObject("on")); + assertTrue(ConvertUtils.toBooleanObject("oN")); + assertTrue(ConvertUtils.toBooleanObject("On")); + assertTrue(ConvertUtils.toBooleanObject("ON")); + assertFalse(ConvertUtils.toBooleanObject("No")); + assertFalse(ConvertUtils.toBooleanObject("NO")); + assertNull(ConvertUtils.toBooleanObject("an")); + assertNull(ConvertUtils.toBooleanObject("aN")); + assertNull(ConvertUtils.toBooleanObject("oa")); + assertNull(ConvertUtils.toBooleanObject("Oa")); + assertNull(ConvertUtils.toBooleanObject("Na")); + assertNull(ConvertUtils.toBooleanObject("na")); + assertNull(ConvertUtils.toBooleanObject("aO")); + assertNull(ConvertUtils.toBooleanObject("ao")); - Assert.assertFalse(ConvertUtils.toBooleanObject("off")); - Assert.assertFalse(ConvertUtils.toBooleanObject("ofF")); - Assert.assertFalse(ConvertUtils.toBooleanObject("oFf")); - Assert.assertFalse(ConvertUtils.toBooleanObject("oFF")); - Assert.assertFalse(ConvertUtils.toBooleanObject("Off")); - Assert.assertFalse(ConvertUtils.toBooleanObject("OfF")); - Assert.assertFalse(ConvertUtils.toBooleanObject("OFf")); - Assert.assertFalse(ConvertUtils.toBooleanObject("OFF")); - Assert.assertTrue(ConvertUtils.toBooleanObject("yes")); - Assert.assertTrue(ConvertUtils.toBooleanObject("yeS")); - Assert.assertTrue(ConvertUtils.toBooleanObject("yEs")); - Assert.assertTrue(ConvertUtils.toBooleanObject("yES")); - Assert.assertTrue(ConvertUtils.toBooleanObject("Yes")); - Assert.assertTrue(ConvertUtils.toBooleanObject("YeS")); - Assert.assertTrue(ConvertUtils.toBooleanObject("YEs")); - Assert.assertTrue(ConvertUtils.toBooleanObject("YES")); - Assert.assertNull(ConvertUtils.toBooleanObject("ono")); - Assert.assertNull(ConvertUtils.toBooleanObject("aes")); - Assert.assertNull(ConvertUtils.toBooleanObject("aeS")); - Assert.assertNull(ConvertUtils.toBooleanObject("aEs")); - Assert.assertNull(ConvertUtils.toBooleanObject("aES")); - Assert.assertNull(ConvertUtils.toBooleanObject("yas")); - Assert.assertNull(ConvertUtils.toBooleanObject("yaS")); - Assert.assertNull(ConvertUtils.toBooleanObject("Yas")); - Assert.assertNull(ConvertUtils.toBooleanObject("YaS")); - Assert.assertNull(ConvertUtils.toBooleanObject("yea")); - Assert.assertNull(ConvertUtils.toBooleanObject("yEa")); - Assert.assertNull(ConvertUtils.toBooleanObject("Yea")); - Assert.assertNull(ConvertUtils.toBooleanObject("YEa")); - Assert.assertNull(ConvertUtils.toBooleanObject("aff")); - Assert.assertNull(ConvertUtils.toBooleanObject("afF")); - Assert.assertNull(ConvertUtils.toBooleanObject("aFf")); - Assert.assertNull(ConvertUtils.toBooleanObject("aFF")); - Assert.assertNull(ConvertUtils.toBooleanObject("oaf")); - Assert.assertNull(ConvertUtils.toBooleanObject("oaF")); - Assert.assertNull(ConvertUtils.toBooleanObject("Oaf")); - Assert.assertNull(ConvertUtils.toBooleanObject("OaF")); - Assert.assertNull(ConvertUtils.toBooleanObject("Ofa")); - Assert.assertNull(ConvertUtils.toBooleanObject("ofa")); - Assert.assertNull(ConvertUtils.toBooleanObject("OFa")); - Assert.assertNull(ConvertUtils.toBooleanObject("oFa")); + assertFalse(ConvertUtils.toBooleanObject("off")); + assertFalse(ConvertUtils.toBooleanObject("ofF")); + assertFalse(ConvertUtils.toBooleanObject("oFf")); + assertFalse(ConvertUtils.toBooleanObject("oFF")); + assertFalse(ConvertUtils.toBooleanObject("Off")); + assertFalse(ConvertUtils.toBooleanObject("OfF")); + assertFalse(ConvertUtils.toBooleanObject("OFf")); + assertFalse(ConvertUtils.toBooleanObject("OFF")); + assertTrue(ConvertUtils.toBooleanObject("yes")); + assertTrue(ConvertUtils.toBooleanObject("yeS")); + assertTrue(ConvertUtils.toBooleanObject("yEs")); + assertTrue(ConvertUtils.toBooleanObject("yES")); + assertTrue(ConvertUtils.toBooleanObject("Yes")); + assertTrue(ConvertUtils.toBooleanObject("YeS")); + assertTrue(ConvertUtils.toBooleanObject("YEs")); + assertTrue(ConvertUtils.toBooleanObject("YES")); + assertNull(ConvertUtils.toBooleanObject("ono")); + assertNull(ConvertUtils.toBooleanObject("aes")); + assertNull(ConvertUtils.toBooleanObject("aeS")); + assertNull(ConvertUtils.toBooleanObject("aEs")); + assertNull(ConvertUtils.toBooleanObject("aES")); + assertNull(ConvertUtils.toBooleanObject("yas")); + assertNull(ConvertUtils.toBooleanObject("yaS")); + assertNull(ConvertUtils.toBooleanObject("Yas")); + assertNull(ConvertUtils.toBooleanObject("YaS")); + assertNull(ConvertUtils.toBooleanObject("yea")); + assertNull(ConvertUtils.toBooleanObject("yEa")); + assertNull(ConvertUtils.toBooleanObject("Yea")); + assertNull(ConvertUtils.toBooleanObject("YEa")); + assertNull(ConvertUtils.toBooleanObject("aff")); + assertNull(ConvertUtils.toBooleanObject("afF")); + assertNull(ConvertUtils.toBooleanObject("aFf")); + assertNull(ConvertUtils.toBooleanObject("aFF")); + assertNull(ConvertUtils.toBooleanObject("oaf")); + assertNull(ConvertUtils.toBooleanObject("oaF")); + assertNull(ConvertUtils.toBooleanObject("Oaf")); + assertNull(ConvertUtils.toBooleanObject("OaF")); + assertNull(ConvertUtils.toBooleanObject("Ofa")); + assertNull(ConvertUtils.toBooleanObject("ofa")); + assertNull(ConvertUtils.toBooleanObject("OFa")); + assertNull(ConvertUtils.toBooleanObject("oFa")); - Assert.assertTrue(ConvertUtils.toBooleanObject("true")); - Assert.assertTrue(ConvertUtils.toBooleanObject("truE")); - Assert.assertTrue(ConvertUtils.toBooleanObject("trUe")); - Assert.assertTrue(ConvertUtils.toBooleanObject("trUE")); - Assert.assertTrue(ConvertUtils.toBooleanObject("tRue")); - Assert.assertTrue(ConvertUtils.toBooleanObject("tRuE")); - Assert.assertTrue(ConvertUtils.toBooleanObject("tRUe")); - Assert.assertTrue(ConvertUtils.toBooleanObject("tRUE")); - Assert.assertTrue(ConvertUtils.toBooleanObject("True")); - Assert.assertTrue(ConvertUtils.toBooleanObject("TruE")); - Assert.assertTrue(ConvertUtils.toBooleanObject("TrUe")); - Assert.assertTrue(ConvertUtils.toBooleanObject("TrUE")); - Assert.assertTrue(ConvertUtils.toBooleanObject("TRue")); - Assert.assertTrue(ConvertUtils.toBooleanObject("TRuE")); - Assert.assertTrue(ConvertUtils.toBooleanObject("TRUe")); - Assert.assertTrue(ConvertUtils.toBooleanObject("TRUE")); - Assert.assertNull(ConvertUtils.toBooleanObject("Xrue")); - Assert.assertNull(ConvertUtils.toBooleanObject("XruE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XrUe")); - Assert.assertNull(ConvertUtils.toBooleanObject("XrUE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XRue")); - Assert.assertNull(ConvertUtils.toBooleanObject("XRuE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XRUe")); - Assert.assertNull(ConvertUtils.toBooleanObject("XRUE")); - Assert.assertNull(ConvertUtils.toBooleanObject("tXue")); - Assert.assertNull(ConvertUtils.toBooleanObject("tXuE")); - Assert.assertNull(ConvertUtils.toBooleanObject("tXUe")); - Assert.assertNull(ConvertUtils.toBooleanObject("tXUE")); - Assert.assertNull(ConvertUtils.toBooleanObject("TXue")); - Assert.assertNull(ConvertUtils.toBooleanObject("TXuE")); - Assert.assertNull(ConvertUtils.toBooleanObject("TXUe")); - Assert.assertNull(ConvertUtils.toBooleanObject("TXUE")); - Assert.assertNull(ConvertUtils.toBooleanObject("trXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("trXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("tRXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("tRXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("TrXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("TrXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("TRXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("TRXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("truX")); - Assert.assertNull(ConvertUtils.toBooleanObject("trUX")); - Assert.assertNull(ConvertUtils.toBooleanObject("tRuX")); - Assert.assertNull(ConvertUtils.toBooleanObject("tRUX")); - Assert.assertNull(ConvertUtils.toBooleanObject("TruX")); - Assert.assertNull(ConvertUtils.toBooleanObject("TrUX")); - Assert.assertNull(ConvertUtils.toBooleanObject("TRuX")); - Assert.assertNull(ConvertUtils.toBooleanObject("TRUX")); + assertTrue(ConvertUtils.toBooleanObject("true")); + assertTrue(ConvertUtils.toBooleanObject("truE")); + assertTrue(ConvertUtils.toBooleanObject("trUe")); + assertTrue(ConvertUtils.toBooleanObject("trUE")); + assertTrue(ConvertUtils.toBooleanObject("tRue")); + assertTrue(ConvertUtils.toBooleanObject("tRuE")); + assertTrue(ConvertUtils.toBooleanObject("tRUe")); + assertTrue(ConvertUtils.toBooleanObject("tRUE")); + assertTrue(ConvertUtils.toBooleanObject("True")); + assertTrue(ConvertUtils.toBooleanObject("TruE")); + assertTrue(ConvertUtils.toBooleanObject("TrUe")); + assertTrue(ConvertUtils.toBooleanObject("TrUE")); + assertTrue(ConvertUtils.toBooleanObject("TRue")); + assertTrue(ConvertUtils.toBooleanObject("TRuE")); + assertTrue(ConvertUtils.toBooleanObject("TRUe")); + assertTrue(ConvertUtils.toBooleanObject("TRUE")); + assertNull(ConvertUtils.toBooleanObject("Xrue")); + assertNull(ConvertUtils.toBooleanObject("XruE")); + assertNull(ConvertUtils.toBooleanObject("XrUe")); + assertNull(ConvertUtils.toBooleanObject("XrUE")); + assertNull(ConvertUtils.toBooleanObject("XRue")); + assertNull(ConvertUtils.toBooleanObject("XRuE")); + assertNull(ConvertUtils.toBooleanObject("XRUe")); + assertNull(ConvertUtils.toBooleanObject("XRUE")); + assertNull(ConvertUtils.toBooleanObject("tXue")); + assertNull(ConvertUtils.toBooleanObject("tXuE")); + assertNull(ConvertUtils.toBooleanObject("tXUe")); + assertNull(ConvertUtils.toBooleanObject("tXUE")); + assertNull(ConvertUtils.toBooleanObject("TXue")); + assertNull(ConvertUtils.toBooleanObject("TXuE")); + assertNull(ConvertUtils.toBooleanObject("TXUe")); + assertNull(ConvertUtils.toBooleanObject("TXUE")); + assertNull(ConvertUtils.toBooleanObject("trXe")); + assertNull(ConvertUtils.toBooleanObject("trXE")); + assertNull(ConvertUtils.toBooleanObject("tRXe")); + assertNull(ConvertUtils.toBooleanObject("tRXE")); + assertNull(ConvertUtils.toBooleanObject("TrXe")); + assertNull(ConvertUtils.toBooleanObject("TrXE")); + assertNull(ConvertUtils.toBooleanObject("TRXe")); + assertNull(ConvertUtils.toBooleanObject("TRXE")); + assertNull(ConvertUtils.toBooleanObject("truX")); + assertNull(ConvertUtils.toBooleanObject("trUX")); + assertNull(ConvertUtils.toBooleanObject("tRuX")); + assertNull(ConvertUtils.toBooleanObject("tRUX")); + assertNull(ConvertUtils.toBooleanObject("TruX")); + assertNull(ConvertUtils.toBooleanObject("TrUX")); + assertNull(ConvertUtils.toBooleanObject("TRuX")); + assertNull(ConvertUtils.toBooleanObject("TRUX")); - Assert.assertFalse(ConvertUtils.toBooleanObject("false")); - Assert.assertFalse(ConvertUtils.toBooleanObject("falsE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("falSe")); - Assert.assertFalse(ConvertUtils.toBooleanObject("falSE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("faLse")); - Assert.assertFalse(ConvertUtils.toBooleanObject("faLsE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("faLSe")); - Assert.assertFalse(ConvertUtils.toBooleanObject("faLSE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("fAlse")); - Assert.assertFalse(ConvertUtils.toBooleanObject("fAlsE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("fAlSe")); - Assert.assertFalse(ConvertUtils.toBooleanObject("fAlSE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("fALse")); - Assert.assertFalse(ConvertUtils.toBooleanObject("fALsE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("fALSe")); - Assert.assertFalse(ConvertUtils.toBooleanObject("fALSE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("False")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FalsE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FalSe")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FalSE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FaLse")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FaLsE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FaLSe")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FaLSE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FAlse")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FAlsE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FAlSe")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FAlSE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FALse")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FALsE")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FALSe")); - Assert.assertFalse(ConvertUtils.toBooleanObject("FALSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("Xalse")); - Assert.assertNull(ConvertUtils.toBooleanObject("XalsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XalSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("XalSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XaLse")); - Assert.assertNull(ConvertUtils.toBooleanObject("XaLsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XaLSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("XaLSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XAlse")); - Assert.assertNull(ConvertUtils.toBooleanObject("XAlsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XAlSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("XAlSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XALse")); - Assert.assertNull(ConvertUtils.toBooleanObject("XALsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("XALSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("XALSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("fXlse")); - Assert.assertNull(ConvertUtils.toBooleanObject("fXlsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("fXlSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("fXlSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("fXLse")); - Assert.assertNull(ConvertUtils.toBooleanObject("fXLsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("fXLSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("fXLSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FXlse")); - Assert.assertNull(ConvertUtils.toBooleanObject("FXlsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FXlSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("FXlSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FXLse")); - Assert.assertNull(ConvertUtils.toBooleanObject("FXLsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FXLSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("FXLSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("faXse")); - Assert.assertNull(ConvertUtils.toBooleanObject("faXsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("faXSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("faXSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("fAXse")); - Assert.assertNull(ConvertUtils.toBooleanObject("fAXsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("fAXSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("fAXSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FaXse")); - Assert.assertNull(ConvertUtils.toBooleanObject("FaXsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FaXSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("FaXSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FAXse")); - Assert.assertNull(ConvertUtils.toBooleanObject("FAXsE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FAXSe")); - Assert.assertNull(ConvertUtils.toBooleanObject("FAXSE")); - Assert.assertNull(ConvertUtils.toBooleanObject("falXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("falXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("faLXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("faLXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("fAlXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("fAlXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("fALXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("fALXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FalXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("FalXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FaLXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("FaLXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FAlXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("FAlXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("FALXe")); - Assert.assertNull(ConvertUtils.toBooleanObject("FALXE")); - Assert.assertNull(ConvertUtils.toBooleanObject("falsX")); - Assert.assertNull(ConvertUtils.toBooleanObject("falSX")); - Assert.assertNull(ConvertUtils.toBooleanObject("faLsX")); - Assert.assertNull(ConvertUtils.toBooleanObject("faLSX")); - Assert.assertNull(ConvertUtils.toBooleanObject("fAlsX")); - Assert.assertNull(ConvertUtils.toBooleanObject("fAlSX")); - Assert.assertNull(ConvertUtils.toBooleanObject("fALsX")); - Assert.assertNull(ConvertUtils.toBooleanObject("fALSX")); - Assert.assertNull(ConvertUtils.toBooleanObject("FalsX")); - Assert.assertNull(ConvertUtils.toBooleanObject("FalSX")); - Assert.assertNull(ConvertUtils.toBooleanObject("FaLsX")); - Assert.assertNull(ConvertUtils.toBooleanObject("FaLSX")); - Assert.assertNull(ConvertUtils.toBooleanObject("FAlsX")); - Assert.assertNull(ConvertUtils.toBooleanObject("FAlSX")); - Assert.assertNull(ConvertUtils.toBooleanObject("FALsX")); - Assert.assertNull(ConvertUtils.toBooleanObject("FALSX")); + assertFalse(ConvertUtils.toBooleanObject("false")); + assertFalse(ConvertUtils.toBooleanObject("falsE")); + assertFalse(ConvertUtils.toBooleanObject("falSe")); + assertFalse(ConvertUtils.toBooleanObject("falSE")); + assertFalse(ConvertUtils.toBooleanObject("faLse")); + assertFalse(ConvertUtils.toBooleanObject("faLsE")); + assertFalse(ConvertUtils.toBooleanObject("faLSe")); + assertFalse(ConvertUtils.toBooleanObject("faLSE")); + assertFalse(ConvertUtils.toBooleanObject("fAlse")); + assertFalse(ConvertUtils.toBooleanObject("fAlsE")); + assertFalse(ConvertUtils.toBooleanObject("fAlSe")); + assertFalse(ConvertUtils.toBooleanObject("fAlSE")); + assertFalse(ConvertUtils.toBooleanObject("fALse")); + assertFalse(ConvertUtils.toBooleanObject("fALsE")); + assertFalse(ConvertUtils.toBooleanObject("fALSe")); + assertFalse(ConvertUtils.toBooleanObject("fALSE")); + assertFalse(ConvertUtils.toBooleanObject("False")); + assertFalse(ConvertUtils.toBooleanObject("FalsE")); + assertFalse(ConvertUtils.toBooleanObject("FalSe")); + assertFalse(ConvertUtils.toBooleanObject("FalSE")); + assertFalse(ConvertUtils.toBooleanObject("FaLse")); + assertFalse(ConvertUtils.toBooleanObject("FaLsE")); + assertFalse(ConvertUtils.toBooleanObject("FaLSe")); + assertFalse(ConvertUtils.toBooleanObject("FaLSE")); + assertFalse(ConvertUtils.toBooleanObject("FAlse")); + assertFalse(ConvertUtils.toBooleanObject("FAlsE")); + assertFalse(ConvertUtils.toBooleanObject("FAlSe")); + assertFalse(ConvertUtils.toBooleanObject("FAlSE")); + assertFalse(ConvertUtils.toBooleanObject("FALse")); + assertFalse(ConvertUtils.toBooleanObject("FALsE")); + assertFalse(ConvertUtils.toBooleanObject("FALSe")); + assertFalse(ConvertUtils.toBooleanObject("FALSE")); + assertNull(ConvertUtils.toBooleanObject("Xalse")); + assertNull(ConvertUtils.toBooleanObject("XalsE")); + assertNull(ConvertUtils.toBooleanObject("XalSe")); + assertNull(ConvertUtils.toBooleanObject("XalSE")); + assertNull(ConvertUtils.toBooleanObject("XaLse")); + assertNull(ConvertUtils.toBooleanObject("XaLsE")); + assertNull(ConvertUtils.toBooleanObject("XaLSe")); + assertNull(ConvertUtils.toBooleanObject("XaLSE")); + assertNull(ConvertUtils.toBooleanObject("XAlse")); + assertNull(ConvertUtils.toBooleanObject("XAlsE")); + assertNull(ConvertUtils.toBooleanObject("XAlSe")); + assertNull(ConvertUtils.toBooleanObject("XAlSE")); + assertNull(ConvertUtils.toBooleanObject("XALse")); + assertNull(ConvertUtils.toBooleanObject("XALsE")); + assertNull(ConvertUtils.toBooleanObject("XALSe")); + assertNull(ConvertUtils.toBooleanObject("XALSE")); + assertNull(ConvertUtils.toBooleanObject("fXlse")); + assertNull(ConvertUtils.toBooleanObject("fXlsE")); + assertNull(ConvertUtils.toBooleanObject("fXlSe")); + assertNull(ConvertUtils.toBooleanObject("fXlSE")); + assertNull(ConvertUtils.toBooleanObject("fXLse")); + assertNull(ConvertUtils.toBooleanObject("fXLsE")); + assertNull(ConvertUtils.toBooleanObject("fXLSe")); + assertNull(ConvertUtils.toBooleanObject("fXLSE")); + assertNull(ConvertUtils.toBooleanObject("FXlse")); + assertNull(ConvertUtils.toBooleanObject("FXlsE")); + assertNull(ConvertUtils.toBooleanObject("FXlSe")); + assertNull(ConvertUtils.toBooleanObject("FXlSE")); + assertNull(ConvertUtils.toBooleanObject("FXLse")); + assertNull(ConvertUtils.toBooleanObject("FXLsE")); + assertNull(ConvertUtils.toBooleanObject("FXLSe")); + assertNull(ConvertUtils.toBooleanObject("FXLSE")); + assertNull(ConvertUtils.toBooleanObject("faXse")); + assertNull(ConvertUtils.toBooleanObject("faXsE")); + assertNull(ConvertUtils.toBooleanObject("faXSe")); + assertNull(ConvertUtils.toBooleanObject("faXSE")); + assertNull(ConvertUtils.toBooleanObject("fAXse")); + assertNull(ConvertUtils.toBooleanObject("fAXsE")); + assertNull(ConvertUtils.toBooleanObject("fAXSe")); + assertNull(ConvertUtils.toBooleanObject("fAXSE")); + assertNull(ConvertUtils.toBooleanObject("FaXse")); + assertNull(ConvertUtils.toBooleanObject("FaXsE")); + assertNull(ConvertUtils.toBooleanObject("FaXSe")); + assertNull(ConvertUtils.toBooleanObject("FaXSE")); + assertNull(ConvertUtils.toBooleanObject("FAXse")); + assertNull(ConvertUtils.toBooleanObject("FAXsE")); + assertNull(ConvertUtils.toBooleanObject("FAXSe")); + assertNull(ConvertUtils.toBooleanObject("FAXSE")); + assertNull(ConvertUtils.toBooleanObject("falXe")); + assertNull(ConvertUtils.toBooleanObject("falXE")); + assertNull(ConvertUtils.toBooleanObject("faLXe")); + assertNull(ConvertUtils.toBooleanObject("faLXE")); + assertNull(ConvertUtils.toBooleanObject("fAlXe")); + assertNull(ConvertUtils.toBooleanObject("fAlXE")); + assertNull(ConvertUtils.toBooleanObject("fALXe")); + assertNull(ConvertUtils.toBooleanObject("fALXE")); + assertNull(ConvertUtils.toBooleanObject("FalXe")); + assertNull(ConvertUtils.toBooleanObject("FalXE")); + assertNull(ConvertUtils.toBooleanObject("FaLXe")); + assertNull(ConvertUtils.toBooleanObject("FaLXE")); + assertNull(ConvertUtils.toBooleanObject("FAlXe")); + assertNull(ConvertUtils.toBooleanObject("FAlXE")); + assertNull(ConvertUtils.toBooleanObject("FALXe")); + assertNull(ConvertUtils.toBooleanObject("FALXE")); + assertNull(ConvertUtils.toBooleanObject("falsX")); + assertNull(ConvertUtils.toBooleanObject("falSX")); + assertNull(ConvertUtils.toBooleanObject("faLsX")); + assertNull(ConvertUtils.toBooleanObject("faLSX")); + assertNull(ConvertUtils.toBooleanObject("fAlsX")); + assertNull(ConvertUtils.toBooleanObject("fAlSX")); + assertNull(ConvertUtils.toBooleanObject("fALsX")); + assertNull(ConvertUtils.toBooleanObject("fALSX")); + assertNull(ConvertUtils.toBooleanObject("FalsX")); + assertNull(ConvertUtils.toBooleanObject("FalSX")); + assertNull(ConvertUtils.toBooleanObject("FaLsX")); + assertNull(ConvertUtils.toBooleanObject("FaLSX")); + assertNull(ConvertUtils.toBooleanObject("FAlsX")); + assertNull(ConvertUtils.toBooleanObject("FAlSX")); + assertNull(ConvertUtils.toBooleanObject("FALsX")); + assertNull(ConvertUtils.toBooleanObject("FALSX")); - Assert.assertNull(ConvertUtils.toBooleanObject(null)); + assertNull(ConvertUtils.toBooleanObject(null)); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/DateFormatUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/DateFormatUtilsTest.java index 70a956b5c42..5b622be1687 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/DateFormatUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/DateFormatUtilsTest.java @@ -16,21 +16,24 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + /** * DateFormatUtils test. + * * @author zzq */ -public class DateFormatUtilsTest { +class DateFormatUtilsTest { @Test - public void testformat() { + void testformat() { final Calendar c = Calendar.getInstance(TimeZone.getDefault()); c.set(2021, Calendar.JANUARY, 1, 12, 0, 0); c.setTimeZone(TimeZone.getDefault()); @@ -43,16 +46,20 @@ public void testformat() { buffer.append(month); buffer.append(day); buffer.append(hour); - Assert.assertEquals(buffer.toString(), DateFormatUtils.format(c.getTime(), "yyyyMdH")); + assertEquals(buffer.toString(), DateFormatUtils.format(c.getTime(), "yyyyMdH")); } - @Test(expected = NullPointerException.class) - public void testForNullPointerExceptionWithDate() { - DateFormatUtils.format(new Date(), null); + @Test + void testForNullPointerExceptionWithDate() { + assertThrows(NullPointerException.class, () -> { + DateFormatUtils.format(new Date(), null); + }); } - @Test(expected = NullPointerException.class) - public void testForNullPointerExceptionWithPattern() { - DateFormatUtils.format(null, "yyyyMdH"); + @Test + void testForNullPointerExceptionWithPattern() { + assertThrows(NullPointerException.class, () -> { + DateFormatUtils.format(null, "yyyyMdH"); + }); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ExceptionUtilTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ExceptionUtilTest.java index b221bc43dc6..029c7e3946d 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ExceptionUtilTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ExceptionUtilTest.java @@ -17,42 +17,42 @@ package com.alibaba.nacos.common.utils; import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ExceptionUtilTest { +class ExceptionUtilTest { NacosRuntimeException nacosRuntimeException; - @Before - public void setUp() { + @BeforeEach + void setUp() { RuntimeException caused = new RuntimeException("I'm caused exception."); nacosRuntimeException = new NacosRuntimeException(500, "Test", caused); } @Test - public void testGetAllExceptionMsg() { + void testGetAllExceptionMsg() { String msg = ExceptionUtil.getAllExceptionMsg(nacosRuntimeException); assertEquals("caused: errCode: 500, errMsg: Test ;caused: I'm caused exception.;", msg); } @Test - public void testGetCause() { + void testGetCause() { assertEquals("I'm caused exception.", ExceptionUtil.getCause(nacosRuntimeException).getMessage()); NacosRuntimeException nreWithoutCaused = new NacosRuntimeException(500); assertEquals(nreWithoutCaused, ExceptionUtil.getCause(nreWithoutCaused)); } @Test - public void testGetStackTrace() { + void testGetStackTrace() { assertEquals("", ExceptionUtil.getStackTrace(null)); String stackTrace = ExceptionUtil.getStackTrace(nacosRuntimeException); - assertTrue(stackTrace.contains( - "com.alibaba.nacos.api.exception.runtime.NacosRuntimeException: errCode: 500, errMsg: Test")); + assertTrue( + stackTrace.contains("com.alibaba.nacos.api.exception.runtime.NacosRuntimeException: errCode: 500, errMsg: Test")); assertTrue(stackTrace.contains("at")); assertTrue(stackTrace.contains("Caused by: java.lang.RuntimeException: I'm caused exception.")); } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/InetAddressValidatorTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/InetAddressValidatorTest.java index b85b89a89b0..3b614b3844f 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/InetAddressValidatorTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/InetAddressValidatorTest.java @@ -16,46 +16,49 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * InetAddressValidator Test. + * * @ClassName: InetAddressValidatorTest * @Author: ChenHao26 * @Date: 2022/8/22 13:07 */ -public class InetAddressValidatorTest { +class InetAddressValidatorTest { @Test - public void isIPv6Address() { - Assert.assertTrue(InetAddressValidator.isIPv6Address("2000:0000:0000:0000:0001:2345:6789:abcd")); - Assert.assertTrue(InetAddressValidator.isIPv6Address("2001:DB8:0:0:8:800:200C:417A")); - Assert.assertTrue(InetAddressValidator.isIPv6Address("2001:DB8::8:800:200C:417A")); - Assert.assertFalse(InetAddressValidator.isIPv6Address("2001:DB8::8:800:200C141aA")); + void isIPv6Address() { + assertTrue(InetAddressValidator.isIPv6Address("2000:0000:0000:0000:0001:2345:6789:abcd")); + assertTrue(InetAddressValidator.isIPv6Address("2001:DB8:0:0:8:800:200C:417A")); + assertTrue(InetAddressValidator.isIPv6Address("2001:DB8::8:800:200C:417A")); + assertFalse(InetAddressValidator.isIPv6Address("2001:DB8::8:800:200C141aA")); } @Test - public void isIPv6MixedAddress() { - Assert.assertTrue(InetAddressValidator.isIPv6MixedAddress("1:0:0:0:0:0:172.12.55.18")); - Assert.assertTrue(InetAddressValidator.isIPv6MixedAddress("::172.12.55.18")); - Assert.assertFalse(InetAddressValidator.isIPv6MixedAddress("2001:DB8::8:800:200C141aA")); + void isIPv6MixedAddress() { + assertTrue(InetAddressValidator.isIPv6MixedAddress("1:0:0:0:0:0:172.12.55.18")); + assertTrue(InetAddressValidator.isIPv6MixedAddress("::172.12.55.18")); + assertFalse(InetAddressValidator.isIPv6MixedAddress("2001:DB8::8:800:200C141aA")); } @Test - public void isIPv6IPv4MappedAddress() { - Assert.assertFalse(InetAddressValidator.isIPv6IPv4MappedAddress(":ffff:1.1.1.1")); - Assert.assertTrue(InetAddressValidator.isIPv6IPv4MappedAddress("::FFFF:192.168.1.2")); + void isIPv6IPv4MappedAddress() { + assertFalse(InetAddressValidator.isIPv6IPv4MappedAddress(":ffff:1.1.1.1")); + assertTrue(InetAddressValidator.isIPv6IPv4MappedAddress("::FFFF:192.168.1.2")); } @Test - public void isIPv4Address() { - Assert.assertTrue(InetAddressValidator.isIPv4Address("192.168.1.2")); + void isIPv4Address() { + assertTrue(InetAddressValidator.isIPv4Address("192.168.1.2")); } @Test - public void isLinkLocalIPv6WithZoneIndex() { - Assert.assertTrue(InetAddressValidator.isLinkLocalIPv6WithZoneIndex("fe80::1%lo0")); - Assert.assertFalse(InetAddressValidator.isLinkLocalIPv6WithZoneIndex("2000:0000:0000:0000:0001:2345:6789:abcd")); + void isLinkLocalIPv6WithZoneIndex() { + assertTrue(InetAddressValidator.isLinkLocalIPv6WithZoneIndex("fe80::1%lo0")); + assertFalse(InetAddressValidator.isLinkLocalIPv6WithZoneIndex("2000:0000:0000:0000:0001:2345:6789:abcd")); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/InternetAddressUtilTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/InternetAddressUtilTest.java index 8dd89895f89..c631898e49e 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/InternetAddressUtilTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/InternetAddressUtilTest.java @@ -16,12 +16,17 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.lang.reflect.Modifier; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + /** * test IpUtil. * @@ -31,70 +36,90 @@ @SuppressWarnings("checkstyle:AbbreviationAsWordInName") public class InternetAddressUtilTest { + /** + * checkSplitIpPortStr. 2020/9/4 14:12 + * + * @param addr addr + * @param isEx isEx + * @param equalsStrs equalsStrs + */ + public static void checkSplitIPPortStr(String addr, boolean isEx, String... equalsStrs) { + try { + String[] array = InternetAddressUtil.splitIPPortStr(addr); + assertEquals(array.length, equalsStrs.length); + for (int i = 0; i < array.length; i++) { + assertEquals(array[i], equalsStrs[i]); + } + } catch (Exception ex) { + if (!isEx) { + // No exception is expected here, but an exception has occurred + fail("Unexpected exception"); + } + } + } + @Test - public void testIsIPv4() { - Assert.assertTrue(InternetAddressUtil.isIPv4("127.0.0.1")); - Assert.assertFalse(InternetAddressUtil.isIPv4("[::1]")); - Assert.assertFalse(InternetAddressUtil.isIPv4("asdfasf")); - Assert.assertFalse(InternetAddressUtil.isIPv4("ffgertert")); - Assert.assertFalse(InternetAddressUtil.isIPv4("127.100.19")); + void testIsIPv4() { + assertTrue(InternetAddressUtil.isIPv4("127.0.0.1")); + assertFalse(InternetAddressUtil.isIPv4("[::1]")); + assertFalse(InternetAddressUtil.isIPv4("asdfasf")); + assertFalse(InternetAddressUtil.isIPv4("ffgertert")); + assertFalse(InternetAddressUtil.isIPv4("127.100.19")); } @Test - public void testIsIPv6() { - Assert.assertTrue(InternetAddressUtil.isIPv6("[::1]")); - Assert.assertFalse(InternetAddressUtil.isIPv6("127.0.0.1")); - Assert.assertFalse(InternetAddressUtil.isIPv6("er34234")); + void testIsIPv6() { + assertTrue(InternetAddressUtil.isIPv6("[::1]")); + assertFalse(InternetAddressUtil.isIPv6("127.0.0.1")); + assertFalse(InternetAddressUtil.isIPv6("er34234")); } @Test - public void testIsIP() { - Assert.assertTrue(InternetAddressUtil.isIP("[::1]")); - Assert.assertTrue(InternetAddressUtil.isIP("127.0.0.1")); - Assert.assertFalse(InternetAddressUtil.isIP("er34234")); - Assert.assertFalse(InternetAddressUtil.isIP("127.100.19")); + void testIsIP() { + assertTrue(InternetAddressUtil.isIP("[::1]")); + assertTrue(InternetAddressUtil.isIP("127.0.0.1")); + assertFalse(InternetAddressUtil.isIP("er34234")); + assertFalse(InternetAddressUtil.isIP("127.100.19")); } @Test - public void testGetIPFromString() { - Assert.assertEquals("[::1]", - InternetAddressUtil.getIPFromString("http://[::1]:666/xzdsfasdf/awerwef" + "?eewer=2&xxx=3")); - Assert.assertEquals("[::1]", InternetAddressUtil.getIPFromString( + void testGetIPFromString() { + assertEquals("[::1]", InternetAddressUtil.getIPFromString("http://[::1]:666/xzdsfasdf/awerwef" + "?eewer=2&xxx=3")); + assertEquals("[::1]", InternetAddressUtil.getIPFromString( "jdbc:mysql://[::1]:3306/nacos_config_test?characterEncoding=utf8&connectTimeout=1000" + "&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC")); - Assert.assertEquals("127.0.0.1", + assertEquals("127.0.0.1", InternetAddressUtil.getIPFromString("http://127.0.0.1:666/xzdsfasdf/awerwef" + "?eewer=2&xxx=3")); - Assert.assertEquals("127.0.0.1", InternetAddressUtil.getIPFromString( + assertEquals("127.0.0.1", InternetAddressUtil.getIPFromString( "jdbc:mysql://127.0.0.1:3306/nacos_config_test?characterEncoding=utf8&connectTimeout=1000" + "&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC")); - Assert.assertEquals("", InternetAddressUtil.getIPFromString("http://[::1:666")); + assertEquals("", InternetAddressUtil.getIPFromString("http://[::1:666")); - Assert.assertEquals("", - InternetAddressUtil.getIPFromString("http://[dddd]:666/xzdsfasdf/awerwef" + "?eewer=2&xxx=3")); - Assert.assertEquals("", InternetAddressUtil.getIPFromString( + assertEquals("", InternetAddressUtil.getIPFromString("http://[dddd]:666/xzdsfasdf/awerwef" + "?eewer=2&xxx=3")); + assertEquals("", InternetAddressUtil.getIPFromString( "jdbc:mysql://[127.0.0.1]:3306/nacos_config_test?characterEncoding=utf8&connectTimeout=1000" + "&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC")); - Assert.assertEquals("", InternetAddressUtil.getIPFromString( + assertEquals("", InternetAddressUtil.getIPFromString( "jdbc:mysql://666.288.333.444:3306/nacos_config_test?characterEncoding=utf8&connectTimeout=1000" + "&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC")); - Assert.assertEquals("", InternetAddressUtil.getIPFromString( + assertEquals("", InternetAddressUtil.getIPFromString( "jdbc:mysql://292.168.1.1:3306/nacos_config_test?characterEncoding=utf8&connectTimeout=1000" + "&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC")); - Assert.assertEquals("", InternetAddressUtil.getIPFromString( + assertEquals("", InternetAddressUtil.getIPFromString( "jdbc:mysql://29.168.1.288:3306/nacos_config_test?characterEncoding=utf8&connectTimeout=1000" + "&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC")); - Assert.assertEquals("", InternetAddressUtil.getIPFromString( + assertEquals("", InternetAddressUtil.getIPFromString( "jdbc:mysql://29.168.288.28:3306/nacos_config_test?characterEncoding=utf8&connectTimeout=1000" + "&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC")); - Assert.assertEquals("", InternetAddressUtil.getIPFromString( + assertEquals("", InternetAddressUtil.getIPFromString( "jdbc:mysql://29.288.28.28:3306/nacos_config_test?characterEncoding=utf8&connectTimeout=1000" + "&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC")); - Assert.assertEquals("", InternetAddressUtil.getIPFromString("")); - Assert.assertEquals("", InternetAddressUtil.getIPFromString(null)); + assertEquals("", InternetAddressUtil.getIPFromString("")); + assertEquals("", InternetAddressUtil.getIPFromString(null)); } @Test - public void testSplitIpPort() { + void testSplitIpPort() { checkSplitIPPortStr("[::1]:88", false, "[::1]", "88"); checkSplitIPPortStr("[::1]", false, "[::1]"); checkSplitIPPortStr("127.0.0.1:88", false, "127.0.0.1", "88"); @@ -121,48 +146,48 @@ public void testSplitIpPort() { } @Test - public void testCheckIPs() { - Assert.assertEquals("ok", InternetAddressUtil.checkIPs("127.0.0.1")); - Assert.assertEquals("ok", InternetAddressUtil.checkIPs()); - Assert.assertEquals("ok", InternetAddressUtil.checkIPs()); - Assert.assertEquals("ok", InternetAddressUtil.checkIPs(null)); + void testCheckIPs() { + assertEquals("ok", InternetAddressUtil.checkIPs("127.0.0.1")); + assertEquals("ok", InternetAddressUtil.checkIPs()); + assertEquals("ok", InternetAddressUtil.checkIPs()); + assertEquals("ok", InternetAddressUtil.checkIPs(null)); - Assert.assertEquals("illegal ip: 127.100.19", InternetAddressUtil.checkIPs("127.100.19", "127.0.0.1")); + assertEquals("illegal ip: 127.100.19", InternetAddressUtil.checkIPs("127.100.19", "127.0.0.1")); } @Test - public void testIsDomain() { - Assert.assertTrue(InternetAddressUtil.isDomain("localhost")); - Assert.assertTrue(InternetAddressUtil.isDomain("github.com")); - Assert.assertTrue(InternetAddressUtil.isDomain("prefix.infix.suffix")); - Assert.assertTrue(InternetAddressUtil.isDomain("p-hub.com")); + void testIsDomain() { + assertTrue(InternetAddressUtil.isDomain("localhost")); + assertTrue(InternetAddressUtil.isDomain("github.com")); + assertTrue(InternetAddressUtil.isDomain("prefix.infix.suffix")); + assertTrue(InternetAddressUtil.isDomain("p-hub.com")); - Assert.assertFalse(InternetAddressUtil.isDomain("")); - Assert.assertFalse(InternetAddressUtil.isDomain(null)); + assertFalse(InternetAddressUtil.isDomain("")); + assertFalse(InternetAddressUtil.isDomain(null)); } @Test - public void testRemoveBrackets() { - Assert.assertEquals(InternetAddressUtil.removeBrackets("[2001:DB8:0:0:1::1]"), "2001:DB8:0:0:1::1"); - Assert.assertEquals(InternetAddressUtil.removeBrackets("[2077[]]]"), "2077"); - Assert.assertEquals(InternetAddressUtil.removeBrackets(""), ""); - Assert.assertEquals(InternetAddressUtil.removeBrackets(null), ""); + void testRemoveBrackets() { + assertEquals("2001:DB8:0:0:1::1", InternetAddressUtil.removeBrackets("[2001:DB8:0:0:1::1]")); + assertEquals("2077", InternetAddressUtil.removeBrackets("[2077[]]]")); + assertEquals("", InternetAddressUtil.removeBrackets("")); + assertEquals("", InternetAddressUtil.removeBrackets(null)); } @Test - public void testCheckOk() { - Assert.assertTrue(InternetAddressUtil.checkOK("ok")); - Assert.assertFalse(InternetAddressUtil.checkOK("ojbk")); + void testCheckOk() { + assertTrue(InternetAddressUtil.checkOK("ok")); + assertFalse(InternetAddressUtil.checkOK("ojbk")); } @Test - public void testContainsPort() { - Assert.assertTrue(InternetAddressUtil.containsPort("127.0.0.1:80")); - Assert.assertFalse(InternetAddressUtil.containsPort("127.0.0.1:80:80")); + void testContainsPort() { + assertTrue(InternetAddressUtil.containsPort("127.0.0.1:80")); + assertFalse(InternetAddressUtil.containsPort("127.0.0.1:80:80")); } @Test - public void testLocalHostIP() throws NoSuchFieldException, IllegalAccessException { + void testLocalHostIP() throws NoSuchFieldException, IllegalAccessException { Field field = InternetAddressUtil.class.getField("PREFER_IPV6_ADDRESSES"); field.setAccessible(true); Field modifiersField = Field.class.getDeclaredField("modifiers"); @@ -170,43 +195,23 @@ public void testLocalHostIP() throws NoSuchFieldException, IllegalAccessExceptio modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); field.set(null, false); - Assert.assertEquals("127.0.0.1", InternetAddressUtil.localHostIP()); + assertEquals("127.0.0.1", InternetAddressUtil.localHostIP()); field.set(null, true); - Assert.assertEquals("[::1]", InternetAddressUtil.localHostIP()); + assertEquals("[::1]", InternetAddressUtil.localHostIP()); } @Test - public void testIpToInt() { - Assert.assertEquals(2130706433, InternetAddressUtil.ipToInt("127.0.0.1")); - Assert.assertEquals(-1062731775, InternetAddressUtil.ipToInt("192.168.0.1")); + void testIpToInt() { + assertEquals(2130706433, InternetAddressUtil.ipToInt("127.0.0.1")); + assertEquals(-1062731775, InternetAddressUtil.ipToInt("192.168.0.1")); } - @Test(expected = IllegalArgumentException.class) - public void testIllegalIpToInt() { - InternetAddressUtil.ipToInt("127.0.0.256"); - } - - /** - * checkSplitIpPortStr. 2020/9/4 14:12 - * - * @param addr addr - * @param isEx isEx - * @param equalsStrs equalsStrs - */ - public static void checkSplitIPPortStr(String addr, boolean isEx, String... equalsStrs) { - try { - String[] array = InternetAddressUtil.splitIPPortStr(addr); - Assert.assertEquals(array.length, equalsStrs.length); - for (int i = 0; i < array.length; i++) { - Assert.assertEquals(array[i], equalsStrs[i]); - } - } catch (Exception ex) { - if (!isEx) { - // No exception is expected here, but an exception has occurred - Assert.fail("Unexpected exception"); - } - } + @Test + void testIllegalIpToInt() { + assertThrows(IllegalArgumentException.class, () -> { + InternetAddressUtil.ipToInt("127.0.0.256"); + }); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/IoUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/IoUtilsTest.java index 667c4d008e1..dc195dc00fb 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/IoUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/IoUtilsTest.java @@ -17,8 +17,7 @@ package com.alibaba.nacos.common.utils; import org.apache.commons.io.Charsets; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import sun.security.action.GetPropertyAction; import java.io.BufferedReader; @@ -33,6 +32,12 @@ import java.security.AccessController; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -42,35 +47,35 @@ * * @author karsonto */ -public class IoUtilsTest { +class IoUtilsTest { @Test - public void testTryDecompressForNotGzip() throws Exception { + void testTryDecompressForNotGzip() throws Exception { byte[] testCase = "123".getBytes(Charsets.toCharset("UTF-8")); - Assert.assertEquals(testCase, IoUtils.tryDecompress(testCase)); + assertEquals(testCase, IoUtils.tryDecompress(testCase)); } @Test - public void testTryDecompressForGzip() throws Exception { + void testTryDecompressForGzip() throws Exception { byte[] testCase = IoUtils.tryCompress("123", "UTF-8"); - Assert.assertEquals("123", new String(IoUtils.tryDecompress(testCase), StandardCharsets.UTF_8)); + assertEquals("123", new String(IoUtils.tryDecompress(testCase), StandardCharsets.UTF_8)); } @Test - public void testTryCompressWithEmptyString() { - Assert.assertEquals(0, IoUtils.tryCompress("", "UTF-8").length); - Assert.assertEquals(0, IoUtils.tryCompress(null, "UTF-8").length); + void testTryCompressWithEmptyString() { + assertEquals(0, IoUtils.tryCompress("", "UTF-8").length); + assertEquals(0, IoUtils.tryCompress(null, "UTF-8").length); } @Test - public void testWriteStringToFile() throws IOException { + void testWriteStringToFile() throws IOException { File file = null; try { file = File.createTempFile("test_writeStringToFile", ".txt"); IoUtils.writeStringToFile(file, "123", "UTF-8"); List actual = IoUtils.readLines(new FileReader(file)); - Assert.assertEquals(1, actual.size()); - Assert.assertEquals("123", actual.get(0)); + assertEquals(1, actual.size()); + assertEquals("123", actual.get(0)); } finally { if (null != file) { file.deleteOnExit(); @@ -79,30 +84,30 @@ public void testWriteStringToFile() throws IOException { } @Test - public void testToStringWithNull() throws IOException { - Assert.assertEquals("", IoUtils.toString(null, "UTF-8")); + void testToStringWithNull() throws IOException { + assertEquals("", IoUtils.toString(null, "UTF-8")); } @Test - public void testToStringWithReader() throws IOException { + void testToStringWithReader() throws IOException { String testCase = "123"; - Assert.assertEquals(testCase, + assertEquals(testCase, IoUtils.toString(new ByteArrayInputStream(testCase.getBytes(Charsets.toCharset("UTF-8"))), "UTF-8")); } @Test - public void testDeleteForNullFile() throws IOException { + void testDeleteForNullFile() throws IOException { IoUtils.delete(null); } @Test - public void testDeleteSuccess() throws IOException { + void testDeleteSuccess() throws IOException { File file = null; try { file = File.createTempFile("test_deleteForFile", ".txt"); - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); IoUtils.delete(file); - Assert.assertFalse(file.exists()); + assertFalse(file.exists()); } finally { if (null != file) { file.deleteOnExit(); @@ -110,26 +115,28 @@ public void testDeleteSuccess() throws IOException { } } - @Test(expected = IOException.class) - public void testDeleteFileFailure() throws IOException { - File file = mock(File.class); - when(file.exists()).thenReturn(true); - when(file.delete()).thenReturn(false); - IoUtils.delete(file); + @Test + void testDeleteFileFailure() throws IOException { + assertThrows(IOException.class, () -> { + File file = mock(File.class); + when(file.exists()).thenReturn(true); + when(file.delete()).thenReturn(false); + IoUtils.delete(file); + }); } @Test - public void testDeleteForDirectory() throws IOException { + void testDeleteForDirectory() throws IOException { File file = null; try { String tmpDir = AccessController.doPrivileged(new GetPropertyAction("java.io.tmpdir")); File tmpDirFile = new File(tmpDir, "IoUtilsTest"); tmpDirFile.mkdirs(); file = File.createTempFile("test_deleteForDirectory", ".txt", tmpDirFile); - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); IoUtils.delete(file.getParentFile()); - Assert.assertTrue(tmpDirFile.exists()); - Assert.assertFalse(file.exists()); + assertTrue(tmpDirFile.exists()); + assertFalse(file.exists()); } finally { if (null != file) { file.getParentFile().deleteOnExit(); @@ -138,88 +145,96 @@ public void testDeleteForDirectory() throws IOException { } } - @Test(expected = IllegalArgumentException.class) - public void testCleanDirectoryForNonExistingDirectory() throws IOException { - File nonexistentDir = new File("non_exist"); - IoUtils.cleanDirectory(nonexistentDir); + @Test + void testCleanDirectoryForNonExistingDirectory() throws IOException { + assertThrows(IllegalArgumentException.class, () -> { + File nonexistentDir = new File("non_exist"); + IoUtils.cleanDirectory(nonexistentDir); + }); } - @Test(expected = IllegalArgumentException.class) - public void testCleanDirectoryForFile() throws IOException { - File mockFile = mock(File.class); - when(mockFile.exists()).thenReturn(true); - IoUtils.cleanDirectory(mockFile); + @Test + void testCleanDirectoryForFile() throws IOException { + assertThrows(IllegalArgumentException.class, () -> { + File mockFile = mock(File.class); + when(mockFile.exists()).thenReturn(true); + IoUtils.cleanDirectory(mockFile); + }); } - @Test(expected = IOException.class) - public void testCleanDirectoryWithEmptyDirectory() throws IOException { - File mockFile = mock(File.class); - when(mockFile.exists()).thenReturn(true); - when(mockFile.isDirectory()).thenReturn(true); - IoUtils.cleanDirectory(mockFile); + @Test + void testCleanDirectoryWithEmptyDirectory() throws IOException { + assertThrows(IOException.class, () -> { + File mockFile = mock(File.class); + when(mockFile.exists()).thenReturn(true); + when(mockFile.isDirectory()).thenReturn(true); + IoUtils.cleanDirectory(mockFile); + }); } - @Test(expected = IOException.class) - public void testCleanDirectory() throws IOException { - File mockFile = mock(File.class); - when(mockFile.exists()).thenReturn(true); - when(mockFile.isDirectory()).thenReturn(true); - File mockSubFile = mock(File.class); - when(mockSubFile.exists()).thenReturn(true); - when(mockFile.listFiles()).thenReturn(new File[] {mockSubFile}); - IoUtils.cleanDirectory(mockFile); + @Test + void testCleanDirectory() throws IOException { + assertThrows(IOException.class, () -> { + File mockFile = mock(File.class); + when(mockFile.exists()).thenReturn(true); + when(mockFile.isDirectory()).thenReturn(true); + File mockSubFile = mock(File.class); + when(mockSubFile.exists()).thenReturn(true); + when(mockFile.listFiles()).thenReturn(new File[] {mockSubFile}); + IoUtils.cleanDirectory(mockFile); + }); } @Test - public void testIsGzipStreamWithNull() { - Assert.assertFalse(IoUtils.isGzipStream(null)); + void testIsGzipStreamWithNull() { + assertFalse(IoUtils.isGzipStream(null)); } @Test - public void testIsGzipStreamWithEmpty() { - Assert.assertFalse(IoUtils.isGzipStream(new byte[0])); + void testIsGzipStreamWithEmpty() { + assertFalse(IoUtils.isGzipStream(new byte[0])); } - @Test() - public void testCloseQuietly() throws IOException { + @Test + void testCloseQuietly() throws IOException { BufferedReader br = new BufferedReader( new InputStreamReader(new ByteArrayInputStream("111".getBytes(Charsets.toCharset("UTF-8"))))); - Assert.assertEquals("111", br.readLine()); + assertEquals("111", br.readLine()); IoUtils.closeQuietly(br); try { br.readLine(); } catch (IOException e) { - Assert.assertNotNull(e); + assertNotNull(e); return; } - Assert.fail(); + fail(); } - @Test() - public void testCloseQuietly2() throws IOException { + @Test + void testCloseQuietly2() throws IOException { BufferedReader br = new BufferedReader( new InputStreamReader(new ByteArrayInputStream("123".getBytes(Charsets.toCharset("UTF-8"))))); - Assert.assertEquals("123", br.readLine()); + assertEquals("123", br.readLine()); BufferedReader br2 = new BufferedReader( new InputStreamReader(new ByteArrayInputStream("456".getBytes(Charsets.toCharset("UTF-8"))))); - Assert.assertEquals("456", br2.readLine()); + assertEquals("456", br2.readLine()); IoUtils.closeQuietly(br, br2); try { br.readLine(); } catch (IOException e) { - Assert.assertNotNull(e); + assertNotNull(e); } try { br2.readLine(); } catch (IOException e) { - Assert.assertNotNull(e); + assertNotNull(e); return; } - Assert.fail(); + fail(); } @Test - public void testCloseQuietlyForHttpConnection() throws IOException { + void testCloseQuietlyForHttpConnection() throws IOException { HttpURLConnection conn = mock(HttpURLConnection.class); InputStream inputStream = mock(InputStream.class); when(conn.getInputStream()).thenReturn(inputStream); diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/JacksonUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/JacksonUtilsTest.java index 5c593be1695..9e08c062edf 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/JacksonUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/JacksonUtilsTest.java @@ -29,8 +29,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonNode; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -45,154 +44,161 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -public class JacksonUtilsTest { +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class JacksonUtilsTest { @Test - public void testToJson1() { - Assert.assertEquals("null", JacksonUtils.toJson(null)); - Assert.assertEquals("\"string\"", JacksonUtils.toJson("string")); - Assert.assertEquals("30", JacksonUtils.toJson(new BigDecimal(30))); - Assert.assertEquals("{\"key\":\"value\"}", JacksonUtils.toJson(Collections.singletonMap("key", "value"))); - Assert.assertEquals("[{\"key\":\"value\"}]", + void testToJson1() { + assertEquals("null", JacksonUtils.toJson(null)); + assertEquals("\"string\"", JacksonUtils.toJson("string")); + assertEquals("30", JacksonUtils.toJson(new BigDecimal(30))); + assertEquals("{\"key\":\"value\"}", JacksonUtils.toJson(Collections.singletonMap("key", "value"))); + assertEquals("[{\"key\":\"value\"}]", JacksonUtils.toJson(Collections.singletonList(Collections.singletonMap("key", "value")))); - Assert.assertEquals("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}", - JacksonUtils.toJson(new TestOfAtomicObject())); - Assert.assertEquals("{\"date\":1626192000000}", JacksonUtils.toJson(new TestOfDate())); + assertEquals("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}", JacksonUtils.toJson(new TestOfAtomicObject())); + assertEquals("{\"date\":1626192000000}", JacksonUtils.toJson(new TestOfDate())); // only public - Assert.assertEquals("{\"publicAccessModifier\":\"public\"}", JacksonUtils.toJson(new TestOfAccessModifier())); + assertEquals("{\"publicAccessModifier\":\"public\"}", JacksonUtils.toJson(new TestOfAccessModifier())); // getter is also recognized - Assert.assertEquals("{\"value\":\"value\",\"key\":\"key\"}", JacksonUtils.toJson(new TestOfGetter())); + assertEquals("{\"value\":\"value\",\"key\":\"key\"}", JacksonUtils.toJson(new TestOfGetter())); // annotation available - Assert.assertEquals( + assertEquals( "{\"@type\":\"JacksonUtilsTest$TestOfAnnotationSub\",\"date\":\"2021-07-14\",\"subField\":\"subField\"," + "\"camelCase\":\"value\"}", JacksonUtils.toJson(new TestOfAnnotationSub())); } - @Test(expected = NacosSerializationException.class) - public void testToJson2() { - // object without field will throw exceptions - JacksonUtils.toJson(new Object()); + @Test + void testToJson2() { + assertThrows(NacosSerializationException.class, () -> { + // object without field will throw exceptions + JacksonUtils.toJson(new Object()); + }); } @Test - public void testToJsonBytes1() { - Assert.assertArrayEquals("null".getBytes(), JacksonUtils.toJsonBytes(null)); - Assert.assertArrayEquals("\"string\"".getBytes(), JacksonUtils.toJsonBytes("string")); - Assert.assertArrayEquals("30".getBytes(), JacksonUtils.toJsonBytes(new BigDecimal(30))); - Assert.assertArrayEquals("{\"key\":\"value\"}".getBytes(), - JacksonUtils.toJsonBytes(Collections.singletonMap("key", "value"))); - Assert.assertArrayEquals("[{\"key\":\"value\"}]".getBytes(), + void testToJsonBytes1() { + assertArrayEquals("null".getBytes(), JacksonUtils.toJsonBytes(null)); + assertArrayEquals("\"string\"".getBytes(), JacksonUtils.toJsonBytes("string")); + assertArrayEquals("30".getBytes(), JacksonUtils.toJsonBytes(new BigDecimal(30))); + assertArrayEquals("{\"key\":\"value\"}".getBytes(), JacksonUtils.toJsonBytes(Collections.singletonMap("key", "value"))); + assertArrayEquals("[{\"key\":\"value\"}]".getBytes(), JacksonUtils.toJsonBytes(Collections.singletonList(Collections.singletonMap("key", "value")))); - Assert.assertArrayEquals("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}".getBytes(), + assertArrayEquals("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}".getBytes(), JacksonUtils.toJsonBytes(new TestOfAtomicObject())); - Assert.assertArrayEquals("{\"date\":1626192000000}".getBytes(), JacksonUtils.toJsonBytes(new TestOfDate())); + assertArrayEquals("{\"date\":1626192000000}".getBytes(), JacksonUtils.toJsonBytes(new TestOfDate())); // only public - Assert.assertArrayEquals("{\"publicAccessModifier\":\"public\"}".getBytes(), + assertArrayEquals("{\"publicAccessModifier\":\"public\"}".getBytes(), JacksonUtils.toJsonBytes(new TestOfAccessModifier())); // getter is also recognized - Assert.assertArrayEquals("{\"value\":\"value\",\"key\":\"key\"}".getBytes(), - JacksonUtils.toJsonBytes(new TestOfGetter())); + assertArrayEquals("{\"value\":\"value\",\"key\":\"key\"}".getBytes(), JacksonUtils.toJsonBytes(new TestOfGetter())); // annotation available - Assert.assertArrayEquals( + assertArrayEquals( ("{\"@type\":\"JacksonUtilsTest$TestOfAnnotationSub\",\"date\":\"2021-07-14\",\"subField\":\"subField\"," + "\"camelCase\":\"value\"}").getBytes(), JacksonUtils.toJsonBytes(new TestOfAnnotationSub())); } - @Test(expected = NacosSerializationException.class) - public void testToJsonBytes2() { - // object without field will throw exceptions - JacksonUtils.toJsonBytes(new Object()); + @Test + void testToJsonBytes2() { + assertThrows(NacosSerializationException.class, () -> { + // object without field will throw exceptions + JacksonUtils.toJsonBytes(new Object()); + }); } /** * JacksonUtils.toObj(byte[], Class) */ @Test - public void testToObject1() { - Assert.assertNull(JacksonUtils.toObj("null".getBytes(), Object.class)); - Assert.assertEquals("string", JacksonUtils.toObj("\"string\"".getBytes(), String.class)); - Assert.assertEquals(new BigDecimal(30), JacksonUtils.toObj("30".getBytes(), BigDecimal.class)); - Assert.assertEquals(Collections.singletonMap("key", "value"), - JacksonUtils.toObj("{\"key\":\"value\"}".getBytes(), Map.class)); - Assert.assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), + void testToObject1() { + assertNull(JacksonUtils.toObj("null".getBytes(), Object.class)); + assertEquals("string", JacksonUtils.toObj("\"string\"".getBytes(), String.class)); + assertEquals(new BigDecimal(30), JacksonUtils.toObj("30".getBytes(), BigDecimal.class)); + assertEquals(Collections.singletonMap("key", "value"), JacksonUtils.toObj("{\"key\":\"value\"}".getBytes(), Map.class)); + assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), JacksonUtils.toObj("[{\"key\":\"value\"}]".getBytes(), List.class)); - Assert.assertEquals(new TestOfAtomicObject(), JacksonUtils - .toObj("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}".getBytes(), TestOfAtomicObject.class)); - Assert.assertEquals(new TestOfDate(), - JacksonUtils.toObj("{\"date\":1626192000000}".getBytes(), TestOfDate.class)); - Assert.assertEquals(new TestOfAccessModifier(), + assertEquals(new TestOfAtomicObject(), + JacksonUtils.toObj("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}".getBytes(), TestOfAtomicObject.class)); + assertEquals(new TestOfDate(), JacksonUtils.toObj("{\"date\":1626192000000}".getBytes(), TestOfDate.class)); + assertEquals(new TestOfAccessModifier(), JacksonUtils.toObj("{\"publicAccessModifier\":\"public\"}".getBytes(), TestOfAccessModifier.class)); - Assert.assertEquals(new TestOfGetter(), + assertEquals(new TestOfGetter(), JacksonUtils.toObj("{\"value\":\"value\",\"key\":\"key\"}".getBytes(), TestOfGetter.class)); - Assert.assertEquals(new TestOfAnnotationSub(), JacksonUtils - .toObj(("{\"@type\":\"JacksonUtilsTest$TestOfAnnotationSub\",\"date\":\"2021-07-14\"," + assertEquals(new TestOfAnnotationSub(), JacksonUtils.toObj( + ("{\"@type\":\"JacksonUtilsTest$TestOfAnnotationSub\",\"date\":\"2021-07-14\"," + "\"subField\":\"subField\",\"camelCase\":\"value\"}").getBytes(), TestOfAnnotation.class)); } /** * JacksonUtils.toObj(byte[], Class) */ - @Test(expected = Exception.class) - public void testToObject2() { - JacksonUtils.toObj(("{not_A}Json:String}").getBytes(), TestOfAnnotationSub.class); + @Test + void testToObject2() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj(("{not_A}Json:String}").getBytes(), TestOfAnnotationSub.class); + }); } /** * JacksonUtils.toObj(byte[], Type) */ @Test - public void testToObject3() { - Assert.assertEquals(Collections.singletonMap("key", "value"), JacksonUtils - .toObj("{\"key\":\"value\"}".getBytes(), - TypeUtils.parameterize(Map.class, String.class, String.class))); - Assert.assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), JacksonUtils - .toObj("[{\"key\":\"value\"}]".getBytes(), TypeUtils - .parameterize(List.class, TypeUtils.parameterize(Map.class, String.class, String.class)))); + void testToObject3() { + assertEquals(Collections.singletonMap("key", "value"), JacksonUtils.toObj("{\"key\":\"value\"}".getBytes(), + TypeUtils.parameterize(Map.class, String.class, String.class))); + assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), + JacksonUtils.toObj("[{\"key\":\"value\"}]".getBytes(), + TypeUtils.parameterize(List.class, TypeUtils.parameterize(Map.class, String.class, String.class)))); } /** * JacksonUtils.toObj(byte[], Type) */ - @Test(expected = Exception.class) - public void testToObject4() { - JacksonUtils - .toObj("{not_A}Json:String}".getBytes(), TypeUtils.parameterize(Map.class, String.class, String.class)); + @Test + void testToObject4() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj("{not_A}Json:String}".getBytes(), TypeUtils.parameterize(Map.class, String.class, String.class)); + }); } /** * JacksonUtils.toObj(byte[], Type) */ - @Test(expected = Exception.class) - public void testToObject5() { - JacksonUtils.toObj("{\"key\":\"value\"}".getBytes(), Object.class.getGenericSuperclass()); + @Test + void testToObject5() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj("{\"key\":\"value\"}".getBytes(), Object.class.getGenericSuperclass()); + }); } /** * JacksonUtils.toObj(InputStream, Class) */ @Test - public void testToObject6() { - Assert.assertNull(JacksonUtils.toObj(new ByteArrayInputStream("null".getBytes()), Object.class)); - Assert.assertEquals("string", - JacksonUtils.toObj(new ByteArrayInputStream("\"string\"".getBytes()), String.class)); - Assert.assertEquals(new BigDecimal(30), - JacksonUtils.toObj(new ByteArrayInputStream("30".getBytes()), BigDecimal.class)); - Assert.assertEquals(Collections.singletonMap("key", "value"), + void testToObject6() { + assertNull(JacksonUtils.toObj(new ByteArrayInputStream("null".getBytes()), Object.class)); + assertEquals("string", JacksonUtils.toObj(new ByteArrayInputStream("\"string\"".getBytes()), String.class)); + assertEquals(new BigDecimal(30), JacksonUtils.toObj(new ByteArrayInputStream("30".getBytes()), BigDecimal.class)); + assertEquals(Collections.singletonMap("key", "value"), JacksonUtils.toObj(new ByteArrayInputStream("{\"key\":\"value\"}".getBytes()), Map.class)); - Assert.assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), + assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), JacksonUtils.toObj(new ByteArrayInputStream("[{\"key\":\"value\"}]".getBytes()), List.class)); - Assert.assertEquals(new TestOfAtomicObject(), JacksonUtils - .toObj(new ByteArrayInputStream("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}".getBytes()), + assertEquals(new TestOfAtomicObject(), + JacksonUtils.toObj(new ByteArrayInputStream("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}".getBytes()), TestOfAtomicObject.class)); - Assert.assertEquals(new TestOfDate(), + assertEquals(new TestOfDate(), JacksonUtils.toObj(new ByteArrayInputStream("{\"date\":1626192000000}".getBytes()), TestOfDate.class)); - Assert.assertEquals(new TestOfAccessModifier(), JacksonUtils - .toObj(new ByteArrayInputStream("{\"publicAccessModifier\":\"public\"}".getBytes()), + assertEquals(new TestOfAccessModifier(), + JacksonUtils.toObj(new ByteArrayInputStream("{\"publicAccessModifier\":\"public\"}".getBytes()), TestOfAccessModifier.class)); - Assert.assertEquals(new TestOfGetter(), JacksonUtils - .toObj(new ByteArrayInputStream("{\"value\":\"value\",\"key\":\"key\"}".getBytes()), + assertEquals(new TestOfGetter(), + JacksonUtils.toObj(new ByteArrayInputStream("{\"value\":\"value\",\"key\":\"key\"}".getBytes()), TestOfGetter.class)); - Assert.assertEquals(new TestOfAnnotationSub(), JacksonUtils.toObj((new ByteArrayInputStream( + assertEquals(new TestOfAnnotationSub(), JacksonUtils.toObj((new ByteArrayInputStream( ("{\"@type\":\"JacksonUtilsTest$TestOfAnnotationSub\"," + "\"date\":\"2021-07-14\",\"subField\":\"subField\",\"camelCase\":\"value\"}").getBytes())), TestOfAnnotation.class)); @@ -201,62 +207,66 @@ public void testToObject6() { /** * JacksonUtils.toObj(InputStream, Class) */ - @Test(expected = Exception.class) - public void testToObject7() { - JacksonUtils.toObj((ByteArrayInputStream) null, BigDecimal.class); + @Test + void testToObject7() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj((ByteArrayInputStream) null, BigDecimal.class); + }); } /** * JacksonUtils.toObj(InputStream, Class) */ - @Test(expected = Exception.class) - public void testToObject8() { - JacksonUtils.toObj(new ByteArrayInputStream("{not_A}Json:String}".getBytes()), Object.class); + @Test + void testToObject8() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj(new ByteArrayInputStream("{not_A}Json:String}".getBytes()), Object.class); + }); } /** * JacksonUtils.toObj(byte[], TypeReference) */ @Test - public void testToObject9() { - Assert.assertNull(JacksonUtils.toObj("null".getBytes(), new TypeReference() { + void testToObject9() { + assertNull(JacksonUtils.toObj("null".getBytes(), new TypeReference() { })); - Assert.assertEquals("string", JacksonUtils.toObj("\"string\"".getBytes(), new TypeReference() { + assertEquals("string", JacksonUtils.toObj("\"string\"".getBytes(), new TypeReference() { })); - Assert.assertEquals(new BigDecimal(30), JacksonUtils.toObj("30".getBytes(), new TypeReference() { + assertEquals(new BigDecimal(30), JacksonUtils.toObj("30".getBytes(), new TypeReference() { })); - Assert.assertEquals(Collections.singletonMap("key", "value"), + assertEquals(Collections.singletonMap("key", "value"), JacksonUtils.toObj("{\"key\":\"value\"}".getBytes(), new TypeReference>() { })); - Assert.assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), + assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), JacksonUtils.toObj("[{\"key\":\"value\"}]".getBytes(), new TypeReference>>() { })); - Assert.assertEquals(new TestOfAtomicObject(), JacksonUtils - .toObj("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}".getBytes(), - new TypeReference() { - })); - Assert.assertEquals(new TestOfDate(), - JacksonUtils.toObj("{\"date\":1626192000000}".getBytes(), new TypeReference() { + assertEquals(new TestOfAtomicObject(), JacksonUtils.toObj("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}".getBytes(), + new TypeReference() { })); - Assert.assertEquals(new TestOfAccessModifier(), JacksonUtils - .toObj("{\"publicAccessModifier\":\"public\"}".getBytes(), new TypeReference() { + assertEquals(new TestOfDate(), JacksonUtils.toObj("{\"date\":1626192000000}".getBytes(), new TypeReference() { + })); + assertEquals(new TestOfAccessModifier(), + JacksonUtils.toObj("{\"publicAccessModifier\":\"public\"}".getBytes(), new TypeReference() { + })); + assertEquals(new TestOfGetter(), + JacksonUtils.toObj("{\"value\":\"value\",\"key\":\"key\"}".getBytes(), new TypeReference() { })); - Assert.assertEquals(new TestOfGetter(), JacksonUtils - .toObj("{\"value\":\"value\",\"key\":\"key\"}".getBytes(), new TypeReference() { + assertEquals(new TestOfAnnotationSub(), JacksonUtils.toObj( + ("{\"@type\":\"JacksonUtilsTest$TestOfAnnotationSub\",\"date\":\"2021-07-14\"," + + "\"subField\":\"subField\",\"camelCase\":\"value\"}").getBytes(), + new TypeReference() { })); - Assert.assertEquals(new TestOfAnnotationSub(), JacksonUtils - .toObj(("{\"@type\":\"JacksonUtilsTest$TestOfAnnotationSub\",\"date\":\"2021-07-14\"," - + "\"subField\":\"subField\",\"camelCase\":\"value\"}").getBytes(), - new TypeReference() { - })); } /** * JacksonUtils.toObj(byte[], TypeReference) */ - @Test(expected = Exception.class) - public void testToObject10() { - JacksonUtils.toObj("{not_A}Json:String}".getBytes(), new TypeReference() { + @Test + void testToObject10() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj("{not_A}Json:String}".getBytes(), new TypeReference() { + }); }); } @@ -264,106 +274,113 @@ public void testToObject10() { * JacksonUtils.toObj(InputStream, Type) */ @Test - public void testToObject11() { - Assert.assertEquals(Collections.singletonMap("key", "value"), JacksonUtils - .toObj(new ByteArrayInputStream("{\"key\":\"value\"}".getBytes()), + void testToObject11() { + assertEquals(Collections.singletonMap("key", "value"), + JacksonUtils.toObj(new ByteArrayInputStream("{\"key\":\"value\"}".getBytes()), TypeUtils.parameterize(Map.class, String.class, String.class))); - Assert.assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), JacksonUtils - .toObj(new ByteArrayInputStream("[{\"key\":\"value\"}]".getBytes()), TypeUtils - .parameterize(List.class, TypeUtils.parameterize(Map.class, String.class, String.class)))); + assertEquals(Collections.singletonList(Collections.singletonMap("key", "value")), + JacksonUtils.toObj(new ByteArrayInputStream("[{\"key\":\"value\"}]".getBytes()), + TypeUtils.parameterize(List.class, TypeUtils.parameterize(Map.class, String.class, String.class)))); } /** * JacksonUtils.toObj(InputStream, Type) */ - @Test(expected = Exception.class) - public void testToObject12() { - JacksonUtils.toObj(new ByteArrayInputStream("{not_A}Json:String}".getBytes()), - TypeUtils.parameterize(Map.class, String.class, String.class)); + @Test + void testToObject12() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj(new ByteArrayInputStream("{not_A}Json:String}".getBytes()), + TypeUtils.parameterize(Map.class, String.class, String.class)); + }); } /** * JacksonUtils.toObj(InputStream, Type) */ - @Test(expected = Exception.class) - public void testToObject13() { - JacksonUtils - .toObj(new ByteArrayInputStream("{\"key\":\"value\"}".getBytes()), Object.class.getGenericSuperclass()); + @Test + void testToObject13() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj(new ByteArrayInputStream("{\"key\":\"value\"}".getBytes()), Object.class.getGenericSuperclass()); + }); } /** * JacksonUtils.toObj(InputStream, Type) */ - @Test(expected = Exception.class) - public void testToObject14() { - JacksonUtils.toObj((InputStream) null, Object.class.getGenericSuperclass()); + @Test + void testToObject14() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj((InputStream) null, Object.class.getGenericSuperclass()); + }); } /** * JacksonUtils.toObj(String) */ @Test - public void testToObject15() { - Assert.assertEquals("null", JacksonUtils.toObj("null").asText()); - Assert.assertEquals("string", JacksonUtils.toObj("\"string\"").asText()); - Assert.assertEquals(30, JacksonUtils.toObj("30").asInt()); - Assert.assertEquals("value", JacksonUtils.toObj("{\"key\":\"value\"}").get("key").asText()); - Assert.assertEquals("value", JacksonUtils.toObj("[{\"key\":\"value\"}]").get(0).get("key").asText()); + void testToObject15() { + assertEquals("null", JacksonUtils.toObj("null").asText()); + assertEquals("string", JacksonUtils.toObj("\"string\"").asText()); + assertEquals(30, JacksonUtils.toObj("30").asInt()); + assertEquals("value", JacksonUtils.toObj("{\"key\":\"value\"}").get("key").asText()); + assertEquals("value", JacksonUtils.toObj("[{\"key\":\"value\"}]").get(0).get("key").asText()); JsonNode jsonNode = JacksonUtils.toObj("{\"aLong\":0,\"aInteger\":1,\"aBoolean\":false}"); - Assert.assertEquals(0L, jsonNode.get("aLong").asLong()); - Assert.assertEquals(1, jsonNode.get("aInteger").asInt()); + assertEquals(0L, jsonNode.get("aLong").asLong()); + assertEquals(1, jsonNode.get("aInteger").asInt()); } /** * JacksonUtils.toObj(String) */ - @Test(expected = Exception.class) - public void testToObject16() { - JacksonUtils.toObj("{not_A}Json:String}"); + @Test + void testToObject16() { + assertThrows(Exception.class, () -> { + JacksonUtils.toObj("{not_A}Json:String}"); + }); } @Test - public void testRegisterSubtype() { + void testRegisterSubtype() { JacksonUtils.registerSubtype(TestOfChild.class, "JacksonUtilsTest$TestOfChild"); - Assert.assertEquals(new TestOfChild(), JacksonUtils - .toObj("{\"@type\":\"JacksonUtilsTest$TestOfChild\",\"parentField\":\"parentValue\"," - + "\"childField\":\"childValue\"}", TestOfParent.class)); + assertEquals(new TestOfChild(), JacksonUtils.toObj( + "{\"@type\":\"JacksonUtilsTest$TestOfChild\",\"parentField\":\"parentValue\"," + "\"childField\":\"childValue\"}", + TestOfParent.class)); } @Test - public void testCreateEmptyJsonNode() { - Assert.assertEquals("", JacksonUtils.createEmptyJsonNode().asText()); - Assert.assertTrue(JacksonUtils.createEmptyJsonNode().isEmpty()); + void testCreateEmptyJsonNode() { + assertEquals("", JacksonUtils.createEmptyJsonNode().asText()); + assertTrue(JacksonUtils.createEmptyJsonNode().isEmpty()); } @Test - public void testCreateEmptyArrayNode() { - Assert.assertEquals("", JacksonUtils.createEmptyJsonNode().asText()); - Assert.assertEquals(0, JacksonUtils.createEmptyArrayNode().size()); - Assert.assertTrue(JacksonUtils.createEmptyArrayNode().isEmpty()); + void testCreateEmptyArrayNode() { + assertEquals("", JacksonUtils.createEmptyJsonNode().asText()); + assertEquals(0, JacksonUtils.createEmptyArrayNode().size()); + assertTrue(JacksonUtils.createEmptyArrayNode().isEmpty()); } @Test - public void testTransferToJsonNode() { + void testTransferToJsonNode() { JsonNode jsonNode1 = JacksonUtils.transferToJsonNode(Collections.singletonMap("key", "value")); - Assert.assertEquals("value", jsonNode1.get("key").asText()); + assertEquals("value", jsonNode1.get("key").asText()); JsonNode jsonNode2 = JacksonUtils.transferToJsonNode(new TestOfAtomicObject()); - Assert.assertEquals("0", jsonNode2.get("aLong").asText()); - Assert.assertEquals("1", jsonNode2.get("aInteger").asText()); - Assert.assertEquals("false", jsonNode2.get("aBoolean").asText()); + assertEquals("0", jsonNode2.get("aLong").asText()); + assertEquals("1", jsonNode2.get("aInteger").asText()); + assertEquals("false", jsonNode2.get("aBoolean").asText()); } @Test - public void testConstructJavaType() { - Assert.assertEquals("java.lang.String", JacksonUtils.constructJavaType(String.class).getRawClass().getName()); - Assert.assertTrue(JacksonUtils.constructJavaType(String.class).isFinal()); + void testConstructJavaType() { + assertEquals("java.lang.String", JacksonUtils.constructJavaType(String.class).getRawClass().getName()); + assertTrue(JacksonUtils.constructJavaType(String.class).isFinal()); } @Test - public void testToJsonBytes() { + void testToJsonBytes() { Map map = new LinkedHashMap(); map.put("string", "你好,中国!"); map.put("integer", 999); @@ -372,8 +389,8 @@ public void testToJsonBytes() { byte[] bytes = JacksonUtils.toJsonBytes(restResult); String jsonFromBytes = ByteUtils.toString(bytes); - Assert.assertTrue(jsonFromBytes.contains("\"code\":0")); - Assert.assertTrue(jsonFromBytes.contains("\"data\":{\"string\":\"你好,中国!\",\"integer\":999}")); + assertTrue(jsonFromBytes.contains("\"code\":0")); + assertTrue(jsonFromBytes.contains("\"data\":{\"string\":\"你好,中国!\",\"integer\":999}")); // old `toJsonBytes` method implementation: // public static byte[] toJsonBytes(Object obj) { // try { @@ -385,41 +402,46 @@ public void testToJsonBytes() { // here is a verification to compare with the old implementation byte[] bytesFromOldImplementation = ByteUtils.toBytes(JacksonUtils.toJson(restResult)); - String jsonFromBytesOldImplementation = new String(bytesFromOldImplementation, - Charset.forName(Constants.ENCODE)); - Assert.assertTrue(jsonFromBytesOldImplementation.contains("\"code\":0")); - Assert.assertTrue(jsonFromBytesOldImplementation.contains("\"data\":{\"string\":\"你好,中国!\",\"integer\":999}")); + String jsonFromBytesOldImplementation = new String(bytesFromOldImplementation, Charset.forName(Constants.ENCODE)); + assertTrue(jsonFromBytesOldImplementation.contains("\"code\":0")); + assertTrue(jsonFromBytesOldImplementation.contains("\"data\":{\"string\":\"你好,中国!\",\"integer\":999}")); } @Test - public void testToObjFromBytes() { + void testToObjFromBytes() { String json = "{\"code\":0,\"data\":{\"string\":\"你好,中国!\",\"integer\":999}}"; RestResult> restResult = JacksonUtils.toObj(json, RestResult.class); - Assert.assertEquals(0, restResult.getCode()); - Assert.assertEquals("你好,中国!", restResult.getData().get("string")); - Assert.assertEquals(999, restResult.getData().get("integer")); + assertEquals(0, restResult.getCode()); + assertEquals("你好,中国!", restResult.getData().get("string")); + assertEquals(999, restResult.getData().get("integer")); restResult = JacksonUtils.toObj(json, new TypeReference>>() { }); - Assert.assertEquals(0, restResult.getCode()); - Assert.assertEquals("你好,中国!", restResult.getData().get("string")); - Assert.assertEquals(999, restResult.getData().get("integer")); + assertEquals(0, restResult.getCode()); + assertEquals("你好,中国!", restResult.getData().get("string")); + assertEquals(999, restResult.getData().get("integer")); } - @Test(expected = NacosDeserializationException.class) - public void tesToObjForClassWithException() { - JacksonUtils.toObj("aaa", JsonNode.class); + @Test + void tesToObjForClassWithException() { + assertThrows(NacosDeserializationException.class, () -> { + JacksonUtils.toObj("aaa", JsonNode.class); + }); } - @Test(expected = NacosDeserializationException.class) - public void tesToObjForTypeWithException() { - JacksonUtils.toObj("aaa", TypeUtils.parameterize(JsonNode.class)); + @Test + void tesToObjForTypeWithException() { + assertThrows(NacosDeserializationException.class, () -> { + JacksonUtils.toObj("aaa", TypeUtils.parameterize(JsonNode.class)); + }); } - @Test(expected = NacosDeserializationException.class) - public void tesToObjForTypeTypeReferenceWithException() { - JacksonUtils.toObj("aaa", new TypeReference() { + @Test + void tesToObjForTypeTypeReferenceWithException() { + assertThrows(NacosDeserializationException.class, () -> { + JacksonUtils.toObj("aaa", new TypeReference() { + }); }); } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/LoggerUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/LoggerUtilsTest.java index a7836ec617c..d4abde0ecf6 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/LoggerUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/LoggerUtilsTest.java @@ -16,14 +16,14 @@ package com.alibaba.nacos.common.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.slf4j.Logger; -public class LoggerUtilsTest { +class LoggerUtilsTest { @Test - public void testPrintIfDebugEnabled() { + void testPrintIfDebugEnabled() { Logger logger = Mockito.mock(Logger.class); Mockito.when(logger.isDebugEnabled()).thenReturn(true); LoggerUtils.printIfDebugEnabled(logger, "test", "arg1", "arg2", "arg3"); @@ -31,7 +31,7 @@ public void testPrintIfDebugEnabled() { } @Test - public void testPrintIfInfoEnabled() { + void testPrintIfInfoEnabled() { Logger logger = Mockito.mock(Logger.class); Mockito.when(logger.isInfoEnabled()).thenReturn(true); LoggerUtils.printIfInfoEnabled(logger, "test", "arg1", "arg2", "arg3"); @@ -39,7 +39,7 @@ public void testPrintIfInfoEnabled() { } @Test - public void testPrintIfTraceEnabled() { + void testPrintIfTraceEnabled() { Logger logger = Mockito.mock(Logger.class); Mockito.when(logger.isTraceEnabled()).thenReturn(true); LoggerUtils.printIfTraceEnabled(logger, "test", "arg1", "arg2", "arg3"); @@ -47,7 +47,7 @@ public void testPrintIfTraceEnabled() { } @Test - public void testPrintIfWarnEnabled() { + void testPrintIfWarnEnabled() { Logger logger = Mockito.mock(Logger.class); Mockito.when(logger.isWarnEnabled()).thenReturn(true); LoggerUtils.printIfWarnEnabled(logger, "test", "arg1", "arg2", "arg3"); @@ -55,7 +55,7 @@ public void testPrintIfWarnEnabled() { } @Test - public void testPrintIfErrorEnabled() { + void testPrintIfErrorEnabled() { Logger logger = Mockito.mock(Logger.class); Mockito.when(logger.isErrorEnabled()).thenReturn(true); LoggerUtils.printIfErrorEnabled(logger, "test", "arg1", "arg2", "arg3"); diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/MD5UtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/MD5UtilsTest.java index 0384d97ba12..9315992ea3b 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/MD5UtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/MD5UtilsTest.java @@ -17,29 +17,29 @@ package com.alibaba.nacos.common.utils; import com.alibaba.nacos.api.common.Constants; +import org.junit.jupiter.api.Test; import java.security.NoSuchAlgorithmException; -import org.junit.Assert; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class MD5UtilsTest { +class MD5UtilsTest { @Test - public void testMd5Hex() throws NoSuchAlgorithmException { - Assert.assertEquals("d41d8cd98f00b204e9800998ecf8427e", MD5Utils.md5Hex("", Constants.ENCODE)); - Assert.assertEquals("acbd18db4cc2f85cedef654fccc4a4d8", MD5Utils.md5Hex("foo", Constants.ENCODE)); - Assert.assertEquals("02f463eb799797e2a978fb1a2ae2991e", MD5Utils.md5Hex( + void testMd5Hex() throws NoSuchAlgorithmException { + assertEquals("d41d8cd98f00b204e9800998ecf8427e", MD5Utils.md5Hex("", Constants.ENCODE)); + assertEquals("acbd18db4cc2f85cedef654fccc4a4d8", MD5Utils.md5Hex("foo", Constants.ENCODE)); + assertEquals("02f463eb799797e2a978fb1a2ae2991e", MD5Utils.md5Hex( "38c5ee9532f037a20b93d0f804cf111fca4003e451d09a692d9dea8032308d9c64eda9047fcd5e850284a49b1a0cfb2ecd45", Constants.ENCODE)); - Assert.assertEquals("d41d8cd98f00b204e9800998ecf8427e", MD5Utils.md5Hex(new byte[0])); - Assert.assertEquals("5289df737df57326fcdd22597afb1fac", MD5Utils.md5Hex(new byte[] {1, 2, 3})); + assertEquals("d41d8cd98f00b204e9800998ecf8427e", MD5Utils.md5Hex(new byte[0])); + assertEquals("5289df737df57326fcdd22597afb1fac", MD5Utils.md5Hex(new byte[] {1, 2, 3})); } @Test - public void testEncodeHexString() { - Assert.assertEquals("", MD5Utils.encodeHexString(new byte[0])); - Assert.assertEquals("010203", MD5Utils.encodeHexString(new byte[] {1, 2, 3})); + void testEncodeHexString() { + assertEquals("", MD5Utils.encodeHexString(new byte[0])); + assertEquals("010203", MD5Utils.encodeHexString(new byte[] {1, 2, 3})); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/MapUtilTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/MapUtilTest.java index 0374d4594b0..5c66dee7b25 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/MapUtilTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/MapUtilTest.java @@ -16,7 +16,7 @@ package com.alibaba.nacos.common.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import java.util.Collections; @@ -27,15 +27,15 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiFunction; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; -public class MapUtilTest { +class MapUtilTest { @Test - public void testIsEmptyAndNotEmptyMap() { + void testIsEmptyAndNotEmptyMap() { Map map = null; assertTrue(MapUtil.isEmpty(map)); assertFalse(MapUtil.isNotEmpty(map)); @@ -48,7 +48,7 @@ public void testIsEmptyAndNotEmptyMap() { } @Test - public void testIsEmptyOrEmptyDictionary() { + void testIsEmptyOrEmptyDictionary() { Dictionary dictionary = null; assertTrue(MapUtil.isEmpty(dictionary)); assertFalse(MapUtil.isNotEmpty(dictionary)); @@ -61,7 +61,7 @@ public void testIsEmptyOrEmptyDictionary() { } @Test - public void testPutIfValNoNull() { + void testPutIfValNoNull() { Map map = new HashMap<>(); MapUtil.putIfValNoNull(map, "key-1", null); assertTrue(map.isEmpty()); @@ -70,7 +70,7 @@ public void testPutIfValNoNull() { } @Test - public void testPutIfValNoEmptyMap() { + void testPutIfValNoEmptyMap() { Map map = new HashMap<>(); MapUtil.putIfValNoEmpty(map, "key-str", null); @@ -113,7 +113,7 @@ public void testPutIfValNoEmptyMap() { } @Test - public void testComputeIfAbsent() { + void testComputeIfAbsent() { Map target = new HashMap<>(); String key = "key"; String param1 = "param1"; @@ -136,7 +136,7 @@ public void testComputeIfAbsent() { } @Test - public void testRemoveKey() { + void testRemoveKey() { Map map = new HashMap<>(); map.put("A", 1); map.put("B", 2); diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/NamespaceUtilTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/NamespaceUtilTest.java index ff399a7119b..25f5325eea1 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/NamespaceUtilTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/NamespaceUtilTest.java @@ -16,9 +16,10 @@ package com.alibaba.nacos.common.utils; -import org.junit.After; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; /** * test NamespaceUtil. @@ -26,33 +27,33 @@ * @author klw(213539 @ qq.com) * @date 2020/10/13 9:46 */ -public class NamespaceUtilTest { +class NamespaceUtilTest { - @After - public void tearDown() { + @AfterEach + void tearDown() { NamespaceUtil.setNamespaceDefaultId(""); } @Test - public void testProcessTenantParameter() { + void testProcessTenantParameter() { String strPublic = "public"; - String strNull = "null"; String strEmpty = ""; + assertEquals(strEmpty, NamespaceUtil.processNamespaceParameter(strPublic)); + String strNull = "null"; + assertEquals(strEmpty, NamespaceUtil.processNamespaceParameter(strNull)); + assertEquals(strEmpty, NamespaceUtil.processNamespaceParameter(strEmpty)); + assertEquals(strEmpty, NamespaceUtil.processNamespaceParameter(null)); String strAbc = "abc"; + assertEquals(strAbc, NamespaceUtil.processNamespaceParameter(strAbc)); String strdef123 = "def123"; + assertEquals(strdef123, NamespaceUtil.processNamespaceParameter(strdef123)); String strAbcHasSpace = " abc "; - Assert.assertEquals(strEmpty, NamespaceUtil.processNamespaceParameter(strPublic)); - Assert.assertEquals(strEmpty, NamespaceUtil.processNamespaceParameter(strNull)); - Assert.assertEquals(strEmpty, NamespaceUtil.processNamespaceParameter(strEmpty)); - Assert.assertEquals(strEmpty, NamespaceUtil.processNamespaceParameter(null)); - Assert.assertEquals(strAbc, NamespaceUtil.processNamespaceParameter(strAbc)); - Assert.assertEquals(strdef123, NamespaceUtil.processNamespaceParameter(strdef123)); - Assert.assertEquals(strAbc, NamespaceUtil.processNamespaceParameter(strAbcHasSpace)); + assertEquals(strAbc, NamespaceUtil.processNamespaceParameter(strAbcHasSpace)); } @Test - public void testSetNamespaceDefaultId() { + void testSetNamespaceDefaultId() { NamespaceUtil.setNamespaceDefaultId("Deprecated"); - Assert.assertEquals("Deprecated", NamespaceUtil.getNamespaceDefaultId()); + assertEquals("Deprecated", NamespaceUtil.getNamespaceDefaultId()); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/NumberUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/NumberUtilsTest.java index 8016e0b47d1..bea74efc8f8 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/NumberUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/NumberUtilsTest.java @@ -16,78 +16,82 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * Number utils. + * * @author zzq */ -public class NumberUtilsTest { +class NumberUtilsTest { @Test - public void testToInt() { - Assert.assertEquals(0, NumberUtils.toInt(null)); - Assert.assertEquals(0, NumberUtils.toInt(StringUtils.EMPTY)); - Assert.assertEquals(1, NumberUtils.toInt("1")); + void testToInt() { + assertEquals(0, NumberUtils.toInt(null)); + assertEquals(0, NumberUtils.toInt(StringUtils.EMPTY)); + assertEquals(1, NumberUtils.toInt("1")); } @Test - public void testTestToInt() { - Assert.assertEquals(1, NumberUtils.toInt(null, 1)); - Assert.assertEquals(1, NumberUtils.toInt("", 1)); - Assert.assertEquals(1, NumberUtils.toInt("1", 0)); + void testTestToInt() { + assertEquals(1, NumberUtils.toInt(null, 1)); + assertEquals(1, NumberUtils.toInt("", 1)); + assertEquals(1, NumberUtils.toInt("1", 0)); } @Test - public void testToLong() { - Assert.assertEquals(1L, NumberUtils.toLong(null, 1L)); - Assert.assertEquals(1L, NumberUtils.toLong("", 1L)); - Assert.assertEquals(1L, NumberUtils.toLong("1", 0L)); + void testToLong() { + assertEquals(1L, NumberUtils.toLong(null, 1L)); + assertEquals(1L, NumberUtils.toLong("", 1L)); + assertEquals(1L, NumberUtils.toLong("1", 0L)); } @Test - public void testToDouble() { - Assert.assertEquals(1.1d, NumberUtils.toDouble(null, 1.1d), 0); - Assert.assertEquals(1.1d, NumberUtils.toDouble("", 1.1d), 0); - Assert.assertEquals(1.5d, NumberUtils.toDouble("1.5", 0.0d), 0); + void testToDouble() { + assertEquals(1.1d, NumberUtils.toDouble(null, 1.1d), 0); + assertEquals(1.1d, NumberUtils.toDouble("", 1.1d), 0); + assertEquals(1.5d, NumberUtils.toDouble("1.5", 0.0d), 0); } @Test - public void testIsDigits() { - Assert.assertFalse(NumberUtils.isDigits(null)); - Assert.assertFalse(NumberUtils.isDigits("")); - Assert.assertTrue(NumberUtils.isDigits("12345")); - Assert.assertFalse(NumberUtils.isDigits("1234.5")); - Assert.assertFalse(NumberUtils.isDigits("1ab")); - Assert.assertFalse(NumberUtils.isDigits("abc")); + void testIsDigits() { + assertFalse(NumberUtils.isDigits(null)); + assertFalse(NumberUtils.isDigits("")); + assertTrue(NumberUtils.isDigits("12345")); + assertFalse(NumberUtils.isDigits("1234.5")); + assertFalse(NumberUtils.isDigits("1ab")); + assertFalse(NumberUtils.isDigits("abc")); } @Test - public void testToFloatString() { - Assert.assertEquals(NumberUtils.toFloat("-1.2345"), -1.2345f, 0); - Assert.assertEquals(1.2345f, NumberUtils.toFloat("1.2345"), 0); - Assert.assertEquals(0.0f, NumberUtils.toFloat("abc"), 0); - - Assert.assertEquals(NumberUtils.toFloat("-001.2345"), -1.2345f, 0); - Assert.assertEquals(1.2345f, NumberUtils.toFloat("+001.2345"), 0); - Assert.assertEquals(1.2345f, NumberUtils.toFloat("001.2345"), 0); - Assert.assertEquals(0f, NumberUtils.toFloat("000.00"), 0); - - Assert.assertEquals(NumberUtils.toFloat(Float.MAX_VALUE + ""), Float.MAX_VALUE, 0); - Assert.assertEquals(NumberUtils.toFloat(Float.MIN_VALUE + ""), Float.MIN_VALUE, 0); - Assert.assertEquals(0.0f, NumberUtils.toFloat(""), 0); - Assert.assertEquals(0.0f, NumberUtils.toFloat(null), 0); + void testToFloatString() { + assertEquals(NumberUtils.toFloat("-1.2345"), -1.2345f, 0); + assertEquals(1.2345f, NumberUtils.toFloat("1.2345"), 0); + assertEquals(0.0f, NumberUtils.toFloat("abc"), 0); + + assertEquals(NumberUtils.toFloat("-001.2345"), -1.2345f, 0); + assertEquals(1.2345f, NumberUtils.toFloat("+001.2345"), 0); + assertEquals(1.2345f, NumberUtils.toFloat("001.2345"), 0); + assertEquals(0f, NumberUtils.toFloat("000.00"), 0); + + assertEquals(Float.MAX_VALUE, NumberUtils.toFloat(Float.MAX_VALUE + ""), 0); + assertEquals(Float.MIN_VALUE, NumberUtils.toFloat(Float.MIN_VALUE + ""), 0); + assertEquals(0.0f, NumberUtils.toFloat(""), 0); + assertEquals(0.0f, NumberUtils.toFloat(null), 0); } @Test - public void testToFloatStringString() { - Assert.assertEquals(1.2345f, NumberUtils.toFloat("1.2345", 5.1f), 0); - Assert.assertEquals(5.0f, NumberUtils.toFloat("a", 5.0f), 0); + void testToFloatStringString() { + assertEquals(1.2345f, NumberUtils.toFloat("1.2345", 5.1f), 0); + assertEquals(5.0f, NumberUtils.toFloat("a", 5.0f), 0); // LANG-1060 - Assert.assertEquals(5.0f, NumberUtils.toFloat("-001Z.2345", 5.0f), 0); - Assert.assertEquals(5.0f, NumberUtils.toFloat("+001AB.2345", 5.0f), 0); - Assert.assertEquals(5.0f, NumberUtils.toFloat("001Z.2345", 5.0f), 0); + assertEquals(5.0f, NumberUtils.toFloat("-001Z.2345", 5.0f), 0); + assertEquals(5.0f, NumberUtils.toFloat("+001AB.2345", 5.0f), 0); + assertEquals(5.0f, NumberUtils.toFloat("001Z.2345", 5.0f), 0); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ObservableTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ObservableTest.java index 0142fff7546..a2361518055 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ObservableTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ObservableTest.java @@ -16,46 +16,46 @@ package com.alibaba.nacos.common.utils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; -@RunWith(MockitoJUnitRunner.class) -public class ObservableTest { +@ExtendWith(MockitoExtension.class) +class ObservableTest { @Mock private Observer observer; private Observable observable; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { observable = new Observable(); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { } @Test - public void testAddObserver() { + void testAddObserver() { observable.addObserver(observer); assertEquals(1, observable.countObservers()); verify(observer).update(observable); } @Test - public void testDeleteObserver() { + void testDeleteObserver() { observable.addObserver(observer); assertEquals(1, observable.countObservers()); observable.deleteObserver(observer); @@ -63,7 +63,7 @@ public void testDeleteObserver() { } @Test - public void testNotifyObservers() { + void testNotifyObservers() { observable.addObserver(observer); reset(observer); observable.notifyObservers(); @@ -77,7 +77,7 @@ public void testNotifyObservers() { } @Test - public void testDeleteObservers() { + void testDeleteObservers() { observable.addObserver(observer); observable.deleteObservers(); assertEquals(1, observable.countObservers()); diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/PairTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/PairTest.java index 511bdfc80b9..ae21b142224 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/PairTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/PairTest.java @@ -16,14 +16,14 @@ package com.alibaba.nacos.common.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class PairTest { +class PairTest { @Test - public void testPair() { + void testPair() { Pair pair = Pair.with("a", "b"); assertEquals("a", pair.getFirst()); assertEquals("b", pair.getSecond()); diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/PreconditionsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/PreconditionsTest.java index 7f735320167..01c62db3357 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/PreconditionsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/PreconditionsTest.java @@ -16,14 +16,17 @@ package com.alibaba.nacos.common.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertThrows; /** * {@code Preconditions} unit test. + * * @author zzq * @date 2021/7/29 */ -public final class PreconditionsTest { +final class PreconditionsTest { private static final String FORMAT = "I ate %s pies."; @@ -32,47 +35,61 @@ public final class PreconditionsTest { private static final String ERRORMSG = "A message"; @Test - public void testCheckArgument2Args1true() { + void testCheckArgument2Args1true() { Preconditions.checkArgument(true, ERRORMSG); } - @Test(expected = IllegalArgumentException.class) - public void testCheckArgument2Args1false() { - Preconditions.checkArgument(false, ERRORMSG); + @Test + void testCheckArgument2Args1false() { + assertThrows(IllegalArgumentException.class, () -> { + Preconditions.checkArgument(false, ERRORMSG); + }); } - @Test(expected = IllegalArgumentException.class) - public void testCheckArgument2Args1true2null() { - Preconditions.checkArgument(true, null); + @Test + void testCheckArgument2Args1true2null() { + assertThrows(IllegalArgumentException.class, () -> { + Preconditions.checkArgument(true, null); + }); } - @Test(expected = IllegalArgumentException.class) - public void testCheckArgument2Args1false2null() { - Preconditions.checkArgument(false, null); + @Test + void testCheckArgument2Args1false2null() { + assertThrows(IllegalArgumentException.class, () -> { + Preconditions.checkArgument(false, null); + }); } @Test - public void testCheckArgument3Args1true() { + void testCheckArgument3Args1true() { Preconditions.checkArgument(true, ERRORMSG, ARG); } - @Test(expected = IllegalArgumentException.class) - public void testCheckArgument3Args1false() { - Preconditions.checkArgument(false, ERRORMSG, ARG); + @Test + void testCheckArgument3Args1false() { + assertThrows(IllegalArgumentException.class, () -> { + Preconditions.checkArgument(false, ERRORMSG, ARG); + }); } - @Test(expected = IllegalArgumentException.class) - public void testCheckArgument3Args1true2null() { - Preconditions.checkArgument(true, null, ARG); + @Test + void testCheckArgument3Args1true2null() { + assertThrows(IllegalArgumentException.class, () -> { + Preconditions.checkArgument(true, null, ARG); + }); } - @Test(expected = IllegalArgumentException.class) - public void testCheckArgument3Args1false2null() { - Preconditions.checkArgument(false, null, ARG); + @Test + void testCheckArgument3Args1false2null() { + assertThrows(IllegalArgumentException.class, () -> { + Preconditions.checkArgument(false, null, ARG); + }); } - @Test(expected = IllegalArgumentException.class) - public void testCheckArgument3Args1false3null() { - Preconditions.checkArgument(false, ERRORMSG, null); + @Test + void testCheckArgument3Args1false3null() { + assertThrows(IllegalArgumentException.class, () -> { + Preconditions.checkArgument(false, ERRORMSG, null); + }); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/PropertyUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/PropertyUtilsTest.java index 0e2b43a5835..fdde9608435 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/PropertyUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/PropertyUtilsTest.java @@ -16,33 +16,36 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; /** * PropertyUtils Test. + * * @ClassName: PropertyUtilsTest * @Author: ChenHao26 * @Date: 2022/8/22 13:28 */ -public class PropertyUtilsTest { +class PropertyUtilsTest { @Test - public void getProperty() { + void getProperty() { System.setProperty("nacos.test", "google"); String property = PropertyUtils.getProperty("nacos.test", "xx"); - Assert.assertEquals(property, "google"); + assertEquals("google", property); } @Test - public void getPropertyWithDefaultValue() { + void getPropertyWithDefaultValue() { String property = PropertyUtils.getProperty("nacos.test", "xx", "test001"); - Assert.assertEquals(property, "test001"); + assertEquals("test001", property); } @Test - public void getProcessorsCount() { + void getProcessorsCount() { int processorsCount = PropertyUtils.getProcessorsCount(); - Assert.assertNotNull(processorsCount); + assertNotNull(processorsCount); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/RandomUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/RandomUtilsTest.java index 8ba35941e2f..58443a2d36b 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/RandomUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/RandomUtilsTest.java @@ -16,47 +16,54 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * test RandomUtils. * * @author zzq */ -public class RandomUtilsTest { +class RandomUtilsTest { @Test - public void testNextLong() { + void testNextLong() { final long result = RandomUtils.nextLong(1L, 199L); - Assert.assertTrue(result >= 1L && result < 199L); + assertTrue(result >= 1L && result < 199L); } @Test - public void testNextLongWithSame() { + void testNextLongWithSame() { final long result = RandomUtils.nextLong(1L, 1L); - Assert.assertEquals(1L, result); + assertEquals(1L, result); } - @Test(expected = IllegalArgumentException.class) - public void testNextLongWithIllegalArgumentException() { - RandomUtils.nextLong(999L, 199L); + @Test + void testNextLongWithIllegalArgumentException() { + assertThrows(IllegalArgumentException.class, () -> { + RandomUtils.nextLong(999L, 199L); + }); } - @Test(expected = IllegalArgumentException.class) - public void testNextLongWithIllegalArgumentException2() { - RandomUtils.nextLong(-10L, 199L); + @Test + void testNextLongWithIllegalArgumentException2() { + assertThrows(IllegalArgumentException.class, () -> { + RandomUtils.nextLong(-10L, 199L); + }); } @Test - public void testNextInt() { + void testNextInt() { final int result = RandomUtils.nextInt(1, 199); - Assert.assertTrue(result >= 1 && result < 199); + assertTrue(result >= 1 && result < 199); } @Test - public void testNextIntWithSame() { + void testNextIntWithSame() { final int result = RandomUtils.nextInt(1, 1); - Assert.assertEquals(1, result); + assertEquals(1, result); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ReflectUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ReflectUtilsTest.java index 327665121e8..7c2730c1b44 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ReflectUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ReflectUtilsTest.java @@ -16,9 +16,8 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.lang.reflect.Field; @@ -28,108 +27,122 @@ import java.util.ArrayList; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * ReflectUtils unit test. * * @author karsonto * @date 2022/08/19 */ -public class ReflectUtilsTest { +class ReflectUtilsTest { List listStr; - @Before - public void before() { + @BeforeEach + void before() { listStr = new ArrayList<>(2); } @Test - public void testGetFieldValue() { + void testGetFieldValue() { Object elementData = ReflectUtils.getFieldValue(listStr, "elementData"); - Assert.assertTrue(elementData instanceof Object[]); - Assert.assertEquals(2, ((Object[]) elementData).length); + assertTrue(elementData instanceof Object[]); + assertEquals(2, ((Object[]) elementData).length); } - @Test(expected = RuntimeException.class) - public void testGetFieldValueWithoutField() { - ReflectUtils.getFieldValue(listStr, "elementDataxx"); + @Test + void testGetFieldValueWithoutField() { + assertThrows(RuntimeException.class, () -> { + ReflectUtils.getFieldValue(listStr, "elementDataxx"); + }); } @Test - public void testGetFieldValueWithDefault() { + void testGetFieldValueWithDefault() { Object elementData = ReflectUtils.getFieldValue(listStr, "elementDataxx", 3); - Assert.assertEquals(elementData, 3); + assertEquals(3, elementData); elementData = ReflectUtils.getFieldValue(listStr, "elementData", 3); - Assert.assertTrue(elementData instanceof Object[]); - Assert.assertEquals(2, ((Object[]) elementData).length); + assertTrue(elementData instanceof Object[]); + assertEquals(2, ((Object[]) elementData).length); } @Test - public void testGetField() throws NoSuchFieldException { + void testGetField() throws NoSuchFieldException { Field field = listStr.getClass().getDeclaredField("elementData"); field.setAccessible(true); Object elementData = ReflectUtils.getField(field, listStr); - Assert.assertTrue(elementData instanceof Object[]); + assertTrue(elementData instanceof Object[]); } - @Test(expected = IllegalStateException.class) - public void testGetFieldWithoutAccess() throws NoSuchFieldException { - Field field = listStr.getClass().getDeclaredField("elementData"); - ReflectUtils.getField(field, listStr); + @Test + void testGetFieldWithoutAccess() throws NoSuchFieldException { + assertThrows(IllegalStateException.class, () -> { + Field field = listStr.getClass().getDeclaredField("elementData"); + ReflectUtils.getField(field, listStr); + }); } @Test - public void testInvokeMethod() throws Exception { + void testInvokeMethod() throws Exception { Method method = listStr.getClass().getDeclaredMethod("grow", int.class); method.setAccessible(true); ReflectUtils.invokeMethod(method, listStr, 4); Object elementData = ReflectUtils.getFieldValue(listStr, "elementData"); - Assert.assertEquals(4, ((Object[]) elementData).length); + assertEquals(4, ((Object[]) elementData).length); } - @Test(expected = IllegalStateException.class) - public void testInvokeMethodWithoutAccess() throws Exception { - Method method = listStr.getClass().getDeclaredMethod("grow", int.class); - ReflectUtils.invokeMethod(method, listStr, 4); + @Test + void testInvokeMethodWithoutAccess() throws Exception { + assertThrows(IllegalStateException.class, () -> { + Method method = listStr.getClass().getDeclaredMethod("grow", int.class); + ReflectUtils.invokeMethod(method, listStr, 4); + }); } - @Test(expected = UndeclaredThrowableException.class) - public void testHandleReflectionException() { - try { - NoSuchMethodException exception = new NoSuchMethodException("test"); - ReflectUtils.handleReflectionException(exception); - } catch (Exception e) { - Assert.assertEquals("Method not found: test", e.getMessage()); - } - try { - IllegalAccessException exception = new IllegalAccessException("test"); - ReflectUtils.handleReflectionException(exception); - } catch (Exception e) { - Assert.assertEquals("Could not access method or field: test", e.getMessage()); - } - RuntimeException exception = new RuntimeException("test"); - try { - ReflectUtils.handleReflectionException(exception); - } catch (Exception e) { - Assert.assertEquals(exception, e); - } - try { - InvocationTargetException invocationTargetException = new InvocationTargetException(exception); - ReflectUtils.handleReflectionException(invocationTargetException); - } catch (Exception e) { - Assert.assertEquals(exception, e); - } - ReflectUtils.handleReflectionException(new IOException()); + @Test + void testHandleReflectionException() { + assertThrows(UndeclaredThrowableException.class, () -> { + try { + NoSuchMethodException exception = new NoSuchMethodException("test"); + ReflectUtils.handleReflectionException(exception); + } catch (Exception e) { + assertEquals("Method not found: test", e.getMessage()); + } + try { + IllegalAccessException exception = new IllegalAccessException("test"); + ReflectUtils.handleReflectionException(exception); + } catch (Exception e) { + assertEquals("Could not access method or field: test", e.getMessage()); + } + RuntimeException exception = new RuntimeException("test"); + try { + ReflectUtils.handleReflectionException(exception); + } catch (Exception e) { + assertEquals(exception, e); + } + try { + InvocationTargetException invocationTargetException = new InvocationTargetException(exception); + ReflectUtils.handleReflectionException(invocationTargetException); + } catch (Exception e) { + assertEquals(exception, e); + } + ReflectUtils.handleReflectionException(new IOException()); + }); } - @Test(expected = UndeclaredThrowableException.class) - public void testRethrowRuntimeException() { - ClassFormatError error = new ClassFormatError("test"); - try { - ReflectUtils.rethrowRuntimeException(error); - } catch (Error e) { - Assert.assertEquals(error, e); - } - ReflectUtils.rethrowRuntimeException(new IOException()); + @Test + void testRethrowRuntimeException() { + assertThrows(UndeclaredThrowableException.class, () -> { + ClassFormatError error = new ClassFormatError("test"); + try { + ReflectUtils.rethrowRuntimeException(error); + } catch (Error e) { + assertEquals(error, e); + } + ReflectUtils.rethrowRuntimeException(new IOException()); + }); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ResourceUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ResourceUtilsTest.java index d678532572b..834e43467a0 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ResourceUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ResourceUtilsTest.java @@ -16,7 +16,7 @@ package com.alibaba.nacos.common.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.File; import java.io.FileNotFoundException; @@ -26,24 +26,27 @@ import java.net.URL; import java.util.Properties; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ResourceUtilsTest { +class ResourceUtilsTest { @Test - public void testGetResourceUrlForClasspath() throws IOException { + void testGetResourceUrlForClasspath() throws IOException { URL url = ResourceUtils.getResourceUrl("classpath:test-tls-cert.pem"); assertNotNull(url); } - @Test(expected = FileNotFoundException.class) - public void testGetResourceUrlForClasspathNotExists() throws IOException { - ResourceUtils.getResourceUrl("classpath:non-exist.pem"); + @Test + void testGetResourceUrlForClasspathNotExists() throws IOException { + assertThrows(FileNotFoundException.class, () -> { + ResourceUtils.getResourceUrl("classpath:non-exist.pem"); + }); } @Test - public void testGetResourceUrlForFile() throws IOException { + void testGetResourceUrlForFile() throws IOException { File file = File.createTempFile("test", ".txt"); try { URL url = ResourceUtils.getResourceUrl("file://" + file.getPath()); @@ -54,7 +57,7 @@ public void testGetResourceUrlForFile() throws IOException { } @Test - public void testGetResourceUrlForFileWithoutProtocol() throws IOException { + void testGetResourceUrlForFileWithoutProtocol() throws IOException { File file = File.createTempFile("test", ".txt"); try { URL url = ResourceUtils.getResourceUrl(file.getPath()); @@ -65,83 +68,84 @@ public void testGetResourceUrlForFileWithoutProtocol() throws IOException { } @Test - public void testGetResourceUrlFromLoader() throws IOException { + void testGetResourceUrlFromLoader() throws IOException { URL url = ResourceUtils.getResourceUrl(this.getClass().getClassLoader(), "test-tls-cert.pem"); assertNotNull(url); } @Test - public void testGetResourceUrlFromSystemLoader() throws IOException { + void testGetResourceUrlFromSystemLoader() throws IOException { URL url = ResourceUtils.getResourceUrl(null, "test-tls-cert.pem"); assertNotNull(url); } - @Test(expected = IOException.class) - public void testGetResourceUrlFromLoaderWithoutExist() throws IOException { - URL url = ResourceUtils.getResourceUrl(null, "non-exist"); - assertNotNull(url); + @Test + void testGetResourceUrlFromLoaderWithoutExist() throws IOException { + assertThrows(IOException.class, () -> { + URL url = ResourceUtils.getResourceUrl(null, "non-exist"); + assertNotNull(url); + }); } @Test - public void testGetResourceAsStreamForClasspath() throws IOException { + void testGetResourceAsStreamForClasspath() throws IOException { try (InputStream inputStream = ResourceUtils.getResourceAsStream("test-tls-cert.pem")) { assertNotNull(inputStream); } } @Test - public void testGetResourceAsStreamForClasspathFromSystem() throws IOException { + void testGetResourceAsStreamForClasspathFromSystem() throws IOException { try (InputStream inputStream = ResourceUtils.getResourceAsStream(null, "test-tls-cert.pem")) { assertNotNull(inputStream); } } - @Test(expected = IOException.class) - public void testGetResourceAsStreamForClasspathWithoutExist() throws IOException { - URL url = ResourceUtils.getResourceUrl("non-exist"); - ResourceUtils.getResourceAsStream(null, url.toString()); + @Test + void testGetResourceAsStreamForClasspathWithoutExist() throws IOException { + assertThrows(IOException.class, () -> { + URL url = ResourceUtils.getResourceUrl("non-exist"); + ResourceUtils.getResourceAsStream(null, url.toString()); + }); } @Test - public void testGetResourceAsPropertiesForClasspath() throws IOException { + void testGetResourceAsPropertiesForClasspath() throws IOException { Properties properties = ResourceUtils.getResourceAsProperties("resource_utils_test.properties"); assertNotNull(properties); assertTrue(properties.containsKey("a")); } @Test - public void testGetResourceAsReader() throws IOException { + void testGetResourceAsReader() throws IOException { try (Reader reader = ResourceUtils.getResourceAsReader("resource_utils_test.properties", "UTF-8")) { assertNotNull(reader); } } @Test - public void testGetResourceAsReaderWithLoader() throws IOException { - try (Reader reader = ResourceUtils - .getResourceAsReader(ResourceUtilsTest.class.getClassLoader(), "resource_utils_test.properties", - "UTF-8")) { + void testGetResourceAsReaderWithLoader() throws IOException { + try (Reader reader = ResourceUtils.getResourceAsReader(ResourceUtilsTest.class.getClassLoader(), + "resource_utils_test.properties", "UTF-8")) { assertNotNull(reader); } } @Test - public void testGetResourceAsFile() throws IOException { + void testGetResourceAsFile() throws IOException { File file = ResourceUtils.getResourceAsFile("classpath:resource_utils_test.properties"); assertNotNull(file); } @Test - public void testGetResourceAsFileByUrl() throws IOException { - File file = ResourceUtils - .getResourceAsFile(ResourceUtils.getResourceUrl("classpath:resource_utils_test.properties")); + void testGetResourceAsFileByUrl() throws IOException { + File file = ResourceUtils.getResourceAsFile(ResourceUtils.getResourceUrl("classpath:resource_utils_test.properties")); assertNotNull(file); } @Test - public void testGetResourceAsFileByLoader() throws IOException { - File file = ResourceUtils - .getResourceAsFile(ResourceUtils.class.getClassLoader(), "resource_utils_test.properties"); + void testGetResourceAsFileByLoader() throws IOException { + File file = ResourceUtils.getResourceAsFile(ResourceUtils.class.getClassLoader(), "resource_utils_test.properties"); assertNotNull(file); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/StringUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/StringUtilsTest.java index 143c76e83f9..cbc69de3f2b 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/StringUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/StringUtilsTest.java @@ -16,228 +16,231 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Arrays; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * String utils. * * @author zzq */ -public class StringUtilsTest { +class StringUtilsTest { @Test - public void testNewStringForUtf8() { + void testNewStringForUtf8() { String abc = "abc"; byte[] abcByte = abc.getBytes(); - Assert.assertEquals(abc, StringUtils.newStringForUtf8(abcByte)); + assertEquals(abc, StringUtils.newStringForUtf8(abcByte)); } @Test - public void isBlank() { - Assert.assertTrue(StringUtils.isBlank(null)); - Assert.assertTrue(StringUtils.isBlank("")); - Assert.assertTrue(StringUtils.isBlank(" ")); - Assert.assertFalse(StringUtils.isBlank("bob")); - Assert.assertFalse(StringUtils.isBlank(" bob ")); + void isBlank() { + assertTrue(StringUtils.isBlank(null)); + assertTrue(StringUtils.isBlank("")); + assertTrue(StringUtils.isBlank(" ")); + assertFalse(StringUtils.isBlank("bob")); + assertFalse(StringUtils.isBlank(" bob ")); } @Test - public void testIsNotBlank() { - Assert.assertFalse(StringUtils.isNotBlank(null)); - Assert.assertFalse(StringUtils.isNotBlank("")); - Assert.assertFalse(StringUtils.isNotBlank(" ")); - Assert.assertTrue(StringUtils.isNotBlank("bob")); - Assert.assertTrue(StringUtils.isNotBlank(" bob ")); + void testIsNotBlank() { + assertFalse(StringUtils.isNotBlank(null)); + assertFalse(StringUtils.isNotBlank("")); + assertFalse(StringUtils.isNotBlank(" ")); + assertTrue(StringUtils.isNotBlank("bob")); + assertTrue(StringUtils.isNotBlank(" bob ")); } @Test - public void testIsNotEmpty() { - Assert.assertFalse(StringUtils.isNotEmpty(null)); - Assert.assertFalse(StringUtils.isNotEmpty("")); - Assert.assertTrue(StringUtils.isNotEmpty(" ")); - Assert.assertTrue(StringUtils.isNotEmpty("bob")); - Assert.assertTrue(StringUtils.isNotEmpty(" bob ")); + void testIsNotEmpty() { + assertFalse(StringUtils.isNotEmpty(null)); + assertFalse(StringUtils.isNotEmpty("")); + assertTrue(StringUtils.isNotEmpty(" ")); + assertTrue(StringUtils.isNotEmpty("bob")); + assertTrue(StringUtils.isNotEmpty(" bob ")); } @Test - public void testIsEmpty() { - Assert.assertTrue(StringUtils.isEmpty(null)); - Assert.assertTrue(StringUtils.isEmpty("")); - Assert.assertFalse(StringUtils.isEmpty(" ")); - Assert.assertFalse(StringUtils.isEmpty("bob")); - Assert.assertFalse(StringUtils.isEmpty(" bob ")); + void testIsEmpty() { + assertTrue(StringUtils.isEmpty(null)); + assertTrue(StringUtils.isEmpty("")); + assertFalse(StringUtils.isEmpty(" ")); + assertFalse(StringUtils.isEmpty("bob")); + assertFalse(StringUtils.isEmpty(" bob ")); } @Test - public void testDefaultIfEmpty() { - Assert.assertEquals("NULL", StringUtils.defaultIfEmpty(null, "NULL")); - Assert.assertEquals("NULL", StringUtils.defaultIfEmpty("", "NULL")); - Assert.assertEquals(" ", StringUtils.defaultIfEmpty(" ", "NULL")); - Assert.assertEquals("bat", StringUtils.defaultIfEmpty("bat", "NULL")); - Assert.assertNull(StringUtils.defaultIfEmpty("", null)); + void testDefaultIfEmpty() { + assertEquals("NULL", StringUtils.defaultIfEmpty(null, "NULL")); + assertEquals("NULL", StringUtils.defaultIfEmpty("", "NULL")); + assertEquals(" ", StringUtils.defaultIfEmpty(" ", "NULL")); + assertEquals("bat", StringUtils.defaultIfEmpty("bat", "NULL")); + assertNull(StringUtils.defaultIfEmpty("", null)); } @Test - public void testDefaultIfBlank() { - Assert.assertEquals("NULL", StringUtils.defaultIfBlank(null, "NULL")); - Assert.assertEquals("NULL", StringUtils.defaultIfBlank("", "NULL")); - Assert.assertEquals("NULL", StringUtils.defaultIfBlank(" ", "NULL")); - Assert.assertEquals("bat", StringUtils.defaultIfBlank("bat", "NULL")); - Assert.assertNull(StringUtils.defaultIfBlank("", null)); + void testDefaultIfBlank() { + assertEquals("NULL", StringUtils.defaultIfBlank(null, "NULL")); + assertEquals("NULL", StringUtils.defaultIfBlank("", "NULL")); + assertEquals("NULL", StringUtils.defaultIfBlank(" ", "NULL")); + assertEquals("bat", StringUtils.defaultIfBlank("bat", "NULL")); + assertNull(StringUtils.defaultIfBlank("", null)); } @Test - public void testDefaultEmptyIfBlank() { - Assert.assertEquals("", StringUtils.defaultEmptyIfBlank(null)); - Assert.assertEquals("", StringUtils.defaultEmptyIfBlank("")); - Assert.assertEquals("", StringUtils.defaultEmptyIfBlank(" ")); - Assert.assertEquals("bat", StringUtils.defaultEmptyIfBlank("bat")); + void testDefaultEmptyIfBlank() { + assertEquals("", StringUtils.defaultEmptyIfBlank(null)); + assertEquals("", StringUtils.defaultEmptyIfBlank("")); + assertEquals("", StringUtils.defaultEmptyIfBlank(" ")); + assertEquals("bat", StringUtils.defaultEmptyIfBlank("bat")); } @Test - public void testEquals() { - Assert.assertTrue(StringUtils.equals(null, null)); - Assert.assertFalse(StringUtils.equals(null, "abc")); - Assert.assertFalse(StringUtils.equals("abc", null)); - Assert.assertTrue(StringUtils.equals("abc", "abc")); - Assert.assertFalse(StringUtils.equals("abc", "ABC")); + void testEquals() { + assertTrue(StringUtils.equals(null, null)); + assertFalse(StringUtils.equals(null, "abc")); + assertFalse(StringUtils.equals("abc", null)); + assertTrue(StringUtils.equals("abc", "abc")); + assertFalse(StringUtils.equals("abc", "ABC")); } @Test - public void trim() { - Assert.assertNull(StringUtils.trim(null)); - Assert.assertEquals(StringUtils.EMPTY, StringUtils.trim("")); - Assert.assertEquals(StringUtils.EMPTY, StringUtils.trim(" ")); - Assert.assertEquals("abc", StringUtils.trim("abc")); - Assert.assertEquals("abc", StringUtils.trim(" abc ")); + void trim() { + assertNull(StringUtils.trim(null)); + assertEquals(StringUtils.EMPTY, StringUtils.trim("")); + assertEquals(StringUtils.EMPTY, StringUtils.trim(" ")); + assertEquals("abc", StringUtils.trim("abc")); + assertEquals("abc", StringUtils.trim(" abc ")); } @Test - public void testSubstringBetween() { - Assert.assertNull(StringUtils.substringBetween(null, "a", "b")); - Assert.assertNull(StringUtils.substringBetween("a", null, "b")); - Assert.assertNull(StringUtils.substringBetween("a", "b", null)); - Assert.assertNull(StringUtils.substringBetween(StringUtils.EMPTY, StringUtils.EMPTY, "]")); - Assert.assertNull(StringUtils.substringBetween(StringUtils.EMPTY, "[", "]")); - Assert.assertEquals(StringUtils.EMPTY, - StringUtils.substringBetween("yabcz", StringUtils.EMPTY, StringUtils.EMPTY)); - Assert.assertEquals(StringUtils.EMPTY, - StringUtils.substringBetween(StringUtils.EMPTY, StringUtils.EMPTY, StringUtils.EMPTY)); - Assert.assertEquals("b", StringUtils.substringBetween("wx[b]yz", "[", "]")); - Assert.assertEquals("abc", StringUtils.substringBetween("yabcz", "y", "z")); - Assert.assertEquals("abc", StringUtils.substringBetween("yabczyabcz", "y", "z")); + void testSubstringBetween() { + assertNull(StringUtils.substringBetween(null, "a", "b")); + assertNull(StringUtils.substringBetween("a", null, "b")); + assertNull(StringUtils.substringBetween("a", "b", null)); + assertNull(StringUtils.substringBetween(StringUtils.EMPTY, StringUtils.EMPTY, "]")); + assertNull(StringUtils.substringBetween(StringUtils.EMPTY, "[", "]")); + assertEquals(StringUtils.EMPTY, StringUtils.substringBetween("yabcz", StringUtils.EMPTY, StringUtils.EMPTY)); + assertEquals(StringUtils.EMPTY, StringUtils.substringBetween(StringUtils.EMPTY, StringUtils.EMPTY, StringUtils.EMPTY)); + assertEquals("b", StringUtils.substringBetween("wx[b]yz", "[", "]")); + assertEquals("abc", StringUtils.substringBetween("yabcz", "y", "z")); + assertEquals("abc", StringUtils.substringBetween("yabczyabcz", "y", "z")); } @Test - public void testJoin() { + void testJoin() { ArrayList objects = new ArrayList<>(); objects.add(null); - Assert.assertNull(StringUtils.join(null, "a")); - Assert.assertEquals(StringUtils.EMPTY, StringUtils.join(Arrays.asList(), "a")); - Assert.assertEquals(StringUtils.EMPTY, StringUtils.join(objects, "a")); - Assert.assertEquals("a;b;c", StringUtils.join(Arrays.asList("a", "b", "c"), ";")); - Assert.assertEquals("abc", StringUtils.join(Arrays.asList("a", "b", "c"), null)); + assertNull(StringUtils.join(null, "a")); + assertEquals(StringUtils.EMPTY, StringUtils.join(Arrays.asList(), "a")); + assertEquals(StringUtils.EMPTY, StringUtils.join(objects, "a")); + assertEquals("a;b;c", StringUtils.join(Arrays.asList("a", "b", "c"), ";")); + assertEquals("abc", StringUtils.join(Arrays.asList("a", "b", "c"), null)); } @Test - public void testContainsIgnoreCase() { - Assert.assertFalse(StringUtils.containsIgnoreCase(null, "1")); - Assert.assertFalse(StringUtils.containsIgnoreCase("abc", null)); - Assert.assertTrue(StringUtils.containsIgnoreCase(StringUtils.EMPTY, StringUtils.EMPTY)); - Assert.assertTrue(StringUtils.containsIgnoreCase("abc", StringUtils.EMPTY)); - Assert.assertTrue(StringUtils.containsIgnoreCase("abc", "a")); - Assert.assertFalse(StringUtils.containsIgnoreCase("abc", "z")); - Assert.assertTrue(StringUtils.containsIgnoreCase("abc", "A")); - Assert.assertFalse(StringUtils.containsIgnoreCase("abc", "Z")); + void testContainsIgnoreCase() { + assertFalse(StringUtils.containsIgnoreCase(null, "1")); + assertFalse(StringUtils.containsIgnoreCase("abc", null)); + assertTrue(StringUtils.containsIgnoreCase(StringUtils.EMPTY, StringUtils.EMPTY)); + assertTrue(StringUtils.containsIgnoreCase("abc", StringUtils.EMPTY)); + assertTrue(StringUtils.containsIgnoreCase("abc", "a")); + assertFalse(StringUtils.containsIgnoreCase("abc", "z")); + assertTrue(StringUtils.containsIgnoreCase("abc", "A")); + assertFalse(StringUtils.containsIgnoreCase("abc", "Z")); } @Test - public void testContains() { - Assert.assertFalse(StringUtils.contains(null, "1")); - Assert.assertFalse(StringUtils.contains("abc", null)); - Assert.assertTrue(StringUtils.contains(StringUtils.EMPTY, StringUtils.EMPTY)); - Assert.assertTrue(StringUtils.contains("abc", StringUtils.EMPTY)); - Assert.assertTrue(StringUtils.contains("abc", "a")); - Assert.assertFalse(StringUtils.contains("abc", "z")); - Assert.assertFalse(StringUtils.contains("abc", "A")); - Assert.assertFalse(StringUtils.contains("abc", "Z")); + void testContains() { + assertFalse(StringUtils.contains(null, "1")); + assertFalse(StringUtils.contains("abc", null)); + assertTrue(StringUtils.contains(StringUtils.EMPTY, StringUtils.EMPTY)); + assertTrue(StringUtils.contains("abc", StringUtils.EMPTY)); + assertTrue(StringUtils.contains("abc", "a")); + assertFalse(StringUtils.contains("abc", "z")); + assertFalse(StringUtils.contains("abc", "A")); + assertFalse(StringUtils.contains("abc", "Z")); } @Test - public void testIsNoneBlank() { - Assert.assertFalse(StringUtils.isNoneBlank(null)); - Assert.assertFalse(StringUtils.isNoneBlank(null, "foo")); - Assert.assertFalse(StringUtils.isNoneBlank(null, null)); - Assert.assertFalse(StringUtils.isNoneBlank("", "bar")); - Assert.assertFalse(StringUtils.isNoneBlank("bob", "")); - Assert.assertFalse(StringUtils.isNoneBlank(" bob ", null)); - Assert.assertFalse(StringUtils.isNoneBlank(" ", "bar")); - Assert.assertTrue(StringUtils.isNoneBlank("foo", "bar")); + void testIsNoneBlank() { + assertFalse(StringUtils.isNoneBlank(null)); + assertFalse(StringUtils.isNoneBlank(null, "foo")); + assertFalse(StringUtils.isNoneBlank(null, null)); + assertFalse(StringUtils.isNoneBlank("", "bar")); + assertFalse(StringUtils.isNoneBlank("bob", "")); + assertFalse(StringUtils.isNoneBlank(" bob ", null)); + assertFalse(StringUtils.isNoneBlank(" ", "bar")); + assertTrue(StringUtils.isNoneBlank("foo", "bar")); } @Test - public void isAnyBlank() { - Assert.assertTrue(StringUtils.isAnyBlank(null)); - Assert.assertTrue(StringUtils.isAnyBlank(null, "foo")); - Assert.assertTrue(StringUtils.isAnyBlank(null, null)); - Assert.assertTrue(StringUtils.isAnyBlank("", "bar")); - Assert.assertTrue(StringUtils.isAnyBlank("bob", "")); - Assert.assertTrue(StringUtils.isAnyBlank(" bob ", null)); - Assert.assertTrue(StringUtils.isAnyBlank(" ", "bar")); - Assert.assertFalse(StringUtils.isAnyBlank("foo", "bar")); + void isAnyBlank() { + assertTrue(StringUtils.isAnyBlank(null)); + assertTrue(StringUtils.isAnyBlank(null, "foo")); + assertTrue(StringUtils.isAnyBlank(null, null)); + assertTrue(StringUtils.isAnyBlank("", "bar")); + assertTrue(StringUtils.isAnyBlank("bob", "")); + assertTrue(StringUtils.isAnyBlank(" bob ", null)); + assertTrue(StringUtils.isAnyBlank(" ", "bar")); + assertFalse(StringUtils.isAnyBlank("foo", "bar")); } @Test - public void testStartsWith() { - Assert.assertTrue(StringUtils.startsWith(null, null)); - Assert.assertFalse(StringUtils.startsWith(null, "abc")); - Assert.assertFalse(StringUtils.startsWith("abcdef", null)); - Assert.assertTrue(StringUtils.startsWith("abcdef", "abc")); - Assert.assertFalse(StringUtils.startsWith("ABCDEF", "abc")); - Assert.assertFalse(StringUtils.startsWith("ABC", "ABCDEF")); + void testStartsWith() { + assertTrue(StringUtils.startsWith(null, null)); + assertFalse(StringUtils.startsWith(null, "abc")); + assertFalse(StringUtils.startsWith("abcdef", null)); + assertTrue(StringUtils.startsWith("abcdef", "abc")); + assertFalse(StringUtils.startsWith("ABCDEF", "abc")); + assertFalse(StringUtils.startsWith("ABC", "ABCDEF")); } @Test - public void testStartsWithIgnoreCase() { - Assert.assertTrue(StringUtils.startsWithIgnoreCase(null, null)); - Assert.assertFalse(StringUtils.startsWithIgnoreCase(null, "abc")); - Assert.assertFalse(StringUtils.startsWithIgnoreCase("abcdef", null)); - Assert.assertTrue(StringUtils.startsWithIgnoreCase("abcdef", "abc")); - Assert.assertTrue(StringUtils.startsWithIgnoreCase("ABCDEF", "abc")); + void testStartsWithIgnoreCase() { + assertTrue(StringUtils.startsWithIgnoreCase(null, null)); + assertFalse(StringUtils.startsWithIgnoreCase(null, "abc")); + assertFalse(StringUtils.startsWithIgnoreCase("abcdef", null)); + assertTrue(StringUtils.startsWithIgnoreCase("abcdef", "abc")); + assertTrue(StringUtils.startsWithIgnoreCase("ABCDEF", "abc")); } @Test - public void testDeleteWhitespace() { - Assert.assertNull(StringUtils.deleteWhitespace(null)); - Assert.assertEquals(StringUtils.EMPTY, StringUtils.deleteWhitespace("")); - Assert.assertEquals("abc", StringUtils.deleteWhitespace("abc")); - Assert.assertEquals("abc", StringUtils.deleteWhitespace(" ab c ")); + void testDeleteWhitespace() { + assertNull(StringUtils.deleteWhitespace(null)); + assertEquals(StringUtils.EMPTY, StringUtils.deleteWhitespace("")); + assertEquals("abc", StringUtils.deleteWhitespace("abc")); + assertEquals("abc", StringUtils.deleteWhitespace(" ab c ")); } @Test - public void testEqualsIgnoreCase() { - Assert.assertTrue(StringUtils.equalsIgnoreCase(null, null)); - Assert.assertFalse(StringUtils.equalsIgnoreCase(null, "abc")); - Assert.assertFalse(StringUtils.equalsIgnoreCase("abc", null)); - Assert.assertTrue(StringUtils.equalsIgnoreCase("abc", "abc")); - Assert.assertTrue(StringUtils.equalsIgnoreCase("abc", "ABC")); + void testEqualsIgnoreCase() { + assertTrue(StringUtils.equalsIgnoreCase(null, null)); + assertFalse(StringUtils.equalsIgnoreCase(null, "abc")); + assertFalse(StringUtils.equalsIgnoreCase("abc", null)); + assertTrue(StringUtils.equalsIgnoreCase("abc", "abc")); + assertTrue(StringUtils.equalsIgnoreCase("abc", "ABC")); } @Test - public void testSplit() { - Assert.assertNull(StringUtils.split(null, ",")); - Assert.assertArrayEquals(new String[0], StringUtils.split("", ",")); - Assert.assertArrayEquals(new String[] {"ab", "cd", "ef"}, StringUtils.split("ab cd ef", null)); - Assert.assertArrayEquals(new String[] {"ab", "cd", "ef"}, StringUtils.split("ab cd ef", null)); - Assert.assertArrayEquals(new String[] {"ab", "cd", "ef"}, StringUtils.split("ab:cd:ef", ":")); + void testSplit() { + assertNull(StringUtils.split(null, ",")); + assertArrayEquals(new String[0], StringUtils.split("", ",")); + assertArrayEquals(new String[] {"ab", "cd", "ef"}, StringUtils.split("ab cd ef", null)); + assertArrayEquals(new String[] {"ab", "cd", "ef"}, StringUtils.split("ab cd ef", null)); + assertArrayEquals(new String[] {"ab", "cd", "ef"}, StringUtils.split("ab:cd:ef", ":")); } @Test - public void testTokenizeToStringArray() { + void testTokenizeToStringArray() { // Test case 1: Empty string String str1 = ""; String delimiters1 = ","; @@ -245,7 +248,7 @@ public void testTokenizeToStringArray() { boolean ignoreEmptyTokens1 = false; String[] expected1 = new String[0]; String[] result1 = StringUtils.tokenizeToStringArray(str1, delimiters1, trimTokens1, ignoreEmptyTokens1); - Assert.assertArrayEquals(expected1, result1); + assertArrayEquals(expected1, result1); // Test case 2: Null string String str2 = null; @@ -254,7 +257,7 @@ public void testTokenizeToStringArray() { boolean ignoreEmptyTokens2 = true; String[] expected2 = new String[0]; String[] result2 = StringUtils.tokenizeToStringArray(str2, delimiters2, trimTokens2, ignoreEmptyTokens2); - Assert.assertArrayEquals(expected2, result2); + assertArrayEquals(expected2, result2); // Test case 3: Single token String str3 = "Hello"; @@ -263,7 +266,7 @@ public void testTokenizeToStringArray() { boolean ignoreEmptyTokens3 = false; String[] expected3 = {"Hello"}; String[] result3 = StringUtils.tokenizeToStringArray(str3, delimiters3, trimTokens3, ignoreEmptyTokens3); - Assert.assertArrayEquals(expected3, result3); + assertArrayEquals(expected3, result3); // Test case 4: Multiple tokens with trimming String str4 = " Hello, World, "; @@ -272,7 +275,7 @@ public void testTokenizeToStringArray() { boolean ignoreEmptyTokens4 = false; String[] expected4 = {"Hello", "World", ""}; String[] result4 = StringUtils.tokenizeToStringArray(str4, delimiters4, trimTokens4, ignoreEmptyTokens4); - Assert.assertArrayEquals(expected4, result4); + assertArrayEquals(expected4, result4); // Test case 5: Multiple tokens with empty tokens ignored String str5 = " ,Hello, ,World, "; @@ -281,233 +284,233 @@ public void testTokenizeToStringArray() { boolean ignoreEmptyTokens5 = true; String[] expected5 = {"Hello", "World"}; String[] result5 = StringUtils.tokenizeToStringArray(str5, delimiters5, trimTokens5, ignoreEmptyTokens5); - Assert.assertArrayEquals(expected5, result5); + assertArrayEquals(expected5, result5); } @Test - public void testHasText() { + void testHasText() { // Test case 1: Empty string - Assert.assertFalse(StringUtils.hasText("")); + assertFalse(StringUtils.hasText("")); // Test case 2: String with whitespace only - Assert.assertFalse(StringUtils.hasText(" ")); + assertFalse(StringUtils.hasText(" ")); // Test case 3: Null string - Assert.assertFalse(StringUtils.hasText(null)); + assertFalse(StringUtils.hasText(null)); // Test case 4: String with non-whitespace characters - Assert.assertTrue(StringUtils.hasText("hello")); + assertTrue(StringUtils.hasText("hello")); // Test case 5: String with both text and whitespace - Assert.assertTrue(StringUtils.hasText(" hello ")); + assertTrue(StringUtils.hasText(" hello ")); } @Test - public void testCleanPath() { + void testCleanPath() { // Test case 1: path with no length String path1 = ""; String expected1 = ""; - Assert.assertEquals(expected1, StringUtils.cleanPath(path1)); + assertEquals(expected1, StringUtils.cleanPath(path1)); // Test case 2: normal path String path2 = "path/to/file"; String expected2 = "path/to/file"; - Assert.assertEquals(expected2, StringUtils.cleanPath(path2)); + assertEquals(expected2, StringUtils.cleanPath(path2)); // Test case 3: path with Windows folder separator String path3 = "path\\to\\文件"; String expected3 = "path/to/文件"; - Assert.assertEquals(expected3, StringUtils.cleanPath(path3)); + assertEquals(expected3, StringUtils.cleanPath(path3)); // Test case 4: path with dot String path4 = "path/.."; String expected4 = ""; - Assert.assertEquals(expected4, StringUtils.cleanPath(path4)); + assertEquals(expected4, StringUtils.cleanPath(path4)); // Test case 5: path with top path String path5 = "path/../top"; String expected5 = "top"; - Assert.assertEquals(expected5, StringUtils.cleanPath(path5)); + assertEquals(expected5, StringUtils.cleanPath(path5)); // Test case 6: path with multiple top path String path6 = "path/../../top"; String expected6 = "../top"; - Assert.assertEquals(expected6, StringUtils.cleanPath(path6)); + assertEquals(expected6, StringUtils.cleanPath(path6)); // Test case 7: path with leading colon String path7 = "file:../top"; String expected7 = "file:../top"; - Assert.assertEquals(expected7, StringUtils.cleanPath(path7)); + assertEquals(expected7, StringUtils.cleanPath(path7)); // Test case 8: path with leading slash String path8 = "file:/path/../file"; String expected8 = "file:/file"; - Assert.assertEquals(expected8, StringUtils.cleanPath(path8)); + assertEquals(expected8, StringUtils.cleanPath(path8)); // Test case 9: path with empty prefix String path9 = "file:path/../file"; String expected9 = "file:file"; - Assert.assertEquals(expected9, StringUtils.cleanPath(path9)); + assertEquals(expected9, StringUtils.cleanPath(path9)); // Test case 10: prefix contain separator String path10 = "file/:path/../file"; String expected10 = "file/file"; - Assert.assertEquals(expected10, StringUtils.cleanPath(path10)); + assertEquals(expected10, StringUtils.cleanPath(path10)); // Test case 11: dot in file name String path11 = "file:/path/to/file.txt"; String expected11 = "file:/path/to/file.txt"; - Assert.assertEquals(expected11, StringUtils.cleanPath(path11)); + assertEquals(expected11, StringUtils.cleanPath(path11)); // Test case 12: dot in path String path12 = "file:/path/./file.txt"; String expected12 = "file:/path/file.txt"; - Assert.assertEquals(expected12, StringUtils.cleanPath(path12)); + assertEquals(expected12, StringUtils.cleanPath(path12)); // Test case 13: path with dot and slash String path13 = "file:aaa/../"; String expected13 = "file:./"; - Assert.assertEquals(expected13, StringUtils.cleanPath(path13)); + assertEquals(expected13, StringUtils.cleanPath(path13)); } @Test - public void testDelimitedListToStringArrayWithNull() { - Assert.assertEquals(0, StringUtils.delimitedListToStringArray(null, ",", "").length); - Assert.assertEquals(1, StringUtils.delimitedListToStringArray("a,b", null, "").length); + void testDelimitedListToStringArrayWithNull() { + assertEquals(0, StringUtils.delimitedListToStringArray(null, ",", "").length); + assertEquals(1, StringUtils.delimitedListToStringArray("a,b", null, "").length); } @Test - public void testDelimitedListToStringArrayWithEmptyDelimiter() { + void testDelimitedListToStringArrayWithEmptyDelimiter() { String testCase = "a,b"; String[] actual = StringUtils.delimitedListToStringArray(testCase, "", ""); - Assert.assertEquals(3, actual.length); - Assert.assertEquals("a", actual[0]); - Assert.assertEquals(",", actual[1]); - Assert.assertEquals("b", actual[2]); + assertEquals(3, actual.length); + assertEquals("a", actual[0]); + assertEquals(",", actual[1]); + assertEquals("b", actual[2]); } @Test - public void testDeleteAny() { + void testDeleteAny() { // Test case 1: inString is empty, charsToDelete is empty String inString1 = ""; String charsToDelete1 = ""; - Assert.assertEquals("", StringUtils.deleteAny(inString1, charsToDelete1)); + assertEquals("", StringUtils.deleteAny(inString1, charsToDelete1)); // Test case 2: inString is empty, charsToDelete is not empty String inString2 = ""; String charsToDelete2 = "abc"; - Assert.assertEquals("", StringUtils.deleteAny(inString2, charsToDelete2)); + assertEquals("", StringUtils.deleteAny(inString2, charsToDelete2)); // Test case 3: inString is not empty, charsToDelete is empty String inString3 = "abc"; String charsToDelete3 = ""; - Assert.assertEquals("abc", StringUtils.deleteAny(inString3, charsToDelete3)); + assertEquals("abc", StringUtils.deleteAny(inString3, charsToDelete3)); // Test case 4: inString is not empty, charsToDelete is not empty String inString4 = "abc"; String charsToDelete4 = "a"; - Assert.assertEquals("bc", StringUtils.deleteAny(inString4, charsToDelete4)); + assertEquals("bc", StringUtils.deleteAny(inString4, charsToDelete4)); // Test case 5: inString contains special characters String inString5 = "abc\n"; String charsToDelete5 = "\n"; - Assert.assertEquals("abc", StringUtils.deleteAny(inString5, charsToDelete5)); - + assertEquals("abc", StringUtils.deleteAny(inString5, charsToDelete5)); + // Test case 6: inString not contains special characters String inString6 = "abc\n"; String charsToDelete6 = "d"; - Assert.assertEquals("abc\n", StringUtils.deleteAny(inString6, charsToDelete6)); + assertEquals("abc\n", StringUtils.deleteAny(inString6, charsToDelete6)); } @Test - public void testReplace() { + void testReplace() { // Test case 1: pattern is empty - Assert.assertEquals("abc", StringUtils.replace("abc", "", "a")); + assertEquals("abc", StringUtils.replace("abc", "", "a")); // Test case 2: oldPattern less than newPattern - Assert.assertEquals("aabc", StringUtils.replace("abc", "a", "aa")); - + assertEquals("aabc", StringUtils.replace("abc", "a", "aa")); + // Test case 3: oldPattern more than newPattern - Assert.assertEquals("dc", StringUtils.replace("abc", "ab", "d")); + assertEquals("dc", StringUtils.replace("abc", "ab", "d")); } @Test - public void testApplyRelativePath() { + void testApplyRelativePath() { // Test case 1 String path1 = "/path/to/file"; String relativePath1 = "subfolder/subfile"; String expected1 = "/path/to/subfolder/subfile"; String result1 = StringUtils.applyRelativePath(path1, relativePath1); - Assert.assertEquals(expected1, result1); + assertEquals(expected1, result1); // Test case 2 String path2 = "path/to/file"; String relativePath2 = "subfolder/subfile"; String expected2 = "path/to/subfolder/subfile"; String result2 = StringUtils.applyRelativePath(path2, relativePath2); - Assert.assertEquals(expected2, result2); + assertEquals(expected2, result2); // Test case 3 String path3 = "/path/to/file"; String relativePath3 = "/subfolder/subfile"; String expected3 = "/path/to/subfolder/subfile"; String result3 = StringUtils.applyRelativePath(path3, relativePath3); - Assert.assertEquals(expected3, result3); + assertEquals(expected3, result3); //Test case 4 String path4 = "file"; String relativePath4 = "/subfolder/subfile"; String expected4 = "/subfolder/subfile"; String result4 = StringUtils.applyRelativePath(path4, relativePath4); - Assert.assertEquals(expected4, result4); + assertEquals(expected4, result4); } @Test - public void testGetFilename() { + void testGetFilename() { // Test case 1: null path String path1 = null; String result1 = StringUtils.getFilename(path1); - Assert.assertNull(result1); + assertNull(result1); // Test case 2: path without separator String path2 = "myFile.txt"; String expectedResult2 = "myFile.txt"; String result2 = StringUtils.getFilename(path2); - Assert.assertEquals(expectedResult2, result2); + assertEquals(expectedResult2, result2); // Test case 3: path with separator String path3 = "myPath/myFile.txt"; String expectedResult3 = "myFile.txt"; String result3 = StringUtils.getFilename(path3); - Assert.assertEquals(expectedResult3, result3); + assertEquals(expectedResult3, result3); // Test case 4: path with multiple separators String path4 = "myPath/subPath/myFile.txt"; String expectedResult4 = "myFile.txt"; String result4 = StringUtils.getFilename(path4); - Assert.assertEquals(expectedResult4, result4); + assertEquals(expectedResult4, result4); } @Test - public void testCapitalize() { + void testCapitalize() { // Test for an empty string String str1 = ""; - Assert.assertEquals("", StringUtils.capitalize(str1)); + assertEquals("", StringUtils.capitalize(str1)); // Test for a single word string String str2 = "hello"; - Assert.assertEquals("Hello", StringUtils.capitalize(str2)); + assertEquals("Hello", StringUtils.capitalize(str2)); // Test for a multiple word string String str3 = "hello world"; - Assert.assertEquals("Hello world", StringUtils.capitalize(str3)); + assertEquals("Hello world", StringUtils.capitalize(str3)); // Test for a string with special characters String str4 = "!@#$%^&*()"; - Assert.assertEquals("!@#$%^&*()", StringUtils.capitalize(str4)); + assertEquals("!@#$%^&*()", StringUtils.capitalize(str4)); // Test for a string with numbers String str5 = "abc123"; - Assert.assertEquals("Abc123", StringUtils.capitalize(str5)); + assertEquals("Abc123", StringUtils.capitalize(str5)); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ThreadFactoryBuilderTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ThreadFactoryBuilderTest.java index 0a65577456f..a8c9a82d4ee 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ThreadFactoryBuilderTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ThreadFactoryBuilderTest.java @@ -16,113 +16,101 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + /** * thread factory builder unit test. + * * @author zzq * @date 2021/8/3 */ -public class ThreadFactoryBuilderTest { +class ThreadFactoryBuilderTest { int priority = 2; @Test - public void simpleTest() { - ThreadFactory threadFactory = new ThreadFactoryBuilder() - .daemon(true) - .priority(priority) - .nameFormat("nacos-grpc-executor-%d") - .build(); + void simpleTest() { + ThreadFactory threadFactory = new ThreadFactoryBuilder().daemon(true).priority(priority) + .nameFormat("nacos-grpc-executor-%d").build(); Thread thread1 = threadFactory.newThread(() -> { }); - Assert.assertEquals("nacos-grpc-executor-0", thread1.getName()); - Assert.assertEquals(priority, thread1.getPriority()); - Assert.assertTrue(thread1.isDaemon()); + assertEquals("nacos-grpc-executor-0", thread1.getName()); + assertEquals(priority, thread1.getPriority()); + assertTrue(thread1.isDaemon()); Thread thread2 = threadFactory.newThread(() -> { }); - Assert.assertEquals("nacos-grpc-executor-1", thread2.getName()); - Assert.assertEquals(priority, thread2.getPriority()); - Assert.assertTrue(thread2.isDaemon()); + assertEquals("nacos-grpc-executor-1", thread2.getName()); + assertEquals(priority, thread2.getPriority()); + assertTrue(thread2.isDaemon()); } @Test - public void customizeFactoryTest() { + void customizeFactoryTest() { String threadName = "hello is me!"; ThreadFactory myFactory = r -> { Thread thread = new Thread(); thread.setName(threadName); return thread; }; - ThreadFactory factory = new ThreadFactoryBuilder() - .daemon(true) - .priority(priority) - .customizeFactory(myFactory) - .build(); - Thread thread = factory.newThread(() -> { }); - Assert.assertEquals(threadName, thread.getName()); + ThreadFactory factory = new ThreadFactoryBuilder().daemon(true).priority(priority).customizeFactory(myFactory).build(); + Thread thread = factory.newThread(() -> { + }); + assertEquals(threadName, thread.getName()); } @Test - public void uncaughtExceptionHandlerTest() throws Exception { + void uncaughtExceptionHandlerTest() throws Exception { AtomicBoolean state = new AtomicBoolean(false); - ThreadFactory threadFactory = new ThreadFactoryBuilder() - .daemon(true) - .priority(priority) - .nameFormat("nacos-grpc-executor-%d") - .uncaughtExceptionHandler((t, e) -> state.set(true)) - .build(); + ThreadFactory threadFactory = new ThreadFactoryBuilder().daemon(true).priority(priority) + .nameFormat("nacos-grpc-executor-%d").uncaughtExceptionHandler((t, e) -> state.set(true)).build(); threadFactory.newThread(() -> { throw new NullPointerException("null pointer"); }).start(); TimeUnit.SECONDS.sleep(1); - Assert.assertTrue(state.get()); + assertTrue(state.get()); } - @Test(expected = IllegalArgumentException.class) - public void propertyPriorityTest1() { - new ThreadFactoryBuilder() - .priority(11) - .nameFormat("nacos-grpc-executor-%d") - .build(); + @Test + void propertyPriorityTest1() { + assertThrows(IllegalArgumentException.class, () -> { + new ThreadFactoryBuilder().priority(11).nameFormat("nacos-grpc-executor-%d").build(); + }); } - @Test(expected = IllegalArgumentException.class) - public void propertyPriorityTest2() { - new ThreadFactoryBuilder() - .priority(-1) - .nameFormat("nacos-grpc-executor-%d") - .build(); + @Test + void propertyPriorityTest2() { + assertThrows(IllegalArgumentException.class, () -> { + new ThreadFactoryBuilder().priority(-1).nameFormat("nacos-grpc-executor-%d").build(); + }); } - @Test(expected = IllegalArgumentException.class) - public void propertyNameFormatTest() { - new ThreadFactoryBuilder() - .priority(priority) - .nameFormat(null) - .build(); + @Test + void propertyNameFormatTest() { + assertThrows(IllegalArgumentException.class, () -> { + new ThreadFactoryBuilder().priority(priority).nameFormat(null).build(); + }); } - @Test(expected = IllegalArgumentException.class) - public void propertyUncaughtExceptionHandlerTest() { - new ThreadFactoryBuilder() - .priority(priority) - .nameFormat("nacos-grpc-executor-%d") - .uncaughtExceptionHandler(null) - .build(); + @Test + void propertyUncaughtExceptionHandlerTest() { + assertThrows(IllegalArgumentException.class, () -> { + new ThreadFactoryBuilder().priority(priority).nameFormat("nacos-grpc-executor-%d").uncaughtExceptionHandler(null) + .build(); + }); } - @Test(expected = IllegalArgumentException.class) - public void propertyCustomizeFactoryHandlerTest() { - new ThreadFactoryBuilder() - .priority(priority) - .nameFormat("nacos-grpc-executor-%d") - .customizeFactory(null) - .build(); + @Test + void propertyCustomizeFactoryHandlerTest() { + assertThrows(IllegalArgumentException.class, () -> { + new ThreadFactoryBuilder().priority(priority).nameFormat("nacos-grpc-executor-%d").customizeFactory(null).build(); + }); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/ThreadUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/ThreadUtilsTest.java index e6ea4f1b82c..534188de4f0 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/ThreadUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/ThreadUtilsTest.java @@ -16,9 +16,9 @@ package com.alibaba.nacos.common.utils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.slf4j.Logger; import java.util.concurrent.CountDownLatch; @@ -26,31 +26,31 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -public class ThreadUtilsTest { +class ThreadUtilsTest { private ExecutorService executorService; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { System.setProperty("nacos.common.processors", "2"); executorService = Executors.newFixedThreadPool(1); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { System.setProperty("nacos.common.processors", ""); ThreadUtils.shutdownThreadPool(executorService); } @Test - public void testLatchAwait() { + void testLatchAwait() { final CountDownLatch countDownLatch = new CountDownLatch(1); long currentTime = System.currentTimeMillis(); executorService.execute(() -> { @@ -62,7 +62,7 @@ public void testLatchAwait() { } @Test - public void testLatchAwaitForTimeout() { + void testLatchAwaitForTimeout() { final CountDownLatch countDownLatch = new CountDownLatch(1); long currentTime = System.currentTimeMillis(); ThreadUtils.latchAwait(countDownLatch, 50, TimeUnit.MILLISECONDS); @@ -71,13 +71,13 @@ public void testLatchAwaitForTimeout() { } @Test - public void testGetSuitableThreadCount() { + void testGetSuitableThreadCount() { assertEquals(4, ThreadUtils.getSuitableThreadCount()); assertEquals(8, ThreadUtils.getSuitableThreadCount(3)); } @Test - public void testShutdownThreadPoolWithInterruptedException() throws InterruptedException { + void testShutdownThreadPoolWithInterruptedException() throws InterruptedException { ExecutorService executor = mock(ExecutorService.class); when(executor.awaitTermination(100, TimeUnit.MILLISECONDS)).thenThrow(new InterruptedException()); ThreadUtils.shutdownThreadPool(executor); @@ -85,7 +85,7 @@ public void testShutdownThreadPoolWithInterruptedException() throws InterruptedE } @Test - public void testShutdownThreadPoolWithOtherException() throws InterruptedException { + void testShutdownThreadPoolWithOtherException() throws InterruptedException { ExecutorService executor = mock(ExecutorService.class); Logger logger = mock(Logger.class); Throwable cause = new RuntimeException(); @@ -96,7 +96,7 @@ public void testShutdownThreadPoolWithOtherException() throws InterruptedExcepti } @Test - public void testAddShutdownHook() { + void testAddShutdownHook() { Runnable shutdownHook = () -> { }; ThreadUtils.addShutdownHook(shutdownHook); diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/TlsTypeResolveTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/TlsTypeResolveTest.java index 40ac12d35ed..b2383a87c54 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/TlsTypeResolveTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/TlsTypeResolveTest.java @@ -17,27 +17,28 @@ package com.alibaba.nacos.common.utils; import io.grpc.netty.shaded.io.netty.handler.ssl.SslProvider; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class TlsTypeResolveTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +class TlsTypeResolveTest { + @Test - public void test() { - + void test() { + SslProvider openssl = TlsTypeResolve.getSslProvider("openssl"); - Assert.assertEquals(SslProvider.OPENSSL, openssl); - + assertEquals(SslProvider.OPENSSL, openssl); + SslProvider openSsL = TlsTypeResolve.getSslProvider("openSSL"); - Assert.assertEquals(SslProvider.OPENSSL, openSsL); - + assertEquals(SslProvider.OPENSSL, openSsL); + SslProvider jdk = TlsTypeResolve.getSslProvider("JDK"); - Assert.assertEquals(SslProvider.JDK, jdk); - + assertEquals(SslProvider.JDK, jdk); + SslProvider anySsl = TlsTypeResolve.getSslProvider("anySSL"); - Assert.assertEquals(SslProvider.OPENSSL, anySsl); + assertEquals(SslProvider.OPENSSL, anySsl); SslProvider refcnt = TlsTypeResolve.getSslProvider("openSSL_refcnt"); - Assert.assertEquals(SslProvider.OPENSSL_REFCNT, refcnt); + assertEquals(SslProvider.OPENSSL_REFCNT, refcnt); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/TypeUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/TypeUtilsTest.java index 0e98c560b52..9fc3bf21efd 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/TypeUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/TypeUtilsTest.java @@ -16,57 +16,67 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.List; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + /** * type utils test. * * @author zzq */ -public class TypeUtilsTest { +class TypeUtilsTest { @Test - public void parameterize() { + void parameterize() { ParameterizedType stringComparableType = TypeUtils.parameterize(List.class, String.class); - Assert.assertEquals("java.util.List", stringComparableType.toString()); - Assert.assertEquals(List.class, stringComparableType.getRawType()); - Assert.assertNull(stringComparableType.getOwnerType()); - Assert.assertEquals(1, stringComparableType.getActualTypeArguments().length); - Assert.assertEquals(String.class, stringComparableType.getActualTypeArguments()[0]); + assertEquals("java.util.List", stringComparableType.toString()); + assertEquals(List.class, stringComparableType.getRawType()); + assertNull(stringComparableType.getOwnerType()); + assertEquals(1, stringComparableType.getActualTypeArguments().length); + assertEquals(String.class, stringComparableType.getActualTypeArguments()[0]); ParameterizedType stringIntegerComparableType = TypeUtils.parameterize(Map.class, String.class, Integer.class); - Assert.assertEquals("java.util.Map", - stringIntegerComparableType.toString()); - Assert.assertEquals(Map.class, stringIntegerComparableType.getRawType()); - Assert.assertNull(stringComparableType.getOwnerType()); - Assert.assertEquals(2, stringIntegerComparableType.getActualTypeArguments().length); - Assert.assertEquals(String.class, stringIntegerComparableType.getActualTypeArguments()[0]); - Assert.assertEquals(Integer.class, stringIntegerComparableType.getActualTypeArguments()[1]); + assertEquals("java.util.Map", stringIntegerComparableType.toString()); + assertEquals(Map.class, stringIntegerComparableType.getRawType()); + assertNull(stringComparableType.getOwnerType()); + assertEquals(2, stringIntegerComparableType.getActualTypeArguments().length); + assertEquals(String.class, stringIntegerComparableType.getActualTypeArguments()[0]); + assertEquals(Integer.class, stringIntegerComparableType.getActualTypeArguments()[1]); } - @Test(expected = NullPointerException.class) - public void testParameterizeForNull() { - TypeUtils.parameterize(null, String.class); + @Test + void testParameterizeForNull() { + assertThrows(NullPointerException.class, () -> { + TypeUtils.parameterize(null, String.class); + }); } - @Test(expected = NullPointerException.class) - public void testParameterizeForNullType() { - TypeUtils.parameterize(List.class, (Type[]) null); + @Test + void testParameterizeForNullType() { + assertThrows(NullPointerException.class, () -> { + TypeUtils.parameterize(List.class, (Type[]) null); + }); } - @Test(expected = IllegalArgumentException.class) - public void testParameterizeForNullTypeArray() { - TypeUtils.parameterize(List.class, (Type) null); + @Test + void testParameterizeForNullTypeArray() { + assertThrows(IllegalArgumentException.class, () -> { + TypeUtils.parameterize(List.class, (Type) null); + }); } - @Test(expected = IllegalArgumentException.class) - public void testParameterizeForDiffLength() { - TypeUtils.parameterize(List.class, String.class, Integer.class); + @Test + void testParameterizeForDiffLength() { + assertThrows(IllegalArgumentException.class, () -> { + TypeUtils.parameterize(List.class, String.class, Integer.class); + }); } } diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/UuidUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/UuidUtilsTest.java index 1d40252d1e0..3425ddc40b2 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/UuidUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/UuidUtilsTest.java @@ -16,14 +16,14 @@ package com.alibaba.nacos.common.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.UUID; -public class UuidUtilsTest { +class UuidUtilsTest { @Test - public void testGenerateUuid() { + void testGenerateUuid() { String uuid = UuidUtils.generateUuid(); // try parse to UUID. UUID.fromString(uuid); diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/VersionUtilsTest.java b/common/src/test/java/com/alibaba/nacos/common/utils/VersionUtilsTest.java index 4978a1cb039..41abdcccf84 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/VersionUtilsTest.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/VersionUtilsTest.java @@ -16,80 +16,90 @@ package com.alibaba.nacos.common.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.File; import java.net.URL; -public class VersionUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class VersionUtilsTest { @Test - public void testVersionCompareLt() { - Assert.assertTrue(VersionUtils.compareVersion("1.2.0", "1.2.1") < 0); - Assert.assertTrue(VersionUtils.compareVersion("0.2.0", "1.2.0") < 0); - Assert.assertTrue(VersionUtils.compareVersion("1.2.0", "1.3.0") < 0); + void testVersionCompareLt() { + assertTrue(VersionUtils.compareVersion("1.2.0", "1.2.1") < 0); + assertTrue(VersionUtils.compareVersion("0.2.0", "1.2.0") < 0); + assertTrue(VersionUtils.compareVersion("1.2.0", "1.3.0") < 0); } @Test - public void testVersionCompareGt() { - Assert.assertTrue(VersionUtils.compareVersion("1.2.2", "1.2.1") > 0); - Assert.assertTrue(VersionUtils.compareVersion("2.2.0", "1.2.0") > 0); - Assert.assertTrue(VersionUtils.compareVersion("1.3.0", "1.2.0") > 0); + void testVersionCompareGt() { + assertTrue(VersionUtils.compareVersion("1.2.2", "1.2.1") > 0); + assertTrue(VersionUtils.compareVersion("2.2.0", "1.2.0") > 0); + assertTrue(VersionUtils.compareVersion("1.3.0", "1.2.0") > 0); } @Test - public void testVersionCompareEt() { - Assert.assertEquals(0, VersionUtils.compareVersion("1.2.1", "1.2.1")); + void testVersionCompareEt() { + assertEquals(0, VersionUtils.compareVersion("1.2.1", "1.2.1")); } @Test - public void testVersionCompareLtWithChar() { - Assert.assertTrue(VersionUtils.compareVersion("1.2.0-beta", "1.2.1") < 0); + void testVersionCompareLtWithChar() { + assertTrue(VersionUtils.compareVersion("1.2.0-beta", "1.2.1") < 0); } @Test - public void testVersionCompareGtWithChar() { - Assert.assertTrue(VersionUtils.compareVersion("1.2.2-beta", "1.2.1-beta") > 0); + void testVersionCompareGtWithChar() { + assertTrue(VersionUtils.compareVersion("1.2.2-beta", "1.2.1-beta") > 0); } @Test - public void testVersionCompareEtWithChar() { - Assert.assertEquals(0, VersionUtils.compareVersion("1.2.1", "1.2.1-beta")); + void testVersionCompareEtWithChar() { + assertEquals(0, VersionUtils.compareVersion("1.2.1", "1.2.1-beta")); } @Test - public void testVersionCompareResourceNotExist() { + void testVersionCompareResourceNotExist() { URL resource = VersionUtils.class.getClassLoader().getResource("nacos-version.txt"); - Assert.assertNotNull(resource); + assertNotNull(resource); File originFile = new File(resource.getFile()); File tempFile = new File(originFile.getAbsolutePath() + ".rename"); - Assert.assertTrue(originFile.renameTo(tempFile)); - + assertTrue(originFile.renameTo(tempFile)); + // not throw any exception VersionUtils.compareVersion("1.2.1", "1.2.1"); - - Assert.assertTrue(tempFile.renameTo(originFile)); + + assertTrue(tempFile.renameTo(originFile)); } - @Test(expected = IllegalArgumentException.class) - public void testVersionCompareVersionNotValid1() { - VersionUtils.compareVersion("1.2.1.1", "1.2.1.1"); + @Test + void testVersionCompareVersionNotValid1() { + assertThrows(IllegalArgumentException.class, () -> { + VersionUtils.compareVersion("1.2.1.1", "1.2.1.1"); + }); } - @Test(expected = IllegalArgumentException.class) - public void testVersionCompareVersionNotValid2() { - VersionUtils.compareVersion("1.2.1", "1.2.1.1"); + @Test + void testVersionCompareVersionNotValid2() { + assertThrows(IllegalArgumentException.class, () -> { + VersionUtils.compareVersion("1.2.1", "1.2.1.1"); + }); } - @Test(expected = IllegalArgumentException.class) - public void testVersionCompareVersionNotValid3() { - VersionUtils.compareVersion("1.2.1.1", "1.2.1"); + @Test + void testVersionCompareVersionNotValid3() { + assertThrows(IllegalArgumentException.class, () -> { + VersionUtils.compareVersion("1.2.1.1", "1.2.1"); + }); } @Test - public void testFullClientVersion() { - Assert.assertNotNull(VersionUtils.getFullClientVersion()); - Assert.assertTrue(VersionUtils.getFullClientVersion().startsWith("Nacos-Java-Client:v")); + void testFullClientVersion() { + assertNotNull(VersionUtils.getFullClientVersion()); + assertTrue(VersionUtils.getFullClientVersion().startsWith("Nacos-Java-Client:v")); } } \ No newline at end of file diff --git a/common/src/test/java/com/alibaba/nacos/common/utils/to/User.java b/common/src/test/java/com/alibaba/nacos/common/utils/to/User.java index f74846db434..241f0db019e 100644 --- a/common/src/test/java/com/alibaba/nacos/common/utils/to/User.java +++ b/common/src/test/java/com/alibaba/nacos/common/utils/to/User.java @@ -17,8 +17,9 @@ package com.alibaba.nacos.common.utils.to; public class User { + private Integer id; - + private String name; public User(Integer id, String name) { From 9363a088f0fb0c2570ec9dc52eecb98fef6b9fc9 Mon Sep 17 00:00:00 2001 From: Zachary <354062500@qq.com> Date: Mon, 20 May 2024 11:12:24 +0800 Subject: [PATCH 022/110] [ISSUE #12060] fix too large ttl when auth disabled (#12090) * [ISSUE #12060] fix too large ttl when auth disabled fix issue #12060 1. fix too large ttl when auth disabled 2. generate a valid token when key is valid even if auth disabled * [ISSUE #12060] add unit test * [ISSUE alibaba#12060] fix style issue --- .../auth/impl/token/impl/JwtTokenManager.java | 9 +++-- .../impl/token/impl/JwtTokenManagerTest.java | 39 ++++++++++++++++++- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManager.java b/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManager.java index 33e727cc722..7dc2cc57469 100644 --- a/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManager.java +++ b/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManager.java @@ -103,10 +103,13 @@ public String createToken(Authentication authentication) { * @return token */ public String createToken(String userName) { - if (!authConfigs.isAuthEnabled()) { + // create a token when auth enabled or nacos.core.auth.plugin.nacos.token.secret.key is configured + if (!authConfigs.isAuthEnabled() && null == jwtParser) { return AUTH_DISABLED_TOKEN; + } else if (authConfigs.isAuthEnabled()) { + // check nacos.core.auth.plugin.nacos.token.secret.key only if auth enabled + checkJwtParser(); } - checkJwtParser(); return jwtParser.jwtBuilder().setUserName(userName).setExpiredTime(this.tokenValidityInSeconds).compact(); } @@ -147,7 +150,7 @@ public long getTokenValidityInSeconds() { @Override public long getTokenTtlInSeconds(String token) throws AccessException { if (!authConfigs.isAuthEnabled()) { - return TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()) + tokenValidityInSeconds; + return tokenValidityInSeconds; } return jwtParser.getExpireTimeInSeconds(token) - TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()); } diff --git a/plugin-default-impl/nacos-default-auth-plugin/src/test/java/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManagerTest.java b/plugin-default-impl/nacos-default-auth-plugin/src/test/java/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManagerTest.java index 6942f028e42..21f3712e0b6 100644 --- a/plugin-default-impl/nacos-default-auth-plugin/src/test/java/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManagerTest.java +++ b/plugin-default-impl/nacos-default-auth-plugin/src/test/java/com/alibaba/nacos/plugin/auth/impl/token/impl/JwtTokenManagerTest.java @@ -35,6 +35,7 @@ import java.util.concurrent.TimeUnit; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) @@ -105,13 +106,49 @@ public void testGetTokenTtlInSeconds() throws AccessException { public void testGetExpiredTimeInSeconds() throws AccessException { Assert.assertTrue(jwtTokenManager.getExpiredTimeInSeconds(jwtTokenManager.createToken("nacos")) > 0); } + + @Test + public void testGetTokenTtlInSecondsWhenAuthDisabled() throws AccessException { + when(authConfigs.isAuthEnabled()).thenReturn(false); + // valid secret key + String ttl = EnvUtil.getProperty(AuthConstants.TOKEN_EXPIRE_SECONDS); + Assert.assertEquals(Integer.parseInt(ttl), jwtTokenManager.getTokenTtlInSeconds(jwtTokenManager.createToken("nacos"))); + // invalid secret key + MockEnvironment mockEnvironment = new MockEnvironment(); + mockEnvironment.setProperty(AuthConstants.TOKEN_SECRET_KEY, ""); + EnvUtil.setEnvironment(mockEnvironment); + jwtTokenManager = new JwtTokenManager(authConfigs); + Assert.assertEquals(Integer.parseInt(ttl), jwtTokenManager.getTokenTtlInSeconds(jwtTokenManager.createToken("nacos"))); + } @Test - public void testCreateTokenWhenDisableAuth() { + public void testCreateTokenWhenDisableAuthAndSecretKeyIsBlank() { when(authConfigs.isAuthEnabled()).thenReturn(false); + MockEnvironment mockEnvironment = new MockEnvironment(); + mockEnvironment.setProperty(AuthConstants.TOKEN_SECRET_KEY, ""); + mockEnvironment + .setProperty(AuthConstants.TOKEN_EXPIRE_SECONDS, AuthConstants.DEFAULT_TOKEN_EXPIRE_SECONDS.toString()); + + EnvUtil.setEnvironment(mockEnvironment); jwtTokenManager = new JwtTokenManager(authConfigs); assertEquals("AUTH_DISABLED", jwtTokenManager.createToken("nacos")); } + + @Test + public void testCreateTokenWhenDisableAuthAndSecretKeyIsNotBlank() throws AccessException { + when(authConfigs.isAuthEnabled()).thenReturn(false); + MockEnvironment mockEnvironment = new MockEnvironment(); + String tmpKey = "SecretKey0123567890234567890123456789012345678901234567890123456789"; + mockEnvironment.setProperty(AuthConstants.TOKEN_SECRET_KEY, + Base64.getEncoder().encodeToString(tmpKey.getBytes(StandardCharsets.UTF_8))); + mockEnvironment + .setProperty(AuthConstants.TOKEN_EXPIRE_SECONDS, AuthConstants.DEFAULT_TOKEN_EXPIRE_SECONDS.toString()); + EnvUtil.setEnvironment(mockEnvironment); + jwtTokenManager = new JwtTokenManager(authConfigs); + String token = jwtTokenManager.createToken("nacos"); + assertNotEquals("AUTH_DISABLED", token); + jwtTokenManager.validateToken(token); + } @Test public void testNacosJwtParser() throws AccessException { From 366c88e4d6ec95b5448d3c57371f519b8ddbf973 Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Mon, 20 May 2024 11:14:33 +0800 Subject: [PATCH 023/110] [issue #12081] module api upgrade junit4 to junit5 (#12082) * refact(api): remove junit4 to junit5 * format with code style --- .../api/ability/ClientAbilitiesTest.java | 18 +-- .../api/ability/ServerAbilitiesTest.java | 32 ++--- .../impl/ClusterClientAbilitiesTest.java | 8 +- .../register/impl/SdkClientAbilitiesTest.java | 8 +- .../register/impl/ServerAbilitiesTest.java | 14 +-- .../api/annotation/NacosPropertiesTest.java | 30 ++--- .../nacos/api/cmdb/pojo/EntityEventTest.java | 18 +-- .../nacos/api/cmdb/pojo/EntityTest.java | 18 +-- .../nacos/api/cmdb/pojo/LabelTest.java | 18 +-- .../api/config/ConfigChangeEventTest.java | 10 +- .../api/config/ConfigChangeItemTest.java | 12 +- .../nacos/api/config/ConfigTypeTest.java | 14 +-- .../ability/ClientRemoteAbilityTest.java | 18 +-- .../ability/ServerConfigAbilityTest.java | 15 ++- .../ability/ServerRemoteAbilityTest.java | 30 ++--- .../config/listener/AbstractListenerTest.java | 8 +- .../listener/AbstractSharedListenerTest.java | 18 +-- .../request/BasedConfigRequestTest.java | 8 +- .../ClientConfigMetricRequestTest.java | 34 +++--- .../request/ConfigBatchListenRequestTest.java | 18 +-- .../ConfigChangeNotifyRequestTest.java | 24 ++-- .../request/ConfigPublishRequestTest.java | 34 +++--- .../request/ConfigQueryRequestTest.java | 26 ++--- .../request/ConfigRemoveRequestTest.java | 24 ++-- .../ConfigChangeClusterSyncRequestTest.java | 31 ++--- .../ClientConfigMetricResponseTest.java | 12 +- .../ConfigChangeBatchListenResponseTest.java | 18 +-- .../ConfigChangeNotifyResponseTest.java | 12 +- .../response/ConfigPublishResponseTest.java | 12 +- .../response/ConfigQueryResponseTest.java | 14 +-- .../response/ConfigRemoveResponseTest.java | 12 +- .../ConfigChangeClusterSyncResponseTest.java | 10 +- .../api/exception/NacosExceptionTest.java | 16 +-- .../exception/api/NacosApiExceptionTest.java | 12 +- .../NacosDeserializationExceptionTest.java | 20 ++-- .../runtime/NacosLoadExceptionTest.java | 10 +- .../runtime/NacosRuntimeExceptionTest.java | 22 ++-- .../NacosSerializationExceptionTest.java | 16 +-- .../nacos/api/model/v2/ErrorCodeTest.java | 9 +- .../nacos/api/model/v2/ResultTest.java | 20 ++-- .../ability/ClientNamingAbilityTest.java | 10 +- .../ability/ServerNamingAbilityTest.java | 31 +++-- .../api/naming/listener/NamingEventTest.java | 20 ++-- .../nacos/api/naming/pojo/ClusterTest.java | 24 ++-- .../nacos/api/naming/pojo/InstanceTest.java | 41 +++---- .../nacos/api/naming/pojo/ListViewTest.java | 12 +- .../api/naming/pojo/ServiceInfoTest.java | 51 ++++---- .../nacos/api/naming/pojo/ServiceTest.java | 17 +-- .../pojo/builder/InstanceBuilderTest.java | 18 +-- .../AbstractHealthCheckerTest.java | 20 ++-- .../pojo/healthcheck/HealthCheckTypeTest.java | 16 +-- .../healthcheck/HealthCheckerFactoryTest.java | 51 ++++---- .../naming/pojo/healthcheck/TestChecker.java | 8 +- .../pojo/healthcheck/impl/HttpTest.java | 39 ++++--- .../pojo/healthcheck/impl/MysqlTest.java | 34 +++--- .../naming/pojo/healthcheck/impl/TcpTest.java | 11 +- .../request/BasedNamingRequestTest.java | 8 +- .../request/BatchInstanceRequestTest.java | 12 +- .../remote/request/InstanceRequestTest.java | 12 +- .../request/NotifySubscriberRequestTest.java | 18 +-- .../PersistentInstanceRequestTest.java | 12 +- .../request/ServiceListRequestTest.java | 12 +- .../request/ServiceQueryRequestTest.java | 12 +- .../request/SubscribeServiceRequestTest.java | 14 +-- .../response/BatchInstanceResponseTest.java | 18 +-- .../remote/response/InstanceResponseTest.java | 18 +-- .../response/QueryServiceResponseTest.java | 20 ++-- .../response/ServiceListResponseTest.java | 20 ++-- .../SubscribeServiceResponseTest.java | 20 ++-- .../api/naming/utils/NamingUtilsTest.java | 110 ++++++++++-------- .../api/remote/AbstractPushCallBackTest.java | 12 +- .../remote/AbstractRequestCallBackTest.java | 12 +- .../api/remote/DefaultRequestFutureTest.java | 86 +++++++------- .../api/remote/RpcScheduledExecutorTest.java | 10 +- .../ability/ClientRemoteAbilityTest.java | 18 +-- .../ability/ServerRemoteAbilityTest.java | 32 ++--- .../api/remote/request/BasicRequestTest.java | 4 +- .../request/ConnectResetRequestTest.java | 33 +++--- .../request/ConnectionSetupRequestTest.java | 48 ++++---- .../request/EmptyContentRequestTest.java | 24 ++-- .../remote/request/PushAckRequestTest.java | 30 ++--- .../api/remote/request/RequestMetaTest.java | 28 ++--- .../nacos/api/remote/request/RequestTest.java | 18 +-- .../request/ServerReloadRequestTest.java | 33 +++--- .../remote/request/SetupAckRequestTest.java | 29 ++--- .../response/EmptyContentResponseTest.java | 30 ++--- .../remote/response/ErrorResponseTest.java | 41 +++---- .../response/ServerCheckResponseTest.java | 18 +-- .../ServerLoaderInfoResponseTest.java | 18 +-- .../selector/AbstractCmdbSelectorTest.java | 26 ++--- .../api/selector/ExpressionSelectorTest.java | 18 +-- .../nacos/api/selector/NoneSelectorTest.java | 18 +-- .../api/selector/context/CmdbContextTest.java | 8 +- .../nacos/api/utils/AbilityKeyTest.java | 52 +++++---- .../alibaba/nacos/api/utils/NetUtilsTest.java | 20 ++-- .../nacos/api/utils/StringUtilsTest.java | 104 +++++++++-------- 96 files changed, 1113 insertions(+), 1069 deletions(-) diff --git a/api/src/test/java/com/alibaba/nacos/api/ability/ClientAbilitiesTest.java b/api/src/test/java/com/alibaba/nacos/api/ability/ClientAbilitiesTest.java index 7510c1e82fd..b15c83dcde4 100644 --- a/api/src/test/java/com/alibaba/nacos/api/ability/ClientAbilitiesTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/ability/ClientAbilitiesTest.java @@ -20,25 +20,25 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ClientAbilitiesTest { +class ClientAbilitiesTest { private static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { ClientAbilities abilities = new ClientAbilities(); String json = mapper.writeValueAsString(abilities); assertTrue(json.contains("\"remoteAbility\":{")); @@ -47,7 +47,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"remoteAbility\":{\"supportRemoteConnection\":false}," + "\"configAbility\":{\"supportRemoteMetrics\":false},\"namingAbility\":{\"supportDeltaPush\":false," + "\"supportRemoteMetric\":false}}"; diff --git a/api/src/test/java/com/alibaba/nacos/api/ability/ServerAbilitiesTest.java b/api/src/test/java/com/alibaba/nacos/api/ability/ServerAbilitiesTest.java index 69ba2aca886..1b9785cfe3c 100644 --- a/api/src/test/java/com/alibaba/nacos/api/ability/ServerAbilitiesTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/ability/ServerAbilitiesTest.java @@ -20,35 +20,35 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServerAbilitiesTest { +class ServerAbilitiesTest { private static ObjectMapper mapper; private ServerAbilities serverAbilities; - @BeforeClass - public static void setUpBeforeClass() throws Exception { + @BeforeAll + static void setUpBeforeClass() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { serverAbilities = new ServerAbilities(); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { serverAbilities = new ServerAbilities(); String json = mapper.writeValueAsString(serverAbilities); assertTrue(json.contains("\"remoteAbility\":{")); @@ -57,7 +57,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"remoteAbility\":{\"supportRemoteConnection\":false}," + "\"configAbility\":{\"supportRemoteMetrics\":false},\"namingAbility\":{\"supportDeltaPush\":false," + "\"supportRemoteMetric\":false}}"; @@ -68,10 +68,10 @@ public void testDeserialize() throws JsonProcessingException { } @Test - public void testEqualsAndHashCode() { + void testEqualsAndHashCode() { assertEquals(serverAbilities, serverAbilities); assertEquals(serverAbilities.hashCode(), serverAbilities.hashCode()); - assertNotEquals(serverAbilities, null); + assertNotEquals(null, serverAbilities); assertNotEquals(serverAbilities, new ClientAbilities()); ServerAbilities test = new ServerAbilities(); assertEquals(serverAbilities, test); diff --git a/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/ClusterClientAbilitiesTest.java b/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/ClusterClientAbilitiesTest.java index b6ec8a54e66..e7db88cc8c3 100644 --- a/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/ClusterClientAbilitiesTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/ClusterClientAbilitiesTest.java @@ -16,14 +16,14 @@ package com.alibaba.nacos.api.ability.register.impl; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ClusterClientAbilitiesTest { +class ClusterClientAbilitiesTest { @Test - public void testGetStaticAbilities() { + void testGetStaticAbilities() { // TODO add the cluster client abilities. assertTrue(ClusterClientAbilities.getStaticAbilities().isEmpty()); } diff --git a/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/SdkClientAbilitiesTest.java b/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/SdkClientAbilitiesTest.java index ea9cabd4653..36a6db496bd 100644 --- a/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/SdkClientAbilitiesTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/SdkClientAbilitiesTest.java @@ -16,14 +16,14 @@ package com.alibaba.nacos.api.ability.register.impl; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class SdkClientAbilitiesTest { +class SdkClientAbilitiesTest { @Test - public void testGetStaticAbilities() { + void testGetStaticAbilities() { // TODO add the sdk client abilities. assertTrue(SdkClientAbilities.getStaticAbilities().isEmpty()); } diff --git a/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/ServerAbilitiesTest.java b/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/ServerAbilitiesTest.java index 2058a353137..79ba5f6e425 100644 --- a/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/ServerAbilitiesTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/ability/register/impl/ServerAbilitiesTest.java @@ -17,20 +17,20 @@ package com.alibaba.nacos.api.ability.register.impl; import com.alibaba.nacos.api.ability.constant.AbilityKey; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServerAbilitiesTest { +class ServerAbilitiesTest { @Test - public void testGetStaticAbilities() { + void testGetStaticAbilities() { assertFalse(ServerAbilities.getStaticAbilities().isEmpty()); } - + @Test - public void testSupportPersistentInstanceByGrpcAbilities() { + void testSupportPersistentInstanceByGrpcAbilities() { assertTrue(ServerAbilities.getStaticAbilities().get(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); } } \ No newline at end of file diff --git a/api/src/test/java/com/alibaba/nacos/api/annotation/NacosPropertiesTest.java b/api/src/test/java/com/alibaba/nacos/api/annotation/NacosPropertiesTest.java index c0ff4ccee43..1e3885d044a 100644 --- a/api/src/test/java/com/alibaba/nacos/api/annotation/NacosPropertiesTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/annotation/NacosPropertiesTest.java @@ -16,8 +16,7 @@ package com.alibaba.nacos.api.annotation; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.springframework.mock.env.MockEnvironment; import static com.alibaba.nacos.api.annotation.NacosProperties.ACCESS_KEY_PLACEHOLDER; @@ -28,23 +27,24 @@ import static com.alibaba.nacos.api.annotation.NacosProperties.NAMESPACE_PLACEHOLDER; import static com.alibaba.nacos.api.annotation.NacosProperties.SECRET_KEY_PLACEHOLDER; import static com.alibaba.nacos.api.annotation.NacosProperties.SERVER_ADDR_PLACEHOLDER; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class NacosPropertiesTest { +class NacosPropertiesTest { @Test - public void testPlaceholders() { - Assert.assertEquals("${nacos.endpoint:}", ENDPOINT_PLACEHOLDER); - Assert.assertEquals("${nacos.namespace:}", NAMESPACE_PLACEHOLDER); - Assert.assertEquals("${nacos.access-key:}", ACCESS_KEY_PLACEHOLDER); - Assert.assertEquals("${nacos.secret-key:}", SECRET_KEY_PLACEHOLDER); - Assert.assertEquals("${nacos.server-addr:}", SERVER_ADDR_PLACEHOLDER); - Assert.assertEquals("${nacos.context-path:}", CONTEXT_PATH_PLACEHOLDER); - Assert.assertEquals("${nacos.cluster-name:}", CLUSTER_NAME_PLACEHOLDER); - Assert.assertEquals("${nacos.encode:UTF-8}", ENCODE_PLACEHOLDER); + void testPlaceholders() { + assertEquals("${nacos.endpoint:}", ENDPOINT_PLACEHOLDER); + assertEquals("${nacos.namespace:}", NAMESPACE_PLACEHOLDER); + assertEquals("${nacos.access-key:}", ACCESS_KEY_PLACEHOLDER); + assertEquals("${nacos.secret-key:}", SECRET_KEY_PLACEHOLDER); + assertEquals("${nacos.server-addr:}", SERVER_ADDR_PLACEHOLDER); + assertEquals("${nacos.context-path:}", CONTEXT_PATH_PLACEHOLDER); + assertEquals("${nacos.cluster-name:}", CLUSTER_NAME_PLACEHOLDER); + assertEquals("${nacos.encode:UTF-8}", ENCODE_PLACEHOLDER); } @Test - public void testResolvePlaceholders() { + void testResolvePlaceholders() { testResolvePlaceholder(ENDPOINT_PLACEHOLDER, "nacos.endpoint", "test-value", "test-value"); testResolvePlaceholder(ENDPOINT_PLACEHOLDER, "", "test-value", ""); @@ -75,11 +75,11 @@ private void testResolvePlaceholder(String placeholder, String propertyName, Str MockEnvironment environment = new MockEnvironment(); environment.setProperty(propertyName, propertyValue); String resolvedValue = environment.resolvePlaceholders(placeholder); - Assert.assertEquals(expectValue, resolvedValue); + assertEquals(expectValue, resolvedValue); } @Test - public void testSort() { + void testSort() { } } diff --git a/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/EntityEventTest.java b/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/EntityEventTest.java index cab555aed68..c2e6bd0719b 100644 --- a/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/EntityEventTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/EntityEventTest.java @@ -20,24 +20,24 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class EntityEventTest { +class EntityEventTest { ObjectMapper mapper = new ObjectMapper(); - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialization() throws JsonProcessingException { + void testSerialization() throws JsonProcessingException { EntityEvent entity = new EntityEvent(); entity.setEntityName("test-entity"); entity.setEntityType("CMDB"); @@ -50,7 +50,7 @@ public void testSerialization() throws JsonProcessingException { } @Test - public void testDeserialization() throws JsonProcessingException { + void testDeserialization() throws JsonProcessingException { String json = "{\"type\":\"ENTITY_REMOVE\",\"entityName\":\"test-entity\",\"entityType\":\"CMDB\"}"; EntityEvent entity = mapper.readValue(json, EntityEvent.class); assertEquals("test-entity", entity.getEntityName()); diff --git a/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/EntityTest.java b/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/EntityTest.java index 79f05b39a90..5530921e213 100644 --- a/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/EntityTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/EntityTest.java @@ -20,26 +20,26 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class EntityTest { +class EntityTest { ObjectMapper mapper = new ObjectMapper(); - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialization() throws JsonProcessingException { + void testSerialization() throws JsonProcessingException { Entity entity = new Entity(); entity.setName("test-entity"); entity.setType(PreservedEntityTypes.ip.name()); @@ -51,7 +51,7 @@ public void testSerialization() throws JsonProcessingException { } @Test - public void testDeserialization() throws JsonProcessingException { + void testDeserialization() throws JsonProcessingException { String json = "{\"type\":\"service\",\"name\":\"test-entity\",\"labels\":{\"test-label-key\":\"test-label-value\"}}"; Entity entity = mapper.readValue(json, Entity.class); assertEquals("test-entity", entity.getName()); diff --git a/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/LabelTest.java b/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/LabelTest.java index 4a0023a009c..519e5401359 100644 --- a/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/LabelTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/cmdb/pojo/LabelTest.java @@ -20,26 +20,26 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class LabelTest { +class LabelTest { ObjectMapper mapper = new ObjectMapper(); - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialization() throws JsonProcessingException { + void testSerialization() throws JsonProcessingException { Label label = new Label(); label.setName("test-label"); label.setDescription("CMDB description"); @@ -52,7 +52,7 @@ public void testSerialization() throws JsonProcessingException { } @Test - public void testDeserialization() throws JsonProcessingException { + void testDeserialization() throws JsonProcessingException { String json = "{\"values\":[\"test-value\"],\"name\":\"test-label\",\"description\":\"CMDB description\"}"; Label label = mapper.readValue(json, Label.class); assertEquals("test-label", label.getName()); diff --git a/api/src/test/java/com/alibaba/nacos/api/config/ConfigChangeEventTest.java b/api/src/test/java/com/alibaba/nacos/api/config/ConfigChangeEventTest.java index 3120941f2fb..c7adfac3a4e 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/ConfigChangeEventTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/ConfigChangeEventTest.java @@ -16,18 +16,18 @@ package com.alibaba.nacos.api.config; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class ConfigChangeEventTest { +class ConfigChangeEventTest { @Test - public void testConstructor() { + void testConstructor() { Map mockData = new HashMap<>(); mockData.put("test", new ConfigChangeItem("testKey", null, "testValue")); ConfigChangeEvent event = new ConfigChangeEvent(mockData); diff --git a/api/src/test/java/com/alibaba/nacos/api/config/ConfigChangeItemTest.java b/api/src/test/java/com/alibaba/nacos/api/config/ConfigChangeItemTest.java index cbd28b297b3..6f0ee862187 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/ConfigChangeItemTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/ConfigChangeItemTest.java @@ -16,15 +16,15 @@ package com.alibaba.nacos.api.config; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class ConfigChangeItemTest { +class ConfigChangeItemTest { @Test - public void testSetNewValue() { + void testSetNewValue() { ConfigChangeItem item = new ConfigChangeItem("testKey", null, "testValue"); item.setType(PropertyChangeType.ADDED); assertEquals("testKey", item.getKey()); @@ -46,7 +46,7 @@ public void testSetNewValue() { } @Test - public void testToString() { + void testToString() { ConfigChangeItem item = new ConfigChangeItem("testKey", null, "testValue"); item.setType(PropertyChangeType.ADDED); assertEquals("ConfigChangeItem{key='testKey', oldValue='null', newValue='testValue', type=ADDED}", diff --git a/api/src/test/java/com/alibaba/nacos/api/config/ConfigTypeTest.java b/api/src/test/java/com/alibaba/nacos/api/config/ConfigTypeTest.java index ca8160f2209..003c21af4fe 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/ConfigTypeTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/ConfigTypeTest.java @@ -16,16 +16,16 @@ package com.alibaba.nacos.api.config; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigTypeTest { +class ConfigTypeTest { @Test - public void isValidType() { + void isValidType() { assertTrue(ConfigType.isValidType("xml")); assertTrue(ConfigType.isValidType("properties")); assertTrue(ConfigType.isValidType("json")); @@ -38,7 +38,7 @@ public void isValidType() { } @Test - public void testGetDefaultType() { + void testGetDefaultType() { assertEquals("text", ConfigType.getDefaultType().getType()); } } \ No newline at end of file diff --git a/api/src/test/java/com/alibaba/nacos/api/config/ability/ClientRemoteAbilityTest.java b/api/src/test/java/com/alibaba/nacos/api/config/ability/ClientRemoteAbilityTest.java index eb9ab814055..2246fa5196e 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/ability/ClientRemoteAbilityTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/ability/ClientRemoteAbilityTest.java @@ -21,32 +21,32 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ClientRemoteAbilityTest { +class ClientRemoteAbilityTest { private static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { ClientRemoteAbility abilities = new ClientRemoteAbility(); String json = mapper.writeValueAsString(abilities); assertEquals("{\"supportRemoteConnection\":false}", json); } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"supportRemoteConnection\":true}"; ClientRemoteAbility abilities = mapper.readValue(json, ClientRemoteAbility.class); assertTrue(abilities.isSupportRemoteConnection()); diff --git a/api/src/test/java/com/alibaba/nacos/api/config/ability/ServerConfigAbilityTest.java b/api/src/test/java/com/alibaba/nacos/api/config/ability/ServerConfigAbilityTest.java index d93e594a218..f20f91a742c 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/ability/ServerConfigAbilityTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/ability/ServerConfigAbilityTest.java @@ -16,21 +16,20 @@ package com.alibaba.nacos.api.config.ability; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; -public class ServerConfigAbilityTest { +class ServerConfigAbilityTest { @Test - public void testEquals() { + void testEquals() { ServerConfigAbility ability = new ServerConfigAbility(); ability.setSupportRemoteMetrics(true); assertEquals(ability, ability); - assertFalse(ability.equals(null)); - assertFalse(ability.equals(new ClientConfigAbility())); + assertNotEquals(null, ability); + assertNotEquals(ability, new ClientConfigAbility()); ServerConfigAbility newOne = new ServerConfigAbility(); assertNotEquals(ability, newOne); newOne.setSupportRemoteMetrics(true); diff --git a/api/src/test/java/com/alibaba/nacos/api/config/ability/ServerRemoteAbilityTest.java b/api/src/test/java/com/alibaba/nacos/api/config/ability/ServerRemoteAbilityTest.java index b25af0f685e..173f82136d9 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/ability/ServerRemoteAbilityTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/ability/ServerRemoteAbilityTest.java @@ -23,35 +23,35 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServerRemoteAbilityTest { +class ServerRemoteAbilityTest { private static ObjectMapper mapper; private ServerRemoteAbility serverAbilities; - @BeforeClass - public static void setUpBeforeClass() throws Exception { + @BeforeAll + static void setUpBeforeClass() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); } - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { serverAbilities = new ServerRemoteAbility(); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { serverAbilities = new ServerRemoteAbility(); String json = mapper.writeValueAsString(serverAbilities); assertTrue(json.contains("\"supportRemoteConnection\":false")); @@ -59,7 +59,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"supportRemoteConnection\":true,\"grpcReportEnabled\":true}"; ServerRemoteAbility abilities = mapper.readValue(json, ServerRemoteAbility.class); assertTrue(abilities.isSupportRemoteConnection()); @@ -67,10 +67,10 @@ public void testDeserialize() throws JsonProcessingException { } @Test - public void testEqualsAndHashCode() { + void testEqualsAndHashCode() { assertEquals(serverAbilities, serverAbilities); assertEquals(serverAbilities.hashCode(), serverAbilities.hashCode()); - assertNotEquals(serverAbilities, null); + assertNotEquals(null, serverAbilities); assertNotEquals(serverAbilities, new ClientAbilities()); ServerRemoteAbility test = new ServerRemoteAbility(); assertEquals(serverAbilities, test); diff --git a/api/src/test/java/com/alibaba/nacos/api/config/listener/AbstractListenerTest.java b/api/src/test/java/com/alibaba/nacos/api/config/listener/AbstractListenerTest.java index cf314884013..c9eadd19a7e 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/listener/AbstractListenerTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/listener/AbstractListenerTest.java @@ -16,14 +16,14 @@ package com.alibaba.nacos.api.config.listener; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertNull; -public class AbstractListenerTest { +class AbstractListenerTest { @Test - public void testGetExecutor() { + void testGetExecutor() { // Default listener executor is null. assertNull(new AbstractListener() { @Override diff --git a/api/src/test/java/com/alibaba/nacos/api/config/listener/AbstractSharedListenerTest.java b/api/src/test/java/com/alibaba/nacos/api/config/listener/AbstractSharedListenerTest.java index 8a1fa8d429e..e61ea4e5518 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/listener/AbstractSharedListenerTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/listener/AbstractSharedListenerTest.java @@ -16,28 +16,28 @@ package com.alibaba.nacos.api.config.listener; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class AbstractSharedListenerTest { +class AbstractSharedListenerTest { private static final String CONFIG_CONTENT = "test"; private static Map receivedMap; - @Before - public void setUp() { + @BeforeEach + void setUp() { receivedMap = new HashMap<>(); } @Test - public void testFillContext() { + void testFillContext() { assertEquals(0, receivedMap.size()); MockShardListener listener = new MockShardListener(); listener.receiveConfigInfo(CONFIG_CONTENT); @@ -52,7 +52,7 @@ public void testFillContext() { } @Test - public void getExecutor() { + void getExecutor() { // Default listener executor is null. assertNull(new MockShardListener().getExecutor()); } diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/BasedConfigRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/BasedConfigRequestTest.java index 8e4cecea7b3..b50a9209380 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/BasedConfigRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/BasedConfigRequestTest.java @@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; +import org.junit.jupiter.api.BeforeAll; import java.util.HashMap; import java.util.Map; @@ -30,8 +30,6 @@ public abstract class BasedConfigRequestTest { - protected static ObjectMapper mapper; - protected static final String DATA_ID = "test_data"; protected static final String GROUP = "group"; @@ -52,11 +50,13 @@ public abstract class BasedConfigRequestTest { protected static final String CONTENT = "content"; + protected static ObjectMapper mapper; + static { HEADERS.put(HEADER_KEY, HEADER_VALUE); } - @BeforeClass + @BeforeAll public static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ClientConfigMetricRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ClientConfigMetricRequestTest.java index 38cf4c63b1b..4b19652f74e 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ClientConfigMetricRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ClientConfigMetricRequestTest.java @@ -18,18 +18,17 @@ import com.alibaba.nacos.api.common.Constants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Objects; import static com.alibaba.nacos.api.config.remote.request.ClientConfigMetricRequest.MetricsKey.CACHE_DATA; import static com.alibaba.nacos.api.config.remote.request.ClientConfigMetricRequest.MetricsKey.SNAPSHOT_DATA; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ClientConfigMetricRequestTest extends BasedConfigRequestTest { +class ClientConfigMetricRequestTest extends BasedConfigRequestTest { @Override @Test @@ -57,35 +56,36 @@ public void testDeserialize() throws JsonProcessingException { + "\"test_data+group+test_tenant\"},{\"type\":\"snapshotData\"," + "\"key\":\"test_data+group+test_tenant\"}],\"module\":\"config\"}"; ClientConfigMetricRequest actual = mapper.readValue(json, ClientConfigMetricRequest.class); - assertEquals(actual.getMetricsKeys().size(), 2); - assertEquals(actual.getModule(), Constants.Config.CONFIG_MODULE); - assertEquals(actual.getHeader(HEADER_KEY), HEADER_VALUE); + assertEquals(2, actual.getMetricsKeys().size()); + assertEquals(Constants.Config.CONFIG_MODULE, actual.getModule()); + assertEquals(HEADER_VALUE, actual.getHeader(HEADER_KEY)); } @Test - public void testMetricsKeysEquals() { + void testMetricsKeysEquals() { String dataKey = String.join("+", KEY); ClientConfigMetricRequest.MetricsKey key = ClientConfigMetricRequest.MetricsKey.build(CACHE_DATA, dataKey); assertEquals(key, key); - assertFalse(key.equals(null)); - assertFalse(key.equals(new ClientConfigMetricRequest())); - ClientConfigMetricRequest.MetricsKey newOne = ClientConfigMetricRequest.MetricsKey - .build(SNAPSHOT_DATA, dataKey); + assertNotEquals(null, key); + assertNotEquals(key, new ClientConfigMetricRequest()); + ClientConfigMetricRequest.MetricsKey newOne = ClientConfigMetricRequest.MetricsKey.build(SNAPSHOT_DATA, + dataKey); assertNotEquals(key, newOne); newOne.setType(CACHE_DATA); assertEquals(key, newOne); } @Test - public void testMetricsHashCode() { + void testMetricsHashCode() { String dataKey = String.join("+", KEY); ClientConfigMetricRequest.MetricsKey key = ClientConfigMetricRequest.MetricsKey.build(CACHE_DATA, dataKey); assertEquals(Objects.hash(CACHE_DATA, dataKey), key.hashCode()); } @Test - public void testMetricsToString() { - ClientConfigMetricRequest.MetricsKey key = ClientConfigMetricRequest.MetricsKey.build(CACHE_DATA, String.join("+", KEY)); + void testMetricsToString() { + ClientConfigMetricRequest.MetricsKey key = ClientConfigMetricRequest.MetricsKey.build(CACHE_DATA, + String.join("+", KEY)); assertEquals("MetricsKey{type='cacheData', key='test_data+group+test_tenant'}", key.toString()); } } diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigBatchListenRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigBatchListenRequestTest.java index 9c85186d6f1..b40823515e5 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigBatchListenRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigBatchListenRequestTest.java @@ -18,12 +18,12 @@ import com.alibaba.nacos.api.common.Constants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigBatchListenRequestTest extends BasedConfigRequestTest { +class ConfigBatchListenRequestTest extends BasedConfigRequestTest { @Override @Test @@ -47,14 +47,14 @@ public void testDeserialize() throws JsonProcessingException { + "\"configListenContexts\":[{\"group\":\"group\",\"md5\":\"test_MD5\"," + "\"dataId\":\"test_data\",\"tenant\":\"test_tenant\"}],\"module\":\"config\"}"; ConfigBatchListenRequest actual = mapper.readValue(json, ConfigBatchListenRequest.class); - assertEquals(actual.isListen(), true); - assertEquals(actual.getModule(), Constants.Config.CONFIG_MODULE); - assertEquals(actual.getHeader(HEADER_KEY), HEADER_VALUE); - assertEquals(actual.getConfigListenContexts().size(), 1); + assertEquals(true, actual.isListen()); + assertEquals(Constants.Config.CONFIG_MODULE, actual.getModule()); + assertEquals(HEADER_VALUE, actual.getHeader(HEADER_KEY)); + assertEquals(1, actual.getConfigListenContexts().size()); } @Test - public void testConfigListenContextToString() { + void testConfigListenContextToString() { ConfigBatchListenRequest configBatchListenRequest = new ConfigBatchListenRequest(); configBatchListenRequest.addConfigListenContext(GROUP, DATA_ID, TENANT, MD5); assertEquals("ConfigListenContext{group='group', md5='test_MD5', dataId='test_data', tenant='test_tenant'}", diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigChangeNotifyRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigChangeNotifyRequestTest.java index 2f64d3a83db..370d885eaa5 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigChangeNotifyRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigChangeNotifyRequestTest.java @@ -18,20 +18,20 @@ import com.alibaba.nacos.api.common.Constants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigChangeNotifyRequestTest extends BasedConfigRequestTest { +class ConfigChangeNotifyRequestTest extends BasedConfigRequestTest { ConfigChangeNotifyRequest configChangeNotifyRequest; String requestId; - @Before - public void before() { + @BeforeEach + void before() { configChangeNotifyRequest = ConfigChangeNotifyRequest.build(DATA_ID, GROUP, TENANT); configChangeNotifyRequest.putAllHeader(HEADERS); requestId = injectRequestUuId(configChangeNotifyRequest); @@ -54,10 +54,10 @@ public void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{\"header1\":\"test_header1\"},\"dataId\":\"test_data\",\"group\":" + "\"group\",\"tenant\":\"test_tenant\",\"module\":\"config\"}"; ConfigChangeNotifyRequest actual = mapper.readValue(json, ConfigChangeNotifyRequest.class); - assertEquals(actual.getDataId(), DATA_ID); - assertEquals(actual.getGroup(), GROUP); - assertEquals(actual.getTenant(), TENANT); - assertEquals(actual.getModule(), Constants.Config.CONFIG_MODULE); - assertEquals(actual.getHeader(HEADER_KEY), HEADER_VALUE); + assertEquals(DATA_ID, actual.getDataId()); + assertEquals(GROUP, actual.getGroup()); + assertEquals(TENANT, actual.getTenant()); + assertEquals(Constants.Config.CONFIG_MODULE, actual.getModule()); + assertEquals(HEADER_VALUE, actual.getHeader(HEADER_KEY)); } } diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigPublishRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigPublishRequestTest.java index 41e253b60d6..7dc214b7bca 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigPublishRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigPublishRequestTest.java @@ -18,24 +18,24 @@ import com.alibaba.nacos.api.common.Constants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigPublishRequestTest extends BasedConfigRequestTest { - - ConfigPublishRequest configPublishRequest; +class ConfigPublishRequestTest extends BasedConfigRequestTest { private static final String TAG_PARAM = "tag"; private static final String APP_NAME_PARAM = "appName"; + ConfigPublishRequest configPublishRequest; + String requestId; - @Before - public void before() { + @BeforeEach + void before() { configPublishRequest = new ConfigPublishRequest(DATA_ID, GROUP, TENANT, CONTENT); configPublishRequest.putAdditionalParam(TAG_PARAM, TAG_PARAM); configPublishRequest.putAdditionalParam(APP_NAME_PARAM, APP_NAME_PARAM); @@ -64,13 +64,13 @@ public void testDeserialize() throws JsonProcessingException { + "\"tenant\":\"test_tenant\",\"content\":\"content\",\"casMd5\":\"test_MD5\"," + "\"additionMap\":{\"appName\":\"appName\",\"tag\":\"tag\"},\"module\":\"config\"}"; ConfigPublishRequest actual = mapper.readValue(json, ConfigPublishRequest.class); - assertEquals(actual.getDataId(), DATA_ID); - assertEquals(actual.getGroup(), GROUP); - assertEquals(actual.getTenant(), TENANT); - assertEquals(actual.getModule(), Constants.Config.CONFIG_MODULE); - assertEquals(actual.getContent(), CONTENT); - assertEquals(actual.getCasMd5(), MD5); - assertEquals(actual.getAdditionParam(TAG_PARAM), TAG_PARAM); - assertEquals(actual.getAdditionParam(APP_NAME_PARAM), APP_NAME_PARAM); + assertEquals(DATA_ID, actual.getDataId()); + assertEquals(GROUP, actual.getGroup()); + assertEquals(TENANT, actual.getTenant()); + assertEquals(Constants.Config.CONFIG_MODULE, actual.getModule()); + assertEquals(CONTENT, actual.getContent()); + assertEquals(MD5, actual.getCasMd5()); + assertEquals(TAG_PARAM, actual.getAdditionParam(TAG_PARAM)); + assertEquals(APP_NAME_PARAM, actual.getAdditionParam(APP_NAME_PARAM)); } } diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigQueryRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigQueryRequestTest.java index c8350f11939..9fde8a18fd4 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigQueryRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigQueryRequestTest.java @@ -18,16 +18,16 @@ import com.alibaba.nacos.api.common.Constants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigQueryRequestTest extends BasedConfigRequestTest { +class ConfigQueryRequestTest extends BasedConfigRequestTest { ConfigQueryRequest configQueryRequest; @@ -35,8 +35,8 @@ public class ConfigQueryRequestTest extends BasedConfigRequestTest { String requestId; - @Before - public void before() { + @BeforeEach + void before() { headers.put(Constants.Config.NOTIFY_HEADER, Boolean.TRUE.toString()); configQueryRequest = ConfigQueryRequest.build(DATA_ID, GROUP, TENANT); configQueryRequest.putAllHeader(headers); @@ -45,7 +45,7 @@ public void before() { } @Test - public void testIsNotify() { + void testIsNotify() { assertTrue(configQueryRequest.isNotify()); } @@ -67,10 +67,10 @@ public void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{\"notify\":\"true\"},\"dataId\":\"test_data\",\"group\":\"group\"," + "\"tenant\":\"test_tenant\",\"notify\":true,\"module\":\"config\",\"tag\":\"tag\"}"; ConfigQueryRequest actual = mapper.readValue(json, ConfigQueryRequest.class); - assertEquals(actual.getDataId(), DATA_ID); - assertEquals(actual.getGroup(), GROUP); - assertEquals(actual.getTenant(), TENANT); - assertEquals(actual.getTag(), TAG); - assertEquals(actual.getModule(), Constants.Config.CONFIG_MODULE); + assertEquals(DATA_ID, actual.getDataId()); + assertEquals(GROUP, actual.getGroup()); + assertEquals(TENANT, actual.getTenant()); + assertEquals(TAG, actual.getTag()); + assertEquals(Constants.Config.CONFIG_MODULE, actual.getModule()); } } diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigRemoveRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigRemoveRequestTest.java index e5c97ad9f5c..054c5e53860 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigRemoveRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/ConfigRemoveRequestTest.java @@ -18,20 +18,20 @@ import com.alibaba.nacos.api.common.Constants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigRemoveRequestTest extends BasedConfigRequestTest { +class ConfigRemoveRequestTest extends BasedConfigRequestTest { ConfigRemoveRequest configRemoveRequest; String requestId; - @Before - public void before() { + @BeforeEach + void before() { configRemoveRequest = new ConfigRemoveRequest(DATA_ID, GROUP, TENANT, TAG); requestId = injectRequestUuId(configRemoveRequest); @@ -56,10 +56,10 @@ public void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{},\"dataId\":\"test_data\",\"group\":\"group\",\"tenant\":\"test_tenant\"" + ",\"tag\":\"tag\",\"module\":\"config\"}"; ConfigRemoveRequest actual = mapper.readValue(json, ConfigRemoveRequest.class); - assertEquals(actual.getDataId(), DATA_ID); - assertEquals(actual.getGroup(), GROUP); - assertEquals(actual.getTenant(), TENANT); - assertEquals(actual.getModule(), Constants.Config.CONFIG_MODULE); - assertEquals(actual.getTag(), TAG); + assertEquals(DATA_ID, actual.getDataId()); + assertEquals(GROUP, actual.getGroup()); + assertEquals(TENANT, actual.getTenant()); + assertEquals(Constants.Config.CONFIG_MODULE, actual.getModule()); + assertEquals(TAG, actual.getTag()); } } diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/cluster/ConfigChangeClusterSyncRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/cluster/ConfigChangeClusterSyncRequestTest.java index 6145eec4a3d..d1055c18c73 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/request/cluster/ConfigChangeClusterSyncRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/request/cluster/ConfigChangeClusterSyncRequestTest.java @@ -19,20 +19,20 @@ import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.config.remote.request.BasedConfigRequestTest; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigChangeClusterSyncRequestTest extends BasedConfigRequestTest { +class ConfigChangeClusterSyncRequestTest extends BasedConfigRequestTest { ConfigChangeClusterSyncRequest configChangeClusterSyncRequest; String requestId; - @Before - public void before() { + @BeforeEach + void before() { configChangeClusterSyncRequest = new ConfigChangeClusterSyncRequest(); configChangeClusterSyncRequest.setDataId(DATA_ID); configChangeClusterSyncRequest.setGroup(GROUP); @@ -64,15 +64,16 @@ public void testSerialize() throws JsonProcessingException { @Override @Test public void testDeserialize() throws JsonProcessingException { - String json = "{\"headers\":{\"header1\":\"test_header1\"},\"requestId\":\"ece89111-3c42-4055-aca4-c95e16ec564b\",\"dataId\":\"test_data\"," - + "\"group\":\"group\",\"tenant\":\"test_tenant\"," - + "\"tag\":\"tag\",\"lastModified\":0,\"beta\":true,\"module\":\"config\"}"; + String json = + "{\"headers\":{\"header1\":\"test_header1\"},\"requestId\":\"ece89111-3c42-4055-aca4-c95e16ec564b\",\"dataId\":\"test_data\"," + + "\"group\":\"group\",\"tenant\":\"test_tenant\"," + + "\"tag\":\"tag\",\"lastModified\":0,\"beta\":true,\"module\":\"config\"}"; ConfigChangeClusterSyncRequest actual = mapper.readValue(json, ConfigChangeClusterSyncRequest.class); - assertEquals(actual.getDataId(), DATA_ID); - assertEquals(actual.getGroup(), GROUP); - assertEquals(actual.getTenant(), TENANT); - assertEquals(actual.getModule(), Constants.Config.CONFIG_MODULE); - assertEquals(actual.getLastModified(), 0L); + assertEquals(DATA_ID, actual.getDataId()); + assertEquals(GROUP, actual.getGroup()); + assertEquals(TENANT, actual.getTenant()); + assertEquals(Constants.Config.CONFIG_MODULE, actual.getModule()); + assertEquals(0L, actual.getLastModified()); assertTrue(actual.isBeta()); } } diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ClientConfigMetricResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ClientConfigMetricResponseTest.java index 66de71c4369..18b86c08a6d 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ClientConfigMetricResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ClientConfigMetricResponseTest.java @@ -18,14 +18,14 @@ import com.alibaba.nacos.api.remote.response.ResponseCode; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; public class ClientConfigMetricResponseTest extends BasedConfigResponseTest { @@ -33,8 +33,8 @@ public class ClientConfigMetricResponseTest extends BasedConfigResponseTest { Map metric = new HashMap<>(16); - @Before - public void before() { + @BeforeEach + void before() { metric.put("m1", "v1"); clientConfigMetricResponse = new ClientConfigMetricResponse(); clientConfigMetricResponse.setMetrics(metric); diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigChangeBatchListenResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigChangeBatchListenResponseTest.java index 54e068eaefe..de56fb71064 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigChangeBatchListenResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigChangeBatchListenResponseTest.java @@ -18,18 +18,18 @@ import com.alibaba.nacos.api.remote.response.ResponseCode; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigChangeBatchListenResponseTest extends BasedConfigResponseTest { +class ConfigChangeBatchListenResponseTest extends BasedConfigResponseTest { ConfigChangeBatchListenResponse configChangeBatchListenResponse; - @Before - public void before() { + @BeforeEach + void before() { configChangeBatchListenResponse = new ConfigChangeBatchListenResponse(); requestId = injectResponseUuId(configChangeBatchListenResponse); configChangeBatchListenResponse.addChangeConfig(DATA_ID, GROUP, TENANT); @@ -50,8 +50,8 @@ public void testSerializeSuccessResponse() throws JsonProcessingException { @Override @Test public void testSerializeFailResponse() throws JsonProcessingException { - ConfigChangeBatchListenResponse configChangeBatchListenResponse = ConfigChangeBatchListenResponse - .buildFailResponse("Fail"); + ConfigChangeBatchListenResponse configChangeBatchListenResponse = ConfigChangeBatchListenResponse.buildFailResponse( + "Fail"); String json = mapper.writeValueAsString(configChangeBatchListenResponse); assertTrue(json.contains("\"resultCode\":" + ResponseCode.FAIL.getCode())); assertTrue(json.contains("\"errorCode\":0")); diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigChangeNotifyResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigChangeNotifyResponseTest.java index 77c67353938..8c84f2b0d67 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigChangeNotifyResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigChangeNotifyResponseTest.java @@ -18,17 +18,17 @@ import com.alibaba.nacos.api.remote.response.ResponseCode; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; public class ConfigChangeNotifyResponseTest extends BasedConfigResponseTest { ConfigChangeNotifyResponse configChangeNotifyResponse; - @Before - public void before() { + @BeforeEach + void before() { configChangeNotifyResponse = new ConfigChangeNotifyResponse(); requestId = injectResponseUuId(configChangeNotifyResponse); } @@ -41,7 +41,7 @@ public void testSerializeSuccessResponse() throws JsonProcessingException { assertTrue(json.contains("\"requestId\":\"" + requestId)); assertTrue(json.contains("\"resultCode\":" + ResponseCode.SUCCESS.getCode())); assertTrue(json.contains("\"errorCode\":0")); - + } @Override diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigPublishResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigPublishResponseTest.java index 551db99c8bb..4aa69a6d8d0 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigPublishResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigPublishResponseTest.java @@ -18,17 +18,17 @@ import com.alibaba.nacos.api.remote.response.ResponseCode; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigPublishResponseTest extends BasedConfigResponseTest { +class ConfigPublishResponseTest extends BasedConfigResponseTest { ConfigPublishResponse configPublishResponse; - @Before - public void before() { + @BeforeEach + void before() { configPublishResponse = ConfigPublishResponse.buildSuccessResponse(); requestId = injectResponseUuId(configPublishResponse); } diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigQueryResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigQueryResponseTest.java index dae2c1528ad..e0574dc152b 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigQueryResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigQueryResponseTest.java @@ -18,18 +18,18 @@ import com.alibaba.nacos.api.remote.response.ResponseCode; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigQueryResponseTest extends BasedConfigResponseTest { +class ConfigQueryResponseTest extends BasedConfigResponseTest { ConfigQueryResponse configQueryResponse; - @Before - public void before() { + @BeforeEach + void before() { configQueryResponse = ConfigQueryResponse.buildSuccessResponse("success"); configQueryResponse.setContentType("text"); configQueryResponse.setEncryptedDataKey("encryptedKey"); diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigRemoveResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigRemoveResponseTest.java index 68c4f42d467..6b735f41235 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigRemoveResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/ConfigRemoveResponseTest.java @@ -18,17 +18,17 @@ import com.alibaba.nacos.api.remote.response.ResponseCode; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ConfigRemoveResponseTest extends BasedConfigResponseTest { +class ConfigRemoveResponseTest extends BasedConfigResponseTest { ConfigRemoveResponse configRemoveResponse; - @Before - public void before() { + @BeforeEach + void before() { configRemoveResponse = ConfigRemoveResponse.buildSuccessResponse(); requestId = injectResponseUuId(configRemoveResponse); } diff --git a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/cluster/ConfigChangeClusterSyncResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/cluster/ConfigChangeClusterSyncResponseTest.java index 949f404680a..b75054f4102 100644 --- a/api/src/test/java/com/alibaba/nacos/api/config/remote/response/cluster/ConfigChangeClusterSyncResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/config/remote/response/cluster/ConfigChangeClusterSyncResponseTest.java @@ -19,17 +19,17 @@ import com.alibaba.nacos.api.config.remote.response.BasedConfigResponseTest; import com.alibaba.nacos.api.remote.response.ResponseCode; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; public class ConfigChangeClusterSyncResponseTest extends BasedConfigResponseTest { ConfigChangeClusterSyncResponse configChangeClusterSyncResponse; - @Before - public void before() { + @BeforeEach + void before() { configChangeClusterSyncResponse = new ConfigChangeClusterSyncResponse(); requestId = injectResponseUuId(configChangeClusterSyncResponse); } diff --git a/api/src/test/java/com/alibaba/nacos/api/exception/NacosExceptionTest.java b/api/src/test/java/com/alibaba/nacos/api/exception/NacosExceptionTest.java index d70c7b4f373..7d43cf5ee80 100644 --- a/api/src/test/java/com/alibaba/nacos/api/exception/NacosExceptionTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/exception/NacosExceptionTest.java @@ -17,14 +17,14 @@ package com.alibaba.nacos.api.exception; import com.alibaba.nacos.api.common.Constants; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class NacosExceptionTest { +class NacosExceptionTest { @Test - public void testEmptyConstructor() { + void testEmptyConstructor() { NacosException exception = new NacosException(); assertEquals(0, exception.getErrCode()); assertEquals(Constants.NULL, exception.getErrMsg()); @@ -35,7 +35,7 @@ public void testEmptyConstructor() { } @Test - public void testConstructorWithErrMsg() { + void testConstructorWithErrMsg() { NacosException exception = new NacosException(NacosException.SERVER_ERROR, "test"); assertEquals(NacosException.SERVER_ERROR, exception.getErrCode()); assertEquals("test", exception.getErrMsg()); @@ -43,7 +43,7 @@ public void testConstructorWithErrMsg() { } @Test - public void testConstructorWithCause() { + void testConstructorWithCause() { NacosException exception = new NacosException(NacosException.SERVER_ERROR, new RuntimeException("cause test")); assertEquals(NacosException.SERVER_ERROR, exception.getErrCode()); assertEquals("cause test", exception.getErrMsg()); @@ -51,7 +51,7 @@ public void testConstructorWithCause() { } @Test - public void testConstructorWithMultiCauses() { + void testConstructorWithMultiCauses() { NacosException exception = new NacosException(NacosException.SERVER_ERROR, new RuntimeException("cause test", new RuntimeException("multi"))); assertEquals(NacosException.SERVER_ERROR, exception.getErrCode()); @@ -60,7 +60,7 @@ public void testConstructorWithMultiCauses() { } @Test - public void testConstructorWithFull() { + void testConstructorWithFull() { NacosException exception = new NacosException(NacosException.SERVER_ERROR, "test", new RuntimeException("cause test")); assertEquals(NacosException.SERVER_ERROR, exception.getErrCode()); diff --git a/api/src/test/java/com/alibaba/nacos/api/exception/api/NacosApiExceptionTest.java b/api/src/test/java/com/alibaba/nacos/api/exception/api/NacosApiExceptionTest.java index 36e3920fe0b..9be5d98e635 100644 --- a/api/src/test/java/com/alibaba/nacos/api/exception/api/NacosApiExceptionTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/exception/api/NacosApiExceptionTest.java @@ -18,14 +18,14 @@ import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.model.v2.ErrorCode; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class NacosApiExceptionTest { +class NacosApiExceptionTest { @Test - public void testEmptyConstructor() { + void testEmptyConstructor() { NacosApiException exception = new NacosApiException(); assertEquals(0, exception.getErrCode()); assertEquals(0, exception.getDetailErrCode()); @@ -34,7 +34,7 @@ public void testEmptyConstructor() { } @Test - public void testConstructorWithoutCause() { + void testConstructorWithoutCause() { NacosApiException exception = new NacosApiException(500, ErrorCode.SERVER_ERROR, "test"); assertEquals(500, exception.getErrCode()); assertEquals(ErrorCode.SERVER_ERROR.getCode().intValue(), exception.getDetailErrCode()); @@ -43,7 +43,7 @@ public void testConstructorWithoutCause() { } @Test - public void testConstructorWithCause() { + void testConstructorWithCause() { NacosApiException exception = new NacosApiException(500, ErrorCode.SERVER_ERROR, new RuntimeException("cause test"), "test"); assertEquals(500, exception.getErrCode()); diff --git a/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosDeserializationExceptionTest.java b/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosDeserializationExceptionTest.java index 612ba9d7c34..e4922acb524 100644 --- a/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosDeserializationExceptionTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosDeserializationExceptionTest.java @@ -18,17 +18,17 @@ import com.alibaba.nacos.api.common.Constants; import com.fasterxml.jackson.databind.type.SimpleType; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.lang.reflect.Type; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class NacosDeserializationExceptionTest { +class NacosDeserializationExceptionTest { @Test - public void testEmptyConstructor() { + void testEmptyConstructor() { NacosDeserializationException exception = new NacosDeserializationException(); assertEquals(Constants.Exception.DESERIALIZE_ERROR_CODE, exception.getErrCode()); assertNull(exception.getMessage()); @@ -36,7 +36,7 @@ public void testEmptyConstructor() { } @Test - public void testConstructorWithTargetClass() { + void testConstructorWithTargetClass() { NacosDeserializationException exception = new NacosDeserializationException( NacosDeserializationExceptionTest.class); assertEquals(Constants.Exception.DESERIALIZE_ERROR_CODE, exception.getErrCode()); @@ -46,7 +46,7 @@ public void testConstructorWithTargetClass() { } @Test - public void testConstructorWithTargetType() { + void testConstructorWithTargetType() { Type type = SimpleType.constructUnsafe(NacosDeserializationExceptionTest.class); NacosDeserializationException exception = new NacosDeserializationException(type); assertEquals(Constants.Exception.DESERIALIZE_ERROR_CODE, exception.getErrCode()); @@ -57,7 +57,7 @@ public void testConstructorWithTargetType() { } @Test - public void testConstructorWithCause() { + void testConstructorWithCause() { NacosDeserializationException exception = new NacosDeserializationException(new RuntimeException("test")); assertEquals(Constants.Exception.DESERIALIZE_ERROR_CODE, exception.getErrCode()); assertEquals("errCode: 101, errMsg: Nacos deserialize failed. ", exception.getMessage()); @@ -65,7 +65,7 @@ public void testConstructorWithCause() { } @Test - public void testConstructorWithTargetClassAndCause() { + void testConstructorWithTargetClassAndCause() { NacosDeserializationException exception = new NacosDeserializationException( NacosDeserializationExceptionTest.class, new RuntimeException("test")); assertEquals(Constants.Exception.DESERIALIZE_ERROR_CODE, exception.getErrCode()); @@ -75,7 +75,7 @@ public void testConstructorWithTargetClassAndCause() { } @Test - public void testConstructorWithTargetTypeAndCause() { + void testConstructorWithTargetTypeAndCause() { Type type = SimpleType.constructUnsafe(NacosDeserializationExceptionTest.class); NacosDeserializationException exception = new NacosDeserializationException(type, new RuntimeException("test")); assertEquals(Constants.Exception.DESERIALIZE_ERROR_CODE, exception.getErrCode()); diff --git a/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosLoadExceptionTest.java b/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosLoadExceptionTest.java index 3311852e980..3be1a4964ea 100644 --- a/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosLoadExceptionTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosLoadExceptionTest.java @@ -16,15 +16,15 @@ package com.alibaba.nacos.api.exception.runtime; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class NacosLoadExceptionTest { +class NacosLoadExceptionTest { @Test - public void testConstructor() { + void testConstructor() { NacosLoadException exception = new NacosLoadException("test"); assertEquals("test", exception.getMessage()); assertNull(exception.getCause()); diff --git a/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosRuntimeExceptionTest.java b/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosRuntimeExceptionTest.java index 5ea20081a2b..8e534811336 100644 --- a/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosRuntimeExceptionTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosRuntimeExceptionTest.java @@ -17,16 +17,16 @@ package com.alibaba.nacos.api.exception.runtime; import com.alibaba.nacos.api.exception.NacosException; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class NacosRuntimeExceptionTest { +class NacosRuntimeExceptionTest { @Test - public void testConstructorWithErrorCode() { + void testConstructorWithErrorCode() { NacosRuntimeException exception = new NacosRuntimeException(NacosException.INVALID_PARAM); assertEquals(NacosException.INVALID_PARAM, exception.getErrCode()); assertNull(exception.getMessage()); @@ -34,7 +34,7 @@ public void testConstructorWithErrorCode() { } @Test - public void testConstructorWithErrorCodeAndMsg() { + void testConstructorWithErrorCodeAndMsg() { NacosRuntimeException exception = new NacosRuntimeException(NacosException.INVALID_PARAM, "test"); assertEquals(NacosException.INVALID_PARAM, exception.getErrCode()); assertEquals("errCode: 400, errMsg: test ", exception.getMessage()); @@ -42,7 +42,7 @@ public void testConstructorWithErrorCodeAndMsg() { } @Test - public void testConstructorWithErrorCodeAndCause() { + void testConstructorWithErrorCodeAndCause() { NacosRuntimeException exception = new NacosRuntimeException(NacosException.INVALID_PARAM, new RuntimeException("test")); assertEquals(NacosException.INVALID_PARAM, exception.getErrCode()); @@ -51,9 +51,9 @@ public void testConstructorWithErrorCodeAndCause() { } @Test - public void testConstructorWithFull() { - NacosRuntimeException exception = new NacosRuntimeException(NacosException.INVALID_PARAM, - "test", new RuntimeException("cause test")); + void testConstructorWithFull() { + NacosRuntimeException exception = new NacosRuntimeException(NacosException.INVALID_PARAM, "test", + new RuntimeException("cause test")); assertEquals(NacosException.INVALID_PARAM, exception.getErrCode()); assertEquals("errCode: 400, errMsg: test ", exception.getMessage()); assertTrue(exception.getCause() instanceof RuntimeException); diff --git a/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosSerializationExceptionTest.java b/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosSerializationExceptionTest.java index da4b0e6793d..fd7b2850a0e 100644 --- a/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosSerializationExceptionTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/exception/runtime/NacosSerializationExceptionTest.java @@ -17,15 +17,15 @@ package com.alibaba.nacos.api.exception.runtime; import com.alibaba.nacos.api.common.Constants; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class NacosSerializationExceptionTest { +class NacosSerializationExceptionTest { @Test - public void testEmptyConstructor() { + void testEmptyConstructor() { NacosSerializationException exception = new NacosSerializationException(); assertEquals(Constants.Exception.SERIALIZE_ERROR_CODE, exception.getErrCode()); assertNull(exception.getMessage()); @@ -33,7 +33,7 @@ public void testEmptyConstructor() { } @Test - public void testConstructorWithSerializedClass() { + void testConstructorWithSerializedClass() { NacosSerializationException exception = new NacosSerializationException(NacosSerializationExceptionTest.class); assertEquals(Constants.Exception.SERIALIZE_ERROR_CODE, exception.getErrCode()); assertEquals(String.format("errCode: 100, errMsg: Nacos serialize for class [%s] failed. ", @@ -42,7 +42,7 @@ public void testConstructorWithSerializedClass() { } @Test - public void testConstructorWithCause() { + void testConstructorWithCause() { NacosSerializationException exception = new NacosSerializationException(new RuntimeException("test")); assertEquals(Constants.Exception.SERIALIZE_ERROR_CODE, exception.getErrCode()); assertEquals("errCode: 100, errMsg: Nacos serialize failed. ", exception.getMessage()); @@ -50,7 +50,7 @@ public void testConstructorWithCause() { } @Test - public void testConstructorWithSerializedClassAndCause() { + void testConstructorWithSerializedClassAndCause() { NacosSerializationException exception = new NacosSerializationException(NacosSerializationExceptionTest.class, new RuntimeException("test")); assertEquals(Constants.Exception.SERIALIZE_ERROR_CODE, exception.getErrCode()); diff --git a/api/src/test/java/com/alibaba/nacos/api/model/v2/ErrorCodeTest.java b/api/src/test/java/com/alibaba/nacos/api/model/v2/ErrorCodeTest.java index 3c61881135f..737c7a451cb 100644 --- a/api/src/test/java/com/alibaba/nacos/api/model/v2/ErrorCodeTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/model/v2/ErrorCodeTest.java @@ -16,16 +16,17 @@ package com.alibaba.nacos.api.model.v2; -import static org.junit.Assert.assertEquals; +import org.junit.jupiter.api.Test; import java.util.HashSet; import java.util.Set; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class ErrorCodeTest { +class ErrorCodeTest { + @Test - public void testCodeNotSame() { + void testCodeNotSame() { Class errorCodeClass = ErrorCode.class; ErrorCode[] errorCodes = errorCodeClass.getEnumConstants(); diff --git a/api/src/test/java/com/alibaba/nacos/api/model/v2/ResultTest.java b/api/src/test/java/com/alibaba/nacos/api/model/v2/ResultTest.java index a67203eb1f6..18444cdf027 100644 --- a/api/src/test/java/com/alibaba/nacos/api/model/v2/ResultTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/model/v2/ResultTest.java @@ -16,15 +16,15 @@ package com.alibaba.nacos.api.model.v2; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class ResultTest { +class ResultTest { @Test - public void testSuccessEmptyResult() { + void testSuccessEmptyResult() { Result result = Result.success(); assertNull(result.getData()); assertEquals(ErrorCode.SUCCESS.getCode(), result.getCode()); @@ -32,7 +32,7 @@ public void testSuccessEmptyResult() { } @Test - public void testSuccessWithData() { + void testSuccessWithData() { Result result = Result.success("test"); assertEquals("test", result.getData()); assertEquals(ErrorCode.SUCCESS.getCode(), result.getCode()); @@ -40,7 +40,7 @@ public void testSuccessWithData() { } @Test - public void testFailureMessageResult() { + void testFailureMessageResult() { Result result = Result.failure("test"); assertNull(result.getData()); assertEquals(ErrorCode.SERVER_ERROR.getCode(), result.getCode()); @@ -48,7 +48,7 @@ public void testFailureMessageResult() { } @Test - public void testFailureWithoutData() { + void testFailureWithoutData() { Result result = Result.failure(ErrorCode.DATA_ACCESS_ERROR); assertNull(result.getData()); assertEquals(ErrorCode.DATA_ACCESS_ERROR.getCode(), result.getCode()); @@ -56,7 +56,7 @@ public void testFailureWithoutData() { } @Test - public void testFailureWithData() { + void testFailureWithData() { Result result = Result.failure(ErrorCode.DATA_ACCESS_ERROR, "error"); assertEquals("error", result.getData()); assertEquals(ErrorCode.DATA_ACCESS_ERROR.getCode(), result.getCode()); @@ -64,7 +64,7 @@ public void testFailureWithData() { } @Test - public void testToString() { + void testToString() { Result result = Result.success("test"); assertEquals("Result{errorCode=0, message='success', data=test}", result.toString()); } diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/ability/ClientNamingAbilityTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/ability/ClientNamingAbilityTest.java index 4dd6dd79c0c..1a3b971aa81 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/ability/ClientNamingAbilityTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/ability/ClientNamingAbilityTest.java @@ -16,15 +16,15 @@ package com.alibaba.nacos.api.naming.ability; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ClientNamingAbilityTest { +class ClientNamingAbilityTest { @Test - public void testGetAndSet() { + void testGetAndSet() { ClientNamingAbility ability = new ClientNamingAbility(); assertFalse(ability.isSupportDeltaPush()); assertFalse(ability.isSupportRemoteMetric()); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/ability/ServerNamingAbilityTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/ability/ServerNamingAbilityTest.java index 978b41f9988..4221972e3d6 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/ability/ServerNamingAbilityTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/ability/ServerNamingAbilityTest.java @@ -20,34 +20,33 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; -public class ServerNamingAbilityTest { +class ServerNamingAbilityTest { private static ObjectMapper jacksonMapper; - @BeforeClass - public static void setUpClass() throws Exception { + @BeforeAll + static void setUpClass() throws Exception { jacksonMapper = new ObjectMapper(); jacksonMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); jacksonMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testDeserializeServerNamingAbilityForNonExistItem() throws JsonProcessingException { + void testDeserializeServerNamingAbilityForNonExistItem() throws JsonProcessingException { String nonExistItemJson = "{\"exampleAbility\":false}"; ServerNamingAbility actual = jacksonMapper.readValue(nonExistItemJson, ServerNamingAbility.class); assertFalse(actual.isSupportJraft()); } @Test - public void testEquals() throws JsonProcessingException { + void testEquals() throws JsonProcessingException { ServerNamingAbility expected = new ServerNamingAbility(); expected.setSupportJraft(true); String serializeJson = jacksonMapper.writeValueAsString(expected); @@ -60,19 +59,19 @@ public void testEquals() throws JsonProcessingException { } @Test - public void testEqualsForOneObject() { + void testEqualsForOneObject() { ServerNamingAbility ability = new ServerNamingAbility(); - assertTrue(ability.equals(ability)); + assertEquals(ability, ability); } @Test - public void testEqualsForOtherAbility() { + void testEqualsForOtherAbility() { ServerNamingAbility ability = new ServerNamingAbility(); - assertFalse(ability.equals(new ClientNamingAbility())); + assertNotEquals(ability, new ClientNamingAbility()); } @Test - public void testHashCode() throws JsonProcessingException { + void testHashCode() throws JsonProcessingException { ServerNamingAbility expected = new ServerNamingAbility(); expected.setSupportJraft(true); String serializeJson = jacksonMapper.writeValueAsString(expected); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/listener/NamingEventTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/listener/NamingEventTest.java index c2a6076ff72..e918533e5f8 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/listener/NamingEventTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/listener/NamingEventTest.java @@ -16,26 +16,26 @@ package com.alibaba.nacos.api.naming.listener; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class NamingEventTest { +class NamingEventTest { private MockNamingEventListener eventListener; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { eventListener = new MockNamingEventListener(); } @Test - public void testNamingEventWithSimpleConstructor() { + void testNamingEventWithSimpleConstructor() { NamingEvent event = new NamingEvent("serviceName", Collections.EMPTY_LIST); assertEquals("serviceName", event.getServiceName()); assertNull(event.getGroupName()); @@ -49,7 +49,7 @@ public void testNamingEventWithSimpleConstructor() { } @Test - public void testNamingEventWithFullConstructor() { + void testNamingEventWithFullConstructor() { NamingEvent event = new NamingEvent("serviceName", "group", "clusters", Collections.EMPTY_LIST); assertEquals("serviceName", event.getServiceName()); assertEquals("group", event.getGroupName()); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ClusterTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ClusterTest.java index 6cc8a204eeb..69910bd2806 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ClusterTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ClusterTest.java @@ -22,29 +22,29 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ClusterTest { +class ClusterTest { private static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSetAndGet() { + void testSetAndGet() { Cluster actual = new Cluster(); assertNull(actual.getName()); assertNull(actual.getServiceName()); @@ -72,7 +72,7 @@ public void testSetAndGet() { } @Test - public void testJsonSerialize() throws JsonProcessingException { + void testJsonSerialize() throws JsonProcessingException { Cluster actual = new Cluster("cluster"); actual.setServiceName("group@@service"); actual.setHealthChecker(new Http()); @@ -91,7 +91,7 @@ public void testJsonSerialize() throws JsonProcessingException { } @Test - public void testJsonDeserialize() throws JsonProcessingException { + void testJsonDeserialize() throws JsonProcessingException { String json = "{\"serviceName\":\"group@@service\",\"name\":\"cluster\"," + "\"healthChecker\":{\"type\":\"HTTP\",\"path\":\"\",\"headers\":\"\",\"expectedResponseCode\":200}," + "\"defaultPort\":81,\"defaultCheckPort\":82,\"useIPPort4Check\":false,\"metadata\":{\"a\":\"a\"}}"; diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/InstanceTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/InstanceTest.java index 441db368754..07726d07840 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/InstanceTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/InstanceTest.java @@ -22,30 +22,31 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.HashMap; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class InstanceTest { +class InstanceTest { private static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSetAndGet() { + void testSetAndGet() { Instance instance = new Instance(); assertNull(instance.getInstanceId()); assertNull(instance.getIp()); @@ -62,7 +63,7 @@ public void testSetAndGet() { } @Test - public void testJsonSerialize() throws JsonProcessingException { + void testJsonSerialize() throws JsonProcessingException { Instance instance = new Instance(); setInstance(instance); String actual = mapper.writeValueAsString(instance); @@ -82,7 +83,7 @@ public void testJsonSerialize() throws JsonProcessingException { } @Test - public void testJsonDeserialize() throws JsonProcessingException { + void testJsonDeserialize() throws JsonProcessingException { String json = "{\"instanceId\":\"id\",\"ip\":\"1.1.1.1\",\"port\":1000,\"weight\":100.0,\"healthy\":false," + "\"enabled\":false,\"ephemeral\":false,\"clusterName\":\"cluster\"," + "\"serviceName\":\"group@@serviceName\",\"metadata\":{\"a\":\"b\"},\"instanceHeartBeatInterval\":5000," @@ -92,21 +93,21 @@ public void testJsonDeserialize() throws JsonProcessingException { } @Test - public void testCheckClusterNameFormat() { + void testCheckClusterNameFormat() { Instance instance = new Instance(); instance.setClusterName("demo"); assertEquals("demo", instance.getClusterName()); } @Test - public void testToInetAddr() { + void testToInetAddr() { Instance instance = new Instance(); setInstance(instance); assertEquals("1.1.1.1:1000", instance.toInetAddr()); } @Test - public void testContainsMetadata() { + void testContainsMetadata() { Instance instance = new Instance(); assertFalse(instance.containsMetadata("a")); instance.setMetadata(null); @@ -116,7 +117,7 @@ public void testContainsMetadata() { } @Test - public void testGetInstanceIdGenerator() { + void testGetInstanceIdGenerator() { Instance instance = new Instance(); assertEquals(Constants.DEFAULT_INSTANCE_ID_GENERATOR, instance.getInstanceIdGenerator()); instance.addMetadata(PreservedMetadataKeys.INSTANCE_ID_GENERATOR, "test"); @@ -124,19 +125,19 @@ public void testGetInstanceIdGenerator() { } @Test - public void testEquals() { + void testEquals() { Instance actual = new Instance(); setInstance(actual); actual.setMetadata(new HashMap<>()); actual.addMetadata("a", "b"); - assertFalse(actual.equals(new Object())); + assertNotEquals(actual, new Object()); Instance expected = new Instance(); setInstance(expected); expected.setMetadata(new HashMap<>()); expected.addMetadata("a", "b"); - assertTrue(actual.equals(expected)); + assertEquals(actual, expected); expected.addMetadata("a", "c"); - assertFalse(actual.equals(expected)); + assertNotEquals(actual, expected); } private void setInstance(Instance instance) { diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ListViewTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ListViewTest.java index 562bb71cd87..a4a6b574f27 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ListViewTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ListViewTest.java @@ -16,19 +16,19 @@ package com.alibaba.nacos.api.naming.pojo; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.LinkedList; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class ListViewTest { +class ListViewTest { @Test - public void testToString() { + void testToString() { List data = new LinkedList<>(); data.add("1"); data.add("2"); @@ -41,7 +41,7 @@ public void testToString() { } @Test - public void testSetAndGet() { + void testSetAndGet() { ListView listView = new ListView<>(); assertEquals(0, listView.getCount()); assertNull(listView.getData()); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ServiceInfoTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ServiceInfoTest.java index 271431800eb..4ff58f9382c 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ServiceInfoTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ServiceInfoTest.java @@ -20,8 +20,8 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -30,25 +30,26 @@ import java.util.LinkedList; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServiceInfoTest { +class ServiceInfoTest { private ObjectMapper mapper; private ServiceInfo serviceInfo; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); serviceInfo = new ServiceInfo("G@@testName", "testClusters"); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { String actual = mapper.writeValueAsString(serviceInfo); assertTrue(actual.contains("\"name\":\"G@@testName\"")); assertTrue(actual.contains("\"clusters\":\"testClusters\"")); @@ -64,7 +65,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws IOException { + void testDeserialize() throws IOException { String example = "{\"name\":\"G@@testName\",\"clusters\":\"testClusters\",\"cacheMillis\":1000,\"hosts\":[]," + "\"lastRefTime\":0,\"checksum\":\"\",\"allIPs\":false,\"valid\":true,\"groupName\":\"\"}"; ServiceInfo actual = mapper.readValue(example, ServiceInfo.class); @@ -82,14 +83,14 @@ public void testDeserialize() throws IOException { } @Test - public void testGetKey() { + void testGetKey() { String key = serviceInfo.getKey(); assertEquals("G@@testName@@testClusters", key); assertEquals("G@@testName@@testClusters", serviceInfo.toString()); } @Test - public void testGetKeyEncode() { + void testGetKeyEncode() { String key = serviceInfo.getKeyEncoded(); String encodeName = null; try { @@ -101,7 +102,7 @@ public void testGetKeyEncode() { } @Test - public void testServiceInfoConstructor() { + void testServiceInfoConstructor() { String key1 = "group@@name"; String key2 = "group@@name@@c2"; ServiceInfo s1 = new ServiceInfo(key1); @@ -110,32 +111,34 @@ public void testServiceInfoConstructor() { assertEquals(key2, s2.getKey()); } - @Test(expected = IllegalArgumentException.class) - public void testServiceInfoConstructorWithError() { - String key1 = "name"; - ServiceInfo s1 = new ServiceInfo(key1); + @Test + void testServiceInfoConstructorWithError() { + assertThrows(IllegalArgumentException.class, () -> { + String key1 = "name"; + ServiceInfo s1 = new ServiceInfo(key1); + }); } @Test - public void testValidateForAllIps() { + void testValidateForAllIps() { serviceInfo.setAllIPs(true); assertTrue(serviceInfo.validate()); } @Test - public void testValidateForNullHosts() { + void testValidateForNullHosts() { serviceInfo.setHosts(null); assertFalse(serviceInfo.validate()); } @Test - public void testValidateForEmptyHosts() { + void testValidateForEmptyHosts() { serviceInfo.setHosts(Collections.EMPTY_LIST); assertFalse(serviceInfo.validate()); } @Test - public void testValidateForUnhealthyHosts() { + void testValidateForUnhealthyHosts() { Instance instance = new Instance(); instance.setHealthy(false); serviceInfo.addHost(instance); @@ -143,7 +146,7 @@ public void testValidateForUnhealthyHosts() { } @Test - public void testValidateForBothUnhealthyAndHealthyHosts() { + void testValidateForBothUnhealthyAndHealthyHosts() { List instanceList = new LinkedList<>(); Instance instance = new Instance(); instanceList.add(instance); @@ -155,7 +158,7 @@ public void testValidateForBothUnhealthyAndHealthyHosts() { } @Test - public void testFromKey() { + void testFromKey() { String key1 = "group@@name"; String key2 = "group@@name@@c2"; ServiceInfo s1 = ServiceInfo.fromKey(key1); @@ -165,7 +168,7 @@ public void testFromKey() { } @Test - public void testSetAndGet() throws JsonProcessingException { + void testSetAndGet() throws JsonProcessingException { serviceInfo.setReachProtectionThreshold(true); serviceInfo.setJsonFromServer(mapper.writeValueAsString(serviceInfo)); ServiceInfo actual = mapper.readValue(serviceInfo.getJsonFromServer(), ServiceInfo.class); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ServiceTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ServiceTest.java index 518b57ea01e..d13eea441a1 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ServiceTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/ServiceTest.java @@ -16,19 +16,19 @@ package com.alibaba.nacos.api.naming.pojo; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.HashMap; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServiceTest { +class ServiceTest { @Test - public void testSetAndGet() { + void testSetAndGet() { Service service = new Service(); assertNull(service.getName()); assertNull(service.getAppName()); @@ -51,12 +51,13 @@ public void testSetAndGet() { } @Test - public void testToString() { + void testToString() { Service service = new Service("service"); service.setGroupName("group"); service.setAppName("app"); service.setProtectThreshold(1.0f); service.setMetadata(Collections.singletonMap("a", "b")); - assertEquals("Service{name='service', protectThreshold=1.0, appName='app', groupName='group', metadata={a=b}}", service.toString()); + assertEquals("Service{name='service', protectThreshold=1.0, appName='app', groupName='group', metadata={a=b}}", + service.toString()); } } \ No newline at end of file diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/builder/InstanceBuilderTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/builder/InstanceBuilderTest.java index c53985927f2..574db46c34f 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/builder/InstanceBuilderTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/builder/InstanceBuilderTest.java @@ -17,18 +17,18 @@ package com.alibaba.nacos.api.naming.pojo.builder; import com.alibaba.nacos.api.naming.pojo.Instance; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class InstanceBuilderTest { +class InstanceBuilderTest { private static final String SERVICE_NAME = "testService"; @@ -53,7 +53,7 @@ public class InstanceBuilderTest { private static final String META_VALUE = "value"; @Test - public void testBuildFullInstance() { + void testBuildFullInstance() { InstanceBuilder builder = InstanceBuilder.newBuilder(); Instance actual = builder.setServiceName(SERVICE_NAME).setClusterName(CLUSTER_NAME).setInstanceId(INSTANCE_ID) .setIp(IP).setPort(PORT).setWeight(WEIGHT).setHealthy(HEALTHY).setEnabled(ENABLED) @@ -72,7 +72,7 @@ public void testBuildFullInstance() { } @Test - public void testBuildInstanceWithoutNewMetadata() { + void testBuildInstanceWithoutNewMetadata() { InstanceBuilder builder = InstanceBuilder.newBuilder(); Map metadata = new HashMap<>(); metadata.put("test", "test"); @@ -90,7 +90,7 @@ public void testBuildInstanceWithoutNewMetadata() { } @Test - public void testBuildEmptyInstance() { + void testBuildEmptyInstance() { InstanceBuilder builder = InstanceBuilder.newBuilder(); Instance actual = builder.build(); assertNull(actual.getServiceName()); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/AbstractHealthCheckerTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/AbstractHealthCheckerTest.java index 1ba45355fc2..22f9cd4cfce 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/AbstractHealthCheckerTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/AbstractHealthCheckerTest.java @@ -20,26 +20,26 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.jsontype.NamedType; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.io.IOException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class AbstractHealthCheckerTest { +class AbstractHealthCheckerTest { private final ObjectMapper objectMapper = new ObjectMapper(); - @Before - public void setUp() { + @BeforeEach + void setUp() { objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); objectMapper.registerSubtypes(new NamedType(TestChecker.class, TestChecker.TYPE)); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { TestChecker testChecker = new TestChecker(); testChecker.setTestValue(""); String actual = objectMapper.writeValueAsString(testChecker); @@ -48,7 +48,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws IOException { + void testDeserialize() throws IOException { String testChecker = "{\"type\":\"TEST\",\"testValue\":\"\"}"; TestChecker actual = objectMapper.readValue(testChecker, TestChecker.class); assertEquals("", actual.getTestValue()); @@ -56,7 +56,7 @@ public void testDeserialize() throws IOException { } @Test - public void testClone() throws CloneNotSupportedException { + void testClone() throws CloneNotSupportedException { AbstractHealthChecker none = new AbstractHealthChecker.None().clone(); assertEquals(AbstractHealthChecker.None.class, none.getClass()); } diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/HealthCheckTypeTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/HealthCheckTypeTest.java index b5e8e5237b7..cd75c7edd0f 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/HealthCheckTypeTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/HealthCheckTypeTest.java @@ -19,17 +19,17 @@ import com.alibaba.nacos.api.naming.pojo.healthcheck.impl.Http; import com.alibaba.nacos.api.naming.pojo.healthcheck.impl.Mysql; import com.alibaba.nacos.api.naming.pojo.healthcheck.impl.Tcp; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -public class HealthCheckTypeTest { +class HealthCheckTypeTest { @Test - public void testOfHealthCheckerClassForBuildInType() { + void testOfHealthCheckerClassForBuildInType() { assertEquals(Tcp.class, HealthCheckType.ofHealthCheckerClass("TCP")); assertEquals(Http.class, HealthCheckType.ofHealthCheckerClass("HTTP")); assertEquals(Mysql.class, HealthCheckType.ofHealthCheckerClass("MYSQL")); @@ -37,18 +37,18 @@ public void testOfHealthCheckerClassForBuildInType() { } @Test - public void testOfHealthCheckerClassForExtendType() { + void testOfHealthCheckerClassForExtendType() { HealthCheckType.registerHealthChecker(TestChecker.TYPE, TestChecker.class); assertEquals(TestChecker.class, HealthCheckType.ofHealthCheckerClass(TestChecker.TYPE)); } @Test - public void testOfHealthCheckerClassForNonExistType() { + void testOfHealthCheckerClassForNonExistType() { assertNull(HealthCheckType.ofHealthCheckerClass("non-exist")); } @Test - public void testGetLoadedHealthCheckerClasses() { + void testGetLoadedHealthCheckerClasses() { HealthCheckType.registerHealthChecker(TestChecker.TYPE, TestChecker.class); List> actual = HealthCheckType.getLoadedHealthCheckerClasses(); assertEquals(5, actual.size()); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/HealthCheckerFactoryTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/HealthCheckerFactoryTest.java index 9e60f4842f4..340b16f7265 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/HealthCheckerFactoryTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/HealthCheckerFactoryTest.java @@ -19,75 +19,80 @@ import com.alibaba.nacos.api.exception.runtime.NacosDeserializationException; import com.alibaba.nacos.api.exception.runtime.NacosSerializationException; import com.alibaba.nacos.api.naming.pojo.healthcheck.impl.Tcp; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class HealthCheckerFactoryTest { +class HealthCheckerFactoryTest { - @BeforeClass - public static void beforeClass() { + @BeforeAll + static void beforeClass() { HealthCheckerFactory.registerSubType(new TestChecker()); } @Test - public void testSerialize() { + void testSerialize() { Tcp tcp = new Tcp(); String actual = HealthCheckerFactory.serialize(tcp); assertTrue(actual.contains("\"type\":\"TCP\"")); } @Test - public void testSerializeExtend() { + void testSerializeExtend() { TestChecker testChecker = new TestChecker(); String actual = HealthCheckerFactory.serialize(testChecker); assertTrue(actual.contains("\"type\":\"TEST\"")); } @Test - public void testDeserialize() { + void testDeserialize() { String tcpString = "{\"type\":\"TCP\"}"; AbstractHealthChecker actual = HealthCheckerFactory.deserialize(tcpString); assertEquals(Tcp.class, actual.getClass()); } @Test - public void testDeserializeExtend() { + void testDeserializeExtend() { String tcpString = "{\"type\":\"TEST\",\"testValue\":null}"; AbstractHealthChecker actual = HealthCheckerFactory.deserialize(tcpString); assertEquals(TestChecker.class, actual.getClass()); } @Test - public void testSerializeNoRegister() { + void testSerializeNoRegister() { NoRegisterHealthChecker noRegister = new NoRegisterHealthChecker(); assertFalse(HealthCheckerFactory.serialize(noRegister).contains("no register")); } @Test - public void testDeserializeNoRegister() { + void testDeserializeNoRegister() { String tcpString = "{\"type\":\"no register\",\"testValue\":null}"; AbstractHealthChecker actual = HealthCheckerFactory.deserialize(tcpString); assertEquals(AbstractHealthChecker.None.class, actual.getClass()); } - @Test(expected = NacosSerializationException.class) - public void testSerializeFailure() { - SelfDependHealthChecker selfDependHealthChecker = new SelfDependHealthChecker(); - System.out.println(HealthCheckerFactory.serialize(selfDependHealthChecker)); + @Test + void testSerializeFailure() { + assertThrows(NacosSerializationException.class, () -> { + SelfDependHealthChecker selfDependHealthChecker = new SelfDependHealthChecker(); + System.out.println(HealthCheckerFactory.serialize(selfDependHealthChecker)); + }); } - @Test(expected = NacosDeserializationException.class) - public void testDeserializeFailure() { - String errorString = "{\"type\"=\"TCP\"}"; - System.out.println(HealthCheckerFactory.deserialize(errorString)); + @Test + void testDeserializeFailure() { + assertThrows(NacosDeserializationException.class, () -> { + String errorString = "{\"type\"=\"TCP\"}"; + System.out.println(HealthCheckerFactory.deserialize(errorString)); + }); } @Test - public void testCreateNoneHealthChecker() { + void testCreateNoneHealthChecker() { assertEquals(AbstractHealthChecker.None.class, HealthCheckerFactory.createNoneHealthChecker().getClass()); } diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/TestChecker.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/TestChecker.java index 4d2e8c0a278..f570245d0c3 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/TestChecker.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/TestChecker.java @@ -28,6 +28,10 @@ public class TestChecker extends AbstractHealthChecker { private String testValue; + public TestChecker() { + super(TYPE); + } + public String getTestValue() { return testValue; } @@ -36,10 +40,6 @@ public void setTestValue(String testValue) { this.testValue = testValue; } - public TestChecker() { - super(TYPE); - } - @Override public AbstractHealthChecker clone() throws CloneNotSupportedException { return null; diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/HttpTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/HttpTest.java index f23918d30f0..5c93e83544b 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/HttpTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/HttpTest.java @@ -18,36 +18,37 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class HttpTest { +class HttpTest { private ObjectMapper objectMapper; private Http http; - @Before - public void setUp() { + @BeforeEach + void setUp() { objectMapper = new ObjectMapper(); http = new Http(); } @Test - public void testGetExpectedResponseCodeWithEmpty() { + void testGetExpectedResponseCodeWithEmpty() { http.setHeaders(""); assertTrue(http.getCustomHeaders().isEmpty()); } @Test - public void testGetExpectedResponseCodeWithoutEmpty() { + void testGetExpectedResponseCodeWithoutEmpty() { http.setHeaders("x:a|y:"); Map actual = http.getCustomHeaders(); assertFalse(actual.isEmpty()); @@ -56,7 +57,7 @@ public void testGetExpectedResponseCodeWithoutEmpty() { } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { http.setHeaders("x:a|y:"); http.setPath("/x"); String actual = objectMapper.writeValueAsString(http); @@ -67,7 +68,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws IOException { + void testDeserialize() throws IOException { String testChecker = "{\"type\":\"HTTP\",\"path\":\"/x\",\"headers\":\"x:a|y:\",\"expectedResponseCode\":200}"; Http actual = objectMapper.readValue(testChecker, Http.class); assertEquals("x:a|y:", actual.getHeaders()); @@ -78,23 +79,23 @@ public void testDeserialize() throws IOException { } @Test - public void testClone() throws CloneNotSupportedException { + void testClone() throws CloneNotSupportedException { Http cloned = http.clone(); assertEquals(http.hashCode(), cloned.hashCode()); - assertTrue(http.equals(cloned)); + assertEquals(http, cloned); } @Test - public void testNotEquals() throws CloneNotSupportedException { - assertFalse(http.equals(new Tcp())); + void testNotEquals() throws CloneNotSupportedException { + assertNotEquals(http, new Tcp()); Http cloned = http.clone(); cloned.setPath("aaa"); - assertFalse(http.equals(cloned)); + assertNotEquals(http, cloned); cloned = http.clone(); cloned.setHeaders("aaa"); - assertFalse(http.equals(cloned)); + assertNotEquals(http, cloned); cloned = http.clone(); cloned.setExpectedResponseCode(500); - assertFalse(http.equals(cloned)); + assertNotEquals(http, cloned); } } diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/MysqlTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/MysqlTest.java index 7dfd6ad92d5..3e11d888590 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/MysqlTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/MysqlTest.java @@ -18,23 +18,23 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.io.IOException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class MysqlTest { +class MysqlTest { private ObjectMapper objectMapper; private Mysql mysql; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mysql = new Mysql(); mysql.setUser("user"); mysql.setPwd("pwd"); @@ -43,7 +43,7 @@ public void setUp() throws Exception { } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { String actual = objectMapper.writeValueAsString(mysql); assertTrue(actual.contains("\"user\":\"user\"")); assertTrue(actual.contains("\"type\":\"MYSQL\"")); @@ -52,7 +52,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws IOException { + void testDeserialize() throws IOException { String testChecker = "{\"type\":\"MYSQL\",\"user\":\"user\",\"pwd\":\"pwd\",\"cmd\":\"cmd\"}"; Mysql actual = objectMapper.readValue(testChecker, Mysql.class); assertEquals("cmd", actual.getCmd()); @@ -62,23 +62,23 @@ public void testDeserialize() throws IOException { } @Test - public void testClone() throws CloneNotSupportedException { + void testClone() throws CloneNotSupportedException { Mysql cloned = mysql.clone(); assertEquals(mysql.hashCode(), cloned.hashCode()); - assertTrue(mysql.equals(cloned)); + assertEquals(mysql, cloned); } @Test - public void testNotEquals() throws CloneNotSupportedException { - assertFalse(mysql.equals(new Tcp())); + void testNotEquals() throws CloneNotSupportedException { + assertNotEquals(mysql, new Tcp()); Mysql cloned = mysql.clone(); cloned.setUser("aaa"); - assertFalse(mysql.equals(cloned)); + assertNotEquals(mysql, cloned); cloned = mysql.clone(); cloned.setPwd("aaa"); - assertFalse(mysql.equals(cloned)); + assertNotEquals(mysql, cloned); cloned = mysql.clone(); cloned.setCmd("aaa"); - assertFalse(mysql.equals(cloned)); + assertNotEquals(mysql, cloned); } } diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/TcpTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/TcpTest.java index d1c57bc4c79..5d02ef946b3 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/TcpTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/pojo/healthcheck/impl/TcpTest.java @@ -16,18 +16,17 @@ package com.alibaba.nacos.api.naming.pojo.healthcheck.impl; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class TcpTest { +class TcpTest { @Test - public void testClone() throws CloneNotSupportedException { + void testClone() throws CloneNotSupportedException { Tcp original = new Tcp(); Tcp cloned = original.clone(); assertEquals(original.hashCode(), cloned.hashCode()); - assertTrue(original.equals(cloned)); + assertEquals(original, cloned); } } \ No newline at end of file diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/BasedNamingRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/BasedNamingRequestTest.java index 435b44611a9..3804dc173f5 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/BasedNamingRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/BasedNamingRequestTest.java @@ -19,11 +19,11 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; +import org.junit.jupiter.api.BeforeAll; import static com.alibaba.nacos.api.common.Constants.Naming.NAMING_MODULE; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; public abstract class BasedNamingRequestTest { @@ -35,7 +35,7 @@ public abstract class BasedNamingRequestTest { protected static ObjectMapper mapper; - @BeforeClass + @BeforeAll public static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/BatchInstanceRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/BatchInstanceRequestTest.java index af4127dddbe..8a48fa101c9 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/BatchInstanceRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/BatchInstanceRequestTest.java @@ -19,17 +19,17 @@ import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.remote.NamingRemoteConstants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class BatchInstanceRequestTest extends BasedNamingRequestTest { +class BatchInstanceRequestTest extends BasedNamingRequestTest { @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { BatchInstanceRequest request = new BatchInstanceRequest(NAMESPACE, SERVICE, GROUP, NamingRemoteConstants.BATCH_REGISTER_INSTANCE, Collections.singletonList(new Instance())); String json = mapper.writeValueAsString(request); @@ -39,7 +39,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{},\"namespace\":\"namespace\",\"serviceName\":\"service\",\"groupName\":\"group\"," + "\"type\":\"batchRegisterInstance\",\"instances\":[{\"port\":0,\"weight\":1.0,\"healthy\":true," + "\"enabled\":true,\"ephemeral\":true,\"metadata\":{},\"instanceIdGenerator\":\"simple\"," diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/InstanceRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/InstanceRequestTest.java index 72c34af4c03..5237df64675 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/InstanceRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/InstanceRequestTest.java @@ -19,15 +19,15 @@ import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.remote.NamingRemoteConstants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class InstanceRequestTest extends BasedNamingRequestTest { +class InstanceRequestTest extends BasedNamingRequestTest { @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { InstanceRequest request = new InstanceRequest(NAMESPACE, SERVICE, GROUP, NamingRemoteConstants.REGISTER_INSTANCE, new Instance()); String json = mapper.writeValueAsString(request); @@ -37,7 +37,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{},\"namespace\":\"namespace\",\"serviceName\":\"service\",\"groupName\":\"group\"," + "\"type\":\"deregisterInstance\",\"instance\":{\"port\":0,\"weight\":1.0,\"healthy\":true," + "\"enabled\":true,\"ephemeral\":true,\"metadata\":{},\"instanceIdGenerator\":\"simple\"," diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/NotifySubscriberRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/NotifySubscriberRequestTest.java index e8dd9df4627..a60eaf98c48 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/NotifySubscriberRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/NotifySubscriberRequestTest.java @@ -21,14 +21,14 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import static com.alibaba.nacos.api.common.Constants.Naming.NAMING_MODULE; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class NotifySubscriberRequestTest { +class NotifySubscriberRequestTest { private static final String SERVICE = "service"; @@ -38,15 +38,15 @@ public class NotifySubscriberRequestTest { private static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { ServiceInfo serviceInfo = new ServiceInfo(GROUP + "@@" + SERVICE); NotifySubscriberRequest request = NotifySubscriberRequest.buildNotifySubscriberRequest(serviceInfo); request.setServiceName(SERVICE); @@ -58,7 +58,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{},\"namespace\":\"namespace\",\"serviceName\":\"service\",\"groupName\":\"group\"," + "\"serviceInfo\":{\"name\":\"service\",\"groupName\":\"group\",\"cacheMillis\":1000,\"hosts\":[]," + "\"lastRefTime\":0,\"checksum\":\"\",\"allIPs\":false,\"reachProtectionThreshold\":false," diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/PersistentInstanceRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/PersistentInstanceRequestTest.java index be358447a0f..41ea9ae5d74 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/PersistentInstanceRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/PersistentInstanceRequestTest.java @@ -19,15 +19,15 @@ import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.remote.NamingRemoteConstants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class PersistentInstanceRequestTest extends BasedNamingRequestTest { +class PersistentInstanceRequestTest extends BasedNamingRequestTest { @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { PersistentInstanceRequest request = new PersistentInstanceRequest(NAMESPACE, SERVICE, GROUP, NamingRemoteConstants.REGISTER_INSTANCE, new Instance()); String json = mapper.writeValueAsString(request); @@ -37,7 +37,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{},\"namespace\":\"namespace\",\"serviceName\":\"service\",\"groupName\":\"group\"," + "\"type\":\"deregisterInstance\",\"instance\":{\"port\":0,\"weight\":1.0,\"healthy\":true," + "\"enabled\":true,\"ephemeral\":true,\"metadata\":{},\"instanceIdGenerator\":\"simple\"," diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/ServiceListRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/ServiceListRequestTest.java index 8014e5b602b..a0e897495c1 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/ServiceListRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/ServiceListRequestTest.java @@ -17,16 +17,16 @@ package com.alibaba.nacos.api.naming.remote.request; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static com.alibaba.nacos.api.common.Constants.Naming.NAMING_MODULE; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServiceListRequestTest extends BasedNamingRequestTest { +class ServiceListRequestTest extends BasedNamingRequestTest { @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { ServiceListRequest request = new ServiceListRequest(NAMESPACE, GROUP, 1, 10); request.setSelector("label"); String json = mapper.writeValueAsString(request); @@ -39,7 +39,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{},\"namespace\":\"namespace\",\"serviceName\":\"\",\"groupName\":\"group\"," + "\"pageNo\":1,\"pageSize\":10,\"selector\":\"label\",\"module\":\"naming\"}"; ServiceListRequest actual = mapper.readValue(json, ServiceListRequest.class); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/ServiceQueryRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/ServiceQueryRequestTest.java index 609a33caa36..93e039220d0 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/ServiceQueryRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/ServiceQueryRequestTest.java @@ -18,15 +18,15 @@ import com.alibaba.nacos.api.common.Constants; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServiceQueryRequestTest extends BasedNamingRequestTest { +class ServiceQueryRequestTest extends BasedNamingRequestTest { @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { ServiceQueryRequest request = new ServiceQueryRequest(NAMESPACE, SERVICE, GROUP); request.setCluster(Constants.DEFAULT_CLUSTER_NAME); String json = mapper.writeValueAsString(request); @@ -37,7 +37,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{},\"namespace\":\"namespace\",\"serviceName\":\"service\",\"groupName\":\"group\"," + "\"cluster\":\"DEFAULT\",\"healthyOnly\":true,\"udpPort\":0,\"module\":\"naming\"}"; ServiceQueryRequest actual = mapper.readValue(json, ServiceQueryRequest.class); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/SubscribeServiceRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/SubscribeServiceRequestTest.java index 1eabfb40a35..f0a76876bde 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/SubscribeServiceRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/request/SubscribeServiceRequestTest.java @@ -17,16 +17,16 @@ package com.alibaba.nacos.api.naming.remote.request; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class SubscribeServiceRequestTest extends BasedNamingRequestTest { +class SubscribeServiceRequestTest extends BasedNamingRequestTest { @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { SubscribeServiceRequest request = new SubscribeServiceRequest(NAMESPACE, GROUP, SERVICE, "", true); String json = mapper.writeValueAsString(request); checkSerializeBasedInfo(json); @@ -35,7 +35,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"headers\":{},\"namespace\":\"namespace\",\"serviceName\":\"service\",\"groupName\":\"group\"," + "\"subscribe\":false,\"clusters\":\"aa,bb\",\"module\":\"naming\"}"; SubscribeServiceRequest actual = mapper.readValue(json, SubscribeServiceRequest.class); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/BatchInstanceResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/BatchInstanceResponseTest.java index bb8c409873f..74e37c33213 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/BatchInstanceResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/BatchInstanceResponseTest.java @@ -21,32 +21,32 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class BatchInstanceResponseTest { +class BatchInstanceResponseTest { protected static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { BatchInstanceResponse response = new BatchInstanceResponse(NamingRemoteConstants.REGISTER_INSTANCE); String json = mapper.writeValueAsString(response); assertTrue(json.contains("\"type\":\"" + NamingRemoteConstants.REGISTER_INSTANCE + "\"")); } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"resultCode\":200,\"errorCode\":0,\"type\":\"registerInstance\",\"success\":true}"; BatchInstanceResponse response = mapper.readValue(json, BatchInstanceResponse.class); assertEquals(NamingRemoteConstants.REGISTER_INSTANCE, response.getType()); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/InstanceResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/InstanceResponseTest.java index 1f448824a11..33dafa78524 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/InstanceResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/InstanceResponseTest.java @@ -21,32 +21,32 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class InstanceResponseTest { +class InstanceResponseTest { protected static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { InstanceResponse response = new InstanceResponse(NamingRemoteConstants.REGISTER_INSTANCE); String json = mapper.writeValueAsString(response); assertTrue(json.contains("\"type\":\"" + NamingRemoteConstants.REGISTER_INSTANCE + "\"")); } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"resultCode\":200,\"errorCode\":0,\"type\":\"deregisterInstance\",\"success\":true}"; InstanceResponse response = mapper.readValue(json, InstanceResponse.class); assertEquals(NamingRemoteConstants.DE_REGISTER_INSTANCE, response.getType()); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/QueryServiceResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/QueryServiceResponseTest.java index cc98aebf802..a75d7c89e3f 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/QueryServiceResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/QueryServiceResponseTest.java @@ -21,25 +21,25 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class QueryServiceResponseTest { +class QueryServiceResponseTest { protected static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerializeSuccessResponse() throws JsonProcessingException { + void testSerializeSuccessResponse() throws JsonProcessingException { QueryServiceResponse response = QueryServiceResponse.buildSuccessResponse(new ServiceInfo()); String json = mapper.writeValueAsString(response); assertTrue(json.contains("\"serviceInfo\":{")); @@ -49,7 +49,7 @@ public void testSerializeSuccessResponse() throws JsonProcessingException { } @Test - public void testSerializeFailResponse() throws JsonProcessingException { + void testSerializeFailResponse() throws JsonProcessingException { QueryServiceResponse response = QueryServiceResponse.buildFailResponse("test"); String json = mapper.writeValueAsString(response); assertTrue(json.contains("\"resultCode\":500")); @@ -59,7 +59,7 @@ public void testSerializeFailResponse() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"resultCode\":200,\"errorCode\":0,\"serviceInfo\":{\"cacheMillis\":1000,\"hosts\":[]," + "\"lastRefTime\":0,\"checksum\":\"\",\"allIPs\":false,\"reachProtectionThreshold\":false," + "\"valid\":true},\"success\":true}"; diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/ServiceListResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/ServiceListResponseTest.java index 8fc59aade65..1f9c8b21953 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/ServiceListResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/ServiceListResponseTest.java @@ -20,27 +20,27 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServiceListResponseTest { +class ServiceListResponseTest { protected static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerializeSuccessResponse() throws JsonProcessingException { + void testSerializeSuccessResponse() throws JsonProcessingException { ServiceListResponse response = ServiceListResponse.buildSuccessResponse(10, Collections.singletonList("a")); String json = mapper.writeValueAsString(response); assertTrue(json.contains("\"count\":10")); @@ -51,7 +51,7 @@ public void testSerializeSuccessResponse() throws JsonProcessingException { } @Test - public void testSerializeFailResponse() throws JsonProcessingException { + void testSerializeFailResponse() throws JsonProcessingException { ServiceListResponse response = ServiceListResponse.buildFailResponse("test"); String json = mapper.writeValueAsString(response); assertTrue(json.contains("\"resultCode\":500")); @@ -61,7 +61,7 @@ public void testSerializeFailResponse() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"resultCode\":200,\"errorCode\":0,\"count\":10,\"serviceNames\":[\"a\"],\"success\":true}"; ServiceListResponse response = mapper.readValue(json, ServiceListResponse.class); assertEquals(10, response.getCount()); diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/SubscribeServiceResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/SubscribeServiceResponseTest.java index ba2288bc891..d52902aa807 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/SubscribeServiceResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/remote/response/SubscribeServiceResponseTest.java @@ -21,25 +21,25 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class SubscribeServiceResponseTest { +class SubscribeServiceResponseTest { protected static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerializeSuccessResponse() throws JsonProcessingException { + void testSerializeSuccessResponse() throws JsonProcessingException { SubscribeServiceResponse response = new SubscribeServiceResponse(200, null, new ServiceInfo()); String json = mapper.writeValueAsString(response); assertTrue(json.contains("\"serviceInfo\":{")); @@ -49,7 +49,7 @@ public void testSerializeSuccessResponse() throws JsonProcessingException { } @Test - public void testSerializeFailResponse() throws JsonProcessingException { + void testSerializeFailResponse() throws JsonProcessingException { SubscribeServiceResponse response = new SubscribeServiceResponse(500, "test", null); String json = mapper.writeValueAsString(response); assertTrue(json.contains("\"resultCode\":500")); @@ -59,7 +59,7 @@ public void testSerializeFailResponse() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"resultCode\":200,\"errorCode\":0,\"serviceInfo\":{\"cacheMillis\":1000,\"hosts\":[]," + "\"lastRefTime\":0,\"checksum\":\"\",\"allIPs\":false,\"reachProtectionThreshold\":false," + "\"valid\":true},\"success\":true}"; diff --git a/api/src/test/java/com/alibaba/nacos/api/naming/utils/NamingUtilsTest.java b/api/src/test/java/com/alibaba/nacos/api/naming/utils/NamingUtilsTest.java index 55eb315c6e9..8b64bb6b181 100644 --- a/api/src/test/java/com/alibaba/nacos/api/naming/utils/NamingUtilsTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/naming/utils/NamingUtilsTest.java @@ -21,107 +21,117 @@ import com.alibaba.nacos.api.naming.PreservedMetadataKeys; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.utils.StringUtils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class NamingUtilsTest { +class NamingUtilsTest { @Test - public void testGetGroupedName() { + void testGetGroupedName() { assertEquals("group@@serviceName", NamingUtils.getGroupedName("serviceName", "group")); } - @Test(expected = IllegalArgumentException.class) - public void testGetGroupedNameWithoutGroup() { - NamingUtils.getGroupedName("serviceName", ""); + @Test + void testGetGroupedNameWithoutGroup() { + assertThrows(IllegalArgumentException.class, () -> { + NamingUtils.getGroupedName("serviceName", ""); + }); } - @Test(expected = IllegalArgumentException.class) - public void testGetGroupedNameWithoutServiceName() { - NamingUtils.getGroupedName("", "group"); + @Test + void testGetGroupedNameWithoutServiceName() { + assertThrows(IllegalArgumentException.class, () -> { + NamingUtils.getGroupedName("", "group"); + }); } @Test - public void testGetServiceName() { + void testGetServiceName() { String validServiceName = "group@@serviceName"; assertEquals("serviceName", NamingUtils.getServiceName(validServiceName)); } @Test - public void testGetServiceNameWithoutGroup() { + void testGetServiceNameWithoutGroup() { String serviceName = "serviceName"; assertEquals(serviceName, NamingUtils.getServiceName(serviceName)); } @Test - public void testGetServiceNameWithEmpty() { + void testGetServiceNameWithEmpty() { assertEquals(StringUtils.EMPTY, NamingUtils.getServiceName(null)); } @Test - public void testGetGroupName() { + void testGetGroupName() { String validServiceName = "group@@serviceName"; assertEquals("group", NamingUtils.getGroupName(validServiceName)); } @Test - public void testGetGroupNameWithoutGroup() { + void testGetGroupNameWithoutGroup() { String serviceName = "serviceName"; assertEquals(Constants.DEFAULT_GROUP, NamingUtils.getGroupName(serviceName)); } @Test - public void testGetGroupNameWithEmpty() { + void testGetGroupNameWithEmpty() { assertEquals(StringUtils.EMPTY, NamingUtils.getGroupName(null)); } @Test - public void testIsServiceNameCompatibilityMode() { + void testIsServiceNameCompatibilityMode() { String serviceName1 = "group@@serviceName"; assertTrue(NamingUtils.isServiceNameCompatibilityMode(serviceName1)); - + String serviceName2 = "serviceName"; assertFalse(NamingUtils.isServiceNameCompatibilityMode(serviceName2)); - + String serviceName3 = null; assertFalse(NamingUtils.isServiceNameCompatibilityMode(serviceName3)); } @Test - public void testCheckServiceNameFormat() { + void testCheckServiceNameFormat() { String validServiceName = "group@@serviceName"; NamingUtils.checkServiceNameFormat(validServiceName); } - @Test(expected = IllegalArgumentException.class) - public void testCheckServiceNameFormatWithoutGroupAndService() { - String validServiceName = "@@"; - NamingUtils.checkServiceNameFormat(validServiceName); + @Test + void testCheckServiceNameFormatWithoutGroupAndService() { + assertThrows(IllegalArgumentException.class, () -> { + String validServiceName = "@@"; + NamingUtils.checkServiceNameFormat(validServiceName); + }); } - @Test(expected = IllegalArgumentException.class) - public void testCheckServiceNameFormatWithoutGroup() { - String validServiceName = "@@service"; - NamingUtils.checkServiceNameFormat(validServiceName); + @Test + void testCheckServiceNameFormatWithoutGroup() { + assertThrows(IllegalArgumentException.class, () -> { + String validServiceName = "@@service"; + NamingUtils.checkServiceNameFormat(validServiceName); + }); } - @Test(expected = IllegalArgumentException.class) - public void testCheckServiceNameFormatWithoutService() { - String validServiceName = "group@@"; - NamingUtils.checkServiceNameFormat(validServiceName); + @Test + void testCheckServiceNameFormatWithoutService() { + assertThrows(IllegalArgumentException.class, () -> { + String validServiceName = "group@@"; + NamingUtils.checkServiceNameFormat(validServiceName); + }); } @Test - public void testGetGroupedNameOptional() { + void testGetGroupedNameOptional() { String onlyGroupName = NamingUtils.getGroupedNameOptional(StringUtils.EMPTY, "groupA"); assertEquals("groupA@@", onlyGroupName); @@ -133,7 +143,7 @@ public void testGetGroupedNameOptional() { } @Test - public void testCheckInstanceIsLegal() throws NacosException { + void testCheckInstanceIsLegal() throws NacosException { // check invalid clusterName Instance instance = new Instance(); instance.setClusterName("cluster1,cluster2"); @@ -151,7 +161,7 @@ public void testCheckInstanceIsLegal() throws NacosException { instance.setClusterName("cluster1"); NamingUtils.checkInstanceIsLegal(instance); assertTrue(true); - + // check heartBeatTimeout, heartBeatInterval, ipDeleteTimeout Map meta = new HashMap<>(); meta.put(PreservedMetadataKeys.HEART_BEAT_TIMEOUT, "1"); @@ -163,8 +173,7 @@ public void testCheckInstanceIsLegal() throws NacosException { assertTrue(false); } catch (Exception e) { assertTrue(e instanceof NacosException); - assertEquals( - "Instance 'heart beat interval' must less than 'heart beat timeout' and 'ip delete timeout'.", + assertEquals("Instance 'heart beat interval' must less than 'heart beat timeout' and 'ip delete timeout'.", e.getMessage()); } meta.put(PreservedMetadataKeys.HEART_BEAT_TIMEOUT, "3"); @@ -175,7 +184,7 @@ public void testCheckInstanceIsLegal() throws NacosException { } @Test - public void testBatchCheckInstanceIsLegal() throws NacosException { + void testBatchCheckInstanceIsLegal() throws NacosException { // check invalid clusterName Instance instance = new Instance(); instance.setClusterName("cluster1,cluster2"); @@ -212,8 +221,7 @@ public void testBatchCheckInstanceIsLegal() throws NacosException { assertTrue(false); } catch (Exception e) { assertTrue(e instanceof NacosException); - assertEquals( - "Instance 'heart beat interval' must less than 'heart beat timeout' and 'ip delete timeout'.", + assertEquals("Instance 'heart beat interval' must less than 'heart beat timeout' and 'ip delete timeout'.", e.getMessage()); } instanceList.remove(instance); @@ -228,7 +236,7 @@ public void testBatchCheckInstanceIsLegal() throws NacosException { } @Test - public void testCheckInstanceIsEphemeral() throws NacosException { + void testCheckInstanceIsEphemeral() throws NacosException { Instance instance = new Instance(); instance.setIp("127.0.0.1"); instance.setPort(9089); @@ -241,12 +249,12 @@ public void testCheckInstanceIsEphemeral() throws NacosException { instance.setEphemeral(false); NamingUtils.checkInstanceIsEphemeral(instance); } catch (NacosException e) { - Assert.assertEquals(e.getErrCode(), NacosException.INVALID_PARAM); + assertEquals(NacosException.INVALID_PARAM, e.getErrCode()); } } - + @Test - public void testCheckInstanceIsNull() throws NacosException { + void testCheckInstanceIsNull() throws NacosException { Instance instance = new Instance(); instance.setIp("127.0.0.1"); instance.setPort(9089); @@ -254,15 +262,15 @@ public void testCheckInstanceIsNull() throws NacosException { try { NamingUtils.checkInstanceIsLegal(null); } catch (NacosException e) { - Assert.assertEquals(e.getErrCode(), NacosException.INVALID_PARAM); + assertEquals(NacosException.INVALID_PARAM, e.getErrCode()); } } @Test - public void testIsNumber() { + void testIsNumber() { String str1 = "abc"; - assertTrue(!NamingUtils.isNumber(str1)); - + assertFalse(NamingUtils.isNumber(str1)); + String str2 = "123456"; assertTrue(NamingUtils.isNumber(str2)); } diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/AbstractPushCallBackTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/AbstractPushCallBackTest.java index 8ccb82f2a20..b415eae67ac 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/AbstractPushCallBackTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/AbstractPushCallBackTest.java @@ -16,18 +16,18 @@ package com.alibaba.nacos.api.remote; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class AbstractPushCallBackTest { +class AbstractPushCallBackTest { boolean testValue; @Test - public void testAbstractPushCallBack() { + void testAbstractPushCallBack() { AbstractPushCallBack callBack = new AbstractPushCallBack(2000) { @Override diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/AbstractRequestCallBackTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/AbstractRequestCallBackTest.java index 3af0a91040d..4a9d74530cc 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/AbstractRequestCallBackTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/AbstractRequestCallBackTest.java @@ -18,20 +18,20 @@ import com.alibaba.nacos.api.remote.response.ErrorResponse; import com.alibaba.nacos.api.remote.response.Response; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.concurrent.Executor; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class AbstractRequestCallBackTest { +class AbstractRequestCallBackTest { boolean testValue; @Test - public void testAbstractPushCallBack() { + void testAbstractPushCallBack() { AbstractRequestCallBack callBack = new AbstractRequestCallBack() { @Override public Executor getExecutor() { diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/DefaultRequestFutureTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/DefaultRequestFutureTest.java index 854e6b4659f..e8f778a6d7a 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/DefaultRequestFutureTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/DefaultRequestFutureTest.java @@ -17,27 +17,28 @@ package com.alibaba.nacos.api.remote; import com.alibaba.nacos.api.remote.response.Response; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.verify; -@RunWith(MockitoJUnitRunner.class) -public class DefaultRequestFutureTest { +@ExtendWith(MockitoExtension.class) +class DefaultRequestFutureTest { private static final String CONNECTION_ID = "1233_1.1.1.1_3306"; @@ -51,17 +52,17 @@ public class DefaultRequestFutureTest { private long timestamp; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { timestamp = System.currentTimeMillis(); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { } @Test - public void testSyncGetResponseSuccessWithoutTimeout() throws InterruptedException { + void testSyncGetResponseSuccessWithoutTimeout() throws InterruptedException { DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID); new Thread(() -> { try { @@ -79,7 +80,7 @@ public void testSyncGetResponseSuccessWithoutTimeout() throws InterruptedExcepti } @Test - public void testSyncGetResponseFailureWithoutTimeout() throws InterruptedException { + void testSyncGetResponseFailureWithoutTimeout() throws InterruptedException { DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID); new Thread(() -> { try { @@ -97,7 +98,7 @@ public void testSyncGetResponseFailureWithoutTimeout() throws InterruptedExcepti } @Test - public void testSyncGetResponseSuccessWithTimeout() throws InterruptedException, TimeoutException { + void testSyncGetResponseSuccessWithTimeout() throws InterruptedException, TimeoutException { DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID); new Thread(() -> { try { @@ -115,7 +116,7 @@ public void testSyncGetResponseSuccessWithTimeout() throws InterruptedException, } @Test - public void testSyncGetResponseSuccessWithInvalidTimeout() throws InterruptedException, TimeoutException { + void testSyncGetResponseSuccessWithInvalidTimeout() throws InterruptedException, TimeoutException { DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID); new Thread(() -> { try { @@ -132,14 +133,16 @@ public void testSyncGetResponseSuccessWithInvalidTimeout() throws InterruptedExc assertTrue(requestFuture.getTimeStamp() >= timestamp); } - @Test(expected = TimeoutException.class) - public void testSyncGetResponseFailureWithTimeout() throws InterruptedException, TimeoutException { - DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID); - requestFuture.get(100L); + @Test + void testSyncGetResponseFailureWithTimeout() throws InterruptedException, TimeoutException { + assertThrows(TimeoutException.class, () -> { + DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID); + requestFuture.get(100L); + }); } @Test - public void testSyncGetResponseSuccessByTriggerWithoutTimeout() throws InterruptedException { + void testSyncGetResponseSuccessByTriggerWithoutTimeout() throws InterruptedException { MockTimeoutInnerTrigger trigger = new MockTimeoutInnerTrigger(); DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, null, trigger); new Thread(() -> { @@ -159,7 +162,7 @@ public void testSyncGetResponseSuccessByTriggerWithoutTimeout() throws Interrupt } @Test - public void testSyncGetResponseFailureByTriggerWithoutTimeout() throws InterruptedException { + void testSyncGetResponseFailureByTriggerWithoutTimeout() throws InterruptedException { MockTimeoutInnerTrigger trigger = new MockTimeoutInnerTrigger(); DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, null, trigger); new Thread(() -> { @@ -179,7 +182,7 @@ public void testSyncGetResponseFailureByTriggerWithoutTimeout() throws Interrupt } @Test - public void testSyncGetResponseSuccessByTriggerWithTimeout() throws InterruptedException, TimeoutException { + void testSyncGetResponseSuccessByTriggerWithTimeout() throws InterruptedException, TimeoutException { MockTimeoutInnerTrigger trigger = new MockTimeoutInnerTrigger(); DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, null, trigger); new Thread(() -> { @@ -198,19 +201,21 @@ public void testSyncGetResponseSuccessByTriggerWithTimeout() throws InterruptedE assertFalse(trigger.isTimeout); } - @Test(expected = TimeoutException.class) - public void testSyncGetResponseFailureByTriggerWithTimeout() throws InterruptedException, TimeoutException { - MockTimeoutInnerTrigger trigger = new MockTimeoutInnerTrigger(); - DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, null, trigger); - try { - requestFuture.get(100L); - } finally { - assertTrue(trigger.isTimeout); - } + @Test + void testSyncGetResponseFailureByTriggerWithTimeout() throws InterruptedException, TimeoutException { + assertThrows(TimeoutException.class, () -> { + MockTimeoutInnerTrigger trigger = new MockTimeoutInnerTrigger(); + DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, null, trigger); + try { + requestFuture.get(100L); + } finally { + assertTrue(trigger.isTimeout); + } + }); } @Test - public void testASyncGetResponseSuccessWithoutTimeout() throws InterruptedException { + void testASyncGetResponseSuccessWithoutTimeout() throws InterruptedException { MockTimeoutInnerTrigger trigger = new MockTimeoutInnerTrigger(); MockRequestCallback callback = new MockRequestCallback(200L); DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, callback, trigger); @@ -229,7 +234,7 @@ public void testASyncGetResponseSuccessWithoutTimeout() throws InterruptedExcept } @Test - public void testASyncGetResponseSuccessWithoutTimeoutByExecutor() throws InterruptedException { + void testASyncGetResponseSuccessWithoutTimeoutByExecutor() throws InterruptedException { MockTimeoutInnerTrigger trigger = new MockTimeoutInnerTrigger(); MockRequestCallback callback = new MockRequestCallback(executor, 200L); DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, callback, trigger); @@ -246,7 +251,7 @@ public void testASyncGetResponseSuccessWithoutTimeoutByExecutor() throws Interru } @Test - public void testASyncGetResponseFailureWithoutTimeout() throws InterruptedException { + void testASyncGetResponseFailureWithoutTimeout() throws InterruptedException { MockTimeoutInnerTrigger trigger = new MockTimeoutInnerTrigger(); MockRequestCallback callback = new MockRequestCallback(1000L); DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, callback, trigger); @@ -265,10 +270,11 @@ public void testASyncGetResponseFailureWithoutTimeout() throws InterruptedExcept } @Test - public void testASyncGetResponseFailureWithTimeout() throws InterruptedException { + void testASyncGetResponseFailureWithTimeout() throws InterruptedException { MockTimeoutInnerTrigger trigger = new MockTimeoutInnerTrigger(); MockRequestCallback callback = new MockRequestCallback(100L); - final DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, callback, trigger); + final DefaultRequestFuture requestFuture = new DefaultRequestFuture(CONNECTION_ID, REQUEST_ID, callback, + trigger); TimeUnit.MILLISECONDS.sleep(500); assertNull(callback.response); assertTrue(callback.exception instanceof TimeoutException); diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/RpcScheduledExecutorTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/RpcScheduledExecutorTest.java index 097bd116fff..fea7d7c90d7 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/RpcScheduledExecutorTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/RpcScheduledExecutorTest.java @@ -16,24 +16,24 @@ package com.alibaba.nacos.api.remote; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class RpcScheduledExecutorTest { +class RpcScheduledExecutorTest { private static final String NAME = "test.rpc.thread"; Map threadNameMap = new ConcurrentHashMap<>(); @Test - public void testRpcScheduledExecutor() throws InterruptedException { + void testRpcScheduledExecutor() throws InterruptedException { RpcScheduledExecutor executor = new RpcScheduledExecutor(2, NAME); CountDownLatch latch = new CountDownLatch(2); executor.submit(new TestRunner(1, latch)); diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/ability/ClientRemoteAbilityTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/ability/ClientRemoteAbilityTest.java index 9e84a5d22ce..21d60872997 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/ability/ClientRemoteAbilityTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/ability/ClientRemoteAbilityTest.java @@ -20,32 +20,32 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ClientRemoteAbilityTest { +class ClientRemoteAbilityTest { private static ObjectMapper mapper; - @BeforeClass - public static void setUp() throws Exception { + @BeforeAll + static void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { ClientRemoteAbility abilities = new ClientRemoteAbility(); String json = mapper.writeValueAsString(abilities); assertEquals("{\"supportRemoteConnection\":false}", json); } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"supportRemoteConnection\":true}"; ClientRemoteAbility abilities = mapper.readValue(json, ClientRemoteAbility.class); assertTrue(abilities.isSupportRemoteConnection()); diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/ability/ServerRemoteAbilityTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/ability/ServerRemoteAbilityTest.java index a2df423249d..6265c68bc5b 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/ability/ServerRemoteAbilityTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/ability/ServerRemoteAbilityTest.java @@ -20,37 +20,37 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.MapperFeature; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServerRemoteAbilityTest { +class ServerRemoteAbilityTest { private static ObjectMapper mapper; private ServerRemoteAbility serverAbilities; - @BeforeClass - public static void setUpBeforeClass() throws Exception { + @BeforeAll + static void setUpBeforeClass() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY); } - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { serverAbilities = new ServerRemoteAbility(); } @Test - public void testSerialize() throws JsonProcessingException { + void testSerialize() throws JsonProcessingException { serverAbilities = new ServerRemoteAbility(); String json = mapper.writeValueAsString(serverAbilities); assertTrue(json.contains("\"supportRemoteConnection\":false")); @@ -58,7 +58,7 @@ public void testSerialize() throws JsonProcessingException { } @Test - public void testDeserialize() throws JsonProcessingException { + void testDeserialize() throws JsonProcessingException { String json = "{\"supportRemoteConnection\":true,\"grpcReportEnabled\":true}"; ServerRemoteAbility abilities = mapper.readValue(json, ServerRemoteAbility.class); assertTrue(abilities.isSupportRemoteConnection()); @@ -66,10 +66,10 @@ public void testDeserialize() throws JsonProcessingException { } @Test - public void testEqualsAndHashCode() { + void testEqualsAndHashCode() { assertEquals(serverAbilities, serverAbilities); assertEquals(serverAbilities.hashCode(), serverAbilities.hashCode()); - assertNotEquals(serverAbilities, null); + assertNotEquals(null, serverAbilities); assertNotEquals(serverAbilities, new ClientAbilities()); ServerRemoteAbility test = new ServerRemoteAbility(); assertEquals(serverAbilities, test); diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/request/BasicRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/request/BasicRequestTest.java index 336f9af7b95..d12af4aefdf 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/request/BasicRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/request/BasicRequestTest.java @@ -19,13 +19,13 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; +import org.junit.jupiter.api.BeforeEach; public abstract class BasicRequestTest { protected ObjectMapper mapper; - @Before + @BeforeEach public void setUp() throws Exception { mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/request/ConnectResetRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/request/ConnectResetRequestTest.java index d2a7d11925a..6356319f7aa 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/request/ConnectResetRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/request/ConnectResetRequestTest.java @@ -16,35 +16,38 @@ package com.alibaba.nacos.api.remote.request; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ConnectResetRequestTest extends BasicRequestTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ConnectResetRequestTest extends BasicRequestTest { @Test - public void testSerialize() throws Exception { + void testSerialize() throws Exception { ConnectResetRequest request = new ConnectResetRequest(); request.setServerIp("127.0.0.1"); request.setServerPort("8888"); request.setRequestId("1"); request.setConnectionId("11111_127.0.0.1_8888"); String json = mapper.writeValueAsString(request); - Assert.assertNotNull(json); - Assert.assertTrue(json.contains("\"serverIp\":\"127.0.0.1\"")); - Assert.assertTrue(json.contains("\"serverPort\":\"8888\"")); - Assert.assertTrue(json.contains("\"module\":\"internal\"")); - Assert.assertTrue(json.contains("\"requestId\":\"1\"")); - Assert.assertTrue(json.contains("\"connectionId\":\"11111_127.0.0.1_8888\"")); + assertNotNull(json); + assertTrue(json.contains("\"serverIp\":\"127.0.0.1\"")); + assertTrue(json.contains("\"serverPort\":\"8888\"")); + assertTrue(json.contains("\"module\":\"internal\"")); + assertTrue(json.contains("\"requestId\":\"1\"")); + assertTrue(json.contains("\"connectionId\":\"11111_127.0.0.1_8888\"")); } @Test - public void testDeserialize() throws Exception { + void testDeserialize() throws Exception { String json = "{\"headers\":{},\"requestId\":\"1\",\"serverIp\":\"127.0.0.1\",\"serverPort\":\"8888\"," + "\"module\":\"internal\",\"connectionId\":\"11111_127.0.0.1_8888\"}"; ConnectResetRequest result = mapper.readValue(json, ConnectResetRequest.class); - Assert.assertNotNull(result); - Assert.assertEquals("127.0.0.1", result.getServerIp()); - Assert.assertEquals("8888", result.getServerPort()); - Assert.assertEquals("11111_127.0.0.1_8888", result.getConnectionId()); + assertNotNull(result); + assertEquals("127.0.0.1", result.getServerIp()); + assertEquals("8888", result.getServerPort()); + assertEquals("11111_127.0.0.1_8888", result.getConnectionId()); } } \ No newline at end of file diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/request/ConnectionSetupRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/request/ConnectionSetupRequestTest.java index 03424d50a64..81d61dc4b0a 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/request/ConnectionSetupRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/request/ConnectionSetupRequestTest.java @@ -16,16 +16,19 @@ package com.alibaba.nacos.api.remote.request; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.HashMap; -public class ConnectionSetupRequestTest extends BasicRequestTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ConnectionSetupRequestTest extends BasicRequestTest { @Test - public void testSerialize() throws Exception { + void testSerialize() throws Exception { ConnectionSetupRequest request = new ConnectionSetupRequest(); request.setClientVersion("2.2.2"); request.setAbilityTable(new HashMap<>()); @@ -33,27 +36,28 @@ public void testSerialize() throws Exception { request.setLabels(Collections.singletonMap("labelKey", "labelValue")); request.setRequestId("1"); String json = mapper.writeValueAsString(request); - Assert.assertNotNull(json); - Assert.assertTrue(json.contains("\"clientVersion\":\"2.2.2\"")); - Assert.assertTrue(json.contains("\"tenant\":\"testNamespaceId\"")); - Assert.assertTrue(json.contains("\"labels\":{\"labelKey\":\"labelValue\"}")); - Assert.assertTrue(json.contains("\"abilityTable\":{")); - Assert.assertTrue(json.contains("\"module\":\"internal\"")); - Assert.assertTrue(json.contains("\"requestId\":\"1\"")); + assertNotNull(json); + assertTrue(json.contains("\"clientVersion\":\"2.2.2\"")); + assertTrue(json.contains("\"tenant\":\"testNamespaceId\"")); + assertTrue(json.contains("\"labels\":{\"labelKey\":\"labelValue\"}")); + assertTrue(json.contains("\"abilityTable\":{")); + assertTrue(json.contains("\"module\":\"internal\"")); + assertTrue(json.contains("\"requestId\":\"1\"")); } @Test - public void testDeserialize() throws Exception { - String json = "{\"headers\":{},\"requestId\":\"1\",\"clientVersion\":\"2.2.2\",\"abilities\":{\"remoteAbility\":" - + "{\"supportRemoteConnection\":false},\"configAbility\":{\"supportRemoteMetrics\":false}," - + "\"namingAbility\":{\"supportDeltaPush\":false,\"supportRemoteMetric\":false}},\"tenant\":\"testNamespaceId\"," - + "\"labels\":{\"labelKey\":\"labelValue\"},\"module\":\"internal\"}"; + void testDeserialize() throws Exception { + String json = + "{\"headers\":{},\"requestId\":\"1\",\"clientVersion\":\"2.2.2\",\"abilities\":{\"remoteAbility\":" + + "{\"supportRemoteConnection\":false},\"configAbility\":{\"supportRemoteMetrics\":false}," + + "\"namingAbility\":{\"supportDeltaPush\":false,\"supportRemoteMetric\":false}},\"tenant\":\"testNamespaceId\"," + + "\"labels\":{\"labelKey\":\"labelValue\"},\"module\":\"internal\"}"; ConnectionSetupRequest result = mapper.readValue(json, ConnectionSetupRequest.class); - Assert.assertNotNull(result); - Assert.assertEquals("2.2.2", result.getClientVersion()); - Assert.assertEquals("testNamespaceId", result.getTenant()); - Assert.assertEquals(1, result.getLabels().size()); - Assert.assertEquals("labelValue", result.getLabels().get("labelKey")); - Assert.assertEquals("1", result.getRequestId()); + assertNotNull(result); + assertEquals("2.2.2", result.getClientVersion()); + assertEquals("testNamespaceId", result.getTenant()); + assertEquals(1, result.getLabels().size()); + assertEquals("labelValue", result.getLabels().get("labelKey")); + assertEquals("1", result.getRequestId()); } } \ No newline at end of file diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/request/EmptyContentRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/request/EmptyContentRequestTest.java index 61aebc55594..5fe22b36eab 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/request/EmptyContentRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/request/EmptyContentRequestTest.java @@ -19,19 +19,19 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class EmptyContentRequestTest extends BasicRequestTest { +class EmptyContentRequestTest extends BasicRequestTest { private static final String COMMON_JSON = "{\"headers\":{\"clientIp\":\"1.1.1.1\"},\"requestId\":\"1\",\"module\":\"internal\"}"; private static final String TO_STRING = "%s{headers={clientIp=1.1.1.1}, requestId='1'}"; - @Before + @BeforeEach public void setUp() throws Exception { super.setUp(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); @@ -39,26 +39,22 @@ public void setUp() throws Exception { } @Test - public void testClientDetectionRequest() - throws JsonProcessingException, InstantiationException, IllegalAccessException { + void testClientDetectionRequest() throws JsonProcessingException, InstantiationException, IllegalAccessException { doTest(ClientDetectionRequest.class); } @Test - public void testHealthCheckRequest() - throws JsonProcessingException, InstantiationException, IllegalAccessException { + void testHealthCheckRequest() throws JsonProcessingException, InstantiationException, IllegalAccessException { doTest(HealthCheckRequest.class); } @Test - public void testServerCheckRequest() - throws JsonProcessingException, InstantiationException, IllegalAccessException { + void testServerCheckRequest() throws JsonProcessingException, InstantiationException, IllegalAccessException { doTest(ServerCheckRequest.class); } @Test - public void testServerLoaderInfoRequest() - throws JsonProcessingException, InstantiationException, IllegalAccessException { + void testServerLoaderInfoRequest() throws JsonProcessingException, InstantiationException, IllegalAccessException { doTest(ServerLoaderInfoRequest.class); } diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/request/PushAckRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/request/PushAckRequestTest.java index 2d13f00158c..02f0fe4b68f 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/request/PushAckRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/request/PushAckRequestTest.java @@ -17,31 +17,35 @@ package com.alibaba.nacos.api.remote.request; import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class PushAckRequestTest extends BasicRequestTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class PushAckRequestTest extends BasicRequestTest { @Test - public void testSerialize() throws Exception { + void testSerialize() throws Exception { PushAckRequest request = PushAckRequest.build("1", false); request.setException(new NacosRuntimeException(500, "test")); String json = mapper.writeValueAsString(request); - Assert.assertNotNull(json); - Assert.assertTrue(json.contains("\"success\":false")); - Assert.assertTrue(json.contains("\"exception\":{")); - Assert.assertTrue(json.contains("\"module\":\"internal\"")); - Assert.assertTrue(json.contains("\"requestId\":\"1\"")); + assertNotNull(json); + assertTrue(json.contains("\"success\":false")); + assertTrue(json.contains("\"exception\":{")); + assertTrue(json.contains("\"module\":\"internal\"")); + assertTrue(json.contains("\"requestId\":\"1\"")); } @Test - public void testDeserialize() throws Exception { + void testDeserialize() throws Exception { String json = "{\"headers\":{},\"requestId\":\"1\",\"success\":false," + "\"exception\":{\"stackTrace\":[],\"errCode\":500,\"message\":\"errCode: 500, errMsg: test \"," + "\"localizedMessage\":\"errCode: 500, errMsg: test \",\"suppressed\":[]},\"module\":\"internal\"}"; PushAckRequest result = mapper.readValue(json, PushAckRequest.class); - Assert.assertNotNull(result); - Assert.assertFalse(result.isSuccess()); - Assert.assertEquals("1", result.getRequestId()); + assertNotNull(result); + assertFalse(result.isSuccess()); + assertEquals("1", result.getRequestId()); } } \ No newline at end of file diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/request/RequestMetaTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/request/RequestMetaTest.java index 13f60b5b34d..866e942d804 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/request/RequestMetaTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/request/RequestMetaTest.java @@ -18,22 +18,22 @@ import com.alibaba.nacos.api.ability.constant.AbilityKey; import com.alibaba.nacos.api.ability.constant.AbilityStatus; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; -public class RequestMetaTest { +class RequestMetaTest { private RequestMeta requestMeta; - @Before - public void setUp() { + @BeforeEach + void setUp() { requestMeta = new RequestMeta(); requestMeta.setClientIp("127.0.0.1"); requestMeta.setClientVersion("1.0.0"); @@ -44,22 +44,22 @@ public void setUp() { } @Test - public void testGetClientIp() { + void testGetClientIp() { assertEquals("127.0.0.1", requestMeta.getClientIp()); } @Test - public void testGetClientVersion() { + void testGetClientVersion() { assertEquals("1.0.0", requestMeta.getClientVersion()); } @Test - public void testGetConnectionId() { + void testGetConnectionId() { assertEquals("test-connection-id", requestMeta.getConnectionId()); } @Test - public void testGetLabels() { + void testGetLabels() { Map labels = requestMeta.getLabels(); assertNotNull(labels); assertEquals(1, labels.size()); @@ -67,20 +67,20 @@ public void testGetLabels() { } @Test - public void testToString() { + void testToString() { String expected = "RequestMeta{connectionId='test-connection-id', clientIp='127.0.0.1', clientVersion='1.0.0', labels={env=dev}}"; assertEquals(expected, requestMeta.toString()); } @Test - public void testGetConnectionAbilityForNonExist() { + void testGetConnectionAbilityForNonExist() { assertEquals(AbilityStatus.UNKNOWN, requestMeta.getConnectionAbility(AbilityKey.SERVER_TEST_1)); requestMeta.setAbilityTable(Collections.emptyMap()); assertEquals(AbilityStatus.UNKNOWN, requestMeta.getConnectionAbility(AbilityKey.SERVER_TEST_1)); } @Test - public void testGetConnectionAbilityForExist() { + void testGetConnectionAbilityForExist() { requestMeta.setAbilityTable(Collections.singletonMap(AbilityKey.SERVER_TEST_1.getName(), Boolean.FALSE)); assertEquals(AbilityStatus.NOT_SUPPORTED, requestMeta.getConnectionAbility(AbilityKey.SERVER_TEST_1)); requestMeta.setAbilityTable(Collections.singletonMap(AbilityKey.SERVER_TEST_1.getName(), Boolean.TRUE)); diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/request/RequestTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/request/RequestTest.java index f52c3f3a025..24ee28b0ac0 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/request/RequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/request/RequestTest.java @@ -16,23 +16,23 @@ package com.alibaba.nacos.api.remote.request; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class RequestTest { +class RequestTest { - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { } @Test - public void testHeader() { + void testHeader() { MockRequest request = new MockRequest(); assertTrue(request.getHeaders().isEmpty()); assertNull(request.getHeader("clientIp")); diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/request/ServerReloadRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/request/ServerReloadRequestTest.java index 8066c2eb014..34c23e91b00 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/request/ServerReloadRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/request/ServerReloadRequestTest.java @@ -16,35 +16,38 @@ package com.alibaba.nacos.api.remote.request; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ServerReloadRequestTest extends BasicRequestTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ServerReloadRequestTest extends BasicRequestTest { @Test - public void testSerialize() throws Exception { + void testSerialize() throws Exception { ServerReloadRequest request = new ServerReloadRequest(); request.setReloadCount(10); request.setReloadServer("1.1.1.1"); request.setRequestId("1"); String json = mapper.writeValueAsString(request); System.out.println(json); - Assert.assertNotNull(json); - Assert.assertTrue(json.contains("\"reloadCount\":10")); - Assert.assertTrue(json.contains("\"reloadServer\":\"1.1.1.1\"")); - Assert.assertTrue(json.contains("\"module\":\"internal\"")); - Assert.assertTrue(json.contains("\"requestId\":\"1\"")); + assertNotNull(json); + assertTrue(json.contains("\"reloadCount\":10")); + assertTrue(json.contains("\"reloadServer\":\"1.1.1.1\"")); + assertTrue(json.contains("\"module\":\"internal\"")); + assertTrue(json.contains("\"requestId\":\"1\"")); } @Test - public void testDeserialize() throws Exception { + void testDeserialize() throws Exception { String json = "{\"headers\":{},\"requestId\":\"1\",\"reloadCount\":10,\"reloadServer\":\"1.1.1.1\"," + "\"module\":\"internal\"}"; ServerReloadRequest result = mapper.readValue(json, ServerReloadRequest.class); - Assert.assertNotNull(result); - Assert.assertEquals(10, result.getReloadCount()); - Assert.assertEquals("1.1.1.1", result.getReloadServer()); - Assert.assertEquals("1", result.getRequestId()); - Assert.assertEquals("internal", result.getModule()); + assertNotNull(result); + assertEquals(10, result.getReloadCount()); + assertEquals("1.1.1.1", result.getReloadServer()); + assertEquals("1", result.getRequestId()); + assertEquals("internal", result.getModule()); } } \ No newline at end of file diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/request/SetupAckRequestTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/request/SetupAckRequestTest.java index b0697db5e1d..c98108685bf 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/request/SetupAckRequestTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/request/SetupAckRequestTest.java @@ -17,34 +17,37 @@ package com.alibaba.nacos.api.remote.request; import com.alibaba.nacos.api.ability.constant.AbilityKey; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collections; -public class SetupAckRequestTest extends BasicRequestTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class SetupAckRequestTest extends BasicRequestTest { @Test - public void testSerialize() throws Exception { + void testSerialize() throws Exception { SetupAckRequest request = new SetupAckRequest( Collections.singletonMap(AbilityKey.SERVER_TEST_1.getName(), Boolean.TRUE)); request.setRequestId("1"); String json = mapper.writeValueAsString(request); System.out.println(json); - Assert.assertNotNull(json); - Assert.assertTrue(json.contains("\"abilityTable\":{\"test_1\":true}")); - Assert.assertTrue(json.contains("\"module\":\"internal\"")); - Assert.assertTrue(json.contains("\"requestId\":\"1\"")); + assertNotNull(json); + assertTrue(json.contains("\"abilityTable\":{\"test_1\":true}")); + assertTrue(json.contains("\"module\":\"internal\"")); + assertTrue(json.contains("\"requestId\":\"1\"")); } @Test - public void testDeserialize() throws Exception { + void testDeserialize() throws Exception { String json = "{\"headers\":{},\"requestId\":\"1\",\"abilityTable\":{\"test_1\":true}," + "\"module\":\"internal\"}"; SetupAckRequest result = mapper.readValue(json, SetupAckRequest.class); - Assert.assertNotNull(result); - Assert.assertTrue(result.getAbilityTable().get("test_1")); - Assert.assertEquals("1", result.getRequestId()); - Assert.assertEquals("internal", result.getModule()); + assertNotNull(result); + assertTrue(result.getAbilityTable().get("test_1")); + assertEquals("1", result.getRequestId()); + assertEquals("internal", result.getModule()); } } \ No newline at end of file diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/response/EmptyContentResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/response/EmptyContentResponseTest.java index 28b23af0891..19484416b7c 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/response/EmptyContentResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/response/EmptyContentResponseTest.java @@ -20,15 +20,15 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class EmptyContentResponseTest { +class EmptyContentResponseTest { private static final String COMMON_JSON = "{\"resultCode\":200,\"errorCode\":0,\"requestId\":\"1\",\"success\":true}"; @@ -36,14 +36,14 @@ public class EmptyContentResponseTest { ObjectMapper mapper = new ObjectMapper(); - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSetErrorInfo() { + void testSetErrorInfo() { Response response = new Response() { }; response.setErrorInfo(ResponseCode.FAIL.getCode(), ResponseCode.FAIL.getDesc()); @@ -53,7 +53,7 @@ public void testSetErrorInfo() { } @Test - public void testClientDetectionResponse() throws JsonProcessingException { + void testClientDetectionResponse() throws JsonProcessingException { ClientDetectionResponse response = new ClientDetectionResponse(); response.setRequestId("1"); String actual = mapper.writeValueAsString(response); @@ -63,7 +63,7 @@ public void testClientDetectionResponse() throws JsonProcessingException { } @Test - public void testConnectResetResponse() throws JsonProcessingException { + void testConnectResetResponse() throws JsonProcessingException { ConnectResetResponse response = new ConnectResetResponse(); response.setRequestId("1"); String actual = mapper.writeValueAsString(response); @@ -73,7 +73,7 @@ public void testConnectResetResponse() throws JsonProcessingException { } @Test - public void testHealthCheckResponse() throws JsonProcessingException { + void testHealthCheckResponse() throws JsonProcessingException { HealthCheckResponse response = new HealthCheckResponse(); response.setRequestId("1"); String actual = mapper.writeValueAsString(response); @@ -83,7 +83,7 @@ public void testHealthCheckResponse() throws JsonProcessingException { } @Test - public void testServerReloadResponse() throws JsonProcessingException { + void testServerReloadResponse() throws JsonProcessingException { ServerReloadResponse response = new ServerReloadResponse(); response.setRequestId("1"); String actual = mapper.writeValueAsString(response); @@ -93,7 +93,7 @@ public void testServerReloadResponse() throws JsonProcessingException { } @Test - public void testSetupAckResponse() throws JsonProcessingException { + void testSetupAckResponse() throws JsonProcessingException { SetupAckResponse response = new SetupAckResponse(); response.setRequestId("1"); String actual = mapper.writeValueAsString(response); diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/response/ErrorResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/response/ErrorResponseTest.java index 33392a4c447..4bf169a06f3 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/response/ErrorResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/response/ErrorResponseTest.java @@ -18,59 +18,60 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ErrorResponseTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ErrorResponseTest { @Test - public void testBuildWithErrorCode() { + void testBuildWithErrorCode() { int errorCode = 500; String msg = "err msg"; Response response = ErrorResponse.build(errorCode, msg); - Assert.assertEquals(errorCode, response.getErrorCode()); - Assert.assertEquals(errorCode, response.getResultCode()); - Assert.assertEquals(msg, response.getMessage()); + assertEquals(errorCode, response.getErrorCode()); + assertEquals(errorCode, response.getResultCode()); + assertEquals(msg, response.getMessage()); } @Test - public void testBuildWithThrowable() { + void testBuildWithThrowable() { String errMsg = "exception msg"; RuntimeException runtimeException = new RuntimeException(errMsg); Response response = ErrorResponse.build(runtimeException); - Assert.assertEquals(ResponseCode.FAIL.getCode(), response.getErrorCode()); - Assert.assertEquals(ResponseCode.FAIL.getCode(), response.getResultCode()); - Assert.assertEquals(errMsg, response.getMessage()); + assertEquals(ResponseCode.FAIL.getCode(), response.getErrorCode()); + assertEquals(ResponseCode.FAIL.getCode(), response.getResultCode()); + assertEquals(errMsg, response.getMessage()); } @Test - public void testBuildWithNacosException() { + void testBuildWithNacosException() { int errCode = 500; String errMsg = "nacos exception msg"; NacosException nacosException = new NacosException(errCode, errMsg); Response response = ErrorResponse.build(nacosException); - Assert.assertEquals(errCode, response.getErrorCode()); - Assert.assertEquals(errCode, response.getResultCode()); - Assert.assertEquals(errMsg, response.getMessage()); + assertEquals(errCode, response.getErrorCode()); + assertEquals(errCode, response.getResultCode()); + assertEquals(errMsg, response.getMessage()); } @Test - public void testBuildWithNacosRuntimeException() { + void testBuildWithNacosRuntimeException() { int errCode = 500; String errMsg = "nacos runtime exception msg"; NacosRuntimeException nacosRuntimeException = new NacosRuntimeException(errCode, errMsg); Response response = ErrorResponse.build(nacosRuntimeException); - Assert.assertEquals(errCode, response.getErrorCode()); - Assert.assertEquals(errCode, response.getResultCode()); - Assert.assertEquals("errCode: " + errCode + ", errMsg: " + errMsg + " ", response.getMessage()); + assertEquals(errCode, response.getErrorCode()); + assertEquals(errCode, response.getResultCode()); + assertEquals("errCode: " + errCode + ", errMsg: " + errMsg + " ", response.getMessage()); } - + } diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/response/ServerCheckResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/response/ServerCheckResponseTest.java index 9a7603435c8..4497514ed74 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/response/ServerCheckResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/response/ServerCheckResponseTest.java @@ -20,24 +20,24 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServerCheckResponseTest { +class ServerCheckResponseTest { ObjectMapper mapper = new ObjectMapper(); - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialization() throws JsonProcessingException { + void testSerialization() throws JsonProcessingException { ServerCheckResponse response = new ServerCheckResponse("35643245_1.1.1.1_3306", false); String actual = mapper.writeValueAsString(response); assertTrue(actual.contains("\"connectionId\":\"35643245_1.1.1.1_3306\"")); @@ -45,7 +45,7 @@ public void testSerialization() throws JsonProcessingException { } @Test - public void testDeserialization() throws JsonProcessingException { + void testDeserialization() throws JsonProcessingException { String json = "{\"resultCode\":200,\"errorCode\":0,\"connectionId\":\"35643245_1.1.1.1_3306\",\"success\":true," + "\"supportAbilityNegotiation\":true}"; ServerCheckResponse response = mapper.readValue(json, ServerCheckResponse.class); diff --git a/api/src/test/java/com/alibaba/nacos/api/remote/response/ServerLoaderInfoResponseTest.java b/api/src/test/java/com/alibaba/nacos/api/remote/response/ServerLoaderInfoResponseTest.java index 7f5041e73b0..20c86906042 100644 --- a/api/src/test/java/com/alibaba/nacos/api/remote/response/ServerLoaderInfoResponseTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/remote/response/ServerLoaderInfoResponseTest.java @@ -20,24 +20,24 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ServerLoaderInfoResponseTest { +class ServerLoaderInfoResponseTest { ObjectMapper mapper = new ObjectMapper(); - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); } @Test - public void testSerialization() throws JsonProcessingException { + void testSerialization() throws JsonProcessingException { ServerLoaderInfoResponse response = new ServerLoaderInfoResponse(); response.putMetricsValue("test", "testValue"); String actual = mapper.writeValueAsString(response); @@ -46,7 +46,7 @@ public void testSerialization() throws JsonProcessingException { } @Test - public void testDeserialization() throws JsonProcessingException { + void testDeserialization() throws JsonProcessingException { String json = "{\"resultCode\":200,\"errorCode\":0,\"loaderMetrics\":{\"test\":\"testValue\"},\"success\":true}"; ServerLoaderInfoResponse response = mapper.readValue(json, ServerLoaderInfoResponse.class); assertEquals(1, response.getLoaderMetrics().size()); diff --git a/api/src/test/java/com/alibaba/nacos/api/selector/AbstractCmdbSelectorTest.java b/api/src/test/java/com/alibaba/nacos/api/selector/AbstractCmdbSelectorTest.java index 267e5882b84..af9323e9786 100644 --- a/api/src/test/java/com/alibaba/nacos/api/selector/AbstractCmdbSelectorTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/selector/AbstractCmdbSelectorTest.java @@ -20,29 +20,29 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.selector.context.CmdbContext; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import static com.alibaba.nacos.api.common.Constants.Naming.CMDB_CONTEXT_TYPE; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class AbstractCmdbSelectorTest { +class AbstractCmdbSelectorTest { private AtomicInteger counter; - @Before - public void setUp() { + @BeforeEach + void setUp() { counter = new AtomicInteger(); } @Test - public void testSetExpression() { + void testSetExpression() { MockCmdbSelector cmdbSelector = new MockCmdbSelector(); assertNull(cmdbSelector.getExpression()); cmdbSelector.setExpression("test"); @@ -50,7 +50,7 @@ public void testSetExpression() { } @Test - public void testParse() throws NacosException { + void testParse() throws NacosException { MockCmdbSelector cmdbSelector = new MockCmdbSelector(); cmdbSelector.parse("test"); assertEquals("test", cmdbSelector.getExpression()); @@ -58,7 +58,7 @@ public void testParse() throws NacosException { } @Test - public void testSelect() { + void testSelect() { CmdbContext context = new CmdbContext<>(); CmdbContext.CmdbInstance provider = new CmdbContext.CmdbInstance<>(); provider.setInstance(new Instance()); @@ -78,12 +78,12 @@ public void testSelect() { } @Test - public void testGetContextType() { + void testGetContextType() { assertEquals(CMDB_CONTEXT_TYPE, new MockCmdbSelector().getContextType()); } @Test - public void testGetType() { + void testGetType() { assertEquals("mock", new MockCmdbSelector().getType()); } diff --git a/api/src/test/java/com/alibaba/nacos/api/selector/ExpressionSelectorTest.java b/api/src/test/java/com/alibaba/nacos/api/selector/ExpressionSelectorTest.java index 20e813168d0..f403a227ec2 100644 --- a/api/src/test/java/com/alibaba/nacos/api/selector/ExpressionSelectorTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/selector/ExpressionSelectorTest.java @@ -21,25 +21,25 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.jsontype.NamedType; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ExpressionSelectorTest { +class ExpressionSelectorTest { ObjectMapper mapper = new ObjectMapper(); - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.registerSubtypes(new NamedType(ExpressionSelector.class, SelectorType.label.name())); } @Test - public void testSerialization() throws JsonProcessingException { + void testSerialization() throws JsonProcessingException { ExpressionSelector selector = new ExpressionSelector(); selector.setExpression("test expression"); String actual = mapper.writeValueAsString(selector); @@ -48,7 +48,7 @@ public void testSerialization() throws JsonProcessingException { } @Test - public void testDeserialization() throws JsonProcessingException { + void testDeserialization() throws JsonProcessingException { String json = "{\"type\":\"label\",\"expression\":\"test expression\"}"; AbstractSelector actual = mapper.readValue(json, AbstractSelector.class); assertEquals(SelectorType.label.name(), actual.getType()); diff --git a/api/src/test/java/com/alibaba/nacos/api/selector/NoneSelectorTest.java b/api/src/test/java/com/alibaba/nacos/api/selector/NoneSelectorTest.java index 8f2f87214c4..1c6d679b502 100644 --- a/api/src/test/java/com/alibaba/nacos/api/selector/NoneSelectorTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/selector/NoneSelectorTest.java @@ -21,32 +21,32 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.jsontype.NamedType; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class NoneSelectorTest { +class NoneSelectorTest { ObjectMapper mapper = new ObjectMapper(); - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.registerSubtypes(new NamedType(NoneSelector.class, SelectorType.none.name())); } @Test - public void testSerialization() throws JsonProcessingException { + void testSerialization() throws JsonProcessingException { NoneSelector selector = new NoneSelector(); String actual = mapper.writeValueAsString(selector); assertTrue(actual.contains("\"type\":\"" + SelectorType.none.name() + "\"")); } @Test - public void testDeserialization() throws JsonProcessingException { + void testDeserialization() throws JsonProcessingException { String json = "{\"type\":\"none\"}"; AbstractSelector actual = mapper.readValue(json, AbstractSelector.class); assertEquals(SelectorType.none.name(), actual.getType()); diff --git a/api/src/test/java/com/alibaba/nacos/api/selector/context/CmdbContextTest.java b/api/src/test/java/com/alibaba/nacos/api/selector/context/CmdbContextTest.java index 90fe6c1fe9a..f3f3bbfa0c5 100644 --- a/api/src/test/java/com/alibaba/nacos/api/selector/context/CmdbContextTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/selector/context/CmdbContextTest.java @@ -17,16 +17,16 @@ package com.alibaba.nacos.api.selector.context; import com.alibaba.nacos.api.naming.pojo.Instance; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class CmdbContextTest { +class CmdbContextTest { @Test - public void testToString() { + void testToString() { CmdbContext cmdbContext = new CmdbContext<>(); cmdbContext.setProviders(Collections.singletonList(new CmdbContext.CmdbInstance<>())); cmdbContext.setConsumer(new CmdbContext.CmdbInstance<>()); diff --git a/api/src/test/java/com/alibaba/nacos/api/utils/AbilityKeyTest.java b/api/src/test/java/com/alibaba/nacos/api/utils/AbilityKeyTest.java index a7a88fce339..0812ce18723 100644 --- a/api/src/test/java/com/alibaba/nacos/api/utils/AbilityKeyTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/utils/AbilityKeyTest.java @@ -18,26 +18,28 @@ import com.alibaba.nacos.api.ability.constant.AbilityKey; import com.alibaba.nacos.api.ability.constant.AbilityMode; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -/**. +/** + * . + * * @author Daydreamer * @description Ability key test * @date 2022/9/8 12:27 **/ -public class AbilityKeyTest { +class AbilityKeyTest { @Test - public void testMapStr() { + void testMapStr() { Map enumMap = new HashMap<>(); Map stringBooleanMap = AbilityKey.mapStr(enumMap); assertEquals(0, stringBooleanMap.size()); @@ -47,27 +49,27 @@ public void testMapStr() { enumMap.put(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC, false); stringBooleanMap = AbilityKey.mapStr(enumMap); assertEquals(3, stringBooleanMap.size()); - Assert.assertTrue(stringBooleanMap.get(AbilityKey.SERVER_TEST_1.getName())); - Assert.assertFalse(stringBooleanMap.get(AbilityKey.SERVER_TEST_2.getName())); - Assert.assertFalse(stringBooleanMap.get(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC.getName())); + assertTrue(stringBooleanMap.get(AbilityKey.SERVER_TEST_1.getName())); + assertFalse(stringBooleanMap.get(AbilityKey.SERVER_TEST_2.getName())); + assertFalse(stringBooleanMap.get(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC.getName())); enumMap.put(AbilityKey.SERVER_TEST_2, true); enumMap.put(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC, true); stringBooleanMap = AbilityKey.mapStr(enumMap); assertEquals(3, stringBooleanMap.size()); - Assert.assertTrue(stringBooleanMap.get(AbilityKey.SERVER_TEST_1.getName())); - Assert.assertTrue(stringBooleanMap.get(AbilityKey.SERVER_TEST_2.getName())); - Assert.assertTrue(stringBooleanMap.get(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC.getName())); + assertTrue(stringBooleanMap.get(AbilityKey.SERVER_TEST_1.getName())); + assertTrue(stringBooleanMap.get(AbilityKey.SERVER_TEST_2.getName())); + assertTrue(stringBooleanMap.get(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC.getName())); } @Test - public void testMapEnumForEmpty() { + void testMapEnumForEmpty() { Map actual = AbilityKey.mapEnum(AbilityMode.SERVER, Collections.emptyMap()); assertTrue(actual.isEmpty()); } @Test - public void testMapEnum() { + void testMapEnum() { Map mapStr = new HashMap<>(); mapStr.put("test-no-existed", true); Map enumMap = AbilityKey.mapEnum(AbilityMode.SERVER, mapStr); @@ -77,23 +79,23 @@ public void testMapEnum() { mapStr.put(AbilityKey.SERVER_TEST_1.getName(), true); mapStr.put(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC.getName(), true); enumMap = AbilityKey.mapEnum(AbilityMode.SERVER, mapStr); - Assert.assertFalse(enumMap.get(AbilityKey.SERVER_TEST_2)); - Assert.assertTrue(enumMap.get(AbilityKey.SERVER_TEST_1)); - Assert.assertTrue(enumMap.get(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); - + assertFalse(enumMap.get(AbilityKey.SERVER_TEST_2)); + assertTrue(enumMap.get(AbilityKey.SERVER_TEST_1)); + assertTrue(enumMap.get(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); + mapStr.clear(); mapStr.put(AbilityKey.SERVER_TEST_2.getName(), true); mapStr.put(AbilityKey.SERVER_TEST_1.getName(), true); mapStr.put(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC.getName(), true); enumMap = AbilityKey.mapEnum(AbilityMode.SERVER, mapStr); - Assert.assertTrue(enumMap.get(AbilityKey.SERVER_TEST_2)); - Assert.assertTrue(enumMap.get(AbilityKey.SERVER_TEST_1)); - Assert.assertTrue(enumMap.get(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); + assertTrue(enumMap.get(AbilityKey.SERVER_TEST_2)); + assertTrue(enumMap.get(AbilityKey.SERVER_TEST_1)); + assertTrue(enumMap.get(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); } @Test - public void testGetAllValues() { + void testGetAllValues() { Collection actual = AbilityKey.getAllValues(AbilityMode.SERVER); assertEquals(3, actual.size()); actual = AbilityKey.getAllValues(AbilityMode.SDK_CLIENT); @@ -103,7 +105,7 @@ public void testGetAllValues() { } @Test - public void testGetAllNames() { + void testGetAllNames() { Collection actual = AbilityKey.getAllNames(AbilityMode.SERVER); assertEquals(3, actual.size()); actual = AbilityKey.getAllNames(AbilityMode.SDK_CLIENT); @@ -113,7 +115,7 @@ public void testGetAllNames() { } @Test - public void testGetDescription() { + void testGetDescription() { assertEquals("just for junit test", AbilityKey.SERVER_TEST_1.getDescription()); } } diff --git a/api/src/test/java/com/alibaba/nacos/api/utils/NetUtilsTest.java b/api/src/test/java/com/alibaba/nacos/api/utils/NetUtilsTest.java index ed9a0f59479..42b57103353 100644 --- a/api/src/test/java/com/alibaba/nacos/api/utils/NetUtilsTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/utils/NetUtilsTest.java @@ -16,22 +16,22 @@ package com.alibaba.nacos.api.utils; -import org.junit.After; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.net.InetAddress; import java.util.Properties; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class NetUtilsTest { +class NetUtilsTest { - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { Class clazz = Class.forName("com.alibaba.nacos.api.utils.NetUtils"); Field field = clazz.getDeclaredField("localIp"); field.setAccessible(true); @@ -42,7 +42,7 @@ public void tearDown() throws Exception { } @Test - public void testLocalIpWithSpecifiedIp() { + void testLocalIpWithSpecifiedIp() { System.setProperty("com.alibaba.nacos.client.local.ip", "10.2.8.8"); assertEquals("10.2.8.8", NetUtils.localIP()); System.setProperty("com.alibaba.nacos.client.local.ip", "10.2.8.9"); @@ -50,7 +50,7 @@ public void testLocalIpWithSpecifiedIp() { } @Test - public void testLocalIpWithPreferHostname() throws Exception { + void testLocalIpWithPreferHostname() throws Exception { InetAddress inetAddress = invokeGetInetAddress(); String hostname = inetAddress.getHostName(); System.setProperty("com.alibaba.nacos.client.local.preferHostname", "true"); @@ -58,14 +58,14 @@ public void testLocalIpWithPreferHostname() throws Exception { } @Test - public void testLocalIpWithoutPreferHostname() throws Exception { + void testLocalIpWithoutPreferHostname() throws Exception { InetAddress inetAddress = invokeGetInetAddress(); String ip = inetAddress.getHostAddress(); assertEquals(ip, NetUtils.localIP()); } @Test - public void testLocalIpWithException() throws Exception { + void testLocalIpWithException() throws Exception { Field field = System.class.getDeclaredField("props"); field.setAccessible(true); Properties properties = (Properties) field.get(null); diff --git a/api/src/test/java/com/alibaba/nacos/api/utils/StringUtilsTest.java b/api/src/test/java/com/alibaba/nacos/api/utils/StringUtilsTest.java index 48a35722461..2775f83c47f 100644 --- a/api/src/test/java/com/alibaba/nacos/api/utils/StringUtilsTest.java +++ b/api/src/test/java/com/alibaba/nacos/api/utils/StringUtilsTest.java @@ -16,94 +16,98 @@ package com.alibaba.nacos.api.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class StringUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class StringUtilsTest { @Test - public void testIsEmpty() { - Assert.assertTrue(StringUtils.isEmpty(null)); - Assert.assertTrue(StringUtils.isEmpty("")); - Assert.assertFalse(StringUtils.isEmpty(" ")); - Assert.assertFalse(StringUtils.isEmpty("bob")); - Assert.assertFalse(StringUtils.isEmpty(" bob ")); + void testIsEmpty() { + assertTrue(StringUtils.isEmpty(null)); + assertTrue(StringUtils.isEmpty("")); + assertFalse(StringUtils.isEmpty(" ")); + assertFalse(StringUtils.isEmpty("bob")); + assertFalse(StringUtils.isEmpty(" bob ")); } @Test - public void testIsBlank() { - Assert.assertTrue(StringUtils.isBlank(null)); - Assert.assertTrue(StringUtils.isBlank("")); - Assert.assertTrue(StringUtils.isBlank(" ")); - Assert.assertFalse(StringUtils.isBlank("bob")); - Assert.assertFalse(StringUtils.isBlank(" bob ")); + void testIsBlank() { + assertTrue(StringUtils.isBlank(null)); + assertTrue(StringUtils.isBlank("")); + assertTrue(StringUtils.isBlank(" ")); + assertFalse(StringUtils.isBlank("bob")); + assertFalse(StringUtils.isBlank(" bob ")); } @Test - public void testTrim() { - Assert.assertNull(StringUtils.trim(null)); - Assert.assertEquals(StringUtils.EMPTY, StringUtils.trim("")); - Assert.assertEquals(StringUtils.EMPTY, StringUtils.trim(" ")); - Assert.assertEquals("abc", StringUtils.trim("abc")); - Assert.assertEquals("abc", StringUtils.trim(" abc ")); + void testTrim() { + assertNull(StringUtils.trim(null)); + assertEquals(StringUtils.EMPTY, StringUtils.trim("")); + assertEquals(StringUtils.EMPTY, StringUtils.trim(" ")); + assertEquals("abc", StringUtils.trim("abc")); + assertEquals("abc", StringUtils.trim(" abc ")); } @Test - public void testEquals() { - Assert.assertTrue(StringUtils.equals(null, null)); - Assert.assertFalse(StringUtils.equals(null, "abc")); - Assert.assertFalse(StringUtils.equals("abc", null)); - Assert.assertTrue(StringUtils.equals("abc", "abc")); - Assert.assertFalse(StringUtils.equals("abc", "ABC")); - Assert.assertTrue(StringUtils.equals(new StringBuilder("abc"), "abc")); - Assert.assertFalse(StringUtils.equals(new StringBuilder("ABC"), "abc")); + void testEquals() { + assertTrue(StringUtils.equals(null, null)); + assertFalse(StringUtils.equals(null, "abc")); + assertFalse(StringUtils.equals("abc", null)); + assertTrue(StringUtils.equals("abc", "abc")); + assertFalse(StringUtils.equals("abc", "ABC")); + assertTrue(StringUtils.equals(new StringBuilder("abc"), "abc")); + assertFalse(StringUtils.equals(new StringBuilder("ABC"), "abc")); } @Test - public void testRegionMatchesEqualsCaseSensitive() { - Assert.assertTrue(StringUtils.regionMatches("abc", false, 0, "xabc", 1, 3)); - + void testRegionMatchesEqualsCaseSensitive() { + assertTrue(StringUtils.regionMatches("abc", false, 0, "xabc", 1, 3)); + } @Test - public void testRegionMatchesEqualsCaseInsensitive() { - Assert.assertTrue(StringUtils.regionMatches("abc", true, 0, "xabc", 1, 3)); - Assert.assertTrue(StringUtils.regionMatches("abc", true, 0, "xAbc", 1, 3)); + void testRegionMatchesEqualsCaseInsensitive() { + assertTrue(StringUtils.regionMatches("abc", true, 0, "xabc", 1, 3)); + assertTrue(StringUtils.regionMatches("abc", true, 0, "xAbc", 1, 3)); } @Test - public void testRegionMatchesNotEqualsCaseSensitive() { - Assert.assertFalse(StringUtils.regionMatches("abc", false, 0, "xAbc", 1, 3)); - Assert.assertFalse(StringUtils.regionMatches("abc", false, 0, "xCbc", 1, 3)); + void testRegionMatchesNotEqualsCaseSensitive() { + assertFalse(StringUtils.regionMatches("abc", false, 0, "xAbc", 1, 3)); + assertFalse(StringUtils.regionMatches("abc", false, 0, "xCbc", 1, 3)); } @Test - public void testRegionMatchesNotEqualsCaseInsensitive() { - Assert.assertFalse(StringUtils.regionMatches("abc", true, 0, "xCab", 1, 3)); + void testRegionMatchesNotEqualsCaseInsensitive() { + assertFalse(StringUtils.regionMatches("abc", true, 0, "xCab", 1, 3)); } @Test - public void testRegionMatchesEqualsCaseSensitiveForNonString() { - Assert.assertTrue(StringUtils.regionMatches(new StringBuilder("abc"), false, 0, "xabc", 1, 3)); + void testRegionMatchesEqualsCaseSensitiveForNonString() { + assertTrue(StringUtils.regionMatches(new StringBuilder("abc"), false, 0, "xabc", 1, 3)); } @Test - public void testRegionMatchesEqualsCaseInsensitiveForNonString() { - Assert.assertTrue(StringUtils.regionMatches(new StringBuilder("abc"), true, 0, "xabc", 1, 3)); - Assert.assertTrue(StringUtils.regionMatches(new StringBuilder("abc"), true, 0, "xAbc", 1, 3)); + void testRegionMatchesEqualsCaseInsensitiveForNonString() { + assertTrue(StringUtils.regionMatches(new StringBuilder("abc"), true, 0, "xabc", 1, 3)); + assertTrue(StringUtils.regionMatches(new StringBuilder("abc"), true, 0, "xAbc", 1, 3)); } @Test - public void testRegionMatchesNotEqualsCaseSensitiveForNonString() { - Assert.assertFalse(StringUtils.regionMatches(new StringBuilder("abc"), false, 0, "xAbc", 1, 3)); - Assert.assertFalse(StringUtils.regionMatches(new StringBuilder("abc"), false, 0, "xCbc", 1, 3)); + void testRegionMatchesNotEqualsCaseSensitiveForNonString() { + assertFalse(StringUtils.regionMatches(new StringBuilder("abc"), false, 0, "xAbc", 1, 3)); + assertFalse(StringUtils.regionMatches(new StringBuilder("abc"), false, 0, "xCbc", 1, 3)); } @Test - public void testRegionMatchesNotEqualsCaseInsensitiveForNonString() { - Assert.assertFalse(StringUtils.regionMatches(new StringBuilder("abc"), true, 0, "xCab", 1, 3)); + void testRegionMatchesNotEqualsCaseInsensitiveForNonString() { + assertFalse(StringUtils.regionMatches(new StringBuilder("abc"), true, 0, "xCab", 1, 3)); } } From 6bee5c47a9710c990f4863e99ba281aa619ff5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E7=BF=8A=20SionYang?= Date: Mon, 20 May 2024 14:32:43 +0800 Subject: [PATCH 024/110] update codecov token. (#12121) --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 663a7d4bf8a..918ac9cb709 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,7 @@ jobs: - name: "Test With Maven" run: mvn -Prelease-nacos clean test -DtrimStackTrace=false -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn - name: "Codecov" - uses: codecov/codecov-action@v3.1.0 + uses: codecov/codecov-action@v4.0.1 with: files: ./address/target/site/jacoco/jacoco.xml,./api/target/site/jacoco/jacoco.xml,./auth/target/site/jacoco/jacoco.xml,./client/target/site/jacoco/jacoco.xml,./common/target/site/jacoco/jacoco.xml,./config/target/site/jacoco/jacoco.xml,./consistency/target/site/jacoco/jacoco.xml,./console/target/site/jacoco/jacoco.xml,./core/target/site/jacoco/jacoco.xml,./logger-adapter-impl/log4j2-adapter/target/site/jacoco/jacoco.xml,./logger-adapter-impl/logback-adapter-12/target/site/jacoco/jacoco.xml,./naming/target/site/jacoco/jacoco.xml,./persistence/target/site/jacoco/jacoco.xml,./plugin-default-impl/nacos-default-auth-plugin/target/site/jacoco/jacoco.xml,./plugin-default-impl/nacos-default-control-plugin/target/site/jacoco/jacoco.xml,./plugin/auth/target/site/jacoco/jacoco.xml,./plugin/config/target/site/jacoco/jacoco.xml,./plugin/control/target/site/jacoco/jacoco.xml,./plugin/datasource/target/site/jacoco/jacoco.xml,./plugin/encryption/target/site/jacoco/jacoco.xml,./plugin/environment/target/site/jacoco/jacoco.xml,./plugin/trace/target/site/jacoco/jacoco.xml,./prometheus/target/site/jacoco/jacoco.xml,./sys/target/site/jacoco/jacoco.xml + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From 992f10a1d61cefc3253265c872d72b229d47d662 Mon Sep 17 00:00:00 2001 From: hth <1165559068@qq.com> Date: Fri, 24 May 2024 10:14:40 +0800 Subject: [PATCH 025/110] [ISSUE #11957] AuthModule add admin exist (#12066) * AuthModule add admin exist * test fix * fix state * add state cache * rename to auth_admin_request * test fix * auth_admin_request default value fix * fix admin request --- .../auth/config/AuthModuleStateBuilder.java | 20 +++++++++++++++++ .../config/AuthModuleStateBuilderTest.java | 2 ++ .../auth/impl/NacosAuthPluginService.java | 5 +++++ .../auth/impl/controller/UserController.java | 15 +++++-------- .../impl/controller/UserControllerTest.java | 1 - .../auth/spi/server/AuthPluginService.java | 9 ++++++++ .../nacos/sys/module/ModuleStateBuilder.java | 10 +++++++++ .../nacos/sys/module/ModuleStateHolder.java | 22 +++++++++++++++++++ 8 files changed, 73 insertions(+), 11 deletions(-) diff --git a/auth/src/main/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilder.java b/auth/src/main/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilder.java index dd83d1329a4..b6eb66657ce 100644 --- a/auth/src/main/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilder.java +++ b/auth/src/main/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilder.java @@ -39,6 +39,10 @@ public class AuthModuleStateBuilder implements ModuleStateBuilder { public static final String AUTH_SYSTEM_TYPE = "auth_system_type"; + public static final String AUTH_ADMIN_REQUEST = "auth_admin_request"; + + private boolean cacheable; + @Override public ModuleState build() { ModuleState result = new ModuleState(AUTH_MODULE); @@ -46,12 +50,28 @@ public ModuleState build() { result.newState(AUTH_ENABLED, authConfigs.isAuthEnabled()); result.newState(LOGIN_PAGE_ENABLED, isLoginPageEnabled(authConfigs)); result.newState(AUTH_SYSTEM_TYPE, authConfigs.getNacosAuthSystemType()); + result.newState(AUTH_ADMIN_REQUEST, isAdminRequest(authConfigs)); return result; } + @Override + public boolean isCacheable() { + return cacheable; + } + private Boolean isLoginPageEnabled(AuthConfigs authConfigs) { Optional authPluginService = AuthPluginManager.getInstance() .findAuthServiceSpiImpl(authConfigs.getNacosAuthSystemType()); return authPluginService.map(AuthPluginService::isLoginEnabled).orElse(false); } + + private Boolean isAdminRequest(AuthConfigs authConfigs) { + Optional authPluginService = AuthPluginManager.getInstance() + .findAuthServiceSpiImpl(authConfigs.getNacosAuthSystemType()); + boolean isAdminRequest = authPluginService.map(AuthPluginService::isAdminRequest).orElse(true); + if (!isAdminRequest) { + cacheable = true; + } + return isAdminRequest; + } } diff --git a/auth/src/test/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilderTest.java b/auth/src/test/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilderTest.java index c78fbfebb54..3727fa3d309 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilderTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/config/AuthModuleStateBuilderTest.java @@ -29,6 +29,7 @@ import static com.alibaba.nacos.auth.config.AuthModuleStateBuilder.AUTH_ENABLED; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) @@ -57,5 +58,6 @@ void testBuild() { assertFalse((Boolean) actual.getStates().get(AUTH_ENABLED)); assertFalse((Boolean) actual.getStates().get("login_page_enabled")); assertEquals("nacos", actual.getStates().get("auth_system_type")); + assertTrue((Boolean) actual.getStates().get("auth_admin_request")); } } \ No newline at end of file diff --git a/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/NacosAuthPluginService.java b/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/NacosAuthPluginService.java index 4902e665292..c643112b8a1 100644 --- a/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/NacosAuthPluginService.java +++ b/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/NacosAuthPluginService.java @@ -113,6 +113,11 @@ public boolean isLoginEnabled() { return ApplicationUtils.getBean(AuthConfigs.class).isAuthEnabled(); } + @Override + public boolean isAdminRequest() { + return !ApplicationUtils.getBean(IAuthenticationManager.class).hasGlobalAdminRole(); + } + protected void checkNacosAuthManager() { if (null == authenticationManager) { authenticationManager = ApplicationUtils.getBean(DefaultAuthenticationManager.class); diff --git a/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/controller/UserController.java b/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/controller/UserController.java index a4e60f7c5e3..954bf978a5f 100644 --- a/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/controller/UserController.java +++ b/plugin-default-impl/nacos-default-auth-plugin/src/main/java/com/alibaba/nacos/plugin/auth/impl/controller/UserController.java @@ -115,18 +115,16 @@ public Object createUser(@RequestParam String username, @RequestParam String pas * Create a admin user only not exist admin user can use. */ @PostMapping("/admin") - public Object createAdminUser(@RequestParam(required = false) String username, - @RequestParam(required = false) String password) { + public Object createAdminUser(@RequestParam(required = false) String password) { if (AuthSystemTypes.NACOS.name().equalsIgnoreCase(authConfigs.getNacosAuthSystemType())) { - if (roleService.hasGlobalAdminRole()) { + if (iAuthenticationManager.hasGlobalAdminRole()) { return RestResultUtils.failed("have admin user cannot use it"); } if (StringUtils.isBlank(password)) { password = PasswordGeneratorUtil.generateRandomPassword(); } - if (StringUtils.isBlank(username)) { - username = AuthConstants.DEFAULT_USER; - } + + String username = AuthConstants.DEFAULT_USER; userDetailsService.createUser(username, PasswordEncoderUtil.encode(password)); roleService.addAdminRole(username); ObjectNode result = JacksonUtils.createEmptyJsonNode(); @@ -266,10 +264,7 @@ public Object login(@RequestParam String username, @RequestParam String password if (AuthSystemTypes.NACOS.name().equalsIgnoreCase(authConfigs.getNacosAuthSystemType()) || AuthSystemTypes.LDAP.name().equalsIgnoreCase(authConfigs.getNacosAuthSystemType())) { - if (!iAuthenticationManager.hasGlobalAdminRole()) { - response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED, "admin role user not exist"); - return null; - } + NacosUser user = iAuthenticationManager.authenticate(request); response.addHeader(AuthConstants.AUTHORIZATION_HEADER, AuthConstants.TOKEN_PREFIX + user.getToken()); diff --git a/plugin-default-impl/nacos-default-auth-plugin/src/test/java/com/alibaba/nacos/plugin/auth/impl/controller/UserControllerTest.java b/plugin-default-impl/nacos-default-auth-plugin/src/test/java/com/alibaba/nacos/plugin/auth/impl/controller/UserControllerTest.java index 74417f67dc8..91268e550f2 100644 --- a/plugin-default-impl/nacos-default-auth-plugin/src/test/java/com/alibaba/nacos/plugin/auth/impl/controller/UserControllerTest.java +++ b/plugin-default-impl/nacos-default-auth-plugin/src/test/java/com/alibaba/nacos/plugin/auth/impl/controller/UserControllerTest.java @@ -90,7 +90,6 @@ public void setUp() throws Exception { public void testLoginWithAuthedUser() throws AccessException, IOException { when(authenticationManager.authenticate(request)).thenReturn(user); when(authenticationManager.hasGlobalAdminRole(user)).thenReturn(true); - when(authenticationManager.hasGlobalAdminRole()).thenReturn(true); when(authConfigs.getNacosAuthSystemType()).thenReturn(AuthSystemTypes.NACOS.name()); when(tokenManagerDelegate.getTokenTtlInSeconds(anyString())).thenReturn(18000L); Object actual = userController.login("nacos", "nacos", response, request); diff --git a/plugin/auth/src/main/java/com/alibaba/nacos/plugin/auth/spi/server/AuthPluginService.java b/plugin/auth/src/main/java/com/alibaba/nacos/plugin/auth/spi/server/AuthPluginService.java index f08dd3b1b46..93b4ef24cd3 100644 --- a/plugin/auth/src/main/java/com/alibaba/nacos/plugin/auth/spi/server/AuthPluginService.java +++ b/plugin/auth/src/main/java/com/alibaba/nacos/plugin/auth/spi/server/AuthPluginService.java @@ -84,4 +84,13 @@ public interface AuthPluginService { default boolean isLoginEnabled() { return false; } + + /** + * Whether need administrator . + * + * @return if need the administrator role. + */ + default boolean isAdminRequest() { + return true; + } } diff --git a/sys/src/main/java/com/alibaba/nacos/sys/module/ModuleStateBuilder.java b/sys/src/main/java/com/alibaba/nacos/sys/module/ModuleStateBuilder.java index d7c14134f66..8c06d18b7a9 100644 --- a/sys/src/main/java/com/alibaba/nacos/sys/module/ModuleStateBuilder.java +++ b/sys/src/main/java/com/alibaba/nacos/sys/module/ModuleStateBuilder.java @@ -38,4 +38,14 @@ public interface ModuleStateBuilder { default boolean isIgnore() { return false; } + + /** + * Whether module is cache, default return true. + * + * @return boolean + */ + default boolean isCacheable() { + return true; + } + } diff --git a/sys/src/main/java/com/alibaba/nacos/sys/module/ModuleStateHolder.java b/sys/src/main/java/com/alibaba/nacos/sys/module/ModuleStateHolder.java index 8a481978639..e8284d6ee61 100644 --- a/sys/src/main/java/com/alibaba/nacos/sys/module/ModuleStateHolder.java +++ b/sys/src/main/java/com/alibaba/nacos/sys/module/ModuleStateHolder.java @@ -21,8 +21,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -40,6 +42,8 @@ public class ModuleStateHolder { private final Map moduleStates; + private final List moduleStateBuilders = new ArrayList<>(); + private ModuleStateHolder() { this.moduleStates = new HashMap<>(); for (ModuleStateBuilder each : NacosServiceLoader.load(ModuleStateBuilder.class)) { @@ -47,6 +51,7 @@ private ModuleStateHolder() { continue; } try { + moduleStateBuilders.add(each); ModuleState moduleState = each.build(); moduleStates.put(moduleState.getModuleName(), moduleState); } catch (Exception e) { @@ -59,11 +64,28 @@ public static ModuleStateHolder getInstance() { return INSTANCE; } + private void reBuildModuleState() { + for (ModuleStateBuilder each : moduleStateBuilders) { + if (each.isCacheable()) { + continue; + } + try { + ModuleState moduleState = each.build(); + moduleStates.put(moduleState.getModuleName(), moduleState); + } catch (Exception e) { + LOGGER.warn("reBuild ModuleState failed in builder:{}", each.getClass().getCanonicalName(), e); + } + } + + } + public Optional getModuleState(String moduleName) { + reBuildModuleState(); return Optional.ofNullable(moduleStates.get(moduleName)); } public Set getAllModuleStates() { + reBuildModuleState(); return new HashSet<>(moduleStates.values()); } From 6fa3069b7e7554b4e76f04c979e312f63d28bcc0 Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Fri, 24 May 2024 10:15:17 +0800 Subject: [PATCH 026/110] [issue #12043] module client refact unit test to junit5 (#12044) * refact(client): remove junit4 to junit5 * fix code style * format with code style * fix code style * fix codestyle --- .../nacos/client/ability/AbilityTest.java | 74 ++-- .../ClientAbilityControlManagerTest.java | 18 +- .../impl/NacosClientAuthServiceImplTest.java | 74 ++-- .../ram/RamClientAuthServiceImplTest.java | 48 +-- .../ram/identify/CredentialServiceTest.java | 54 +-- .../ram/identify/CredentialWatcherTest.java | 49 ++- .../auth/ram/identify/CredentialsTest.java | 32 +- .../auth/ram/identify/StsConfigTest.java | 82 +++-- .../ram/identify/StsCredentialHolderTest.java | 59 +-- .../AbstractResourceInjectorTest.java | 15 +- .../injector/ConfigResourceInjectorTest.java | 72 ++-- .../injector/NamingResourceInjectorTest.java | 74 ++-- .../client/auth/ram/utils/SignUtilTest.java | 28 +- .../auth/ram/utils/SpasAdapterTest.java | 61 ++-- .../client/config/NacosConfigServiceTest.java | 143 ++++---- .../client/config/common/GroupKeyTest.java | 76 ++-- .../config/filter/impl/ConfigContextTest.java | 11 +- .../impl/ConfigEncryptionFilterTest.java | 39 +- .../impl/ConfigEncryptionFilterTest1.java | 58 +-- .../impl/ConfigFilterChainManagerTest.java | 101 +++--- .../filter/impl/ConfigFilterChainTest.java | 13 +- .../config/filter/impl/ConfigRequestTest.java | 34 +- .../filter/impl/ConfigResponseTest.java | 36 +- .../config/http/MetricsHttpAgentTest.java | 112 +++--- .../config/http/ServerHttpAgentTest.java | 228 ++++++------ .../client/config/impl/CacheDataTest.java | 109 +++--- .../client/config/impl/ClientWorkerTest.java | 165 ++++----- .../config/impl/ConfigChangeHandlerTest.java | 15 +- .../impl/ConfigHttpClientManagerTest.java | 34 +- .../nacos/client/config/impl/LimiterTest.java | 16 +- .../impl/PropertiesChangeParserTest.java | 31 +- .../config/impl/ServerListManagerTest.java | 133 +++---- .../config/impl/YmlChangeParserTest.java | 50 +-- .../AbstractConfigChangeListenerTest.java | 11 +- .../listener/impl/PropertiesListenerTest.java | 28 +- .../client/config/utils/ContentUtilsTest.java | 99 ++--- .../client/config/utils/JvmUtilTest.java | 28 +- .../client/config/utils/ParamUtilsTest.java | 190 +++++----- .../config/utils/SnapShotSwitchTest.java | 16 +- .../client/env/NacosClientPropertiesTest.java | 162 +++++---- .../client/env/SearchablePropertiesTest.java | 46 +-- .../env/SystemEnvPropertySourceTest.java | 28 +- .../env/convert/CompositeConverterTest.java | 77 ++-- .../client/logging/NacosLoggingTest.java | 26 +- .../NacosNamingMaintainServiceTest.java | 56 +-- .../client/naming/NacosNamingServiceTest.java | 226 ++++++------ .../naming/backups/FailoverReactorTest.java | 47 ++- .../DiskFailoverDataSourceTest.java | 29 +- .../client/naming/cache/DiskCacheTest.java | 56 +-- .../naming/cache/ServiceInfoHolderTest.java | 79 ++-- .../client/naming/core/BalancerTest.java | 42 +-- .../client/naming/core/ProtectModeTest.java | 15 +- .../naming/core/ServerListManagerTest.java | 151 ++++---- .../core/ServiceInfoUpdateServiceTest.java | 60 +-- .../event/InstancesChangeEventTest.java | 21 +- .../event/InstancesChangeNotifierTest.java | 44 +-- .../remote/AbstractNamingClientProxyTest.java | 33 +- .../remote/NamingClientProxyDelegateTest.java | 108 +++--- .../gprc/NamingGrpcClientProxyTest.java | 274 +++++++------- .../gprc/NamingPushRequestHandlerTest.java | 16 +- .../gprc/redo/NamingGrpcRedoServiceTest.java | 82 ++--- .../gprc/redo/RedoScheduledTaskTest.java | 54 +-- .../redo/data/BatchInstanceRedoDataTest.java | 26 +- .../gprc/redo/data/InstanceRedoDataTest.java | 22 +- .../http/NamingHttpClientManagerTest.java | 22 +- .../http/NamingHttpClientProxyTest.java | 342 +++++++++--------- .../client/naming/utils/CacheDirUtilTest.java | 20 +- .../client/naming/utils/ChooserTest.java | 77 ++-- .../naming/utils/CollectionUtilsTest.java | 47 +-- .../naming/utils/ConcurrentDiskUtilTest.java | 82 +++-- .../naming/utils/GenericPollerTest.java | 19 +- .../client/naming/utils/InitUtilsTest.java | 97 ++--- .../naming/utils/NamingHttpUtilTest.java | 24 +- .../nacos/client/naming/utils/PairTest.java | 13 +- .../client/security/SecurityProxyTest.java | 33 +- .../nacos/client/utils/AppNameUtilsTest.java | 28 +- .../client/utils/ContextPathUtilTest.java | 8 +- .../nacos/client/utils/EnvUtilTest.java | 36 +- .../nacos/client/utils/LogUtilsTest.java | 11 +- .../nacos/client/utils/ParamUtilTest.java | 92 ++--- .../nacos/client/utils/PreInitUtilsTest.java | 6 +- .../nacos/client/utils/StringUtilsTest.java | 24 +- .../nacos/client/utils/TemplateUtilsTest.java | 34 +- .../nacos/client/utils/TenantUtilTest.java | 21 +- .../client/utils/ValidatorUtilsTest.java | 59 +-- 85 files changed, 2799 insertions(+), 2592 deletions(-) diff --git a/client/src/test/java/com/alibaba/nacos/client/ability/AbilityTest.java b/client/src/test/java/com/alibaba/nacos/client/ability/AbilityTest.java index e4b53de1097..302cd0e278d 100644 --- a/client/src/test/java/com/alibaba/nacos/client/ability/AbilityTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/ability/AbilityTest.java @@ -25,57 +25,60 @@ import com.alibaba.nacos.api.remote.response.Response; import com.alibaba.nacos.client.naming.remote.TestConnection; import com.alibaba.nacos.common.remote.ConnectionType; -import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.remote.client.Connection; +import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.remote.client.RpcClientConfig; import com.alibaba.nacos.common.remote.client.ServerListFactory; import com.alibaba.nacos.common.remote.client.ServerRequestHandler; -import org.junit.After; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; + import java.util.HashMap; import java.util.List; import java.util.Map; -public class AbilityTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class AbilityTest { private RpcClient rpcClient; private Connection connection; @Test - public void testReceive() throws Exception { + void testReceive() throws Exception { rpcClient = new RpcClient(new RpcClientConfig() { @Override public String name() { return "test"; } - + @Override public int retryTimes() { return 1; } - + @Override public long timeOutMills() { return 3000L; } - + @Override public long connectionKeepAlive() { return 5000L; } - + @Override public int healthCheckRetryTimes() { return 1; } - + @Override public long healthCheckTimeOut() { return 3000L; } - + @Override public Map labels() { return new HashMap<>(); @@ -86,12 +89,12 @@ public Map labels() { public ConnectionType getConnectionType() { return null; } - + @Override public int rpcPortOffset() { return 0; } - + @Override public Connection connectToServer(ServerInfo serverInfo) throws Exception { connection = new Connection(new RpcClient.ServerInfo()) { @@ -101,33 +104,34 @@ public Connection connectToServer(ServerInfo serverInfo) throws Exception { super.abilityTable.put(AbilityKey.SERVER_TEST_1.getName(), true); super.abilityTable.put(AbilityKey.SERVER_TEST_2.getName(), false); } - + @Override public Response request(Request request, long timeoutMills) throws NacosException { return null; } - + @Override public RequestFuture requestFuture(Request request) throws NacosException { return null; } - + @Override public void asyncRequest(Request request, RequestCallBack requestCallBack) throws NacosException { - + } - + @Override public void close() { - + } - };; + }; + ; return connection; } }; rpcClient.start(); // test not ready - Assert.assertNull(rpcClient.getConnectionAbility(AbilityKey.SERVER_TEST_1)); + assertNull(rpcClient.getConnectionAbility(AbilityKey.SERVER_TEST_1)); // test ready rpcClient.serverListFactory(new ServerListFactory() { @@ -136,12 +140,12 @@ public void close() { public String genNextServer() { return "localhost:8848"; } - + @Override public String getCurrentServer() { return "localhost:8848"; } - + @Override public List getServerList() { return null; @@ -149,24 +153,26 @@ public List getServerList() { }); rpcClient.start(); // if connect successfully - Assert.assertEquals(rpcClient.getConnectionAbility(AbilityKey.SERVER_TEST_1), AbilityStatus.SUPPORTED); - Assert.assertEquals(rpcClient.getConnectionAbility(AbilityKey.SERVER_TEST_2), AbilityStatus.NOT_SUPPORTED); + assertEquals(AbilityStatus.SUPPORTED, rpcClient.getConnectionAbility(AbilityKey.SERVER_TEST_1)); + assertEquals(AbilityStatus.NOT_SUPPORTED, rpcClient.getConnectionAbility(AbilityKey.SERVER_TEST_2)); } - @After - public void testServerRequestAbility() { + @AfterEach + void testServerRequestAbility() { //test support ServerRequestHandler serverRequestHandler = (request, connection) -> { - Assert.assertEquals(connection.getConnectionAbility(AbilityKey.SERVER_TEST_1), AbilityStatus.SUPPORTED); - Assert.assertEquals(connection.getConnectionAbility(AbilityKey.SERVER_TEST_2), AbilityStatus.NOT_SUPPORTED); - return new Response() { }; + assertEquals(AbilityStatus.SUPPORTED, connection.getConnectionAbility(AbilityKey.SERVER_TEST_1)); + assertEquals(AbilityStatus.NOT_SUPPORTED, connection.getConnectionAbility(AbilityKey.SERVER_TEST_2)); + return new Response() { + }; }; serverRequestHandler.requestReply(null, connection); - + // test no ability table serverRequestHandler = (request, connection) -> { - Assert.assertEquals(connection.getConnectionAbility(AbilityKey.SERVER_TEST_1), AbilityStatus.UNKNOWN); - return new Response() { }; + assertEquals(AbilityStatus.UNKNOWN, connection.getConnectionAbility(AbilityKey.SERVER_TEST_1)); + return new Response() { + }; }; serverRequestHandler.requestReply(null, new TestConnection(new RpcClient.ServerInfo())); } diff --git a/client/src/test/java/com/alibaba/nacos/client/ability/ClientAbilityControlManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/ability/ClientAbilityControlManagerTest.java index c31378f0d75..c0473dcc8d3 100644 --- a/client/src/test/java/com/alibaba/nacos/client/ability/ClientAbilityControlManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/ability/ClientAbilityControlManagerTest.java @@ -18,25 +18,25 @@ import com.alibaba.nacos.api.ability.constant.AbilityKey; import com.alibaba.nacos.api.ability.constant.AbilityMode; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ClientAbilityControlManagerTest { +class ClientAbilityControlManagerTest { ClientAbilityControlManager clientAbilityControlManager; - @Before - public void setUp() { + @BeforeEach + void setUp() { clientAbilityControlManager = new ClientAbilityControlManager(); } @Test - public void testInitCurrentNodeAbilities() { + void testInitCurrentNodeAbilities() { Map> actual = clientAbilityControlManager.initCurrentNodeAbilities(); assertEquals(1, actual.size()); assertTrue(actual.containsKey(AbilityMode.SDK_CLIENT)); @@ -45,7 +45,7 @@ public void testInitCurrentNodeAbilities() { } @Test - public void testGetPriority() { + void testGetPriority() { assertEquals(0, clientAbilityControlManager.getPriority()); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/impl/NacosClientAuthServiceImplTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/impl/NacosClientAuthServiceImplTest.java index 11fe0ce83c1..a2312d8b984 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/impl/NacosClientAuthServiceImplTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/impl/NacosClientAuthServiceImplTest.java @@ -20,21 +20,24 @@ import com.alibaba.nacos.common.http.HttpRestResult; import com.alibaba.nacos.common.http.client.NacosRestTemplate; import com.alibaba.nacos.common.http.param.Header; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class NacosClientAuthServiceImplTest { +class NacosClientAuthServiceImplTest { @Test - public void testLoginSuccess() throws Exception { + void testLoginSuccess() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult result = new HttpRestResult<>(); @@ -53,11 +56,11 @@ public void testLoginSuccess() throws Exception { //when boolean ret = nacosClientAuthService.login(properties); //then - Assert.assertTrue(ret); + assertTrue(ret); } @Test - public void testTestLoginFailCode() throws Exception { + void testTestLoginFailCode() throws Exception { NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult result = new HttpRestResult<>(); result.setCode(400); @@ -67,16 +70,16 @@ public void testTestLoginFailCode() throws Exception { properties.setProperty(PropertyKeyConst.PASSWORD, "123456"); List serverList = new ArrayList<>(); serverList.add("localhost"); - + NacosClientAuthServiceImpl nacosClientAuthService = new NacosClientAuthServiceImpl(); nacosClientAuthService.setServerList(serverList); nacosClientAuthService.setNacosRestTemplate(nacosRestTemplate); boolean ret = nacosClientAuthService.login(properties); - Assert.assertFalse(ret); + assertFalse(ret); } @Test - public void testTestLoginFailHttp() throws Exception { + void testTestLoginFailHttp() throws Exception { NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); when(nacosRestTemplate.postForm(any(), (Header) any(), any(), any(), any())).thenThrow(new Exception()); Properties properties = new Properties(); @@ -84,17 +87,17 @@ public void testTestLoginFailHttp() throws Exception { properties.setProperty(PropertyKeyConst.PASSWORD, "123456"); List serverList = new ArrayList<>(); serverList.add("localhost"); - + NacosClientAuthServiceImpl nacosClientAuthService = new NacosClientAuthServiceImpl(); nacosClientAuthService.setServerList(serverList); nacosClientAuthService.setNacosRestTemplate(nacosRestTemplate); boolean ret = nacosClientAuthService.login(properties); - Assert.assertFalse(ret); + assertFalse(ret); } @Test - public void testTestLoginServerListSuccess() throws Exception { + void testTestLoginServerListSuccess() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult result = new HttpRestResult<>(); @@ -107,16 +110,16 @@ public void testTestLoginServerListSuccess() throws Exception { List serverList = new ArrayList<>(); serverList.add("localhost"); serverList.add("localhost"); - + NacosClientAuthServiceImpl nacosClientAuthService = new NacosClientAuthServiceImpl(); nacosClientAuthService.setServerList(serverList); nacosClientAuthService.setNacosRestTemplate(nacosRestTemplate); boolean ret = nacosClientAuthService.login(properties); - Assert.assertTrue(ret); + assertTrue(ret); } @Test - public void testTestLoginServerListLoginInWindow() throws Exception { + void testTestLoginServerListLoginInWindow() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult result = new HttpRestResult<>(); @@ -136,12 +139,12 @@ public void testTestLoginServerListLoginInWindow() throws Exception { nacosClientAuthService.login(properties); //then boolean ret = nacosClientAuthService.login(properties); - Assert.assertTrue(ret); + assertTrue(ret); } - + @Test - public void testGetAccessToken() throws Exception { + void testGetAccessToken() throws Exception { NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult result = new HttpRestResult<>(); result.setData("{\"accessToken\":\"abc\",\"tokenTtl\":1000}"); @@ -150,21 +153,22 @@ public void testGetAccessToken() throws Exception { Properties properties = new Properties(); properties.setProperty(PropertyKeyConst.USERNAME, "aaa"); properties.setProperty(PropertyKeyConst.PASSWORD, "123456"); - + List serverList = new ArrayList<>(); serverList.add("localhost"); - + NacosClientAuthServiceImpl nacosClientAuthService = new NacosClientAuthServiceImpl(); nacosClientAuthService.setServerList(serverList); nacosClientAuthService.setNacosRestTemplate(nacosRestTemplate); //when - Assert.assertTrue(nacosClientAuthService.login(properties)); + assertTrue(nacosClientAuthService.login(properties)); //then - Assert.assertEquals("abc", nacosClientAuthService.getLoginIdentityContext(null).getParameter(NacosAuthLoginConstant.ACCESSTOKEN)); + assertEquals("abc", + nacosClientAuthService.getLoginIdentityContext(null).getParameter(NacosAuthLoginConstant.ACCESSTOKEN)); } @Test - public void testGetAccessEmptyToken() throws Exception { + void testGetAccessEmptyToken() throws Exception { NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult result = new HttpRestResult<>(); result.setData("{\"accessToken\":\"\",\"tokenTtl\":1000}"); @@ -181,13 +185,14 @@ public void testGetAccessEmptyToken() throws Exception { nacosClientAuthService.setServerList(serverList); nacosClientAuthService.setNacosRestTemplate(nacosRestTemplate); //when - Assert.assertTrue(nacosClientAuthService.login(properties)); + assertTrue(nacosClientAuthService.login(properties)); //then - Assert.assertEquals("", nacosClientAuthService.getLoginIdentityContext(null).getParameter(NacosAuthLoginConstant.ACCESSTOKEN)); + assertEquals("", + nacosClientAuthService.getLoginIdentityContext(null).getParameter(NacosAuthLoginConstant.ACCESSTOKEN)); } @Test - public void testGetAccessTokenWithoutToken() throws Exception { + void testGetAccessTokenWithoutToken() throws Exception { NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult result = new HttpRestResult<>(); result.setData("{\"tokenTtl\":1000}"); @@ -196,21 +201,22 @@ public void testGetAccessTokenWithoutToken() throws Exception { Properties properties = new Properties(); properties.setProperty(PropertyKeyConst.USERNAME, "aaa"); properties.setProperty(PropertyKeyConst.PASSWORD, "123456"); - + List serverList = new ArrayList<>(); serverList.add("localhost"); - + NacosClientAuthServiceImpl nacosClientAuthService = new NacosClientAuthServiceImpl(); nacosClientAuthService.setServerList(serverList); nacosClientAuthService.setNacosRestTemplate(nacosRestTemplate); //when - Assert.assertTrue(nacosClientAuthService.login(properties)); + assertTrue(nacosClientAuthService.login(properties)); //then - Assert.assertNull(nacosClientAuthService.getLoginIdentityContext(null).getParameter(NacosAuthLoginConstant.ACCESSTOKEN)); + assertNull( + nacosClientAuthService.getLoginIdentityContext(null).getParameter(NacosAuthLoginConstant.ACCESSTOKEN)); } @Test - public void testGetAccessTokenWithInvalidTtl() throws Exception { + void testGetAccessTokenWithInvalidTtl() throws Exception { NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult result = new HttpRestResult<>(); result.setData("{\"accessToken\":\"abc\",\"tokenTtl\":\"abc\"}"); @@ -219,14 +225,14 @@ public void testGetAccessTokenWithInvalidTtl() throws Exception { Properties properties = new Properties(); properties.setProperty(PropertyKeyConst.USERNAME, "aaa"); properties.setProperty(PropertyKeyConst.PASSWORD, "123456"); - + List serverList = new ArrayList<>(); serverList.add("localhost"); - + NacosClientAuthServiceImpl nacosClientAuthService = new NacosClientAuthServiceImpl(); nacosClientAuthService.setServerList(serverList); nacosClientAuthService.setNacosRestTemplate(nacosRestTemplate); //when - Assert.assertFalse(nacosClientAuthService.login(properties)); + assertFalse(nacosClientAuthService.login(properties)); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/RamClientAuthServiceImplTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/RamClientAuthServiceImplTest.java index 6613a62ef6d..a7a577af4c4 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/RamClientAuthServiceImplTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/RamClientAuthServiceImplTest.java @@ -17,27 +17,27 @@ package com.alibaba.nacos.client.auth.ram; import com.alibaba.nacos.api.PropertyKeyConst; -import com.alibaba.nacos.plugin.auth.api.LoginIdentityContext; import com.alibaba.nacos.client.auth.ram.injector.AbstractResourceInjector; -import com.alibaba.nacos.plugin.auth.api.RequestResource; import com.alibaba.nacos.common.utils.ReflectUtils; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import com.alibaba.nacos.plugin.auth.api.LoginIdentityContext; +import com.alibaba.nacos.plugin.auth.api.RequestResource; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.Map; import java.util.Properties; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; -@RunWith(MockitoJUnitRunner.class) -public class RamClientAuthServiceImplTest { +@ExtendWith(MockitoExtension.class) +class RamClientAuthServiceImplTest { private static final String MOCK = "mock"; @@ -54,11 +54,11 @@ public class RamClientAuthServiceImplTest { private RequestResource resource; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { ramClientAuthService = new RamClientAuthServiceImpl(); - Map resourceInjectors = (Map) ReflectUtils - .getFieldValue(ramClientAuthService, "resourceInjectors"); + Map resourceInjectors = (Map) ReflectUtils.getFieldValue( + ramClientAuthService, "resourceInjectors"); resourceInjectors.clear(); resourceInjectors.put(MOCK, mockResourceInjector); ramContext = (RamContext) ReflectUtils.getFieldValue(ramClientAuthService, "ramContext"); @@ -71,7 +71,7 @@ public void setUp() throws Exception { } @Test - public void testLoginWithAkSk() { + void testLoginWithAkSk() { assertTrue(ramClientAuthService.login(akSkProperties)); assertEquals(PropertyKeyConst.ACCESS_KEY, ramContext.getAccessKey()); assertEquals(PropertyKeyConst.SECRET_KEY, ramContext.getSecretKey()); @@ -83,26 +83,26 @@ public void testLoginWithAkSk() { } @Test - public void testLoginWithRoleName() { + void testLoginWithRoleName() { assertTrue(ramClientAuthService.login(roleProperties)); - assertNull(PropertyKeyConst.ACCESS_KEY, ramContext.getAccessKey()); - assertNull(PropertyKeyConst.SECRET_KEY, ramContext.getSecretKey()); + assertNull(ramContext.getAccessKey(), PropertyKeyConst.ACCESS_KEY); + assertNull(ramContext.getSecretKey(), PropertyKeyConst.SECRET_KEY); assertEquals(PropertyKeyConst.RAM_ROLE_NAME, ramContext.getRamRoleName()); assertTrue(ramClientAuthService.login(akSkProperties)); - assertNull(PropertyKeyConst.ACCESS_KEY, ramContext.getAccessKey()); - assertNull(PropertyKeyConst.SECRET_KEY, ramContext.getSecretKey()); + assertNull(ramContext.getAccessKey(), PropertyKeyConst.ACCESS_KEY); + assertNull(ramContext.getSecretKey(), PropertyKeyConst.SECRET_KEY); assertEquals(PropertyKeyConst.RAM_ROLE_NAME, ramContext.getRamRoleName()); } @Test - public void testGetLoginIdentityContextWithoutLogin() { + void testGetLoginIdentityContextWithoutLogin() { LoginIdentityContext actual = ramClientAuthService.getLoginIdentityContext(resource); assertTrue(actual.getAllKey().isEmpty()); verify(mockResourceInjector, never()).doInject(resource, ramContext, actual); } @Test - public void testGetLoginIdentityContextWithoutInjector() { + void testGetLoginIdentityContextWithoutInjector() { ramClientAuthService.login(akSkProperties); LoginIdentityContext actual = ramClientAuthService.getLoginIdentityContext(resource); assertTrue(actual.getAllKey().isEmpty()); @@ -110,7 +110,7 @@ public void testGetLoginIdentityContextWithoutInjector() { } @Test - public void testGetLoginIdentityContextWithInjector() { + void testGetLoginIdentityContextWithInjector() { ramClientAuthService.login(akSkProperties); resource.setType(MOCK); LoginIdentityContext actual = ramClientAuthService.getLoginIdentityContext(resource); diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialServiceTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialServiceTest.java index 0e371c64749..4f56bcb77c8 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialServiceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialServiceTest.java @@ -18,49 +18,49 @@ package com.alibaba.nacos.client.auth.ram.identify; -import junit.framework.TestCase; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -public class CredentialServiceTest extends TestCase { +class CredentialServiceTest { private static final String APP_NAME = "app"; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { System.clearProperty(IdentifyConstants.PROJECT_NAME_PROPERTY); CredentialService.freeInstance(); CredentialService.freeInstance(APP_NAME); } @Test - public void testGetInstance() { + void testGetInstance() { CredentialService credentialService1 = CredentialService.getInstance(); CredentialService credentialService2 = CredentialService.getInstance(); - Assert.assertEquals(credentialService1, credentialService2); + assertEquals(credentialService1, credentialService2); } @Test - public void testGetInstance2() { + void testGetInstance2() { CredentialService credentialService1 = CredentialService.getInstance(APP_NAME); CredentialService credentialService2 = CredentialService.getInstance(APP_NAME); - Assert.assertEquals(credentialService1, credentialService2); + assertEquals(credentialService1, credentialService2); } @Test - public void testGetInstance3() throws NoSuchFieldException, IllegalAccessException { + void testGetInstance3() throws NoSuchFieldException, IllegalAccessException { System.setProperty(IdentifyConstants.PROJECT_NAME_PROPERTY, APP_NAME); CredentialService credentialService1 = CredentialService.getInstance(); Field appNameField = credentialService1.getClass().getDeclaredField("appName"); @@ -70,21 +70,21 @@ public void testGetInstance3() throws NoSuchFieldException, IllegalAccessExcepti } @Test - public void testFreeInstance() { + void testFreeInstance() { CredentialService credentialService1 = CredentialService.getInstance(); CredentialService credentialService2 = CredentialService.freeInstance(); - Assert.assertEquals(credentialService1, credentialService2); + assertEquals(credentialService1, credentialService2); } @Test - public void testFreeInstance2() { + void testFreeInstance2() { CredentialService credentialService1 = CredentialService.getInstance(); CredentialService credentialService2 = CredentialService.freeInstance(); - Assert.assertEquals(credentialService1, credentialService2); + assertEquals(credentialService1, credentialService2); } @Test - public void testFree() throws NoSuchFieldException, IllegalAccessException { + void testFree() throws NoSuchFieldException, IllegalAccessException { CredentialService credentialService1 = CredentialService.getInstance(); CredentialWatcher mockWatcher = mock(CredentialWatcher.class); Field watcherField = CredentialService.class.getDeclaredField("watcher"); @@ -97,24 +97,24 @@ public void testFree() throws NoSuchFieldException, IllegalAccessException { } @Test - public void testGetCredential() { + void testGetCredential() { CredentialService credentialService1 = CredentialService.getInstance(); Credentials credential = credentialService1.getCredential(); - Assert.assertNotNull(credential); + assertNotNull(credential); } @Test - public void testSetCredential() { + void testSetCredential() { CredentialService credentialService1 = CredentialService.getInstance(); Credentials credential = new Credentials(); //when credentialService1.setCredential(credential); //then - Assert.assertEquals(credential, credentialService1.getCredential()); + assertEquals(credential, credentialService1.getCredential()); } @Test - public void testSetStaticCredential() throws NoSuchFieldException, IllegalAccessException { + void testSetStaticCredential() throws NoSuchFieldException, IllegalAccessException { CredentialService credentialService1 = CredentialService.getInstance(); CredentialWatcher mockWatcher = mock(CredentialWatcher.class); Field watcherField = CredentialService.class.getDeclaredField("watcher"); @@ -124,12 +124,12 @@ public void testSetStaticCredential() throws NoSuchFieldException, IllegalAccess //when credentialService1.setStaticCredential(credential); //then - Assert.assertEquals(credential, credentialService1.getCredential()); + assertEquals(credential, credentialService1.getCredential()); verify(mockWatcher, times(1)).stop(); } @Test - public void testRegisterCredentialListener() { + void testRegisterCredentialListener() { CredentialListener expect = mock(CredentialListener.class); CredentialService credentialService1 = CredentialService.getInstance(); credentialService1.registerCredentialListener(expect); diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialWatcherTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialWatcherTest.java index c99077b05af..11d51d9f474 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialWatcherTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialWatcherTest.java @@ -16,13 +16,12 @@ package com.alibaba.nacos.client.auth.ram.identify; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.BufferedWriter; import java.io.File; @@ -39,16 +38,17 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class CredentialWatcherTest { +@ExtendWith(MockitoExtension.class) +class CredentialWatcherTest { @Mock private CredentialService credentialService; @@ -59,18 +59,18 @@ public class CredentialWatcherTest { private Method loadCredentialFromPropertiesMethod; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { credentialWatcher = new CredentialWatcher("testApp", credentialService); loadCredentialMethod = CredentialWatcher.class.getDeclaredMethod("loadCredential", boolean.class); loadCredentialMethod.setAccessible(true); - loadCredentialFromPropertiesMethod = CredentialWatcher.class - .getDeclaredMethod("loadCredentialFromProperties", InputStream.class, boolean.class, Credentials.class); + loadCredentialFromPropertiesMethod = CredentialWatcher.class.getDeclaredMethod("loadCredentialFromProperties", + InputStream.class, boolean.class, Credentials.class); loadCredentialFromPropertiesMethod.setAccessible(true); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { credentialWatcher.stop(); System.clearProperty("spas.identity"); System.clearProperty(IdentifyConstants.ENV_ACCESS_KEY); @@ -79,16 +79,16 @@ public void tearDown() throws Exception { } @Test - public void testStop() throws NoSuchFieldException, IllegalAccessException { + void testStop() throws NoSuchFieldException, IllegalAccessException { credentialWatcher.stop(); Field executorField = CredentialWatcher.class.getDeclaredField("executor"); executorField.setAccessible(true); ScheduledExecutorService executor = (ScheduledExecutorService) executorField.get(credentialWatcher); - Assert.assertTrue(executor.isShutdown()); + assertTrue(executor.isShutdown()); } @Test - public void testLoadCredentialByEnv() throws InvocationTargetException, IllegalAccessException { + void testLoadCredentialByEnv() throws InvocationTargetException, IllegalAccessException { System.setProperty(IdentifyConstants.ENV_ACCESS_KEY, "testAk"); System.setProperty(IdentifyConstants.ENV_SECRET_KEY, "testSk"); final AtomicReference readAk = new AtomicReference<>(""); @@ -108,7 +108,7 @@ public void testLoadCredentialByEnv() throws InvocationTargetException, IllegalA } @Test - public void testLoadCredentialByIdentityFile() throws InvocationTargetException, IllegalAccessException { + void testLoadCredentialByIdentityFile() throws InvocationTargetException, IllegalAccessException { URL url = CredentialWatcherTest.class.getResource("/spas.identity"); System.setProperty("spas.identity", url.getPath()); final AtomicReference readAk = new AtomicReference<>(""); @@ -128,7 +128,7 @@ public void testLoadCredentialByIdentityFile() throws InvocationTargetException, } @Test - public void testLoadCredentialByInvalidIdentityFile() throws InvocationTargetException, IllegalAccessException { + void testLoadCredentialByInvalidIdentityFile() throws InvocationTargetException, IllegalAccessException { URL url = CredentialWatcherTest.class.getResource("/spas_invalid.identity"); System.setProperty("spas.identity", url.getPath()); final AtomicReference readAk = new AtomicReference<>(""); @@ -151,7 +151,7 @@ public void testLoadCredentialByInvalidIdentityFile() throws InvocationTargetExc * The docker file is need /etc permission, which depend environment. So use mock InputStream to test. */ @Test - public void testLoadCredentialByDockerFile() + void testLoadCredentialByDockerFile() throws FileNotFoundException, InvocationTargetException, IllegalAccessException, NoSuchFieldException { URL url = CredentialWatcherTest.class.getResource("/spas_docker.identity"); InputStream propertiesIS = new FileInputStream(url.getPath()); @@ -166,7 +166,7 @@ public void testLoadCredentialByDockerFile() } @Test - public void testLoadCredentialByFileWithIoException() + void testLoadCredentialByFileWithIoException() throws IOException, InvocationTargetException, IllegalAccessException { InputStream propertiesIS = mock(InputStream.class); when(propertiesIS.read(any())).thenThrow(new IOException("test")); @@ -179,8 +179,7 @@ public void testLoadCredentialByFileWithIoException() } @Test - public void testReLoadCredential() - throws InvocationTargetException, IllegalAccessException, InterruptedException { + void testReLoadCredential() throws InvocationTargetException, IllegalAccessException, InterruptedException { URL url = CredentialWatcherTest.class.getResource("/spas_modified.identity"); modifiedFile(url, true); System.setProperty("spas.identity", url.getPath()); diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialsTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialsTest.java index 919aacf0582..51f831e11c1 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/CredentialsTest.java @@ -18,26 +18,28 @@ package com.alibaba.nacos.client.auth.ram.identify; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class CredentialsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class CredentialsTest { @Test - public void testGetter() { + void testGetter() { // given String ak = "ak"; String sk = "sk"; String tenantId = "100"; Credentials credentials = new Credentials(ak, sk, tenantId); // when then - Assert.assertEquals(ak, credentials.getAccessKey()); - Assert.assertEquals(sk, credentials.getSecretKey()); - Assert.assertEquals(tenantId, credentials.getTenantId()); + assertEquals(ak, credentials.getAccessKey()); + assertEquals(sk, credentials.getSecretKey()); + assertEquals(tenantId, credentials.getTenantId()); } @Test - public void testSetter() { + void testSetter() { //given String ak = "ak"; String sk = "sk"; @@ -48,13 +50,13 @@ public void testSetter() { credentials.setSecretKey(sk); credentials.setTenantId(tenantId); //then - Assert.assertEquals(ak, credentials.getAccessKey()); - Assert.assertEquals(sk, credentials.getSecretKey()); - Assert.assertEquals(tenantId, credentials.getTenantId()); + assertEquals(ak, credentials.getAccessKey()); + assertEquals(sk, credentials.getSecretKey()); + assertEquals(tenantId, credentials.getTenantId()); } @Test - public void testValid() { + void testValid() { //given String ak = "ak"; String sk = "sk"; @@ -63,11 +65,11 @@ public void testValid() { //when boolean actual = credentials.valid(); //then - Assert.assertTrue(actual); + assertTrue(actual); } @Test - public void testIdentical() { + void testIdentical() { //given String ak = "ak"; String sk = "sk"; @@ -77,6 +79,6 @@ public void testIdentical() { //then boolean actual = credentials1.identical(credentials2); //then - Assert.assertTrue(actual); + assertTrue(actual); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/StsConfigTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/StsConfigTest.java index fdfa26070da..c735f04aca1 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/StsConfigTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/StsConfigTest.java @@ -16,17 +16,21 @@ package com.alibaba.nacos.client.auth.ram.identify; -import org.junit.After; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; -public class StsConfigTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class StsConfigTest { - @After - public void after() { + private static void resetStsConfig() { StsConfig.getInstance().setRamRoleName(null); StsConfig.getInstance().setTimeToRefreshInMillisecond(3 * 60 * 1000); StsConfig.getInstance().setCacheSecurityCredentials(true); @@ -39,73 +43,83 @@ public void after() { System.clearProperty(IdentifyConstants.SECURITY_CACHE_PROPERTY); } + @BeforeEach + void before() { + resetStsConfig(); + } + + @AfterEach + void after() { + resetStsConfig(); + } + @Test - public void testGetInstance() { + void testGetInstance() { StsConfig instance1 = StsConfig.getInstance(); StsConfig instance2 = StsConfig.getInstance(); - Assert.assertEquals(instance1, instance2); + assertEquals(instance1, instance2); } @Test - public void testGetRamRoleName() { + void testGetRamRoleName() { StsConfig.getInstance().setRamRoleName("test"); - Assert.assertEquals("test", StsConfig.getInstance().getRamRoleName()); + assertEquals("test", StsConfig.getInstance().getRamRoleName()); } @Test - public void testGetTimeToRefreshInMillisecond() { - Assert.assertEquals(3 * 60 * 1000, StsConfig.getInstance().getTimeToRefreshInMillisecond()); + void testGetTimeToRefreshInMillisecond() { + assertEquals(3 * 60 * 1000, StsConfig.getInstance().getTimeToRefreshInMillisecond()); StsConfig.getInstance().setTimeToRefreshInMillisecond(3000); - Assert.assertEquals(3000, StsConfig.getInstance().getTimeToRefreshInMillisecond()); + assertEquals(3000, StsConfig.getInstance().getTimeToRefreshInMillisecond()); } @Test - public void testGetSecurityCredentialsUrl() { - Assert.assertNull(StsConfig.getInstance().getSecurityCredentialsUrl()); + void testGetSecurityCredentialsUrl() { + assertNull(StsConfig.getInstance().getSecurityCredentialsUrl()); String expect = "localhost"; StsConfig.getInstance().setSecurityCredentialsUrl(expect); - Assert.assertEquals(expect, StsConfig.getInstance().getSecurityCredentialsUrl()); + assertEquals(expect, StsConfig.getInstance().getSecurityCredentialsUrl()); } @Test - public void testGetSecurityCredentialsUrlDefault() { + void testGetSecurityCredentialsUrlDefault() { StsConfig.getInstance().setRamRoleName("test"); - Assert.assertEquals("http://100.100.100.200/latest/meta-data/ram/security-credentials/test", + assertEquals("http://100.100.100.200/latest/meta-data/ram/security-credentials/test", StsConfig.getInstance().getSecurityCredentialsUrl()); } @Test - public void testGetSecurityCredentials() { - Assert.assertNull(StsConfig.getInstance().getSecurityCredentials()); + void testGetSecurityCredentials() { + assertNull(StsConfig.getInstance().getSecurityCredentials()); String expect = "abc"; StsConfig.getInstance().setSecurityCredentials(expect); - Assert.assertEquals(expect, StsConfig.getInstance().getSecurityCredentials()); + assertEquals(expect, StsConfig.getInstance().getSecurityCredentials()); } @Test - public void testIsCacheSecurityCredentials() { - Assert.assertTrue(StsConfig.getInstance().isCacheSecurityCredentials()); + void testIsCacheSecurityCredentials() { + assertTrue(StsConfig.getInstance().isCacheSecurityCredentials()); StsConfig.getInstance().setCacheSecurityCredentials(false); - Assert.assertFalse(StsConfig.getInstance().isCacheSecurityCredentials()); + assertFalse(StsConfig.getInstance().isCacheSecurityCredentials()); } @Test - public void testIsOnFalse() { + void testIsOnFalse() { boolean stsOn = StsConfig.getInstance().isStsOn(); - Assert.assertFalse(stsOn); + assertFalse(stsOn); } @Test - public void testIsOnTrue() { + void testIsOnTrue() { StsConfig.getInstance().setSecurityCredentials("abc"); boolean stsOn = StsConfig.getInstance().isStsOn(); - Assert.assertTrue(stsOn); + assertTrue(stsOn); } @Test - public void testFromEnv() + void testFromEnv() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { Constructor constructor = StsConfig.class.getDeclaredConstructor(); constructor.setAccessible(true); @@ -115,11 +129,11 @@ public void testFromEnv() System.setProperty(IdentifyConstants.SECURITY_URL_PROPERTY, "localhost"); System.setProperty(IdentifyConstants.SECURITY_CACHE_PROPERTY, "false"); StsConfig stsConfig = constructor.newInstance(); - Assert.assertEquals("test", stsConfig.getRamRoleName()); - Assert.assertEquals(3000, stsConfig.getTimeToRefreshInMillisecond()); - Assert.assertEquals("abc", stsConfig.getSecurityCredentials()); - Assert.assertEquals("localhost", stsConfig.getSecurityCredentialsUrl()); - Assert.assertFalse(stsConfig.isCacheSecurityCredentials()); + assertEquals("test", stsConfig.getRamRoleName()); + assertEquals(3000, stsConfig.getTimeToRefreshInMillisecond()); + assertEquals("abc", stsConfig.getSecurityCredentials()); + assertEquals("localhost", stsConfig.getSecurityCredentialsUrl()); + assertFalse(stsConfig.isCacheSecurityCredentials()); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/StsCredentialHolderTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/StsCredentialHolderTest.java index 6cbd2744ceb..4ca79c2be36 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/StsCredentialHolderTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/identify/StsCredentialHolderTest.java @@ -23,24 +23,25 @@ import com.alibaba.nacos.common.http.client.response.HttpClientResponse; import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.common.utils.JacksonUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.ByteArrayInputStream; import java.lang.reflect.Field; import java.util.Date; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class StsCredentialHolderTest { +@ExtendWith(MockitoExtension.class) +class StsCredentialHolderTest { private String securityCredentialsUrl; @@ -49,8 +50,8 @@ public class StsCredentialHolderTest { @Mock private HttpClientRequest mockRest; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { securityCredentialsUrl = StsConfig.getInstance().getSecurityCredentialsUrl(); StsConfig.getInstance().setSecurityCredentialsUrl("url"); Field field = NacosRestTemplate.class.getDeclaredField("requestClient"); @@ -59,8 +60,8 @@ public void setUp() throws Exception { field.set(ConfigHttpClientManager.getInstance().getNacosRestTemplate(), mockRest); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { StsConfig.getInstance().setSecurityCredentials(null); StsConfig.getInstance().setSecurityCredentialsUrl(securityCredentialsUrl); Field field = NacosRestTemplate.class.getDeclaredField("requestClient"); @@ -77,7 +78,7 @@ private void clearForSts() throws NoSuchFieldException, IllegalAccessException { } @Test - public void testGetStsCredentialFromCache() throws NoSuchFieldException, IllegalAccessException { + void testGetStsCredentialFromCache() throws NoSuchFieldException, IllegalAccessException { StsCredential stsCredential = buildMockStsCredential(); setStsCredential(stsCredential); assertEquals(stsCredential, StsCredentialHolder.getInstance().getStsCredential()); @@ -90,14 +91,14 @@ private void setStsCredential(StsCredential stsCredential) throws NoSuchFieldExc } @Test - public void testGetStsCredentialFromStringCache() throws NoSuchFieldException, IllegalAccessException { + void testGetStsCredentialFromStringCache() throws NoSuchFieldException, IllegalAccessException { StsCredential stsCredential = buildMockStsCredential(); StsConfig.getInstance().setSecurityCredentials(JacksonUtils.toJson(stsCredential)); assertEquals(stsCredential.toString(), StsCredentialHolder.getInstance().getStsCredential().toString()); } @Test - public void testGetStsCredentialFromRequest() throws Exception { + void testGetStsCredentialFromRequest() throws Exception { StsCredential stsCredential = buildMockStsCredential(); HttpClientResponse response = mock(HttpClientResponse.class); when(response.getStatusCode()).thenReturn(200); @@ -107,20 +108,24 @@ public void testGetStsCredentialFromRequest() throws Exception { assertEquals(stsCredential.toString(), StsCredentialHolder.getInstance().getStsCredential().toString()); } - @Test(expected = NacosRuntimeException.class) - public void testGetStsCredentialFromRequestFailure() throws Exception { - HttpClientResponse response = mock(HttpClientResponse.class); - when(response.getStatusCode()).thenReturn(500); - when(response.getHeaders()).thenReturn(Header.newInstance()); - when(response.getBody()).thenReturn(new ByteArrayInputStream(new byte[0])); - when(mockRest.execute(any(), any(), any())).thenReturn(response); - StsCredentialHolder.getInstance().getStsCredential(); + @Test + void testGetStsCredentialFromRequestFailure() throws Exception { + assertThrows(NacosRuntimeException.class, () -> { + HttpClientResponse response = mock(HttpClientResponse.class); + when(response.getStatusCode()).thenReturn(500); + when(response.getHeaders()).thenReturn(Header.newInstance()); + when(response.getBody()).thenReturn(new ByteArrayInputStream(new byte[0])); + when(mockRest.execute(any(), any(), any())).thenReturn(response); + StsCredentialHolder.getInstance().getStsCredential(); + }); } - @Test(expected = NacosRuntimeException.class) - public void testGetStsCredentialFromRequestException() throws Exception { - when(mockRest.execute(any(), any(), any())).thenThrow(new RuntimeException("test")); - StsCredentialHolder.getInstance().getStsCredential(); + @Test + void testGetStsCredentialFromRequestException() throws Exception { + assertThrows(NacosRuntimeException.class, () -> { + when(mockRest.execute(any(), any(), any())).thenThrow(new RuntimeException("test")); + StsCredentialHolder.getInstance().getStsCredential(); + }); } private StsCredential buildMockStsCredential() { diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/AbstractResourceInjectorTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/AbstractResourceInjectorTest.java index ac11121e8c4..4af02b0a162 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/AbstractResourceInjectorTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/AbstractResourceInjectorTest.java @@ -16,23 +16,24 @@ package com.alibaba.nacos.client.auth.ram.injector; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -public class AbstractResourceInjectorTest { +class AbstractResourceInjectorTest { AbstractResourceInjector injector; - @Before - public void setUp() { - injector = new AbstractResourceInjector() { }; + @BeforeEach + void setUp() { + injector = new AbstractResourceInjector() { + }; } /** * TODO, fill test case after AbstractResourceInjector include default logic. */ @Test - public void testDoInject() { + void testDoInject() { injector.doInject(null, null, null); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/ConfigResourceInjectorTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/ConfigResourceInjectorTest.java index 13a1c742143..fdd780f71f3 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/ConfigResourceInjectorTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/ConfigResourceInjectorTest.java @@ -25,15 +25,17 @@ import com.alibaba.nacos.plugin.auth.api.LoginIdentityContext; import com.alibaba.nacos.plugin.auth.api.RequestResource; import com.alibaba.nacos.plugin.auth.constant.SignType; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.util.Date; -public class ConfigResourceInjectorTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ConfigResourceInjectorTest { private ConfigResourceInjector configResourceInjector; @@ -47,8 +49,8 @@ public class ConfigResourceInjectorTest { private StsCredential stsCredential; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { configResourceInjector = new ConfigResourceInjector(); ramContext = new RamContext(); ramContext.setAccessKey(PropertyKeyConst.ACCESS_KEY); @@ -64,66 +66,66 @@ public void setUp() throws Exception { stsCredential = new StsCredential(); } - @After - public void tearDown() throws NoSuchFieldException, IllegalAccessException { + @AfterEach + void tearDown() throws NoSuchFieldException, IllegalAccessException { StsConfig.getInstance().setSecurityCredentialsUrl(cachedSecurityCredentialsUrl); StsConfig.getInstance().setSecurityCredentials(cachedSecurityCredentials); clearForSts(); } @Test - public void testDoInjectWithFullResource() throws Exception { + void testDoInjectWithFullResource() throws Exception { LoginIdentityContext actual = new LoginIdentityContext(); configResourceInjector.doInject(resource, ramContext, actual); - Assert.assertEquals(3, actual.getAllKey().size()); - Assert.assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("Spas-AccessKey")); - Assert.assertTrue(actual.getAllKey().contains("Timestamp")); - Assert.assertTrue(actual.getAllKey().contains("Spas-Signature")); + assertEquals(3, actual.getAllKey().size()); + assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("Spas-AccessKey")); + assertTrue(actual.getAllKey().contains("Timestamp")); + assertTrue(actual.getAllKey().contains("Spas-Signature")); } @Test - public void testDoInjectWithTenant() throws Exception { + void testDoInjectWithTenant() throws Exception { resource.setGroup(""); LoginIdentityContext actual = new LoginIdentityContext(); configResourceInjector.doInject(resource, ramContext, actual); - Assert.assertEquals(3, actual.getAllKey().size()); - Assert.assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("Spas-AccessKey")); - Assert.assertTrue(actual.getAllKey().contains("Timestamp")); - Assert.assertTrue(actual.getAllKey().contains("Spas-Signature")); + assertEquals(3, actual.getAllKey().size()); + assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("Spas-AccessKey")); + assertTrue(actual.getAllKey().contains("Timestamp")); + assertTrue(actual.getAllKey().contains("Spas-Signature")); } @Test - public void testDoInjectWithGroup() throws Exception { + void testDoInjectWithGroup() throws Exception { resource.setNamespace(""); LoginIdentityContext actual = new LoginIdentityContext(); configResourceInjector.doInject(resource, ramContext, actual); - Assert.assertEquals(3, actual.getAllKey().size()); - Assert.assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("Spas-AccessKey")); - Assert.assertTrue(actual.getAllKey().contains("Timestamp")); - Assert.assertTrue(actual.getAllKey().contains("Spas-Signature")); + assertEquals(3, actual.getAllKey().size()); + assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("Spas-AccessKey")); + assertTrue(actual.getAllKey().contains("Timestamp")); + assertTrue(actual.getAllKey().contains("Spas-Signature")); } @Test - public void testDoInjectWithoutResource() throws Exception { + void testDoInjectWithoutResource() throws Exception { resource = new RequestResource(); LoginIdentityContext actual = new LoginIdentityContext(); configResourceInjector.doInject(resource, ramContext, actual); - Assert.assertEquals(3, actual.getAllKey().size()); - Assert.assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("Spas-AccessKey")); - Assert.assertTrue(actual.getAllKey().contains("Timestamp")); - Assert.assertTrue(actual.getAllKey().contains("Spas-Signature")); + assertEquals(3, actual.getAllKey().size()); + assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("Spas-AccessKey")); + assertTrue(actual.getAllKey().contains("Timestamp")); + assertTrue(actual.getAllKey().contains("Spas-Signature")); } @Test - public void testDoInjectForSts() throws NoSuchFieldException, IllegalAccessException { + void testDoInjectForSts() throws NoSuchFieldException, IllegalAccessException { prepareForSts(); LoginIdentityContext actual = new LoginIdentityContext(); configResourceInjector.doInject(resource, ramContext, actual); - Assert.assertEquals(4, actual.getAllKey().size()); - Assert.assertEquals("test-sts-ak", actual.getParameter("Spas-AccessKey")); - Assert.assertTrue(actual.getAllKey().contains("Timestamp")); - Assert.assertTrue(actual.getAllKey().contains("Spas-Signature")); - Assert.assertTrue(actual.getAllKey().contains(IdentifyConstants.SECURITY_TOKEN_HEADER)); + assertEquals(4, actual.getAllKey().size()); + assertEquals("test-sts-ak", actual.getParameter("Spas-AccessKey")); + assertTrue(actual.getAllKey().contains("Timestamp")); + assertTrue(actual.getAllKey().contains("Spas-Signature")); + assertTrue(actual.getAllKey().contains(IdentifyConstants.SECURITY_TOKEN_HEADER)); } private void prepareForSts() throws NoSuchFieldException, IllegalAccessException { diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/NamingResourceInjectorTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/NamingResourceInjectorTest.java index 9c51266e8ce..33b8b473e6a 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/NamingResourceInjectorTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/injector/NamingResourceInjectorTest.java @@ -24,15 +24,17 @@ import com.alibaba.nacos.client.auth.ram.utils.SignUtil; import com.alibaba.nacos.plugin.auth.api.LoginIdentityContext; import com.alibaba.nacos.plugin.auth.api.RequestResource; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.util.Date; -public class NamingResourceInjectorTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class NamingResourceInjectorTest { private NamingResourceInjector namingResourceInjector; @@ -42,8 +44,8 @@ public class NamingResourceInjectorTest { private StsCredential stsCredential; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { namingResourceInjector = new NamingResourceInjector(); ramContext = new RamContext(); ramContext.setAccessKey(PropertyKeyConst.ACCESS_KEY); @@ -52,81 +54,81 @@ public void setUp() throws Exception { StsConfig.getInstance().setRamRoleName(null); } - @After - public void tearDown() throws NoSuchFieldException, IllegalAccessException { + @AfterEach + void tearDown() throws NoSuchFieldException, IllegalAccessException { clearForSts(); } @Test - public void testDoInjectWithEmpty() throws Exception { + void testDoInjectWithEmpty() throws Exception { resource = RequestResource.namingBuilder().setResource("").build(); LoginIdentityContext actual = new LoginIdentityContext(); namingResourceInjector.doInject(resource, ramContext, actual); + assertEquals(3, actual.getAllKey().size()); + assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("ak")); + assertTrue(Long.parseLong(actual.getParameter("data")) - System.currentTimeMillis() < 100); String expectSign = SignUtil.sign(actual.getParameter("data"), PropertyKeyConst.SECRET_KEY); - Assert.assertEquals(3, actual.getAllKey().size()); - Assert.assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("ak")); - Assert.assertTrue(Long.parseLong(actual.getParameter("data")) - System.currentTimeMillis() < 100); - Assert.assertEquals(expectSign, actual.getParameter("signature")); + assertEquals(expectSign, actual.getParameter("signature")); } @Test - public void testDoInjectWithGroup() throws Exception { + void testDoInjectWithGroup() throws Exception { resource = RequestResource.namingBuilder().setResource("test@@aaa").setGroup("group").build(); LoginIdentityContext actual = new LoginIdentityContext(); namingResourceInjector.doInject(resource, ramContext, actual); + assertEquals(3, actual.getAllKey().size()); + assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("ak")); + assertTrue(actual.getParameter("data").endsWith("@@test@@aaa")); String expectSign = SignUtil.sign(actual.getParameter("data"), PropertyKeyConst.SECRET_KEY); - Assert.assertEquals(3, actual.getAllKey().size()); - Assert.assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("ak")); - Assert.assertTrue(actual.getParameter("data").endsWith("@@test@@aaa")); - Assert.assertEquals(expectSign, actual.getParameter("signature")); + assertEquals(expectSign, actual.getParameter("signature")); } @Test - public void testDoInjectWithoutGroup() throws Exception { + void testDoInjectWithoutGroup() throws Exception { resource = RequestResource.namingBuilder().setResource("aaa").setGroup("group").build(); LoginIdentityContext actual = new LoginIdentityContext(); namingResourceInjector.doInject(resource, ramContext, actual); - Assert.assertTrue(actual.getParameter("data").endsWith("@@group@@aaa")); - Assert.assertEquals(3, actual.getAllKey().size()); - Assert.assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("ak")); + assertTrue(actual.getParameter("data").endsWith("@@group@@aaa")); + assertEquals(3, actual.getAllKey().size()); + assertEquals(PropertyKeyConst.ACCESS_KEY, actual.getParameter("ak")); String expectSign = SignUtil.sign(actual.getParameter("data"), PropertyKeyConst.SECRET_KEY); - Assert.assertEquals(expectSign, actual.getParameter("signature")); + assertEquals(expectSign, actual.getParameter("signature")); } @Test - public void testDoInjectWithGroupForSts() throws Exception { + void testDoInjectWithGroupForSts() throws Exception { prepareForSts(); resource = RequestResource.namingBuilder().setResource("test@@aaa").setGroup("group").build(); LoginIdentityContext actual = new LoginIdentityContext(); namingResourceInjector.doInject(resource, ramContext, actual); + assertEquals(4, actual.getAllKey().size()); + assertEquals("test-sts-ak", actual.getParameter("ak")); + assertTrue(actual.getParameter("data").endsWith("@@test@@aaa")); String expectSign = SignUtil.sign(actual.getParameter("data"), "test-sts-sk"); - Assert.assertEquals(4, actual.getAllKey().size()); - Assert.assertEquals("test-sts-ak", actual.getParameter("ak")); - Assert.assertTrue(actual.getParameter("data").endsWith("@@test@@aaa")); - Assert.assertEquals(expectSign, actual.getParameter("signature")); + assertEquals(expectSign, actual.getParameter("signature")); } @Test - public void testDoInjectWithoutGroupForSts() throws Exception { + void testDoInjectWithoutGroupForSts() throws Exception { prepareForSts(); resource = RequestResource.namingBuilder().setResource("aaa").setGroup("group").build(); LoginIdentityContext actual = new LoginIdentityContext(); namingResourceInjector.doInject(resource, ramContext, actual); + assertEquals(4, actual.getAllKey().size()); + assertEquals("test-sts-ak", actual.getParameter("ak")); + assertTrue(actual.getParameter("data").endsWith("@@group@@aaa")); String expectSign = SignUtil.sign(actual.getParameter("data"), "test-sts-sk"); - Assert.assertEquals(4, actual.getAllKey().size()); - Assert.assertEquals("test-sts-ak", actual.getParameter("ak")); - Assert.assertTrue(actual.getParameter("data").endsWith("@@group@@aaa")); - Assert.assertEquals(expectSign, actual.getParameter("signature")); + assertEquals(expectSign, actual.getParameter("signature")); } @Test - public void testDoInjectForStsWithException() throws Exception { + void testDoInjectForStsWithException() throws Exception { prepareForSts(); stsCredential.setExpiration(new Date()); resource = RequestResource.namingBuilder().setResource("aaa").setGroup("group").build(); LoginIdentityContext actual = new LoginIdentityContext(); namingResourceInjector.doInject(resource, ramContext, actual); - Assert.assertEquals(0, actual.getAllKey().size()); + assertEquals(0, actual.getAllKey().size()); } private void prepareForSts() throws NoSuchFieldException, IllegalAccessException { diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/utils/SignUtilTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/utils/SignUtilTest.java index 01141a40d2e..a9eef88a8fd 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/utils/SignUtilTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/utils/SignUtilTest.java @@ -16,26 +16,32 @@ package com.alibaba.nacos.client.auth.ram.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.nio.charset.StandardCharsets; -public class SignUtilTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class SignUtilTest { @Test - public void testSign() throws Exception { + void testSign() throws Exception { String actual = SignUtil.sign("aaa", "b"); - Assert.assertEquals("DxyaKScrqL26yXYOuHXE3OwfQ0Y=", actual); + assertEquals("DxyaKScrqL26yXYOuHXE3OwfQ0Y=", actual); } - @Test(expected = Exception.class) - public void testSignWithException() throws Exception { - SignUtil.sign(null, "b"); + @Test + void testSignWithException() throws Exception { + assertThrows(Exception.class, () -> { + SignUtil.sign(null, "b"); + }); } - @Test(expected = Exception.class) - public void testSignWithException2() throws Exception { - SignUtil.sign("aaa".getBytes(StandardCharsets.UTF_8), "b".getBytes(StandardCharsets.UTF_8), null); + @Test + void testSignWithException2() throws Exception { + assertThrows(Exception.class, () -> { + SignUtil.sign("aaa".getBytes(StandardCharsets.UTF_8), "b".getBytes(StandardCharsets.UTF_8), null); + }); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/auth/ram/utils/SpasAdapterTest.java b/client/src/test/java/com/alibaba/nacos/client/auth/ram/utils/SpasAdapterTest.java index 097bebf3e71..eb19570bedf 100644 --- a/client/src/test/java/com/alibaba/nacos/client/auth/ram/utils/SpasAdapterTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/auth/ram/utils/SpasAdapterTest.java @@ -16,73 +16,76 @@ package com.alibaba.nacos.client.auth.ram.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -public class SpasAdapterTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class SpasAdapterTest { @Test - public void test() { - Assert.assertNull(SpasAdapter.getAk()); - Assert.assertNull(SpasAdapter.getSk()); - try { + void test() { + assertNull(SpasAdapter.getAk()); + assertNull(SpasAdapter.getSk()); + Assertions.assertDoesNotThrow(() -> { SpasAdapter.freeCredentialInstance(); - } catch (Exception e) { - Assert.fail(); - } + }); } @Test - public void testSign() { + void testSign() { - Assert.assertNull(SpasAdapter.getSignHeaders("", "", "123")); + assertNull(SpasAdapter.getSignHeaders("", "", "123")); final Map map1 = SpasAdapter.getSignHeaders("aa", "bb", "123"); - Assert.assertEquals(2, map1.size()); - Assert.assertEquals(SpasAdapter.signWithHmacSha1Encrypt("bb+aa+" + map1.get("Timestamp"), "123"), + assertEquals(2, map1.size()); + assertEquals(SpasAdapter.signWithHmacSha1Encrypt("bb+aa+" + map1.get("Timestamp"), "123"), map1.get("Spas-Signature")); final Map map2 = SpasAdapter.getSignHeaders("aa", "", "123"); - Assert.assertEquals(2, map2.size()); - Assert.assertEquals(SpasAdapter.signWithHmacSha1Encrypt("aa" + "+" + map2.get("Timestamp"), "123"), + assertEquals(2, map2.size()); + assertEquals(SpasAdapter.signWithHmacSha1Encrypt("aa" + "+" + map2.get("Timestamp"), "123"), map2.get("Spas-Signature")); final Map map3 = SpasAdapter.getSignHeaders("", "bb", "123"); - Assert.assertEquals(2, map3.size()); - Assert.assertEquals(SpasAdapter.signWithHmacSha1Encrypt(map3.get("Timestamp"), "123"), - map3.get("Spas-Signature")); + assertEquals(2, map3.size()); + assertEquals(SpasAdapter.signWithHmacSha1Encrypt(map3.get("Timestamp"), "123"), map3.get("Spas-Signature")); } @Test - public void testSign2() { + void testSign2() { - Assert.assertNull(SpasAdapter.getSignHeaders((Map) null, "123")); + assertNull(SpasAdapter.getSignHeaders((Map) null, "123")); Map param1 = new HashMap<>(); param1.put("tenant", "bb"); param1.put("group", "aa"); final Map map1 = SpasAdapter.getSignHeaders(param1, "123"); - Assert.assertEquals(2, map1.size()); - Assert.assertEquals(SpasAdapter.signWithHmacSha1Encrypt("bb+aa+" + map1.get("Timestamp"), "123"), + assertEquals(2, map1.size()); + assertEquals(SpasAdapter.signWithHmacSha1Encrypt("bb+aa+" + map1.get("Timestamp"), "123"), map1.get("Spas-Signature")); } @Test - public void testGetSignHeadersWithoutTenant() { + void testGetSignHeadersWithoutTenant() { Map param1 = new HashMap<>(); param1.put("group", "aa"); final Map map1 = SpasAdapter.getSignHeaders(param1, "123"); - Assert.assertEquals(2, map1.size()); - Assert.assertEquals(SpasAdapter.signWithHmacSha1Encrypt("aa+" + map1.get("Timestamp"), "123"), + assertEquals(2, map1.size()); + assertEquals(SpasAdapter.signWithHmacSha1Encrypt("aa+" + map1.get("Timestamp"), "123"), map1.get("Spas-Signature")); } - @Test(expected = Exception.class) - public void testSignWithHmacSha1EncryptWithException() { - SpasAdapter.signWithHmacSha1Encrypt(null, "123"); + @Test + void testSignWithHmacSha1EncryptWithException() { + assertThrows(Exception.class, () -> { + SpasAdapter.signWithHmacSha1Encrypt(null, "123"); + }); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/NacosConfigServiceTest.java b/client/src/test/java/com/alibaba/nacos/client/config/NacosConfigServiceTest.java index 134cd986860..3cc54107c4a 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/NacosConfigServiceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/NacosConfigServiceTest.java @@ -25,25 +25,27 @@ import com.alibaba.nacos.client.config.impl.LocalConfigInfoProcessor; import com.alibaba.nacos.client.config.impl.ServerListManager; import com.alibaba.nacos.client.env.NacosClientProperties; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; import java.util.Arrays; import java.util.Properties; import java.util.concurrent.Executor; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; -@RunWith(MockitoJUnitRunner.class) -public class NacosConfigServiceTest { +@ExtendWith(MockitoExtension.class) +class NacosConfigServiceTest { private NacosConfigService nacosConfigService; @@ -56,8 +58,8 @@ private void setFinal(Field field, Object ins, Object newValue) throws Exception } - @Before - public void mock() throws Exception { + @BeforeEach + void mock() throws Exception { final Properties properties = new Properties(); properties.put("serverAddr", "1.1.1.1"); nacosConfigService = new NacosConfigService(properties); @@ -65,13 +67,13 @@ public void mock() throws Exception { setFinal(NacosConfigService.class.getDeclaredField("worker"), nacosConfigService, mockWoker); } - @After - public void clean() { + @AfterEach + void clean() { LocalConfigInfoProcessor.cleanAllSnapshot(); } @Test - public void testGetConfigFromServer() throws NacosException { + void testGetConfigFromServer() throws NacosException { final String dataId = "1"; final String group = "2"; final String tenant = ""; @@ -81,57 +83,52 @@ public void testGetConfigFromServer() throws NacosException { response.setConfigType("bb"); Mockito.when(mockWoker.getServerConfig(dataId, group, "", timeout, false)).thenReturn(response); final String config = nacosConfigService.getConfig(dataId, group, timeout); - Assert.assertEquals("aa", config); + assertEquals("aa", config); Mockito.verify(mockWoker, Mockito.times(1)).getServerConfig(dataId, group, tenant, timeout, false); } @Test - public void testGetConfigFromFailOver() throws NacosException { + void testGetConfigFromFailOver() throws NacosException { final String dataId = "1failover"; final String group = "2"; final String tenant = ""; - MockedStatic localConfigInfoProcessorMockedStatic = Mockito.mockStatic( - LocalConfigInfoProcessor.class); + MockedStatic localConfigInfoProcessorMockedStatic = Mockito.mockStatic(LocalConfigInfoProcessor.class); try { String contentFailOver = "failOverContent" + System.currentTimeMillis(); - localConfigInfoProcessorMockedStatic.when( - () -> LocalConfigInfoProcessor.getFailover(any(), eq(dataId), eq(group), eq(tenant))) + localConfigInfoProcessorMockedStatic.when(() -> LocalConfigInfoProcessor.getFailover(any(), eq(dataId), eq(group), eq(tenant))) .thenReturn(contentFailOver); final int timeout = 3000; final String config = nacosConfigService.getConfig(dataId, group, timeout); - Assert.assertEquals(contentFailOver, config); + assertEquals(contentFailOver, config); } finally { localConfigInfoProcessorMockedStatic.close(); } } @Test - public void testGetConfigFromLocalCache() throws NacosException { + void testGetConfigFromLocalCache() throws NacosException { final String dataId = "1localcache"; final String group = "2"; final String tenant = ""; - MockedStatic localConfigInfoProcessorMockedStatic = Mockito.mockStatic( - LocalConfigInfoProcessor.class); + MockedStatic localConfigInfoProcessorMockedStatic = Mockito.mockStatic(LocalConfigInfoProcessor.class); try { String contentFailOver = "localCacheContent" + System.currentTimeMillis(); //fail over null - localConfigInfoProcessorMockedStatic.when( - () -> LocalConfigInfoProcessor.getFailover(any(), eq(dataId), eq(group), eq(tenant))) + localConfigInfoProcessorMockedStatic.when(() -> LocalConfigInfoProcessor.getFailover(any(), eq(dataId), eq(group), eq(tenant))) .thenReturn(null); //snapshot content - localConfigInfoProcessorMockedStatic.when( - () -> LocalConfigInfoProcessor.getSnapshot(any(), eq(dataId), eq(group), eq(tenant))) + localConfigInfoProcessorMockedStatic.when(() -> LocalConfigInfoProcessor.getSnapshot(any(), eq(dataId), eq(group), eq(tenant))) .thenReturn(contentFailOver); //form server error. final int timeout = 3000; Mockito.when(mockWoker.getServerConfig(dataId, group, "", timeout, false)).thenThrow(new NacosException()); final String config = nacosConfigService.getConfig(dataId, group, timeout); - Assert.assertEquals(contentFailOver, config); + assertEquals(contentFailOver, config); } finally { localConfigInfoProcessorMockedStatic.close(); } @@ -139,17 +136,15 @@ public void testGetConfigFromLocalCache() throws NacosException { } @Test - public void testGetConfig403() throws NacosException { + void testGetConfig403() throws NacosException { final String dataId = "1localcache403"; final String group = "2"; final String tenant = ""; - MockedStatic localConfigInfoProcessorMockedStatic = Mockito.mockStatic( - LocalConfigInfoProcessor.class); + MockedStatic localConfigInfoProcessorMockedStatic = Mockito.mockStatic(LocalConfigInfoProcessor.class); try { //fail over null - localConfigInfoProcessorMockedStatic.when( - () -> LocalConfigInfoProcessor.getFailover(any(), eq(dataId), eq(group), eq(tenant))) + localConfigInfoProcessorMockedStatic.when(() -> LocalConfigInfoProcessor.getFailover(any(), eq(dataId), eq(group), eq(tenant))) .thenReturn(null); //form server error. @@ -158,9 +153,9 @@ public void testGetConfig403() throws NacosException { .thenThrow(new NacosException(NacosException.NO_RIGHT, "no right")); try { nacosConfigService.getConfig(dataId, group, timeout); - Assert.assertTrue(false); + assertTrue(false); } catch (NacosException e) { - Assert.assertEquals(NacosException.NO_RIGHT, e.getErrCode()); + assertEquals(NacosException.NO_RIGHT, e.getErrCode()); } } finally { localConfigInfoProcessorMockedStatic.close(); @@ -168,7 +163,7 @@ public void testGetConfig403() throws NacosException { } @Test - public void testGetConfigAndSignListener() throws NacosException { + void testGetConfigAndSignListener() throws NacosException { final String dataId = "1"; final String group = "2"; final String tenant = ""; @@ -214,8 +209,8 @@ public void removeCache(String dataId, String group) { } @Override - public ConfigResponse queryConfig(String dataId, String group, String tenant, long readTimeous, - boolean notify) throws NacosException { + public ConfigResponse queryConfig(String dataId, String group, String tenant, long readTimeous, boolean notify) + throws NacosException { ConfigResponse configResponse = new ConfigResponse(); configResponse.setContent(content); configResponse.setDataId(dataId); @@ -225,9 +220,8 @@ public ConfigResponse queryConfig(String dataId, String group, String tenant, lo } @Override - public boolean publishConfig(String dataId, String group, String tenant, String appName, String tag, - String betaIps, String content, String encryptedDataKey, String casMd5, String type) - throws NacosException { + public boolean publishConfig(String dataId, String group, String tenant, String appName, String tag, String betaIps, + String content, String encryptedDataKey, String casMd5, String type) throws NacosException { return false; } @@ -238,14 +232,13 @@ public boolean removeConfig(String dataId, String group, String tenant, String t }); final String config = nacosConfigService.getConfigAndSignListener(dataId, group, timeout, listener); - Assert.assertEquals(content, config); + assertEquals(content, config); - Mockito.verify(mockWoker, Mockito.times(1)) - .addTenantListenersWithContent(dataId, group, content, null, Arrays.asList(listener)); + Mockito.verify(mockWoker, Mockito.times(1)).addTenantListenersWithContent(dataId, group, content, null, Arrays.asList(listener)); } @Test - public void testAddListener() throws NacosException { + void testAddListener() throws NacosException { String dataId = "1"; String group = "2"; Listener listener = new Listener() { @@ -265,42 +258,38 @@ public void receiveConfigInfo(String configInfo) { } @Test - public void testPublishConfig() throws NacosException { + void testPublishConfig() throws NacosException { String dataId = "1"; String group = "2"; String content = "123"; String namespace = ""; String type = ConfigType.getDefaultType().getType(); - Mockito.when(mockWoker.publishConfig(dataId, group, namespace, null, null, null, content, "", null, type)) - .thenReturn(true); + Mockito.when(mockWoker.publishConfig(dataId, group, namespace, null, null, null, content, "", null, type)).thenReturn(true); final boolean b = nacosConfigService.publishConfig(dataId, group, content); - Assert.assertTrue(b); + assertTrue(b); - Mockito.verify(mockWoker, Mockito.times(1)) - .publishConfig(dataId, group, namespace, null, null, null, content, "", null, type); + Mockito.verify(mockWoker, Mockito.times(1)).publishConfig(dataId, group, namespace, null, null, null, content, "", null, type); } @Test - public void testPublishConfig2() throws NacosException { + void testPublishConfig2() throws NacosException { String dataId = "1"; String group = "2"; String content = "123"; String namespace = ""; String type = ConfigType.PROPERTIES.getType(); - Mockito.when(mockWoker.publishConfig(dataId, group, namespace, null, null, null, content, "", null, type)) - .thenReturn(true); + Mockito.when(mockWoker.publishConfig(dataId, group, namespace, null, null, null, content, "", null, type)).thenReturn(true); final boolean b = nacosConfigService.publishConfig(dataId, group, content, type); - Assert.assertTrue(b); + assertTrue(b); - Mockito.verify(mockWoker, Mockito.times(1)) - .publishConfig(dataId, group, namespace, null, null, null, content, "", null, type); + Mockito.verify(mockWoker, Mockito.times(1)).publishConfig(dataId, group, namespace, null, null, null, content, "", null, type); } @Test - public void testPublishConfigCas() throws NacosException { + void testPublishConfigCas() throws NacosException { String dataId = "1"; String group = "2"; String content = "123"; @@ -308,18 +297,16 @@ public void testPublishConfigCas() throws NacosException { String casMd5 = "96147704e3cb8be8597d55d75d244a02"; String type = ConfigType.getDefaultType().getType(); - Mockito.when(mockWoker.publishConfig(dataId, group, namespace, null, null, null, content, "", casMd5, type)) - .thenReturn(true); + Mockito.when(mockWoker.publishConfig(dataId, group, namespace, null, null, null, content, "", casMd5, type)).thenReturn(true); final boolean b = nacosConfigService.publishConfigCas(dataId, group, content, casMd5); - Assert.assertTrue(b); + assertTrue(b); - Mockito.verify(mockWoker, Mockito.times(1)) - .publishConfig(dataId, group, namespace, null, null, null, content, "", casMd5, type); + Mockito.verify(mockWoker, Mockito.times(1)).publishConfig(dataId, group, namespace, null, null, null, content, "", casMd5, type); } @Test - public void testPublishConfigCas2() throws NacosException { + void testPublishConfigCas2() throws NacosException { String dataId = "1"; String group = "2"; String content = "123"; @@ -327,18 +314,16 @@ public void testPublishConfigCas2() throws NacosException { String casMd5 = "96147704e3cb8be8597d55d75d244a02"; String type = ConfigType.PROPERTIES.getType(); - Mockito.when(mockWoker.publishConfig(dataId, group, namespace, null, null, null, content, "", casMd5, type)) - .thenReturn(true); + Mockito.when(mockWoker.publishConfig(dataId, group, namespace, null, null, null, content, "", casMd5, type)).thenReturn(true); final boolean b = nacosConfigService.publishConfigCas(dataId, group, content, casMd5, type); - Assert.assertTrue(b); + assertTrue(b); - Mockito.verify(mockWoker, Mockito.times(1)) - .publishConfig(dataId, group, namespace, null, null, null, content, "", casMd5, type); + Mockito.verify(mockWoker, Mockito.times(1)).publishConfig(dataId, group, namespace, null, null, null, content, "", casMd5, type); } @Test - public void testRemoveConfig() throws NacosException { + void testRemoveConfig() throws NacosException { String dataId = "1"; String group = "2"; String tenant = ""; @@ -346,13 +331,13 @@ public void testRemoveConfig() throws NacosException { Mockito.when(mockWoker.removeConfig(dataId, group, tenant, null)).thenReturn(true); final boolean b = nacosConfigService.removeConfig(dataId, group); - Assert.assertTrue(b); + assertTrue(b); Mockito.verify(mockWoker, Mockito.times(1)).removeConfig(dataId, group, tenant, null); } @Test - public void testRemoveListener() { + void testRemoveListener() { String dataId = "1"; String group = "2"; Listener listener = new Listener() { @@ -372,23 +357,21 @@ public void receiveConfigInfo(String configInfo) { } @Test - public void testGetServerStatus() { + void testGetServerStatus() { Mockito.when(mockWoker.isHealthServer()).thenReturn(true); - Assert.assertEquals("UP", nacosConfigService.getServerStatus()); + assertEquals("UP", nacosConfigService.getServerStatus()); Mockito.verify(mockWoker, Mockito.times(1)).isHealthServer(); Mockito.when(mockWoker.isHealthServer()).thenReturn(false); - Assert.assertEquals("DOWN", nacosConfigService.getServerStatus()); + assertEquals("DOWN", nacosConfigService.getServerStatus()); Mockito.verify(mockWoker, Mockito.times(2)).isHealthServer(); } @Test - public void testShutDown() { - try { + void testShutDown() { + Assertions.assertDoesNotThrow(() -> { nacosConfigService.shutDown(); - } catch (Exception e) { - Assert.fail(); - } + }); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/common/GroupKeyTest.java b/client/src/test/java/com/alibaba/nacos/client/config/common/GroupKeyTest.java index d35167b38c3..e5bfd1992ac 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/common/GroupKeyTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/common/GroupKeyTest.java @@ -16,68 +16,72 @@ package com.alibaba.nacos.client.config.common; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Test; -public class GroupKeyTest { - - @Rule - public final ExpectedException thrown = ExpectedException.none(); +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class GroupKeyTest { @Test - public void testGetKey() { - Assert.assertEquals("1+foo", GroupKey.getKey("1", "foo")); - Assert.assertEquals("1+foo+bar", GroupKey.getKey("1", "foo", "bar")); - Assert.assertEquals("1+f%2Boo+b%25ar", GroupKey.getKey("1", "f+oo", "b%ar")); + void testGetKey() { + assertEquals("1+foo", GroupKey.getKey("1", "foo")); + assertEquals("1+foo+bar", GroupKey.getKey("1", "foo", "bar")); + assertEquals("1+f%2Boo+b%25ar", GroupKey.getKey("1", "f+oo", "b%ar")); } @Test - public void testGetKeyTenant() { - Assert.assertEquals("1+foo+bar", GroupKey.getKeyTenant("1", "foo", "bar")); + void testGetKeyTenant() { + assertEquals("1+foo+bar", GroupKey.getKeyTenant("1", "foo", "bar")); } @Test - public void testParseKey() { - Assert.assertArrayEquals(new String[] {"a", "f+oo", null}, GroupKey.parseKey("a+f%2Boo")); - Assert.assertArrayEquals(new String[] {"b", "f%oo", null}, GroupKey.parseKey("b+f%25oo")); - Assert.assertArrayEquals(new String[] {"a", "b", "c"}, GroupKey.parseKey("a+b+c")); + void testParseKey() { + assertArrayEquals(new String[] {"a", "f+oo", null}, GroupKey.parseKey("a+f%2Boo")); + assertArrayEquals(new String[] {"b", "f%oo", null}, GroupKey.parseKey("b+f%25oo")); + assertArrayEquals(new String[] {"a", "b", "c"}, GroupKey.parseKey("a+b+c")); } @Test - public void testParseKeyIllegalArgumentException1() { - thrown.expect(IllegalArgumentException.class); - GroupKey.parseKey(""); + void testParseKeyIllegalArgumentException1() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey.parseKey(""); + }); } @Test - public void testParseKeyIllegalArgumentException2() { - thrown.expect(IllegalArgumentException.class); - GroupKey.parseKey("f%oo"); + void testParseKeyIllegalArgumentException2() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey.parseKey("f%oo"); + }); } @Test - public void testParseKeyIllegalArgumentException3() { - thrown.expect(IllegalArgumentException.class); - GroupKey.parseKey("f+o+o+bar"); + void testParseKeyIllegalArgumentException3() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey.parseKey("f+o+o+bar"); + }); } @Test - public void testParseKeyIllegalArgumentException4() { - thrown.expect(IllegalArgumentException.class); - GroupKey.parseKey("f++bar"); + void testParseKeyIllegalArgumentException4() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey.parseKey("f++bar"); + }); } @Test - public void testGetKeyDatIdParam() { - thrown.expect(IllegalArgumentException.class); - GroupKey.getKey("", "a"); + void testGetKeyDatIdParam() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey.getKey("", "a"); + }); } @Test - public void testGetKeyGroupParam() { - thrown.expect(IllegalArgumentException.class); - GroupKey.getKey("a", ""); + void testGetKeyGroupParam() { + assertThrows(IllegalArgumentException.class, () -> { + GroupKey.getKey("a", ""); + }); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigContextTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigContextTest.java index 47acff2c38d..5796a000427 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigContextTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigContextTest.java @@ -16,13 +16,14 @@ package com.alibaba.nacos.client.config.filter.impl; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ConfigContextTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ConfigContextTest { @Test - public void testParameter() { + void testParameter() { ConfigContext context = new ConfigContext(); String key = "key"; String v = "v"; @@ -30,7 +31,7 @@ public void testParameter() { String actual = (String) context.getParameter(key); - Assert.assertEquals(v, actual); + assertEquals(v, actual); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigEncryptionFilterTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigEncryptionFilterTest.java index fa6c5463252..98f84a21a1b 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigEncryptionFilterTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigEncryptionFilterTest.java @@ -18,21 +18,22 @@ import com.alibaba.nacos.api.config.filter.IConfigFilterChain; import com.alibaba.nacos.api.exception.NacosException; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; + +import static org.junit.jupiter.api.Assertions.assertEquals; /** * ConfigCryptoFilterTest. * * @author lixiaoshuang */ -@RunWith(MockitoJUnitRunner.class) -public class ConfigEncryptionFilterTest { +@ExtendWith(MockitoExtension.class) +class ConfigEncryptionFilterTest { private ConfigEncryptionFilter configEncryptionFilter; @@ -45,25 +46,25 @@ public class ConfigEncryptionFilterTest { @Mock private IConfigFilterChain iConfigFilterChain; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { configEncryptionFilter = new ConfigEncryptionFilter(); - - Mockito.when(configRequest.getDataId()).thenReturn("cipher-aes-test"); - Mockito.when(configRequest.getContent()).thenReturn("nacos"); - - Mockito.when(configResponse.getDataId()).thenReturn("test-dataid"); - Mockito.when(configResponse.getContent()).thenReturn("nacos"); - Mockito.when(configResponse.getEncryptedDataKey()).thenReturn("1234567890"); } @Test - public void testDoFilter() throws NacosException { + void doFilter() throws NacosException { + Mockito.when(configRequest.getDataId()).thenReturn("cipher-aes-test"); + Mockito.when(configRequest.getContent()).thenReturn("nacos"); + configEncryptionFilter.doFilter(configRequest, null, iConfigFilterChain); Mockito.verify(configRequest, Mockito.atLeast(1)).getDataId(); Mockito.verify(configRequest, Mockito.atLeast(1)).getContent(); + Mockito.when(configResponse.getDataId()).thenReturn("test-dataid"); + Mockito.when(configResponse.getContent()).thenReturn("nacos"); + Mockito.when(configResponse.getEncryptedDataKey()).thenReturn("1234567890"); + configEncryptionFilter.doFilter(null, configResponse, iConfigFilterChain); Mockito.verify(configResponse, Mockito.atLeast(1)).getDataId(); @@ -72,8 +73,8 @@ public void testDoFilter() throws NacosException { } @Test - public void testGetOrder() { + void testGetOrder() { int order = configEncryptionFilter.getOrder(); - Assert.assertEquals(order, 0); + assertEquals(0, order); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigEncryptionFilterTest1.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigEncryptionFilterTest1.java index 34566ebf640..c4685baed5a 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigEncryptionFilterTest1.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigEncryptionFilterTest1.java @@ -21,22 +21,22 @@ import com.alibaba.nacos.common.utils.StringUtils; import com.alibaba.nacos.plugin.encryption.EncryptionPluginManager; import com.alibaba.nacos.plugin.encryption.spi.EncryptionPluginService; +import org.apache.commons.codec.binary.Base64; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; -import java.nio.charset.StandardCharsets; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; +import java.nio.charset.StandardCharsets; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; -import org.apache.commons.codec.binary.Base64; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * AES encryption algorithm testing dataId with prefix cipher. @@ -45,8 +45,8 @@ * @Date 2023/12/23 9:45 PM * @Version 1.0 */ -@RunWith(MockitoJUnitRunner.class) -public class ConfigEncryptionFilterTest1 { +@ExtendWith(MockitoExtension.class) +class ConfigEncryptionFilterTest1 { private ConfigEncryptionFilter configEncryptionFilter; @@ -55,8 +55,8 @@ public class ConfigEncryptionFilterTest1 { @Mock private IConfigFilterChain iConfigFilterChain; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { mockEncryptionPluginService = new EncryptionPluginService() { private static final String ALGORITHM = "AES"; @@ -150,30 +150,32 @@ private String aesDecrypt(String content, String key) { } @Test - public void testDoFilterEncryptedData() throws NacosException { + void testDoFilterEncryptedData() throws NacosException { String dataId = "cipher-aes-test"; String content = "nacos"; - final String encryptionContent = mockEncryptionPluginService.encrypt(mockEncryptionPluginService.generateSecretKey(), content); - final String theKeyOfContentKey = mockEncryptionPluginService.encryptSecretKey(mockEncryptionPluginService.generateSecretKey()); + final String encryptionContent = mockEncryptionPluginService.encrypt( + mockEncryptionPluginService.generateSecretKey(), content); + final String theKeyOfContentKey = mockEncryptionPluginService.encryptSecretKey( + mockEncryptionPluginService.generateSecretKey()); ConfigRequest configRequest = new ConfigRequest(); configRequest.setDataId(dataId); configRequest.setContent(content); configEncryptionFilter.doFilter(configRequest, null, iConfigFilterChain); - Assert.assertEquals(configRequest.getContent(), encryptionContent); - Assert.assertEquals(configRequest.getEncryptedDataKey(), theKeyOfContentKey); + assertEquals(configRequest.getContent(), encryptionContent); + assertEquals(configRequest.getEncryptedDataKey(), theKeyOfContentKey); ConfigResponse configResponse = new ConfigResponse(); configResponse.setDataId(dataId); configResponse.setContent(encryptionContent); configResponse.setEncryptedDataKey(theKeyOfContentKey); configEncryptionFilter.doFilter(null, configResponse, iConfigFilterChain); - Assert.assertEquals(configResponse.getContent(), content); - Assert.assertEquals(configResponse.getEncryptedDataKey(), mockEncryptionPluginService.generateSecretKey()); + assertEquals(configResponse.getContent(), content); + assertEquals(configResponse.getEncryptedDataKey(), mockEncryptionPluginService.generateSecretKey()); } @Test - public void testDoFilter() throws NacosException { + void testDoFilter() throws NacosException { String dataId = "test"; String content = "nacos"; @@ -181,21 +183,21 @@ public void testDoFilter() throws NacosException { configRequest.setDataId(dataId); configRequest.setContent(content); configEncryptionFilter.doFilter(configRequest, null, iConfigFilterChain); - Assert.assertEquals(configRequest.getContent(), content); - Assert.assertEquals(configRequest.getEncryptedDataKey(), ""); + assertEquals(configRequest.getContent(), content); + assertEquals("", configRequest.getEncryptedDataKey()); ConfigResponse configResponse = new ConfigResponse(); configResponse.setDataId(dataId); configResponse.setContent(content); configResponse.setEncryptedDataKey(""); configEncryptionFilter.doFilter(null, configResponse, iConfigFilterChain); - Assert.assertEquals(configResponse.getContent(), content); - Assert.assertEquals(configResponse.getEncryptedDataKey(), ""); + assertEquals(configResponse.getContent(), content); + assertEquals("", configResponse.getEncryptedDataKey()); } @Test - public void testGetOrder() { + void testGetOrder() { int order = configEncryptionFilter.getOrder(); - Assert.assertEquals(order, 0); + assertEquals(0, order); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java index ef74f305b8e..b610c72c6aa 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java @@ -22,15 +22,63 @@ import com.alibaba.nacos.api.config.filter.IConfigRequest; import com.alibaba.nacos.api.config.filter.IConfigResponse; import com.alibaba.nacos.api.exception.NacosException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Properties; -public class ConfigFilterChainManagerTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ConfigFilterChainManagerTest { + + @Test + void testAddFilterOrder() throws NacosException { + final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); + MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); + MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); + MyIConfigFilter filter3 = new MyIConfigFilter("filter3", 3); + + //random order + configFilterChainManager.addFilter(filter2); + configFilterChainManager.addFilter(filter1); + configFilterChainManager.addFilter(filter3); + + ConfigRequest configRequest = new ConfigRequest(); + + configFilterChainManager.doFilter(configRequest, new ConfigResponse()); + + IConfigContext configContext = configRequest.getConfigContext(); + + // doFilter works + assertEquals(1, configContext.getParameter("filter1")); + assertEquals(2, configContext.getParameter("filter2")); + assertEquals(3, configContext.getParameter("filter3")); + + //order + List orders = (List) configContext.getParameter("orders"); + assertEquals(Arrays.asList(1, 2, 3), orders); + } + + @Test + void testAddFilterNotRepeat() throws NacosException { + final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); + MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); + MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); + MyIConfigFilter repeatFilter = new MyIConfigFilter("filter1", 1); + + configFilterChainManager.addFilter(filter2); + configFilterChainManager.addFilter(filter1); + configFilterChainManager.addFilter(repeatFilter); + + ConfigRequest configRequest = new ConfigRequest(); + configFilterChainManager.doFilter(configRequest, new ConfigResponse()); + + IConfigContext configContext = configRequest.getConfigContext(); + + assertEquals(2, configContext.getParameter("filterCount")); + } private static class MyIConfigFilter implements IConfigFilter { @@ -83,51 +131,4 @@ public String getFilterName() { return name; } } - - @Test - public void testAddFilterOrder() throws NacosException { - final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); - MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); - MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); - MyIConfigFilter filter3 = new MyIConfigFilter("filter3", 3); - - //random order - configFilterChainManager.addFilter(filter2); - configFilterChainManager.addFilter(filter1); - configFilterChainManager.addFilter(filter3); - - ConfigRequest configRequest = new ConfigRequest(); - - configFilterChainManager.doFilter(configRequest, new ConfigResponse()); - - IConfigContext configContext = configRequest.getConfigContext(); - - // doFilter works - Assert.assertEquals(1, configContext.getParameter("filter1")); - Assert.assertEquals(2, configContext.getParameter("filter2")); - Assert.assertEquals(3, configContext.getParameter("filter3")); - - //order - List orders = (List) configContext.getParameter("orders"); - Assert.assertEquals(Arrays.asList(1, 2, 3), orders); - } - - @Test - public void testAddFilterNotRepeat() throws NacosException { - final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); - MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); - MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); - MyIConfigFilter repeatFilter = new MyIConfigFilter("filter1", 1); - - configFilterChainManager.addFilter(filter2); - configFilterChainManager.addFilter(filter1); - configFilterChainManager.addFilter(repeatFilter); - - ConfigRequest configRequest = new ConfigRequest(); - configFilterChainManager.doFilter(configRequest, new ConfigResponse()); - - IConfigContext configContext = configRequest.getConfigContext(); - - Assert.assertEquals(2, configContext.getParameter("filterCount")); - } } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainTest.java index 379bd1af051..e831c796439 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainTest.java @@ -17,13 +17,14 @@ package com.alibaba.nacos.client.config.filter.impl; import com.alibaba.nacos.api.exception.NacosException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ConfigFilterChainTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ConfigFilterChainTest { @Test - public void testConfigFilterChain() { + void testConfigFilterChain() { ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(null); configFilterChainManager.addFilter(new DemoFilter1()); configFilterChainManager.addFilter(new DemoFilter2()); @@ -31,8 +32,8 @@ public void testConfigFilterChain() { ConfigResponse configResponse = new ConfigResponse(); try { configFilterChainManager.doFilter(configRequest, configResponse); - Assert.assertEquals(DemoFilter1.class.getName(), configRequest.getParameter("filter1")); - Assert.assertEquals(DemoFilter2.class.getName(), configRequest.getParameter("filter2")); + assertEquals(DemoFilter1.class.getName(), configRequest.getParameter("filter1")); + assertEquals(DemoFilter2.class.getName(), configRequest.getParameter("filter2")); } catch (NacosException e) { e.printStackTrace(); } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigRequestTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigRequestTest.java index 35c9c0bf718..a2e58bd7512 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigRequestTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigRequestTest.java @@ -17,13 +17,15 @@ package com.alibaba.nacos.client.config.filter.impl; import com.alibaba.nacos.api.config.filter.IConfigContext; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ConfigRequestTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class ConfigRequestTest { @Test - public void testGetterAndSetter() { + void testGetterAndSetter() { ConfigRequest configRequest = new ConfigRequest(); String dataId = "id"; String group = "group"; @@ -37,16 +39,16 @@ public void testGetterAndSetter() { configRequest.setTenant(tenant); configRequest.setType(type); - Assert.assertEquals(dataId, configRequest.getDataId()); - Assert.assertEquals(group, configRequest.getGroup()); - Assert.assertEquals(tenant, configRequest.getTenant()); - Assert.assertEquals(content, configRequest.getContent()); - Assert.assertEquals(type, configRequest.getType()); + assertEquals(dataId, configRequest.getDataId()); + assertEquals(group, configRequest.getGroup()); + assertEquals(tenant, configRequest.getTenant()); + assertEquals(content, configRequest.getContent()); + assertEquals(type, configRequest.getType()); } @Test - public void testGetParameter() { + void testGetParameter() { ConfigRequest configRequest = new ConfigRequest(); String dataId = "id"; String group = "group"; @@ -58,16 +60,16 @@ public void testGetParameter() { configRequest.setGroup(group); configRequest.setTenant(tenant); - Assert.assertEquals(dataId, configRequest.getParameter("dataId")); - Assert.assertEquals(group, configRequest.getParameter("group")); - Assert.assertEquals(tenant, configRequest.getParameter("tenant")); - Assert.assertEquals(content, configRequest.getParameter("content")); + assertEquals(dataId, configRequest.getParameter("dataId")); + assertEquals(group, configRequest.getParameter("group")); + assertEquals(tenant, configRequest.getParameter("tenant")); + assertEquals(content, configRequest.getParameter("content")); } @Test - public void testGetConfigContext() { + void testGetConfigContext() { ConfigRequest configRequest = new ConfigRequest(); IConfigContext configContext = configRequest.getConfigContext(); - Assert.assertNotNull(configContext); + assertNotNull(configContext); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigResponseTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigResponseTest.java index 12b01064c72..ae49404fa88 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigResponseTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigResponseTest.java @@ -17,13 +17,15 @@ package com.alibaba.nacos.client.config.filter.impl; import com.alibaba.nacos.api.config.filter.IConfigContext; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ConfigResponseTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class ConfigResponseTest { @Test - public void testGetterAndSetter() { + void testGetterAndSetter() { ConfigResponse configResponse = new ConfigResponse(); String dataId = "id"; String group = "group"; @@ -37,15 +39,15 @@ public void testGetterAndSetter() { configResponse.setTenant(tenant); configResponse.setConfigType(type); - Assert.assertEquals(dataId, configResponse.getDataId()); - Assert.assertEquals(group, configResponse.getGroup()); - Assert.assertEquals(tenant, configResponse.getTenant()); - Assert.assertEquals(content, configResponse.getContent()); - Assert.assertEquals(type, configResponse.getConfigType()); + assertEquals(dataId, configResponse.getDataId()); + assertEquals(group, configResponse.getGroup()); + assertEquals(tenant, configResponse.getTenant()); + assertEquals(content, configResponse.getContent()); + assertEquals(type, configResponse.getConfigType()); } @Test - public void getParameter() { + void getParameter() { ConfigResponse configResponse = new ConfigResponse(); String dataId = "id"; String group = "group"; @@ -59,17 +61,17 @@ public void getParameter() { configResponse.setTenant(tenant); configResponse.putParameter(custom, custom); - Assert.assertEquals(dataId, configResponse.getParameter("dataId")); - Assert.assertEquals(group, configResponse.getParameter("group")); - Assert.assertEquals(tenant, configResponse.getParameter("tenant")); - Assert.assertEquals(content, configResponse.getParameter("content")); - Assert.assertEquals(custom, configResponse.getParameter("custom")); + assertEquals(dataId, configResponse.getParameter("dataId")); + assertEquals(group, configResponse.getParameter("group")); + assertEquals(tenant, configResponse.getParameter("tenant")); + assertEquals(content, configResponse.getParameter("content")); + assertEquals(custom, configResponse.getParameter("custom")); } @Test - public void getConfigContext() { + void getConfigContext() { ConfigResponse configResponse = new ConfigResponse(); IConfigContext configContext = configResponse.getConfigContext(); - Assert.assertNotNull(configContext); + assertNotNull(configContext); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/http/MetricsHttpAgentTest.java b/client/src/test/java/com/alibaba/nacos/client/config/http/MetricsHttpAgentTest.java index ef56426aebf..cc048de9354 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/http/MetricsHttpAgentTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/http/MetricsHttpAgentTest.java @@ -19,13 +19,67 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.common.http.HttpRestResult; import com.alibaba.nacos.common.http.param.Header; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.HashMap; import java.util.Map; -public class MetricsHttpAgentTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class MetricsHttpAgentTest { + + @Test + void testGetter() { + String name = "name"; + String encode = "UTF-8"; + String tenant = "aaa"; + String namespace = "aaa"; + final HttpAgent mockHttpAgent = new MockHttpAgent(name, encode, tenant, namespace); + final MetricsHttpAgent metricsHttpAgent = new MetricsHttpAgent(mockHttpAgent); + + assertEquals(name, metricsHttpAgent.getName()); + assertEquals(encode, metricsHttpAgent.getEncode()); + assertEquals(tenant, metricsHttpAgent.getTenant()); + assertEquals(namespace, metricsHttpAgent.getNamespace()); + } + + @Test + void testLifeCycle() throws NacosException { + String name = "name"; + String encode = "UTF-8"; + String tenant = "aaa"; + String namespace = "aaa"; + final MockHttpAgent mockHttpAgent = new MockHttpAgent(name, encode, tenant, namespace); + final MetricsHttpAgent metricsHttpAgent = new MetricsHttpAgent(mockHttpAgent); + + metricsHttpAgent.start(); + assertTrue(mockHttpAgent.isStart()); + + metricsHttpAgent.shutdown(); + assertTrue(mockHttpAgent.isShutdown()); + } + + @Test + void testHttpMethod() throws Exception { + String name = "name"; + String encode = "UTF-8"; + String tenant = "aaa"; + String namespace = "aaa"; + final MockHttpAgent mockHttpAgent = new MockHttpAgent(name, encode, tenant, namespace); + final MetricsHttpAgent metricsHttpAgent = new MetricsHttpAgent(mockHttpAgent); + + final HttpRestResult result1 = metricsHttpAgent.httpGet("/aa", new HashMap(), + new HashMap(), "UTF-8", 1L); + assertEquals("get /aa", result1.getMessage()); + final HttpRestResult result2 = metricsHttpAgent.httpPost("/aa", new HashMap(), + new HashMap(), "UTF-8", 1L); + assertEquals("post /aa", result2.getMessage()); + + final HttpRestResult result3 = metricsHttpAgent.httpDelete("/aa", new HashMap(), + new HashMap(), "UTF-8", 1L); + assertEquals("delete /aa", result3.getMessage()); + } private static class MockHttpAgent implements HttpAgent { @@ -104,56 +158,4 @@ public boolean isShutdown() { return shutdown; } } - - @Test - public void testGetter() { - String name = "name"; - String encode = "UTF-8"; - String tenant = "aaa"; - String namespace = "aaa"; - final HttpAgent mockHttpAgent = new MockHttpAgent(name, encode, tenant, namespace); - final MetricsHttpAgent metricsHttpAgent = new MetricsHttpAgent(mockHttpAgent); - - Assert.assertEquals(name, metricsHttpAgent.getName()); - Assert.assertEquals(encode, metricsHttpAgent.getEncode()); - Assert.assertEquals(tenant, metricsHttpAgent.getTenant()); - Assert.assertEquals(namespace, metricsHttpAgent.getNamespace()); - } - - @Test - public void testLifeCycle() throws NacosException { - String name = "name"; - String encode = "UTF-8"; - String tenant = "aaa"; - String namespace = "aaa"; - final MockHttpAgent mockHttpAgent = new MockHttpAgent(name, encode, tenant, namespace); - final MetricsHttpAgent metricsHttpAgent = new MetricsHttpAgent(mockHttpAgent); - - metricsHttpAgent.start(); - Assert.assertTrue(mockHttpAgent.isStart()); - - metricsHttpAgent.shutdown(); - Assert.assertTrue(mockHttpAgent.isShutdown()); - } - - @Test - public void testHttpMethod() throws Exception { - String name = "name"; - String encode = "UTF-8"; - String tenant = "aaa"; - String namespace = "aaa"; - final MockHttpAgent mockHttpAgent = new MockHttpAgent(name, encode, tenant, namespace); - final MetricsHttpAgent metricsHttpAgent = new MetricsHttpAgent(mockHttpAgent); - - final HttpRestResult result1 = metricsHttpAgent - .httpGet("/aa", new HashMap(), new HashMap(), "UTF-8", 1L); - Assert.assertEquals("get /aa", result1.getMessage()); - final HttpRestResult result2 = metricsHttpAgent - .httpPost("/aa", new HashMap(), new HashMap(), "UTF-8", 1L); - Assert.assertEquals("post /aa", result2.getMessage()); - - final HttpRestResult result3 = metricsHttpAgent - .httpDelete("/aa", new HashMap(), new HashMap(), "UTF-8", 1L); - Assert.assertEquals("delete /aa", result3.getMessage()); - } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/http/ServerHttpAgentTest.java b/client/src/test/java/com/alibaba/nacos/client/config/http/ServerHttpAgentTest.java index c394e2485dc..6f512437222 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/http/ServerHttpAgentTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/http/ServerHttpAgentTest.java @@ -24,14 +24,16 @@ import com.alibaba.nacos.common.http.client.NacosRestTemplate; import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.common.http.param.Query; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.lang.reflect.Field; import java.net.ConnectException; @@ -41,13 +43,19 @@ import java.util.Iterator; import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyMap; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class ServerHttpAgentTest { +@ExtendWith(MockitoExtension.class) +// todo remove strictness lenient +@MockitoSettings(strictness = Strictness.LENIENT) +class ServerHttpAgentTest { private static final String SERVER_ADDRESS_1 = "http://1.1.1.1:8848"; @@ -67,8 +75,8 @@ public class ServerHttpAgentTest { ServerHttpAgent serverHttpAgent; - @Before - public void setUp() throws NoSuchFieldException, IllegalAccessException { + @BeforeEach + void setUp() throws NoSuchFieldException, IllegalAccessException { serverHttpAgent = new ServerHttpAgent(serverListManager, new Properties()); injectRestTemplate(); when(serverListManager.getCurrentServerAddr()).thenReturn(SERVER_ADDRESS_1); @@ -82,49 +90,49 @@ private void injectRestTemplate() throws NoSuchFieldException, IllegalAccessExce restTemplateField.set(serverHttpAgent, nacosRestTemplate); } - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { serverHttpAgent.shutdown(); } @Test - public void testConstruct() throws NacosException { + void testConstruct() throws NacosException { ServerListManager server = new ServerListManager(); final ServerHttpAgent serverHttpAgent1 = new ServerHttpAgent(server); - Assert.assertNotNull(serverHttpAgent1); + assertNotNull(serverHttpAgent1); final ServerHttpAgent serverHttpAgent2 = new ServerHttpAgent(server, new Properties()); - Assert.assertNotNull(serverHttpAgent2); + assertNotNull(serverHttpAgent2); final Properties properties = new Properties(); properties.put(PropertyKeyConst.SERVER_ADDR, "1.1.1.1"); final ServerHttpAgent serverHttpAgent3 = new ServerHttpAgent(properties); - Assert.assertNotNull(serverHttpAgent3); + assertNotNull(serverHttpAgent3); } @Test - public void testGetterAndSetter() throws NacosException { + void testGetterAndSetter() throws NacosException { ServerListManager server = new ServerListManager("aaa", "namespace1"); final ServerHttpAgent serverHttpAgent = new ServerHttpAgent(server, new Properties()); final String appname = ServerHttpAgent.getAppname(); //set by AppNameUtils, init in ParamUtils static block - Assert.assertEquals("unknown", appname); + assertEquals("unknown", appname); final String encode = serverHttpAgent.getEncode(); final String namespace = serverHttpAgent.getNamespace(); final String tenant = serverHttpAgent.getTenant(); final String name = serverHttpAgent.getName(); - Assert.assertNull(encode); - Assert.assertEquals("namespace1", namespace); - Assert.assertEquals("namespace1", tenant); - Assert.assertEquals("custom-aaa_8080_nacos_serverlist_namespace1", name); + assertNull(encode); + assertEquals("namespace1", namespace); + assertEquals("namespace1", tenant); + assertEquals("custom-aaa_8080_nacos_serverlist_namespace1", name); } @Test - public void testLifCycle() throws NacosException { + void testLifCycle() throws NacosException { Properties properties = new Properties(); properties.put(PropertyKeyConst.SERVER_ADDR, "aaa"); ServerListManager server = Mockito.mock(ServerListManager.class); @@ -133,148 +141,164 @@ public void testLifCycle() throws NacosException { serverHttpAgent.start(); Mockito.verify(server).start(); - try { + Assertions.assertDoesNotThrow(() -> { serverHttpAgent.shutdown(); - } catch (NullPointerException e) { - Assert.fail(); - } + }); } @Test - public void testHttpGetSuccess() throws Exception { + void testHttpGetSuccess() throws Exception { when(nacosRestTemplate.get(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), any(Header.class), any(Query.class), eq(String.class))).thenReturn(mockResult); when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_OK); - HttpRestResult actual = serverHttpAgent - .httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); - Assert.assertEquals(mockResult, actual); + HttpRestResult actual = serverHttpAgent.httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), + "UTF-8", 1000); + assertEquals(mockResult, actual); } - @Test(expected = ConnectException.class) - public void testHttpGetFailed() throws Exception { - when(nacosRestTemplate.get(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), - any(Header.class), any(Query.class), eq(String.class))).thenReturn(mockResult); - when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_NOT_FOUND); - serverHttpAgent.httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + @Test + void testHttpGetFailed() throws Exception { + assertThrows(ConnectException.class, () -> { + when(nacosRestTemplate.get(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), + any(Header.class), any(Query.class), eq(String.class))).thenReturn(mockResult); + when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_NOT_FOUND); + serverHttpAgent.httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + }); } - @Test(expected = NacosException.class) - public void testHttpWithRequestException() throws Exception { - when(nacosRestTemplate.get(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), - any(Header.class), any(Query.class), eq(String.class))) - .thenThrow(new ConnectException(), new SocketTimeoutException(), new NacosException()); - serverHttpAgent.httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + @Test + void testHttpWithRequestException() throws Exception { + assertThrows(NacosException.class, () -> { + when(nacosRestTemplate.get(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), + any(Header.class), any(Query.class), eq(String.class))).thenThrow(new ConnectException(), + new SocketTimeoutException(), new NacosException()); + serverHttpAgent.httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + }); } @Test - public void testRetryWithNewServer() throws Exception { + void testRetryWithNewServer() throws Exception { when(mockIterator.hasNext()).thenReturn(true); when(nacosRestTemplate.get(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), any(Header.class), any(Query.class), eq(String.class))).thenThrow(new ConnectException()); when(nacosRestTemplate.get(eq(SERVER_ADDRESS_2 + "/test"), any(HttpClientConfig.class), any(Header.class), any(Query.class), eq(String.class))).thenReturn(mockResult); when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_OK); - HttpRestResult actual = serverHttpAgent - .httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); - Assert.assertEquals(mockResult, actual); + HttpRestResult actual = serverHttpAgent.httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), + "UTF-8", 1000); + assertEquals(mockResult, actual); } - @Test(expected = ConnectException.class) - public void testRetryTimeout() throws Exception { - when(nacosRestTemplate.get(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), - any(Header.class), any(Query.class), eq(String.class))).thenThrow(new SocketTimeoutException()); - serverHttpAgent.httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 0); + @Test + void testRetryTimeout() throws Exception { + assertThrows(ConnectException.class, () -> { + when(nacosRestTemplate.get(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), + any(Header.class), any(Query.class), eq(String.class))).thenThrow(new SocketTimeoutException()); + serverHttpAgent.httpGet("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 0); + }); } @Test - public void testHttpPostSuccess() throws Exception { + void testHttpPostSuccess() throws Exception { when(nacosRestTemplate.postForm(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), any(Header.class), anyMap(), eq(String.class))).thenReturn(mockResult); when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_OK); - HttpRestResult actual = serverHttpAgent - .httpPost("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); - Assert.assertEquals(mockResult, actual); + HttpRestResult actual = serverHttpAgent.httpPost("/test", Collections.emptyMap(), + Collections.emptyMap(), "UTF-8", 1000); + assertEquals(mockResult, actual); } - @Test(expected = ConnectException.class) - public void testHttpPostFailed() throws Exception { - when(nacosRestTemplate.postForm(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), - any(Header.class), anyMap(), eq(String.class))).thenReturn(mockResult); - when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_NOT_FOUND); - serverHttpAgent.httpPost("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + @Test + void testHttpPostFailed() throws Exception { + assertThrows(ConnectException.class, () -> { + when(nacosRestTemplate.postForm(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), + any(Header.class), anyMap(), eq(String.class))).thenReturn(mockResult); + when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_NOT_FOUND); + serverHttpAgent.httpPost("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + }); } - @Test(expected = NacosException.class) - public void testHttpPostWithRequestException() throws Exception { - when(nacosRestTemplate.postForm(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), - any(Header.class), anyMap(), eq(String.class))) - .thenThrow(new ConnectException(), new SocketTimeoutException(), new NacosException()); - serverHttpAgent.httpPost("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + @Test + void testHttpPostWithRequestException() throws Exception { + assertThrows(NacosException.class, () -> { + when(nacosRestTemplate.postForm(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), + any(Header.class), anyMap(), eq(String.class))).thenThrow(new ConnectException(), + new SocketTimeoutException(), new NacosException()); + serverHttpAgent.httpPost("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + }); } @Test - public void testRetryPostWithNewServer() throws Exception { + void testRetryPostWithNewServer() throws Exception { when(mockIterator.hasNext()).thenReturn(true); when(nacosRestTemplate.postForm(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), any(Header.class), anyMap(), eq(String.class))).thenThrow(new ConnectException()); when(nacosRestTemplate.postForm(eq(SERVER_ADDRESS_2 + "/test"), any(HttpClientConfig.class), any(Header.class), anyMap(), eq(String.class))).thenReturn(mockResult); when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_OK); - HttpRestResult actual = serverHttpAgent - .httpPost("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); - Assert.assertEquals(mockResult, actual); + HttpRestResult actual = serverHttpAgent.httpPost("/test", Collections.emptyMap(), + Collections.emptyMap(), "UTF-8", 1000); + assertEquals(mockResult, actual); } - @Test(expected = ConnectException.class) - public void testRetryPostTimeout() throws Exception { - when(nacosRestTemplate.postForm(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), - any(Header.class), anyMap(), eq(String.class))).thenThrow(new SocketTimeoutException()); - serverHttpAgent.httpPost("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 0); + @Test + void testRetryPostTimeout() throws Exception { + assertThrows(ConnectException.class, () -> { + when(nacosRestTemplate.postForm(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), + any(Header.class), anyMap(), eq(String.class))).thenThrow(new SocketTimeoutException()); + serverHttpAgent.httpPost("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 0); + }); } @Test - public void testHttpDeleteSuccess() throws Exception { + void testHttpDeleteSuccess() throws Exception { when(nacosRestTemplate.delete(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), any(Header.class), any(Query.class), eq(String.class))).thenReturn(mockResult); when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_OK); - HttpRestResult actual = serverHttpAgent - .httpDelete("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); - Assert.assertEquals(mockResult, actual); + HttpRestResult actual = serverHttpAgent.httpDelete("/test", Collections.emptyMap(), + Collections.emptyMap(), "UTF-8", 1000); + assertEquals(mockResult, actual); } - @Test(expected = ConnectException.class) - public void testHttpDeleteFailed() throws Exception { - when(nacosRestTemplate.delete(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), - any(Header.class), any(Query.class), eq(String.class))).thenReturn(mockResult); - when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_NOT_FOUND); - serverHttpAgent.httpDelete("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + @Test + void testHttpDeleteFailed() throws Exception { + assertThrows(ConnectException.class, () -> { + when(nacosRestTemplate.delete(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), + any(Header.class), any(Query.class), eq(String.class))).thenReturn(mockResult); + when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_NOT_FOUND); + serverHttpAgent.httpDelete("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + }); } - @Test(expected = NacosException.class) - public void testHttpDeleteWithRequestException() throws Exception { - when(nacosRestTemplate.delete(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), - any(Header.class), any(Query.class), eq(String.class))) - .thenThrow(new ConnectException(), new SocketTimeoutException(), new NacosException()); - serverHttpAgent.httpDelete("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + @Test + void testHttpDeleteWithRequestException() throws Exception { + assertThrows(NacosException.class, () -> { + when(nacosRestTemplate.delete(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), + any(Header.class), any(Query.class), eq(String.class))).thenThrow(new ConnectException(), + new SocketTimeoutException(), new NacosException()); + serverHttpAgent.httpDelete("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); + }); } @Test - public void testRetryDeleteWithNewServer() throws Exception { + void testRetryDeleteWithNewServer() throws Exception { when(mockIterator.hasNext()).thenReturn(true); when(nacosRestTemplate.delete(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), any(Header.class), any(Query.class), eq(String.class))).thenThrow(new ConnectException()); when(nacosRestTemplate.delete(eq(SERVER_ADDRESS_2 + "/test"), any(HttpClientConfig.class), any(Header.class), any(Query.class), eq(String.class))).thenReturn(mockResult); when(mockResult.getCode()).thenReturn(HttpURLConnection.HTTP_OK); - HttpRestResult actual = serverHttpAgent - .httpDelete("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 1000); - Assert.assertEquals(mockResult, actual); + HttpRestResult actual = serverHttpAgent.httpDelete("/test", Collections.emptyMap(), + Collections.emptyMap(), "UTF-8", 1000); + assertEquals(mockResult, actual); } - @Test(expected = ConnectException.class) - public void testRetryDeleteTimeout() throws Exception { - when(nacosRestTemplate.delete(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), - any(Header.class), any(Query.class), eq(String.class))).thenThrow(new SocketTimeoutException()); - serverHttpAgent.httpDelete("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 0); + @Test + void testRetryDeleteTimeout() throws Exception { + assertThrows(ConnectException.class, () -> { + when(nacosRestTemplate.delete(eq(SERVER_ADDRESS_1 + "/test"), any(HttpClientConfig.class), + any(Header.class), any(Query.class), eq(String.class))).thenThrow(new SocketTimeoutException()); + serverHttpAgent.httpDelete("/test", Collections.emptyMap(), Collections.emptyMap(), "UTF-8", 0); + }); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/impl/CacheDataTest.java b/client/src/test/java/com/alibaba/nacos/client/config/impl/CacheDataTest.java index 7ff7116345b..3d0fb134393 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/impl/CacheDataTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/impl/CacheDataTest.java @@ -27,8 +27,7 @@ import com.alibaba.nacos.common.notify.NotifyCenter; import com.alibaba.nacos.common.notify.listener.Subscriber; import com.alibaba.nacos.common.utils.MD5Utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Date; @@ -37,34 +36,40 @@ import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicReference; -public class CacheDataTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class CacheDataTest { @Test - public void testConstructorAndEquals() { + void testConstructorAndEquals() { ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); final CacheData cacheData1 = new CacheData(filter, "name1", "key", "group", "tenant"); - Assert.assertEquals("CacheData [key, group]", cacheData1.toString()); + assertEquals("CacheData [key, group]", cacheData1.toString()); final CacheData cacheData2 = new CacheData(filter, "name2", "key", "group"); - Assert.assertEquals(cacheData1, cacheData2); - Assert.assertEquals(cacheData1.hashCode(), cacheData2.hashCode()); + assertEquals(cacheData1, cacheData2); + assertEquals(cacheData1.hashCode(), cacheData2.hashCode()); final CacheData cacheData3 = new CacheData(filter, "name2", "key3", "group", "tenant"); - Assert.assertNotEquals(cacheData1, cacheData3); + assertNotEquals(cacheData1, cacheData3); } @Test - public void testGetter() { + void testGetter() { ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); final CacheData cacheData1 = new CacheData(filter, "name1", "key", "group", "tenant"); - Assert.assertTrue(cacheData1.isInitializing()); - Assert.assertNull(cacheData1.getContent()); - Assert.assertEquals(0, cacheData1.getTaskId()); - Assert.assertFalse(cacheData1.isConsistentWithServer()); - Assert.assertFalse(cacheData1.isUseLocalConfigInfo()); - Assert.assertEquals(0, cacheData1.getLastModifiedTs().intValue()); - Assert.assertEquals(0, cacheData1.getLocalConfigInfoVersion()); + assertTrue(cacheData1.isInitializing()); + assertNull(cacheData1.getContent()); + assertEquals(0, cacheData1.getTaskId()); + assertFalse(cacheData1.isConsistentWithServer()); + assertFalse(cacheData1.isUseLocalConfigInfo()); + assertEquals(0, cacheData1.getLastModifiedTs().intValue()); + assertEquals(0, cacheData1.getLocalConfigInfoVersion()); cacheData1.setInitializing(false); cacheData1.setContent("123"); @@ -76,30 +81,30 @@ public void testGetter() { cacheData1.setUseLocalConfigInfo(true); cacheData1.setLocalConfigInfoVersion(timeStamp); - Assert.assertFalse(cacheData1.isInitializing()); - Assert.assertEquals("123", cacheData1.getContent()); - Assert.assertEquals(MD5Utils.md5Hex("123", "UTF-8"), cacheData1.getMd5()); + assertFalse(cacheData1.isInitializing()); + assertEquals("123", cacheData1.getContent()); + assertEquals(MD5Utils.md5Hex("123", "UTF-8"), cacheData1.getMd5()); - Assert.assertEquals(123, cacheData1.getTaskId()); - Assert.assertTrue(cacheData1.isConsistentWithServer()); - Assert.assertEquals("123", cacheData1.getType()); - Assert.assertTrue(cacheData1.isUseLocalConfigInfo()); - Assert.assertEquals(timeStamp, cacheData1.getLastModifiedTs().longValue()); - Assert.assertEquals(timeStamp, cacheData1.getLocalConfigInfoVersion()); + assertEquals(123, cacheData1.getTaskId()); + assertTrue(cacheData1.isConsistentWithServer()); + assertEquals("123", cacheData1.getType()); + assertTrue(cacheData1.isUseLocalConfigInfo()); + assertEquals(timeStamp, cacheData1.getLastModifiedTs().longValue()); + assertEquals(timeStamp, cacheData1.getLocalConfigInfoVersion()); } @Test - public void testNotifyWarnTimeout() { + void testNotifyWarnTimeout() { System.setProperty("nacos.listener.notify.warn.timeout", "5000"); long notifyWarnTimeout = CacheData.initNotifyWarnTimeout(); - Assert.assertEquals(5000, notifyWarnTimeout); + assertEquals(5000, notifyWarnTimeout); System.setProperty("nacos.listener.notify.warn.timeout", "1bf000abc"); long notifyWarnTimeout2 = CacheData.initNotifyWarnTimeout(); - Assert.assertEquals(60000, notifyWarnTimeout2); + assertEquals(60000, notifyWarnTimeout2); } @Test - public void testListener() throws NacosException { + void testListener() throws NacosException { ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); final CacheData cacheData1 = new CacheData(filter, "name1", "key", "group", "tenant"); @@ -114,16 +119,16 @@ public void receiveConfigInfo(String configInfo) { } }; cacheData1.addListener(listener); - Assert.assertEquals(1, cacheData1.getListeners().size()); - Assert.assertEquals(listener, cacheData1.getListeners().get(0)); + assertEquals(1, cacheData1.getListeners().size()); + assertEquals(listener, cacheData1.getListeners().get(0)); cacheData1.removeListener(listener); - Assert.assertEquals(0, cacheData1.getListeners().size()); + assertEquals(0, cacheData1.getListeners().size()); } @Test - public void testCheckListenerMd5() throws NacosException { + void testCheckListenerMd5() throws NacosException { ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); final CacheData data = new CacheData(filter, "name1", "key", "group", "tenant"); final List list = new ArrayList<>(); @@ -140,22 +145,22 @@ public void receiveConfigInfo(String configInfo) { }; data.addListener(listener); data.checkListenerMd5(); - Assert.assertTrue(data.checkListenersMd5Consistent()); - Assert.assertEquals(0, list.size()); + assertTrue(data.checkListenersMd5Consistent()); + assertEquals(0, list.size()); data.setContent("new"); - Assert.assertFalse(data.checkListenersMd5Consistent()); + assertFalse(data.checkListenersMd5Consistent()); data.checkListenerMd5(); - Assert.assertEquals(1, list.size()); - Assert.assertEquals("new", list.get(0)); + assertEquals(1, list.size()); + assertEquals("new", list.get(0)); } @Test - public void testCheckListenerMd5NotifyTimeouts() throws NacosException { + void testCheckListenerMd5NotifyTimeouts() throws NacosException { System.setProperty("nacos.listener.notify.warn.timeout", "1000"); long notifyWarnTimeout = CacheData.initNotifyWarnTimeout(); - Assert.assertEquals(1000, notifyWarnTimeout); + assertEquals(1000, notifyWarnTimeout); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); final CacheData data = new CacheData(filter, "name1", "keytimeouts", "group", "tenant"); Listener listener = new Listener() { @@ -192,12 +197,12 @@ public Class subscribeType() { data.addListener(listener); data.setContent("new"); data.checkListenerMd5(); - Assert.assertTrue(data.checkListenersMd5Consistent()); - Assert.assertEquals("keytimeouts", dataIdNotifyTimeouts.get()); + assertTrue(data.checkListenersMd5Consistent()); + assertEquals("keytimeouts", dataIdNotifyTimeouts.get()); } @Test - public void testAbstractSharedListener() throws NacosException { + void testAbstractSharedListener() throws NacosException { ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); final CacheData data = new CacheData(filter, "name1", "keyshare", "group", "tenant"); @@ -223,14 +228,14 @@ public void innerReceive(String dataId, String group, String configInfo) { String content = "content" + System.currentTimeMillis(); data.setContent(content); data.checkListenerMd5(); - Assert.assertTrue(data.checkListenersMd5Consistent()); - Assert.assertEquals(dataIdReceive[0], "keyshare"); - Assert.assertEquals(groupReceive[0], "group"); - Assert.assertEquals(contentReceive[0], content); + assertTrue(data.checkListenersMd5Consistent()); + assertEquals("keyshare", dataIdReceive[0]); + assertEquals("group", groupReceive[0]); + assertEquals(contentReceive[0], content); } @Test - public void testAbstractConfigChangeListener() throws NacosException { + void testAbstractConfigChangeListener() throws NacosException { ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); final CacheData data = new CacheData(filter, "name1", "keyshare", "group", "tenant"); data.setType("properties"); @@ -253,10 +258,10 @@ public Executor getExecutor() { String content = "b=b\nc=abc\nd=d"; data.setContent(content); data.checkListenerMd5(); - Assert.assertTrue(data.checkListenersMd5Consistent()); - Assert.assertEquals(PropertyChangeType.DELETED, changeItemReceived.get().getChangeItem("a").getType()); - Assert.assertEquals(PropertyChangeType.MODIFIED, changeItemReceived.get().getChangeItem("c").getType()); - Assert.assertEquals(PropertyChangeType.ADDED, changeItemReceived.get().getChangeItem("d").getType()); + assertTrue(data.checkListenersMd5Consistent()); + assertEquals(PropertyChangeType.DELETED, changeItemReceived.get().getChangeItem("a").getType()); + assertEquals(PropertyChangeType.MODIFIED, changeItemReceived.get().getChangeItem("c").getType()); + assertEquals(PropertyChangeType.ADDED, changeItemReceived.get().getChangeItem("d").getType()); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/impl/ClientWorkerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/impl/ClientWorkerTest.java index 5c780ebbc9d..0b60d704224 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/impl/ClientWorkerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/impl/ClientWorkerTest.java @@ -42,15 +42,14 @@ import com.alibaba.nacos.common.utils.JacksonUtils; import com.alibaba.nacos.common.utils.MD5Utils; import com.fasterxml.jackson.databind.JsonNode; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.File; import java.lang.reflect.Field; @@ -66,9 +65,12 @@ import java.util.concurrent.atomic.AtomicReference; import static com.alibaba.nacos.api.annotation.NacosProperties.NAMESPACE; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; @@ -76,24 +78,24 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.times; -@RunWith(MockitoJUnitRunner.class) -public class ClientWorkerTest { +@ExtendWith(MockitoExtension.class) +class ClientWorkerTest { + + private static final String TEST_NAMESPACE = "TEST_NAMESPACE"; MockedStatic rpcClientFactoryMockedStatic; MockedStatic localConfigInfoProcessorMockedStatic; - private static final String TEST_NAMESPACE = "TEST_NAMESPACE"; + @Mock + RpcClient rpcClient; private ClientWorker clientWorker; private ClientWorker clientWorkerSpy; - @Mock - RpcClient rpcClient; - - @Before - public void before() { + @BeforeEach + void before() { rpcClientFactoryMockedStatic = Mockito.mockStatic(RpcClientFactory.class); rpcClientFactoryMockedStatic.when( @@ -116,25 +118,25 @@ public void before() { clientWorkerSpy = Mockito.spy(clientWorker); } - @After - public void after() { + @AfterEach + void after() { rpcClientFactoryMockedStatic.close(); localConfigInfoProcessorMockedStatic.close(); } @Test - public void testConstruct() throws NacosException { + void testConstruct() throws NacosException { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(prop); ClientWorker clientWorker = new ClientWorker(filter, agent, nacosClientProperties); - Assert.assertNotNull(clientWorker); + assertNotNull(clientWorker); } @Test - public void testAddListenerWithoutTenant() throws NacosException { + void testAddListenerWithoutTenant() throws NacosException { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); @@ -149,22 +151,22 @@ public void testAddListenerWithoutTenant() throws NacosException { public void receiveConfigInfo(String configInfo) { } }; - + clientWorker.addListeners(dataId, group, Collections.singletonList(listener)); List listeners = clientWorker.getCache(dataId, group).getListeners(); - Assert.assertEquals(1, listeners.size()); - Assert.assertEquals(listener, listeners.get(0)); + assertEquals(1, listeners.size()); + assertEquals(listener, listeners.get(0)); clientWorker.removeListener(dataId, group, listener); listeners = clientWorker.getCache(dataId, group).getListeners(); - Assert.assertEquals(0, listeners.size()); + assertEquals(0, listeners.size()); CacheData cacheData = clientWorker.addCacheDataIfAbsent(dataId, group); - Assert.assertEquals(cacheData, clientWorker.getCache(dataId, group)); + assertEquals(cacheData, clientWorker.getCache(dataId, group)); } @Test - public void testListenerWithTenant() throws NacosException { + void testListenerWithTenant() throws NacosException { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); @@ -180,37 +182,37 @@ public void receiveConfigInfo(String configInfo) { String dataId = "a"; String group = "b"; - + clientWorker.addTenantListeners(dataId, group, Collections.singletonList(listener)); List listeners = clientWorker.getCache(dataId, group).getListeners(); - Assert.assertEquals(1, listeners.size()); - Assert.assertEquals(listener, listeners.get(0)); + assertEquals(1, listeners.size()); + assertEquals(listener, listeners.get(0)); clientWorker.removeTenantListener(dataId, group, listener); listeners = clientWorker.getCache(dataId, group).getListeners(); - Assert.assertEquals(0, listeners.size()); + assertEquals(0, listeners.size()); String content = "d"; clientWorker.addTenantListenersWithContent(dataId, group, content, null, Collections.singletonList(listener)); listeners = clientWorker.getCache(dataId, group).getListeners(); - Assert.assertEquals(1, listeners.size()); - Assert.assertEquals(listener, listeners.get(0)); + assertEquals(1, listeners.size()); + assertEquals(listener, listeners.get(0)); clientWorker.removeTenantListener(dataId, group, listener); listeners = clientWorker.getCache(dataId, group).getListeners(); - Assert.assertEquals(0, listeners.size()); + assertEquals(0, listeners.size()); String tenant = "c"; CacheData cacheData = clientWorker.addCacheDataIfAbsent(dataId, group, tenant); - Assert.assertEquals(cacheData, clientWorker.getCache(dataId, group, tenant)); + assertEquals(cacheData, clientWorker.getCache(dataId, group, tenant)); clientWorker.removeCache(dataId, group, tenant); - Assert.assertNull(clientWorker.getCache(dataId, group, tenant)); + assertNull(clientWorker.getCache(dataId, group, tenant)); } @Test - public void testPublishConfigSuccess() throws NacosException { + void testPublishConfigSuccess() throws NacosException { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); @@ -234,12 +236,12 @@ public void testPublishConfigSuccess() throws NacosException { .thenReturn(new ConfigPublishResponse()); boolean b = clientWorker.publishConfig(dataId, group, tenant, appName, tag, betaIps, content, null, casMd5, type); - Assert.assertTrue(b); + assertTrue(b); } @Test - public void testPublishConfigFail() throws NacosException { + void testPublishConfigFail() throws NacosException { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); @@ -263,12 +265,12 @@ public void testPublishConfigFail() throws NacosException { .thenReturn(ConfigPublishResponse.buildFailResponse(503, "over limit")); boolean b = clientWorker.publishConfig(dataId, group, tenant, appName, tag, betaIps, content, null, casMd5, type); - Assert.assertFalse(b); + assertFalse(b); } @Test - public void testPublishConfigException() throws NacosException { + void testPublishConfigException() throws NacosException { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); @@ -291,12 +293,12 @@ public void testPublishConfigException() throws NacosException { Mockito.when(rpcClient.request(any(ConfigPublishRequest.class), anyLong())).thenThrow(new NacosException()); boolean b = clientWorker.publishConfig(dataId, group, tenant, appName, tag, betaIps, content, null, casMd5, type); - Assert.assertFalse(b); + assertFalse(b); } @Test - public void testRemoveConfig() throws NacosException { + void testRemoveConfig() throws NacosException { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); @@ -315,16 +317,16 @@ public void testRemoveConfig() throws NacosException { .thenThrow(new NacosException(503, "overlimit")); clientWorker.removeConfig(dataId, group, tenant, tag); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals("overlimit", e.getErrMsg()); - Assert.assertEquals(503, e.getErrCode()); + assertEquals("overlimit", e.getErrMsg()); + assertEquals(503, e.getErrCode()); } } @Test - public void testGeConfigConfigSuccess() throws NacosException { + void testGeConfigConfigSuccess() throws NacosException { Properties prop = new Properties(); ServerListManager agent = Mockito.mock(ServerListManager.class); @@ -340,14 +342,14 @@ public void testGeConfigConfigSuccess() throws NacosException { .thenReturn(ConfigQueryResponse.buildSuccessResponse(content)); ConfigResponse configResponse = clientWorker.getServerConfig(dataId, group, tenant, 100, true); - Assert.assertEquals(content, configResponse.getContent()); + assertEquals(content, configResponse.getContent()); localConfigInfoProcessorMockedStatic.verify( () -> LocalConfigInfoProcessor.saveSnapshot(eq(clientWorker.getAgentName()), eq(dataId), eq(group), eq(tenant), eq(content)), times(1)); } @Test - public void testHandleConfigChangeReqeust() throws Exception { + void testHandleConfigChangeReqeust() throws Exception { Properties prop = new Properties(); String tenant = "c"; @@ -377,7 +379,7 @@ public void testHandleConfigChangeReqeust() throws Exception { } @Test - public void testHandleClientMetricsReqeust() throws Exception { + void testHandleClientMetricsReqeust() throws Exception { Properties prop = new Properties(); String tenant = "c"; @@ -418,15 +420,15 @@ public void testHandleClientMetricsReqeust() throws Exception { String metricValues = jsonNode.get("metricValues") .get(ClientConfigMetricRequest.MetricsKey.build(ClientConfigMetricRequest.MetricsKey.CACHE_DATA, GroupKey.getKeyTenant(dataId, group, tenant)).toString()).textValue(); - + int colonIndex = metricValues.lastIndexOf(":"); - Assert.assertEquals(content, metricValues.substring(0, colonIndex)); - Assert.assertEquals(md5, metricValues.substring(colonIndex + 1, metricValues.length())); + assertEquals(content, metricValues.substring(0, colonIndex)); + assertEquals(md5, metricValues.substring(colonIndex + 1, metricValues.length())); } @Test - public void testGeConfigConfigNotFound() throws NacosException { + void testGeConfigConfigNotFound() throws NacosException { Properties prop = new Properties(); ServerListManager agent = Mockito.mock(ServerListManager.class); @@ -441,7 +443,7 @@ public void testGeConfigConfigNotFound() throws NacosException { Mockito.when(rpcClient.request(any(ConfigQueryRequest.class), anyLong())).thenReturn(configQueryResponse); ConfigResponse configResponse = clientWorker.getServerConfig(dataId, group, tenant, 100, true); - Assert.assertNull(configResponse.getContent()); + assertNull(configResponse.getContent()); localConfigInfoProcessorMockedStatic.verify( () -> LocalConfigInfoProcessor.saveSnapshot(eq(clientWorker.getAgentName()), eq(dataId), eq(group), eq(tenant), eq(null)), times(1)); @@ -449,7 +451,7 @@ public void testGeConfigConfigNotFound() throws NacosException { } @Test - public void testGeConfigConfigConflict() throws NacosException { + void testGeConfigConfigConflict() throws NacosException { Properties prop = new Properties(); ServerListManager agent = Mockito.mock(ServerListManager.class); @@ -465,32 +467,32 @@ public void testGeConfigConfigConflict() throws NacosException { try { clientWorker.getServerConfig(dataId, group, tenant, 100, true); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals(NacosException.CONFLICT, e.getErrCode()); + assertEquals(NacosException.CONFLICT, e.getErrCode()); } } @Test - public void testShutdown() throws NacosException, NoSuchFieldException, IllegalAccessException { + void testShutdown() throws NacosException, NoSuchFieldException, IllegalAccessException { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); - + final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(prop); ClientWorker clientWorker = new ClientWorker(filter, agent, nacosClientProperties); clientWorker.shutdown(); Field agent1 = ClientWorker.class.getDeclaredField("agent"); agent1.setAccessible(true); ConfigTransportClient o = (ConfigTransportClient) agent1.get(clientWorker); - Assert.assertTrue(o.executor.isShutdown()); + assertTrue(o.executor.isShutdown()); agent1.setAccessible(false); - - Assert.assertNull(clientWorker.getAgentName()); + + assertNull(clientWorker.getAgentName()); } @Test - public void testExecuteConfigListen() throws Exception { + void testExecuteConfigListen() throws Exception { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); @@ -511,7 +513,7 @@ public void testExecuteConfigListen() throws Exception { String dataIdUseLocalCache = "dataIdUseLocalCache" + System.currentTimeMillis(); CacheData cacheUseLocalCache = useLocalCache(filter, agent.getName(), dataIdUseLocalCache, group, tenant, "content" + System.currentTimeMillis()); - Assert.assertFalse(cacheUseLocalCache.isUseLocalConfigInfo()); + assertFalse(cacheUseLocalCache.isUseLocalConfigInfo()); cacheDatas.add(cacheUseLocalCache); @@ -570,11 +572,11 @@ public void receiveConfigInfo(String configInfo) { (clientWorker.getAgent()).executeConfigListen(); //assert //use local cache. - Assert.assertTrue(cacheUseLocalCache.isUseLocalConfigInfo()); + assertTrue(cacheUseLocalCache.isUseLocalConfigInfo()); //discard cache to be deleted. - Assert.assertFalse(cacheMapMocked.get().containsKey(GroupKey.getKeyTenant(dataIdDiscard, group, tenant))); + assertFalse(cacheMapMocked.get().containsKey(GroupKey.getKeyTenant(dataIdDiscard, group, tenant))); //normal cache listener be notified. - Assert.assertEquals(configQueryResponse.getContent(), normalContent.get()); + assertEquals(configQueryResponse.getContent(), normalContent.get()); } @@ -616,28 +618,28 @@ private CacheData useLocalCache(ConfigFilterChainManager filter, String envName, } @Test - public void testIsHealthServer() throws NacosException, NoSuchFieldException, IllegalAccessException { + void testIsHealthServer() throws NacosException, NoSuchFieldException, IllegalAccessException { Properties prop = new Properties(); ConfigFilterChainManager filter = new ConfigFilterChainManager(new Properties()); ServerListManager agent = Mockito.mock(ServerListManager.class); - + final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(prop); ClientWorker clientWorker = new ClientWorker(filter, agent, nacosClientProperties); ClientWorker.ConfigRpcTransportClient client = Mockito.mock(ClientWorker.ConfigRpcTransportClient.class); Mockito.when(client.isHealthServer()).thenReturn(Boolean.TRUE); - + Field declaredField = ClientWorker.class.getDeclaredField("agent"); declaredField.setAccessible(true); declaredField.set(clientWorker, client); - - Assert.assertTrue(clientWorker.isHealthServer()); - + + assertTrue(clientWorker.isHealthServer()); + Mockito.when(client.isHealthServer()).thenReturn(Boolean.FALSE); assertFalse(clientWorker.isHealthServer()); } @Test - public void testPutCache() throws Exception { + void testPutCache() throws Exception { // 反射调用私有方法putCacheIfAbsent Method putCacheMethod = ClientWorker.class.getDeclaredMethod("putCache", String.class, CacheData.class); putCacheMethod.setAccessible(true); @@ -655,17 +657,16 @@ public void testPutCache() throws Exception { clientWorker); // 检查cacheMap是否包含特定的key assertNotNull(cacheMapRef.get().get(key)); - Assert.assertEquals(cacheData, cacheMapRef.get().get(key)); + assertEquals(cacheData, cacheMapRef.get().get(key)); // 测试再次插入相同的key将覆盖原始的值 CacheData newCacheData = new CacheData(filter, "newEnv", "newDataId", "newGroup"); putCacheMethod.invoke(clientWorker, key, newCacheData); // 检查key对应的value是否改变为newCacheData - Assert.assertEquals(newCacheData, cacheMapRef.get().get(key)); + assertEquals(newCacheData, cacheMapRef.get().get(key)); } @Test - public void testAddListenersEnsureCacheDataSafe() - throws NacosException, IllegalAccessException, NoSuchFieldException { + void testAddListenersEnsureCacheDataSafe() throws NacosException, IllegalAccessException, NoSuchFieldException { String dataId = "testDataId"; String group = "testGroup"; // 将key-cacheData插入到cacheMap中 @@ -696,7 +697,7 @@ public void testAddListenersEnsureCacheDataSafe() } @Test - public void testAddTenantListenersEnsureCacheDataSafe() + void testAddTenantListenersEnsureCacheDataSafe() throws NacosException, IllegalAccessException, NoSuchFieldException { String dataId = "testDataId"; String group = "testGroup"; @@ -729,7 +730,7 @@ public void testAddTenantListenersEnsureCacheDataSafe() } @Test - public void testAddTenantListenersWithContentEnsureCacheDataSafe() + void testAddTenantListenersWithContentEnsureCacheDataSafe() throws NacosException, IllegalAccessException, NoSuchFieldException { String dataId = "testDataId"; String group = "testGroup"; diff --git a/client/src/test/java/com/alibaba/nacos/client/config/impl/ConfigChangeHandlerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/impl/ConfigChangeHandlerTest.java index f83713720e5..520d7725c2a 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/impl/ConfigChangeHandlerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/impl/ConfigChangeHandlerTest.java @@ -17,23 +17,24 @@ package com.alibaba.nacos.client.config.impl; import com.alibaba.nacos.api.config.ConfigChangeItem; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.util.Map; -public class ConfigChangeHandlerTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ConfigChangeHandlerTest { @Test - public void testParseProperties() throws IOException { + void testParseProperties() throws IOException { Map properties = ConfigChangeHandler.getInstance().parseChangeData("", "app.name = nacos", "properties"); - Assert.assertEquals("nacos", ((ConfigChangeItem) properties.get("app.name")).getNewValue()); + assertEquals("nacos", ((ConfigChangeItem) properties.get("app.name")).getNewValue()); } @Test - public void testParseYaml() throws IOException { + void testParseYaml() throws IOException { Map properties = ConfigChangeHandler.getInstance().parseChangeData("", "app:\n name: nacos", "yaml"); - Assert.assertEquals("nacos", ((ConfigChangeItem) properties.get("app.name")).getNewValue()); + assertEquals("nacos", ((ConfigChangeItem) properties.get("app.name")).getNewValue()); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/impl/ConfigHttpClientManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/impl/ConfigHttpClientManagerTest.java index 71355f74975..2ca8c0a0775 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/impl/ConfigHttpClientManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/impl/ConfigHttpClientManagerTest.java @@ -16,33 +16,33 @@ package com.alibaba.nacos.client.config.impl; -import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.common.http.client.NacosRestTemplate; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -public class ConfigHttpClientManagerTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class ConfigHttpClientManagerTest { @Test - public void test() { + void test() { final ConfigHttpClientManager instance1 = ConfigHttpClientManager.getInstance(); final ConfigHttpClientManager instance2 = ConfigHttpClientManager.getInstance(); - Assert.assertEquals(instance1, instance2); - + assertEquals(instance1, instance2); + final NacosRestTemplate nacosRestTemplate = instance1.getNacosRestTemplate(); - Assert.assertNotNull(nacosRestTemplate); - + assertNotNull(nacosRestTemplate); + final int time1 = instance1.getConnectTimeoutOrDefault(10); - Assert.assertEquals(1000, time1); + assertEquals(1000, time1); final int time2 = instance1.getConnectTimeoutOrDefault(2000); - Assert.assertEquals(2000, time2); - - try { + assertEquals(2000, time2); + + Assertions.assertDoesNotThrow(() -> { instance1.shutdown(); - } catch (NacosException e) { - Assert.fail(); - } + }); } - + } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/impl/LimiterTest.java b/client/src/test/java/com/alibaba/nacos/client/config/impl/LimiterTest.java index f481066306f..d48bdecd25e 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/impl/LimiterTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/impl/LimiterTest.java @@ -16,22 +16,24 @@ package com.alibaba.nacos.client.config.impl; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class LimiterTest { +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class LimiterTest { @Test - public void testIsLimit() { + void testIsLimit() { String keyId = "a"; //For initiating. - Assert.assertFalse(Limiter.isLimit(keyId)); + assertFalse(Limiter.isLimit(keyId)); long start = System.currentTimeMillis(); for (int j = 0; j < 5; j++) { - Assert.assertFalse(Limiter.isLimit(keyId)); + assertFalse(Limiter.isLimit(keyId)); } long elapse = System.currentTimeMillis() - start; // assert < limit 5qps - Assert.assertTrue(elapse > 980); + assertTrue(elapse > 980); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/impl/PropertiesChangeParserTest.java b/client/src/test/java/com/alibaba/nacos/client/config/impl/PropertiesChangeParserTest.java index 9f06717c525..e667fd0f15d 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/impl/PropertiesChangeParserTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/impl/PropertiesChangeParserTest.java @@ -17,42 +17,45 @@ package com.alibaba.nacos.client.config.impl; import com.alibaba.nacos.api.config.ConfigChangeItem; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.util.Map; -public class PropertiesChangeParserTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class PropertiesChangeParserTest { private final PropertiesChangeParser parser = new PropertiesChangeParser(); private final String type = "properties"; @Test - public void testType() { - Assert.assertTrue(parser.isResponsibleFor(type)); + void testType() { + assertTrue(parser.isResponsibleFor(type)); } @Test - public void testAddKey() throws IOException { + void testAddKey() throws IOException { Map map = parser.doParse("", "app.name = nacos", type); - Assert.assertNull(map.get("app.name").getOldValue()); - Assert.assertEquals("nacos", map.get("app.name").getNewValue()); + assertNull(map.get("app.name").getOldValue()); + assertEquals("nacos", map.get("app.name").getNewValue()); } @Test - public void testRemoveKey() throws IOException { + void testRemoveKey() throws IOException { Map map = parser.doParse("app.name = nacos", "", type); - Assert.assertEquals("nacos", map.get("app.name").getOldValue()); - Assert.assertNull(map.get("app.name").getNewValue()); + assertEquals("nacos", map.get("app.name").getOldValue()); + assertNull(map.get("app.name").getNewValue()); } @Test - public void testModifyKey() throws IOException { + void testModifyKey() throws IOException { Map map = parser.doParse("app.name = rocketMQ", "app.name = nacos", type); - Assert.assertEquals("rocketMQ", map.get("app.name").getOldValue()); - Assert.assertEquals("nacos", map.get("app.name").getNewValue()); + assertEquals("rocketMQ", map.get("app.name").getOldValue()); + assertEquals("nacos", map.get("app.name").getNewValue()); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/impl/ServerListManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/impl/ServerListManagerTest.java index c0496b80f92..c38f620cd5c 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/impl/ServerListManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/impl/ServerListManagerTest.java @@ -19,8 +19,7 @@ import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.client.env.NacosClientProperties; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.util.ArrayList; @@ -29,17 +28,23 @@ import java.util.Properties; import static com.alibaba.nacos.common.constant.RequestUrlConstants.HTTP_PREFIX; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; -public class ServerListManagerTest { +class ServerListManagerTest { @Test - public void testStart() throws NacosException { + void testStart() throws NacosException { final ServerListManager mgr = new ServerListManager("localhost", 0); try { mgr.start(); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals( + assertEquals( "fail to get NACOS-server serverlist! env:custom-localhost_0_nacos_serverlist, not connnect url:http://localhost:0/nacos/serverlist", e.getErrMsg()); } @@ -47,26 +52,26 @@ public void testStart() throws NacosException { } @Test - public void testGetter() throws NacosException { + void testGetter() throws NacosException { { final ServerListManager mgr = new ServerListManager(); - Assert.assertEquals("nacos", mgr.getContentPath()); - Assert.assertEquals("default", mgr.getName()); - Assert.assertEquals("", mgr.getTenant()); - Assert.assertEquals("", mgr.getNamespace()); - Assert.assertEquals("1.1.1.1-2.2.2.2_8848", mgr.getFixedNameSuffix("http://1.1.1.1", "2.2.2.2:8848")); + assertEquals("nacos", mgr.getContentPath()); + assertEquals("default", mgr.getName()); + assertEquals("", mgr.getTenant()); + assertEquals("", mgr.getNamespace()); + assertEquals("1.1.1.1-2.2.2.2_8848", mgr.getFixedNameSuffix("http://1.1.1.1", "2.2.2.2:8848")); } { Properties properties = new Properties(); properties.put(PropertyKeyConst.CONTEXT_PATH, "aaa"); properties.put(PropertyKeyConst.ENDPOINT, "endpoint"); - + final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(properties); final ServerListManager mgr2 = new ServerListManager(nacosClientProperties); - Assert.assertEquals("aaa", mgr2.getContentPath()); + assertEquals("aaa", mgr2.getContentPath()); } - + // Test https { Properties properties = new Properties(); @@ -74,56 +79,58 @@ public void testGetter() throws NacosException { properties.put(PropertyKeyConst.SERVER_ADDR, "https://1.1.1.1:8848"); final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(properties); final ServerListManager mgr2 = new ServerListManager(nacosClientProperties); - Assert.assertEquals("aaa", mgr2.getContentPath()); - Assert.assertEquals("[https://1.1.1.1:8848]", mgr2.getServerUrls().toString()); + assertEquals("aaa", mgr2.getContentPath()); + assertEquals("[https://1.1.1.1:8848]", mgr2.getServerUrls().toString()); } { Properties properties2 = new Properties(); properties2.put(PropertyKeyConst.CONTEXT_PATH, "aaa"); properties2.put(PropertyKeyConst.SERVER_ADDR, "1.1.1.1:8848"); - + final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(properties2); final ServerListManager mgr3 = new ServerListManager(nacosClientProperties); - Assert.assertEquals(1, mgr3.getServerUrls().size()); - Assert.assertEquals("http://1.1.1.1:8848", mgr3.getServerUrls().get(0)); - Assert.assertEquals("[http://1.1.1.1:8848]", mgr3.getUrlString()); - Assert.assertTrue(mgr3.contain("http://1.1.1.1:8848")); - Assert.assertEquals("ServerManager-fixed-1.1.1.1_8848-[http://1.1.1.1:8848]", mgr3.toString()); + assertEquals(1, mgr3.getServerUrls().size()); + assertEquals("http://1.1.1.1:8848", mgr3.getServerUrls().get(0)); + assertEquals("[http://1.1.1.1:8848]", mgr3.getUrlString()); + assertTrue(mgr3.contain("http://1.1.1.1:8848")); + assertEquals("ServerManager-fixed-1.1.1.1_8848-[http://1.1.1.1:8848]", mgr3.toString()); } - + { Properties properties3 = new Properties(); properties3.put(PropertyKeyConst.CONTEXT_PATH, "aaa"); properties3.put(PropertyKeyConst.SERVER_ADDR, "1.1.1.1:8848,2.2.2.2:8848"); - + final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(properties3); final ServerListManager mgr4 = new ServerListManager(nacosClientProperties); - Assert.assertEquals(2, mgr4.getServerUrls().size()); - Assert.assertEquals("http://1.1.1.1:8848", mgr4.getServerUrls().get(0)); - Assert.assertEquals("http://2.2.2.2:8848", mgr4.getServerUrls().get(1)); - Assert.assertTrue(mgr4.contain("http://1.1.1.1:8848")); - Assert.assertEquals("ServerManager-fixed-1.1.1.1_8848-2.2.2.2_8848-[http://1.1.1.1:8848, http://2.2.2.2:8848]", mgr4.toString()); + assertEquals(2, mgr4.getServerUrls().size()); + assertEquals("http://1.1.1.1:8848", mgr4.getServerUrls().get(0)); + assertEquals("http://2.2.2.2:8848", mgr4.getServerUrls().get(1)); + assertTrue(mgr4.contain("http://1.1.1.1:8848")); + assertEquals("ServerManager-fixed-1.1.1.1_8848-2.2.2.2_8848-[http://1.1.1.1:8848, http://2.2.2.2:8848]", + mgr4.toString()); } - + { Properties properties4 = new Properties(); properties4.put(PropertyKeyConst.CONTEXT_PATH, "aaa"); properties4.put(PropertyKeyConst.SERVER_ADDR, "1.1.1.1:8848;2.2.2.2:8848"); - + final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(properties4); final ServerListManager mgr5 = new ServerListManager(nacosClientProperties); - Assert.assertEquals(2, mgr5.getServerUrls().size()); - Assert.assertEquals("http://1.1.1.1:8848", mgr5.getServerUrls().get(0)); - Assert.assertEquals("http://2.2.2.2:8848", mgr5.getServerUrls().get(1)); - Assert.assertTrue(mgr5.contain("http://1.1.1.1:8848")); - Assert.assertEquals("ServerManager-fixed-1.1.1.1_8848-2.2.2.2_8848-[http://1.1.1.1:8848, http://2.2.2.2:8848]", mgr5.toString()); + assertEquals(2, mgr5.getServerUrls().size()); + assertEquals("http://1.1.1.1:8848", mgr5.getServerUrls().get(0)); + assertEquals("http://2.2.2.2:8848", mgr5.getServerUrls().get(1)); + assertTrue(mgr5.contain("http://1.1.1.1:8848")); + assertEquals("ServerManager-fixed-1.1.1.1_8848-2.2.2.2_8848-[http://1.1.1.1:8848, http://2.2.2.2:8848]", + mgr5.toString()); } } @Test - public void testIterator() { + void testIterator() { List addrs = new ArrayList<>(); String addr = "1.1.1.1:8848"; addrs.add(addr); @@ -131,26 +138,26 @@ public void testIterator() { // new iterator final Iterator it = mgr.iterator(); - Assert.assertTrue(it.hasNext()); - Assert.assertEquals(addr, it.next()); + assertTrue(it.hasNext()); + assertEquals(addr, it.next()); - Assert.assertNull(mgr.getIterator()); + assertNull(mgr.getIterator()); mgr.refreshCurrentServerAddr(); - Assert.assertNotNull(mgr.getIterator()); + assertNotNull(mgr.getIterator()); final String currentServerAddr = mgr.getCurrentServerAddr(); - Assert.assertEquals(addr, currentServerAddr); + assertEquals(addr, currentServerAddr); final String nextServerAddr = mgr.getNextServerAddr(); - Assert.assertEquals(addr, nextServerAddr); + assertEquals(addr, nextServerAddr); final Iterator iterator1 = mgr.iterator(); - Assert.assertTrue(iterator1.hasNext()); + assertTrue(iterator1.hasNext()); } @Test - public void testAddressServerBaseServerAddrsStr() throws NacosException { + void testAddressServerBaseServerAddrsStr() throws NacosException { Properties properties = new Properties(); String serverAddrStr = "nacos.test.com:8080"; properties.setProperty(PropertyKeyConst.SERVER_ADDR, serverAddrStr); @@ -158,12 +165,12 @@ public void testAddressServerBaseServerAddrsStr() throws NacosException { properties.setProperty(PropertyKeyConst.CONTEXT_PATH, endpointContextPath); final NacosClientProperties clientProperties = NacosClientProperties.PROTOTYPE.derive(properties); ServerListManager serverListManager = new ServerListManager(clientProperties); - Assert.assertEquals(1, serverListManager.serverUrls.size()); - Assert.assertTrue(serverListManager.serverUrls.contains(HTTP_PREFIX + serverAddrStr)); + assertEquals(1, serverListManager.serverUrls.size()); + assertTrue(serverListManager.serverUrls.contains(HTTP_PREFIX + serverAddrStr)); } @Test - public void testAddressServerBaseEndpoint() throws NacosException { + void testAddressServerBaseEndpoint() throws NacosException { Properties properties = new Properties(); String endpoint = "127.0.0.1"; properties.setProperty(PropertyKeyConst.ENDPOINT, endpoint); @@ -173,12 +180,12 @@ public void testAddressServerBaseEndpoint() throws NacosException { properties.setProperty(PropertyKeyConst.ENDPOINT_CONTEXT_PATH, endpointContextPath); final NacosClientProperties clientProperties = NacosClientProperties.PROTOTYPE.derive(properties); ServerListManager serverListManager = new ServerListManager(clientProperties); - Assert.assertTrue(serverListManager.addressServerUrl.startsWith( + assertTrue(serverListManager.addressServerUrl.startsWith( HTTP_PREFIX + endpoint + ":" + endpointPort + endpointContextPath)); } @Test - public void testInitParam() throws NacosException, NoSuchFieldException, IllegalAccessException { + void testInitParam() throws NacosException, NoSuchFieldException, IllegalAccessException { Properties properties = new Properties(); String endpoint = "127.0.0.1"; properties.setProperty(PropertyKeyConst.ENDPOINT, endpoint); @@ -193,26 +200,26 @@ public void testInitParam() throws NacosException, NoSuchFieldException, Illegal Field endpointField = ServerListManager.class.getDeclaredField("endpoint"); endpointField.setAccessible(true); String fieldEndpoint = (String) endpointField.get(serverListManager); - Assert.assertEquals(endpoint, fieldEndpoint); + assertEquals(endpoint, fieldEndpoint); Field endpointPortField = ServerListManager.class.getDeclaredField("endpointPort"); endpointPortField.setAccessible(true); String fieldEndpointPort = String.valueOf(endpointPortField.get(serverListManager)); - Assert.assertEquals(endpointPort, fieldEndpointPort); + assertEquals(endpointPort, fieldEndpointPort); Field endpointContextPathField = ServerListManager.class.getDeclaredField("endpointContextPath"); endpointContextPathField.setAccessible(true); String fieldEndpointContextPath = String.valueOf(endpointContextPathField.get(serverListManager)); - Assert.assertEquals(endpointContextPath, fieldEndpointContextPath); + assertEquals(endpointContextPath, fieldEndpointContextPath); Field contentPathField = ServerListManager.class.getDeclaredField("contentPath"); contentPathField.setAccessible(true); String fieldContentPath = String.valueOf(contentPathField.get(serverListManager)); - Assert.assertEquals(fieldContentPath, contextPath); + assertEquals(fieldContentPath, contextPath); } @Test - public void testWithEndpointContextPath() throws NacosException { + void testWithEndpointContextPath() throws NacosException { Properties properties = new Properties(); String endpoint = "127.0.0.1"; properties.setProperty(PropertyKeyConst.ENDPOINT, endpoint); @@ -224,12 +231,12 @@ public void testWithEndpointContextPath() throws NacosException { properties.setProperty(PropertyKeyConst.CONTEXT_PATH, contextPath); final NacosClientProperties clientProperties = NacosClientProperties.PROTOTYPE.derive(properties); ServerListManager serverListManager = new ServerListManager(clientProperties); - Assert.assertTrue(serverListManager.addressServerUrl.contains(endpointContextPath)); - Assert.assertTrue(serverListManager.getName().contains("endpointContextPath")); + assertTrue(serverListManager.addressServerUrl.contains(endpointContextPath)); + assertTrue(serverListManager.getName().contains("endpointContextPath")); } @Test - public void testWithoutEndpointContextPath() throws NacosException { + void testWithoutEndpointContextPath() throws NacosException { Properties properties = new Properties(); String endpoint = "127.0.0.1"; properties.setProperty(PropertyKeyConst.ENDPOINT, endpoint); @@ -240,9 +247,9 @@ public void testWithoutEndpointContextPath() throws NacosException { final NacosClientProperties clientProperties = NacosClientProperties.PROTOTYPE.derive(properties); ServerListManager serverListManager = new ServerListManager(clientProperties); String endpointContextPath = "/endpointContextPath"; - Assert.assertFalse(serverListManager.addressServerUrl.contains(endpointContextPath)); - Assert.assertTrue(serverListManager.addressServerUrl.contains(contextPath)); - Assert.assertFalse(serverListManager.getName().contains("endpointContextPath")); - Assert.assertTrue(serverListManager.getName().contains("contextPath")); + assertFalse(serverListManager.addressServerUrl.contains(endpointContextPath)); + assertTrue(serverListManager.addressServerUrl.contains(contextPath)); + assertFalse(serverListManager.getName().contains("endpointContextPath")); + assertTrue(serverListManager.getName().contains("contextPath")); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/impl/YmlChangeParserTest.java b/client/src/test/java/com/alibaba/nacos/client/config/impl/YmlChangeParserTest.java index 10d1b765029..b0157672a38 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/impl/YmlChangeParserTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/impl/YmlChangeParserTest.java @@ -18,46 +18,50 @@ import com.alibaba.nacos.api.config.ConfigChangeItem; import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.util.Map; -public class YmlChangeParserTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class YmlChangeParserTest { private final YmlChangeParser parser = new YmlChangeParser(); private final String type = "yaml"; @Test - public void testType() { - Assert.assertTrue(parser.isResponsibleFor(type)); + void testType() { + assertTrue(parser.isResponsibleFor(type)); } @Test - public void testAddKey() throws IOException { + void testAddKey() throws IOException { Map map = parser.doParse("", "app:\n name: nacos", type); - Assert.assertNull(map.get("app.name").getOldValue()); - Assert.assertEquals("nacos", map.get("app.name").getNewValue()); + assertNull(map.get("app.name").getOldValue()); + assertEquals("nacos", map.get("app.name").getNewValue()); } @Test - public void testRemoveKey() throws IOException { + void testRemoveKey() throws IOException { Map map = parser.doParse("app:\n name: nacos", "", type); - Assert.assertEquals("nacos", map.get("app.name").getOldValue()); - Assert.assertNull(map.get("app.name").getNewValue()); + assertEquals("nacos", map.get("app.name").getOldValue()); + assertNull(map.get("app.name").getNewValue()); } @Test - public void testModifyKey() throws IOException { + void testModifyKey() throws IOException { Map map = parser.doParse("app:\n name: rocketMQ", "app:\n name: nacos", type); - Assert.assertEquals("rocketMQ", map.get("app.name").getOldValue()); - Assert.assertEquals("nacos", map.get("app.name").getNewValue()); + assertEquals("rocketMQ", map.get("app.name").getOldValue()); + assertEquals("nacos", map.get("app.name").getNewValue()); } @Test - public void testComplexYaml() throws IOException { + void testComplexYaml() throws IOException { /* * map: * key1: "string" @@ -70,15 +74,17 @@ public void testComplexYaml() throws IOException { String s = "map:\n" + " key1: \"string\"\n" + " key2:\n" + " - item1\n" + " - item2\n" + " - item3\n" + " key3: 123 \n"; Map map = parser.doParse(s, s, type); - Assert.assertEquals(0, map.size()); + assertEquals(0, map.size()); } - @Test(expected = NacosRuntimeException.class) - public void testChangeInvalidKey() { - parser.doParse("anykey:\n a", - "anykey: !!javax.script.ScriptEngineManager [\n" + " !!java.net.URLClassLoader [[\n" - + " !!java.net.URL [\"http://[yourhost]:[port]/yaml-payload.jar\"]\n" + " ]]\n" + "]", - type); + @Test + void testChangeInvalidKey() { + assertThrows(NacosRuntimeException.class, () -> { + parser.doParse("anykey:\n a", + "anykey: !!javax.script.ScriptEngineManager [\n" + " !!java.net.URLClassLoader [[\n" + + " !!java.net.URL [\"http://[yourhost]:[port]/yaml-payload.jar\"]\n" + " ]]\n" + "]", + type); + }); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/listener/impl/AbstractConfigChangeListenerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/listener/impl/AbstractConfigChangeListenerTest.java index 12f2898c6fe..e57f270dee9 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/listener/impl/AbstractConfigChangeListenerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/listener/impl/AbstractConfigChangeListenerTest.java @@ -17,16 +17,17 @@ package com.alibaba.nacos.client.config.listener.impl; import com.alibaba.nacos.api.config.ConfigChangeEvent; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayDeque; import java.util.Deque; -public class AbstractConfigChangeListenerTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class AbstractConfigChangeListenerTest { @Test - public void receiveConfigInfo() { + void receiveConfigInfo() { final Deque data = new ArrayDeque(); AbstractConfigChangeListener a = new AbstractConfigChangeListener() { @Override @@ -41,6 +42,6 @@ public void receiveConfigInfo(String configInfo) { }; a.receiveConfigInfo("foo"); final String actual = data.poll(); - Assert.assertEquals("foo", actual); + assertEquals("foo", actual); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/listener/impl/PropertiesListenerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/listener/impl/PropertiesListenerTest.java index 9f7f4e63236..490224544f3 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/listener/impl/PropertiesListenerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/listener/impl/PropertiesListenerTest.java @@ -16,17 +16,19 @@ package com.alibaba.nacos.client.config.listener.impl; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayDeque; import java.util.Deque; import java.util.Properties; -public class PropertiesListenerTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class PropertiesListenerTest { @Test - public void testReceiveConfigInfo() { + void testReceiveConfigInfo() { final Deque q2 = new ArrayDeque(); PropertiesListener a = new PropertiesListener() { @Override @@ -36,13 +38,13 @@ public void innerReceive(Properties properties) { }; a.receiveConfigInfo("foo=bar"); final Properties actual = q2.poll(); - Assert.assertEquals(1, actual.size()); - Assert.assertEquals("bar", actual.getProperty("foo")); + assertEquals(1, actual.size()); + assertEquals("bar", actual.getProperty("foo")); } @Test - public void testReceiveConfigInfoEmpty() { + void testReceiveConfigInfoEmpty() { final Deque q2 = new ArrayDeque(); PropertiesListener a = new PropertiesListener() { @Override @@ -52,11 +54,11 @@ public void innerReceive(Properties properties) { }; a.receiveConfigInfo(""); final Properties actual = q2.poll(); - Assert.assertNull(actual); + assertNull(actual); } @Test - public void testReceiveConfigInfoIsNotProperties() { + void testReceiveConfigInfoIsNotProperties() { final Deque q2 = new ArrayDeque(); PropertiesListener a = new PropertiesListener() { @Override @@ -66,11 +68,11 @@ public void innerReceive(Properties properties) { }; a.receiveConfigInfo(null); final Properties actual = q2.poll(); - Assert.assertNull(actual); + assertNull(actual); } @Test - public void testInnerReceive() { + void testInnerReceive() { final Deque q2 = new ArrayDeque(); PropertiesListener a = new PropertiesListener() { @Override @@ -82,8 +84,8 @@ public void innerReceive(Properties properties) { input.put("foo", "bar"); a.innerReceive(input); final Properties actual = q2.poll(); - Assert.assertEquals(1, actual.size()); - Assert.assertEquals("bar", actual.getProperty("foo")); + assertEquals(1, actual.size()); + assertEquals("bar", actual.getProperty("foo")); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/utils/ContentUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/config/utils/ContentUtilsTest.java index ba2e0b33041..bc2c12b3f19 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/utils/ContentUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/utils/ContentUtilsTest.java @@ -18,103 +18,108 @@ package com.alibaba.nacos.client.config.utils; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Test; import java.util.Arrays; import static com.alibaba.nacos.api.common.Constants.WORD_SEPARATOR; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ContentUtilsTest { - - @Rule - public ExpectedException exceptionRule = ExpectedException.none(); +class ContentUtilsTest { @Test - public void testVerifyIncrementPubContent() { + void testVerifyIncrementPubContent() { String content = "aabbb"; ContentUtils.verifyIncrementPubContent(content); } @Test - public void testVerifyIncrementPubContentFail1() { - exceptionRule.expect(IllegalArgumentException.class); - exceptionRule.expectMessage("publish/delete content can not be null"); - String content = null; - ContentUtils.verifyIncrementPubContent(content); + void testVerifyIncrementPubContentFail1() { + Throwable exception = assertThrows(IllegalArgumentException.class, () -> { + String content = null; + ContentUtils.verifyIncrementPubContent(content); + }); + assertTrue(exception.getMessage().contains("publish/delete content can not be null")); } @Test - public void testVerifyIncrementPubContentFail2() { - exceptionRule.expect(IllegalArgumentException.class); - exceptionRule.expectMessage("publish/delete content can not contain return and linefeed"); - String content = "aa\rbbb"; - ContentUtils.verifyIncrementPubContent(content); + void testVerifyIncrementPubContentFail2() { + Throwable exception = assertThrows(IllegalArgumentException.class, () -> { + String content = "aa\rbbb"; + ContentUtils.verifyIncrementPubContent(content); + }); + assertTrue(exception.getMessage().contains("publish/delete content can not contain return and linefeed")); } @Test - public void testVerifyIncrementPubContentFail3() { - exceptionRule.expect(IllegalArgumentException.class); - exceptionRule.expectMessage("publish/delete content can not be null"); - String content = ""; - ContentUtils.verifyIncrementPubContent(content); + void testVerifyIncrementPubContentFail3() { + Throwable exception = assertThrows(IllegalArgumentException.class, () -> { + String content = ""; + ContentUtils.verifyIncrementPubContent(content); + }); + assertTrue(exception.getMessage().contains("publish/delete content can not be null")); } @Test - public void testVerifyIncrementPubContentFail4() { - exceptionRule.expect(IllegalArgumentException.class); - exceptionRule.expectMessage("publish/delete content can not contain(char)2"); - String content = "aa" + WORD_SEPARATOR + "bbb"; - ContentUtils.verifyIncrementPubContent(content); + void testVerifyIncrementPubContentFail4() { + Throwable exception = assertThrows(IllegalArgumentException.class, () -> { + String content = "aa" + WORD_SEPARATOR + "bbb"; + ContentUtils.verifyIncrementPubContent(content); + }); + assertTrue(exception.getMessage().contains("publish/delete content can not contain(char)2")); } @Test - public void testGetContentIdentity() { + void testGetContentIdentity() { String content = "aa" + WORD_SEPARATOR + "bbb"; String content1 = ContentUtils.getContentIdentity(content); - Assert.assertEquals("aa", content1); + assertEquals("aa", content1); } - @Test(expected = IllegalArgumentException.class) - public void testGetContentIdentityFail() { - String content = "aabbb"; - ContentUtils.getContentIdentity(content); + @Test + void testGetContentIdentityFail() { + assertThrows(IllegalArgumentException.class, () -> { + String content = "aabbb"; + ContentUtils.getContentIdentity(content); + }); } @Test - public void testGetContent() { + void testGetContent() { String content = "aa" + WORD_SEPARATOR + "bbb"; String content1 = ContentUtils.getContent(content); - Assert.assertEquals("bbb", content1); + assertEquals("bbb", content1); } - @Test(expected = IllegalArgumentException.class) - public void testGetContentFail() { - String content = "aabbb"; - ContentUtils.getContent(content); + @Test + void testGetContentFail() { + assertThrows(IllegalArgumentException.class, () -> { + String content = "aabbb"; + ContentUtils.getContent(content); + }); } @Test - public void testTruncateContent() { + void testTruncateContent() { String content = "aa"; String actual = ContentUtils.truncateContent(content); - Assert.assertEquals(content, actual); + assertEquals(content, actual); } @Test - public void testTruncateLongContent() { + void testTruncateLongContent() { char[] arr = new char[101]; Arrays.fill(arr, 'a'); String content = new String(arr); String actual = ContentUtils.truncateContent(content); - Assert.assertEquals(content.substring(0, 100) + "...", actual); + assertEquals(content.substring(0, 100) + "...", actual); } @Test - public void testTruncateContentNull() { + void testTruncateContentNull() { String actual = ContentUtils.truncateContent(null); - Assert.assertEquals("", actual); + assertEquals("", actual); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/utils/JvmUtilTest.java b/client/src/test/java/com/alibaba/nacos/client/config/utils/JvmUtilTest.java index fcb39767a3f..a5966243778 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/utils/JvmUtilTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/utils/JvmUtilTest.java @@ -18,27 +18,29 @@ package com.alibaba.nacos.client.config.utils; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -public class JvmUtilTest { +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class JvmUtilTest { Method initMethod; - @Before - public void setUp() throws NoSuchMethodException { + @BeforeEach + void setUp() throws NoSuchMethodException { initMethod = JvmUtil.class.getDeclaredMethod("init"); initMethod.setAccessible(true); } - @After - public void tearDown() throws NoSuchFieldException, IllegalAccessException { + @AfterEach + void tearDown() throws NoSuchFieldException, IllegalAccessException { System.clearProperty("isMultiInstance"); Field field = JvmUtil.class.getDeclaredField("isMultiInstance"); field.setAccessible(true); @@ -46,17 +48,17 @@ public void tearDown() throws NoSuchFieldException, IllegalAccessException { } @Test - public void testIsMultiInstance() throws InvocationTargetException, IllegalAccessException { + void testIsMultiInstance() throws InvocationTargetException, IllegalAccessException { initMethod.invoke(JvmUtil.class); Boolean multiInstance = JvmUtil.isMultiInstance(); - Assert.assertFalse(multiInstance); + assertFalse(multiInstance); } @Test - public void testIsMultiInstance2() throws InvocationTargetException, IllegalAccessException { + void testIsMultiInstance2() throws InvocationTargetException, IllegalAccessException { System.setProperty("isMultiInstance", "true"); initMethod.invoke(JvmUtil.class); Boolean multiInstance = JvmUtil.isMultiInstance(); - Assert.assertTrue(multiInstance); + assertTrue(multiInstance); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/utils/ParamUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/config/utils/ParamUtilsTest.java index ac9142edb3e..f28bfe4fd5f 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/utils/ParamUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/utils/ParamUtilsTest.java @@ -19,39 +19,39 @@ package com.alibaba.nacos.client.config.utils; import com.alibaba.nacos.api.exception.NacosException; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Arrays; -public class ParamUtilsTest { - - @Rule - public ExpectedException exceptionRule = ExpectedException.none(); +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +class ParamUtilsTest { @Test - public void testIsValid() { + void testIsValid() { String content = "abcABC09.:_-"; - Assert.assertTrue(ParamUtils.isValid(content)); + assertTrue(ParamUtils.isValid(content)); content = null; - Assert.assertFalse(ParamUtils.isValid(content)); + assertFalse(ParamUtils.isValid(content)); content = "@"; - Assert.assertFalse(ParamUtils.isValid(content)); + assertFalse(ParamUtils.isValid(content)); content = "+"; - Assert.assertFalse(ParamUtils.isValid(content)); + assertFalse(ParamUtils.isValid(content)); content = "/"; - Assert.assertFalse(ParamUtils.isValid(content)); + assertFalse(ParamUtils.isValid(content)); } @Test - public void testCheckTdg() throws NacosException { + void testCheckTdg() throws NacosException { String tenant = "a"; String dataId = "b"; String group = "c"; @@ -59,29 +59,31 @@ public void testCheckTdg() throws NacosException { } @Test - public void testCheckTdgFail1() throws NacosException { - exceptionRule.expect(NacosException.class); - exceptionRule.expectMessage("dataId invalid"); - - String tenant = "a"; - String dataId = ""; - String group = "c"; - ParamUtils.checkTdg(tenant, dataId, group); + void testCheckTdgFail1() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { + + String tenant = "a"; + String dataId = ""; + String group = "c"; + ParamUtils.checkTdg(tenant, dataId, group); + }); + assertTrue(exception.getMessage().contains("dataId invalid")); } @Test - public void testCheckTdgFail2() throws NacosException { - exceptionRule.expect(NacosException.class); - exceptionRule.expectMessage("group invalid"); - - String tenant = "a"; - String dataId = "b"; - String group = ""; - ParamUtils.checkTdg(tenant, dataId, group); + void testCheckTdgFail2() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { + + String tenant = "a"; + String dataId = "b"; + String group = ""; + ParamUtils.checkTdg(tenant, dataId, group); + }); + assertTrue(exception.getMessage().contains("group invalid")); } @Test - public void testCheckKeyParam1() throws NacosException { + void testCheckKeyParam1() throws NacosException { String dataId = "b"; String group = "c"; ParamUtils.checkKeyParam(dataId, group); @@ -90,23 +92,23 @@ public void testCheckKeyParam1() throws NacosException { dataId = ""; group = "c"; ParamUtils.checkKeyParam(dataId, group); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals("dataId invalid", e.getMessage()); + assertEquals("dataId invalid", e.getMessage()); } try { dataId = "b"; group = ""; ParamUtils.checkKeyParam(dataId, group); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals("group invalid", e.getMessage()); + assertEquals("group invalid", e.getMessage()); } } @Test - public void testCheckKeyParam2() throws NacosException { + void testCheckKeyParam2() throws NacosException { String dataId = "b"; String group = "c"; String datumId = "a"; @@ -117,9 +119,9 @@ public void testCheckKeyParam2() throws NacosException { group = "c"; ParamUtils.checkKeyParam(dataId, group, datumId); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals("dataId invalid", e.getMessage()); + assertEquals("dataId invalid", e.getMessage()); } try { @@ -127,9 +129,9 @@ public void testCheckKeyParam2() throws NacosException { group = ""; ParamUtils.checkKeyParam(dataId, group, datumId); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals("group invalid", e.getMessage()); + assertEquals("group invalid", e.getMessage()); } try { @@ -138,14 +140,14 @@ public void testCheckKeyParam2() throws NacosException { datumId = ""; ParamUtils.checkKeyParam(dataId, group, datumId); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals("datumId invalid", e.getMessage()); + assertEquals("datumId invalid", e.getMessage()); } } @Test - public void testCheckKeyParam3() throws NacosException { + void testCheckKeyParam3() throws NacosException { String dataId = "b"; String group = "c"; ParamUtils.checkKeyParam(Arrays.asList(dataId), group); @@ -154,9 +156,9 @@ public void testCheckKeyParam3() throws NacosException { group = "c"; ParamUtils.checkKeyParam(new ArrayList(), group); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals("dataIds invalid", e.getMessage()); + assertEquals("dataIds invalid", e.getMessage()); } try { @@ -164,9 +166,9 @@ public void testCheckKeyParam3() throws NacosException { group = "c"; ParamUtils.checkKeyParam(Arrays.asList(dataId), group); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals("dataId invalid", e.getMessage()); + assertEquals("dataId invalid", e.getMessage()); } try { @@ -174,33 +176,34 @@ public void testCheckKeyParam3() throws NacosException { group = ""; ParamUtils.checkKeyParam(Arrays.asList(dataId), group); - Assert.fail(); + fail(); } catch (NacosException e) { - Assert.assertEquals("group invalid", e.getMessage()); + assertEquals("group invalid", e.getMessage()); } } @Test - public void testCheckParam() throws NacosException { + void testCheckParam() throws NacosException { String dataId = "b"; String group = "c"; String content = "a"; ParamUtils.checkParam(dataId, group, content); } - + @Test - public void testCheckParamFail() throws NacosException { - exceptionRule.expect(NacosException.class); - exceptionRule.expectMessage("content invalid"); - - String dataId = "b"; - String group = "c"; - String content = ""; - ParamUtils.checkParam(dataId, group, content); + void testCheckParamFail() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { + + String dataId = "b"; + String group = "c"; + String content = ""; + ParamUtils.checkParam(dataId, group, content); + }); + assertTrue(exception.getMessage().contains("content invalid")); } @Test - public void testCheckParam2() throws NacosException { + void testCheckParam2() throws NacosException { String dataId = "b"; String group = "c"; String datumId = "d"; @@ -209,60 +212,65 @@ public void testCheckParam2() throws NacosException { } @Test - public void testCheckParam2Fail() throws NacosException { - exceptionRule.expect(NacosException.class); - exceptionRule.expectMessage("content invalid"); - - String dataId = "b"; - String group = "c"; - String datumId = "d"; - String content = ""; - ParamUtils.checkParam(dataId, group, datumId, content); + void testCheckParam2Fail() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { + + String dataId = "b"; + String group = "c"; + String datumId = "d"; + String content = ""; + ParamUtils.checkParam(dataId, group, datumId, content); + }); + assertTrue(exception.getMessage().contains("content invalid")); } @Test - public void testCheckTenant() throws NacosException { + void testCheckTenant() throws NacosException { String tenant = "a"; ParamUtils.checkTenant(tenant); } @Test - public void testCheckTenantFail() throws NacosException { - exceptionRule.expect(NacosException.class); - exceptionRule.expectMessage("tenant invalid"); - String tenant = ""; - ParamUtils.checkTenant(tenant); + void testCheckTenantFail() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { + String tenant = ""; + ParamUtils.checkTenant(tenant); + }); + assertTrue(exception.getMessage().contains("tenant invalid")); } @Test - public void testCheckBetaIps() throws NacosException { + void testCheckBetaIps() throws NacosException { ParamUtils.checkBetaIps("127.0.0.1"); } @Test - public void testCheckBetaIpsFail1() throws NacosException { - exceptionRule.expect(NacosException.class); - exceptionRule.expectMessage("betaIps invalid"); - - ParamUtils.checkBetaIps(""); + void testCheckBetaIpsFail1() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { + + ParamUtils.checkBetaIps(""); + }); + assertTrue(exception.getMessage().contains("betaIps invalid")); } @Test - public void testCheckBetaIpsFail2() throws NacosException { - exceptionRule.expect(NacosException.class); - exceptionRule.expectMessage("betaIps invalid"); - ParamUtils.checkBetaIps("aaa"); + void testCheckBetaIpsFail2() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { + ParamUtils.checkBetaIps("aaa"); + }); + assertTrue(exception.getMessage().contains("betaIps invalid")); } @Test - public void testCheckContent() throws NacosException { + void testCheckContent() throws NacosException { ParamUtils.checkContent("aaa"); } @Test - public void testCheckContentFail() throws NacosException { - exceptionRule.expect(NacosException.class); - exceptionRule.expectMessage("content invalid"); - ParamUtils.checkContent(""); + void testCheckContentFail() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { + ParamUtils.checkContent(""); + }); + assertTrue(exception.getMessage().contains("content invalid")); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/utils/SnapShotSwitchTest.java b/client/src/test/java/com/alibaba/nacos/client/config/utils/SnapShotSwitchTest.java index 13ad8f4364e..2e0990db99f 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/utils/SnapShotSwitchTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/utils/SnapShotSwitchTest.java @@ -18,21 +18,23 @@ package com.alibaba.nacos.client.config.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class SnapShotSwitchTest { +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class SnapShotSwitchTest { @Test - public void testGetIsSnapShot() { + void testGetIsSnapShot() { Boolean isSnapShot = SnapShotSwitch.getIsSnapShot(); - Assert.assertTrue(isSnapShot); + assertTrue(isSnapShot); SnapShotSwitch.setIsSnapShot(false); - Assert.assertFalse(SnapShotSwitch.getIsSnapShot()); + assertFalse(SnapShotSwitch.getIsSnapShot()); SnapShotSwitch.setIsSnapShot(true); - Assert.assertTrue(SnapShotSwitch.getIsSnapShot()); + assertTrue(SnapShotSwitch.getIsSnapShot()); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/env/NacosClientPropertiesTest.java b/client/src/test/java/com/alibaba/nacos/client/env/NacosClientPropertiesTest.java index ce696d99b3c..ce047577211 100644 --- a/client/src/test/java/com/alibaba/nacos/client/env/NacosClientPropertiesTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/env/NacosClientPropertiesTest.java @@ -16,34 +16,39 @@ package com.alibaba.nacos.client.env; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import java.util.Properties; -public class NacosClientPropertiesTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class NacosClientPropertiesTest { - @BeforeClass - public static void init() { + @BeforeAll + static void init() { System.setProperty("nacos.env.first", "jvm"); } - @AfterClass - public static void teardown() { + @AfterAll + static void teardown() { System.clearProperty("nacos.env.first"); } @Test - public void testGetProperty() { + void testGetProperty() { NacosClientProperties.PROTOTYPE.setProperty("nacos.home", "/home/nacos"); final String value = NacosClientProperties.PROTOTYPE.getProperty("nacos.home"); - Assert.assertEquals("/home/nacos", value); + assertEquals("/home/nacos", value); } @Test - public void testGetPropertyMultiLayer() { + void testGetPropertyMultiLayer() { NacosClientProperties.PROTOTYPE.setProperty("top.layer", "top"); @@ -57,85 +62,85 @@ public void testGetPropertyMultiLayer() { layerCEnv.setProperty("c.layer", "c"); String value = layerCEnv.getProperty("c.layer"); - Assert.assertEquals("c", value); + assertEquals("c", value); value = layerCEnv.getProperty("b.layer"); - Assert.assertEquals("b", value); + assertEquals("b", value); value = layerCEnv.getProperty("a.layer"); - Assert.assertEquals("a", value); + assertEquals("a", value); value = layerCEnv.getProperty("top.layer"); - Assert.assertEquals("top", value); + assertEquals("top", value); } @Test - public void testGetPropertyDefaultValue() { + void testGetPropertyDefaultValue() { final String value = NacosClientProperties.PROTOTYPE.getProperty("nacos.home.default", "/home/default_value"); - Assert.assertEquals("/home/default_value", value); + assertEquals("/home/default_value", value); } @Test - public void testGetBoolean() { + void testGetBoolean() { NacosClientProperties.PROTOTYPE.setProperty("use.cluster", "true"); final Boolean value = NacosClientProperties.PROTOTYPE.getBoolean("use.cluster"); - Assert.assertTrue(value); + assertTrue(value); } @Test - public void testGetBooleanDefaultValue() { + void testGetBooleanDefaultValue() { final Boolean value = NacosClientProperties.PROTOTYPE.getBoolean("use.cluster.default", false); - Assert.assertFalse(value); + assertFalse(value); } @Test - public void testGetInteger() { + void testGetInteger() { NacosClientProperties.PROTOTYPE.setProperty("max.timeout", "200"); final Integer value = NacosClientProperties.PROTOTYPE.getInteger("max.timeout"); - Assert.assertEquals(200, value.intValue()); + assertEquals(200, value.intValue()); } @Test - public void testGetIntegerDefaultValue() { + void testGetIntegerDefaultValue() { final Integer value = NacosClientProperties.PROTOTYPE.getInteger("max.timeout.default", 400); - Assert.assertEquals(400, value.intValue()); + assertEquals(400, value.intValue()); } @Test - public void testGetLong() { + void testGetLong() { NacosClientProperties.PROTOTYPE.setProperty("connection.timeout", "200"); final Long value = NacosClientProperties.PROTOTYPE.getLong("connection.timeout"); - Assert.assertEquals(200L, value.longValue()); + assertEquals(200L, value.longValue()); } @Test - public void testGetLongDefault() { + void testGetLongDefault() { final Long value = NacosClientProperties.PROTOTYPE.getLong("connection.timeout.default", 400L); - Assert.assertEquals(400L, value.longValue()); + assertEquals(400L, value.longValue()); } @Test - public void setProperty() { + void setProperty() { NacosClientProperties.PROTOTYPE.setProperty("nacos.set.property", "true"); final String ret = NacosClientProperties.PROTOTYPE.getProperty("nacos.set.property"); - Assert.assertEquals("true", ret); + assertEquals("true", ret); } @Test - public void setPropertyWithScope() { + void setPropertyWithScope() { final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty("nacos.set.property.scope", "config"); String ret = NacosClientProperties.PROTOTYPE.getProperty("nacos.set.property.scope"); - Assert.assertNull(ret); + assertNull(ret); ret = properties.getProperty("nacos.set.property.scope"); - Assert.assertEquals("config", ret); + assertEquals("config", ret); } @Test - public void testAddProperties() { + void testAddProperties() { Properties properties = new Properties(); properties.setProperty("nacos.add.properties", "true"); @@ -143,11 +148,11 @@ public void testAddProperties() { final String ret = NacosClientProperties.PROTOTYPE.getProperty("nacos.add.properties"); - Assert.assertEquals("true", ret); + assertEquals("true", ret); } @Test - public void testAddPropertiesWithScope() { + void testAddPropertiesWithScope() { Properties properties = new Properties(); properties.setProperty("nacos.add.properties.scope", "config"); @@ -156,15 +161,15 @@ public void testAddPropertiesWithScope() { nacosClientProperties.addProperties(properties); String ret = NacosClientProperties.PROTOTYPE.getProperty("nacos.add.properties.scope"); - Assert.assertNull(ret); + assertNull(ret); ret = nacosClientProperties.getProperty("nacos.add.properties.scope"); - Assert.assertEquals("config", ret); + assertEquals("config", ret); } @Test - public void testTestDerive() { + void testTestDerive() { Properties properties = new Properties(); properties.setProperty("nacos.derive.properties.scope", "derive"); @@ -172,23 +177,23 @@ public void testTestDerive() { final String value = nacosClientProperties.getProperty("nacos.derive.properties.scope"); - Assert.assertEquals("derive", value); + assertEquals("derive", value); } @Test - public void testContainsKey() { + void testContainsKey() { NacosClientProperties.PROTOTYPE.setProperty("nacos.contains.key", "true"); boolean ret = NacosClientProperties.PROTOTYPE.containsKey("nacos.contains.key"); - Assert.assertTrue(ret); + assertTrue(ret); ret = NacosClientProperties.PROTOTYPE.containsKey("nacos.contains.key.in.sys"); - Assert.assertFalse(ret); + assertFalse(ret); } @Test - public void testContainsKeyMultiLayers() { + void testContainsKeyMultiLayers() { NacosClientProperties.PROTOTYPE.setProperty("top.layer", "top"); @@ -202,49 +207,49 @@ public void testContainsKeyMultiLayers() { layerCEnv.setProperty("c.layer", "c"); boolean exist = layerCEnv.containsKey("c.layer"); - Assert.assertTrue(exist); + assertTrue(exist); exist = layerCEnv.containsKey("b.layer"); - Assert.assertTrue(exist); + assertTrue(exist); exist = layerCEnv.containsKey("a.layer"); - Assert.assertTrue(exist); + assertTrue(exist); exist = layerCEnv.containsKey("top.layer"); - Assert.assertTrue(exist); + assertTrue(exist); } @Test - public void testContainsKeyWithScope() { + void testContainsKeyWithScope() { NacosClientProperties.PROTOTYPE.setProperty("nacos.contains.global.scope", "global"); final NacosClientProperties namingProperties = NacosClientProperties.PROTOTYPE.derive(); namingProperties.setProperty("nacos.contains.naming.scope", "naming"); boolean ret = NacosClientProperties.PROTOTYPE.containsKey("nacos.contains.global.scope"); - Assert.assertTrue(ret); + assertTrue(ret); ret = NacosClientProperties.PROTOTYPE.containsKey("nacos.contains.naming.scope"); - Assert.assertFalse(ret); + assertFalse(ret); ret = namingProperties.containsKey("nacos.contains.naming.scope"); - Assert.assertTrue(ret); + assertTrue(ret); ret = namingProperties.containsKey("nacos.contains.global.scope"); - Assert.assertTrue(ret); + assertTrue(ret); } @Test - public void testAsProperties() { + void testAsProperties() { NacosClientProperties.PROTOTYPE.setProperty("nacos.as.properties", "true"); final Properties properties = NacosClientProperties.PROTOTYPE.asProperties(); - Assert.assertNotNull(properties); - Assert.assertEquals("true", properties.getProperty("nacos.as.properties")); + assertNotNull(properties); + assertEquals("true", properties.getProperty("nacos.as.properties")); } @Test - public void testAsPropertiesWithScope() { + void testAsPropertiesWithScope() { NacosClientProperties.PROTOTYPE.setProperty("nacos.as.properties.global.scope", "global"); NacosClientProperties.PROTOTYPE.setProperty("nacos.server.addr.scope", "global"); @@ -253,17 +258,17 @@ public void testAsPropertiesWithScope() { configProperties.setProperty("nacos.server.addr.scope", "config"); final Properties properties = configProperties.asProperties(); - Assert.assertNotNull(properties); + assertNotNull(properties); String ret = properties.getProperty("nacos.as.properties.global.scope"); - Assert.assertEquals("global", ret); + assertEquals("global", ret); ret = properties.getProperty("nacos.server.addr.scope"); - Assert.assertEquals("config", ret); + assertEquals("config", ret); } @Test - public void testGetPropertyWithScope() { + void testGetPropertyWithScope() { NacosClientProperties.PROTOTYPE.setProperty("nacos.global.scope", "global"); @@ -274,41 +279,40 @@ public void testGetPropertyWithScope() { namingProperties.setProperty("nacos.naming.scope", "naming"); String ret = NacosClientProperties.PROTOTYPE.getProperty("nacos.global.scope"); - Assert.assertEquals("global", ret); + assertEquals("global", ret); ret = NacosClientProperties.PROTOTYPE.getProperty("nacos.config.scope"); - Assert.assertNull(ret); + assertNull(ret); ret = NacosClientProperties.PROTOTYPE.getProperty("nacos.naming.scope"); - Assert.assertNull(ret); + assertNull(ret); ret = configProperties.getProperty("nacos.config.scope"); - Assert.assertEquals("config", ret); + assertEquals("config", ret); ret = configProperties.getProperty("nacos.global.scope"); - Assert.assertEquals("global", ret); + assertEquals("global", ret); ret = configProperties.getProperty("nacos.naming.scope"); - Assert.assertNull(ret); + assertNull(ret); ret = namingProperties.getProperty("nacos.naming.scope"); - Assert.assertEquals("naming", ret); + assertEquals("naming", ret); ret = namingProperties.getProperty("nacos.global.scope"); - Assert.assertEquals("global", ret); + assertEquals("global", ret); ret = namingProperties.getProperty("nacos.config.scope"); - Assert.assertNull(ret); + assertNull(ret); } @Test - public void testGetPropertyFrom() { + void testGetPropertyFrom() { System.setProperty("nacos.home.default.test", "/home/jvm_args"); NacosClientProperties.PROTOTYPE.setProperty("nacos.home.default.test", "/home/properties_args"); - Assert.assertEquals(NacosClientProperties.PROTOTYPE.getPropertyFrom(SourceType.JVM, "nacos.home.default.test"), - "/home/jvm_args"); - Assert.assertEquals( - NacosClientProperties.PROTOTYPE.getPropertyFrom(SourceType.PROPERTIES, "nacos.home.default.test"), - "/home/properties_args"); - Assert.assertEquals(NacosClientProperties.PROTOTYPE.getPropertyFrom(null, "nacos.home.default.test"), + assertEquals("/home/jvm_args", + NacosClientProperties.PROTOTYPE.getPropertyFrom(SourceType.JVM, "nacos.home.default.test")); + assertEquals("/home/properties_args", + NacosClientProperties.PROTOTYPE.getPropertyFrom(SourceType.PROPERTIES, "nacos.home.default.test")); + assertEquals(NacosClientProperties.PROTOTYPE.getPropertyFrom(null, "nacos.home.default.test"), NacosClientProperties.PROTOTYPE.getProperty("nacos.home.default.test")); } diff --git a/client/src/test/java/com/alibaba/nacos/client/env/SearchablePropertiesTest.java b/client/src/test/java/com/alibaba/nacos/client/env/SearchablePropertiesTest.java index 5518884b21a..d4f52428fbb 100644 --- a/client/src/test/java/com/alibaba/nacos/client/env/SearchablePropertiesTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/env/SearchablePropertiesTest.java @@ -17,59 +17,59 @@ package com.alibaba.nacos.client.env; import com.alibaba.nacos.client.constant.Constants; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; /** * Additional test cases for SearchableProperties. * *

    Common cases see {@link NacosClientPropertiesTest}.

    */ -public class SearchablePropertiesTest { +class SearchablePropertiesTest { Method initMethod; - @BeforeClass - public static void init() { + @BeforeAll + static void init() { System.setProperty(Constants.SysEnv.NACOS_ENV_FIRST, "jvm"); } - @Before - public void setUp() throws Exception { + @AfterAll + static void teardown() { + System.clearProperty(Constants.SysEnv.NACOS_ENV_FIRST); + } + + @BeforeEach + void setUp() throws Exception { initMethod = SearchableProperties.class.getDeclaredMethod("init"); initMethod.setAccessible(true); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { init(); initMethod.invoke(null); } - @AfterClass - public static void teardown() { - System.clearProperty(Constants.SysEnv.NACOS_ENV_FIRST); - } - @Test - public void testInitWithInvalidOrder() throws IllegalAccessException, InvocationTargetException { + void testInitWithInvalidOrder() throws IllegalAccessException, InvocationTargetException { System.setProperty(Constants.SysEnv.NACOS_ENV_FIRST, "invalid"); List order = (List) initMethod.invoke(null); assertOrder(order, SourceType.PROPERTIES, SourceType.JVM, SourceType.ENV); } @Test - public void testInitWithoutSpecifiedOrder() throws IllegalAccessException, InvocationTargetException { + void testInitWithoutSpecifiedOrder() throws IllegalAccessException, InvocationTargetException { System.clearProperty(Constants.SysEnv.NACOS_ENV_FIRST); List order = (List) initMethod.invoke(null); assertOrder(order, SourceType.PROPERTIES, SourceType.JVM, SourceType.ENV); @@ -83,7 +83,7 @@ private void assertOrder(List order, SourceType... sourceTypes) { } @Test - public void testGetPropertyFromEnv() { + void testGetPropertyFromEnv() { System.setProperty("testFromSource", "jvm"); NacosClientProperties properties = SearchableProperties.INSTANCE.derive(); properties.setProperty("testFromSource", "properties"); @@ -91,7 +91,7 @@ public void testGetPropertyFromEnv() { } @Test - public void testGetPropertyFromUnknown() { + void testGetPropertyFromUnknown() { System.setProperty("testFromSource", "jvm"); NacosClientProperties properties = SearchableProperties.INSTANCE.derive(); properties.setProperty("testFromSource", "properties"); diff --git a/client/src/test/java/com/alibaba/nacos/client/env/SystemEnvPropertySourceTest.java b/client/src/test/java/com/alibaba/nacos/client/env/SystemEnvPropertySourceTest.java index 89361fc68a2..89d1ad6604b 100644 --- a/client/src/test/java/com/alibaba/nacos/client/env/SystemEnvPropertySourceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/env/SystemEnvPropertySourceTest.java @@ -16,28 +16,28 @@ package com.alibaba.nacos.client.env; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Additional test cases for SystemEnvPropertySource. * *

    Common cases see {@link NacosClientPropertiesTest}.

    */ -public class SystemEnvPropertySourceTest { +class SystemEnvPropertySourceTest { SystemEnvPropertySource systemEnvPropertySource; private Map mockEnvMap; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { systemEnvPropertySource = new SystemEnvPropertySource(); mockEnvMap = new HashMap<>(); Field envField = SystemEnvPropertySource.class.getDeclaredField("env"); @@ -50,42 +50,42 @@ public void setUp() throws Exception { } @Test - public void testGetEnvForLowerCaseKey() { + void testGetEnvForLowerCaseKey() { assertEquals("value1", systemEnvPropertySource.getProperty("testcase1")); } @Test - public void testGetEnvForLowerCaseKeyWithDot() { + void testGetEnvForLowerCaseKeyWithDot() { assertEquals("value2", systemEnvPropertySource.getProperty("test.case.2")); } @Test - public void testGetEnvForLowerCaseKeyWithHyphen() { + void testGetEnvForLowerCaseKeyWithHyphen() { assertEquals("value2", systemEnvPropertySource.getProperty("test-case-2")); } @Test - public void testGetEnvForLowerCaseKeyWithHyphenAndDot() { + void testGetEnvForLowerCaseKeyWithHyphenAndDot() { assertEquals("value2", systemEnvPropertySource.getProperty("test.case-2")); } @Test - public void testGetEnvForUpperCaseKey() { + void testGetEnvForUpperCaseKey() { assertEquals("value3", systemEnvPropertySource.getProperty("TESTCASE3")); } @Test - public void testGetEnvForUpperCaseKeyWithDot() { + void testGetEnvForUpperCaseKeyWithDot() { assertEquals("value4", systemEnvPropertySource.getProperty("TEST.CASE.4")); } @Test - public void testGetEnvForUpperCaseKeyWithHyphen() { + void testGetEnvForUpperCaseKeyWithHyphen() { assertEquals("value4", systemEnvPropertySource.getProperty("TEST-CASE-4")); } @Test - public void testGetEnvForUpperCaseKeyWithHyphenAndDot() { + void testGetEnvForUpperCaseKeyWithHyphenAndDot() { assertEquals("value4", systemEnvPropertySource.getProperty("TEST_CASE.4")); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/env/convert/CompositeConverterTest.java b/client/src/test/java/com/alibaba/nacos/client/env/convert/CompositeConverterTest.java index a248a42eed6..8d200e29a29 100644 --- a/client/src/test/java/com/alibaba/nacos/client/env/convert/CompositeConverterTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/env/convert/CompositeConverterTest.java @@ -16,42 +16,45 @@ package com.alibaba.nacos.client.env.convert; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.util.MissingFormatArgumentException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class CompositeConverterTest { +class CompositeConverterTest { CompositeConverter compositeConverter; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { compositeConverter = new CompositeConverter(); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { } - @Test(expected = MissingFormatArgumentException.class) - public void testConvertNotSupportType() { - compositeConverter.convert("test", CompositeConverter.class); + @Test + void testConvertNotSupportType() { + assertThrows(MissingFormatArgumentException.class, () -> { + compositeConverter.convert("test", CompositeConverter.class); + }); } @Test - public void testConvertBooleanForEmptyProperty() { + void testConvertBooleanForEmptyProperty() { assertNull(compositeConverter.convert(null, Boolean.class)); } @Test - public void testConvertBooleanTrue() { + void testConvertBooleanTrue() { assertTrue(compositeConverter.convert("true", Boolean.class)); assertTrue(compositeConverter.convert("on", Boolean.class)); assertTrue(compositeConverter.convert("yes", Boolean.class)); @@ -59,49 +62,57 @@ public void testConvertBooleanTrue() { } @Test - public void testConvertBooleanFalse() { + void testConvertBooleanFalse() { assertFalse(compositeConverter.convert("false", Boolean.class)); assertFalse(compositeConverter.convert("off", Boolean.class)); assertFalse(compositeConverter.convert("no", Boolean.class)); assertFalse(compositeConverter.convert("0", Boolean.class)); } - @Test(expected = IllegalArgumentException.class) - public void testConvertBooleanIllegal() { - compositeConverter.convert("aaa", Boolean.class); + @Test + void testConvertBooleanIllegal() { + assertThrows(IllegalArgumentException.class, () -> { + compositeConverter.convert("aaa", Boolean.class); + }); } @Test - public void testConvertIntegerForEmptyProperty() { + void testConvertIntegerForEmptyProperty() { assertNull(compositeConverter.convert(null, Integer.class)); } @Test - public void testConvertInteger() { + void testConvertInteger() { assertEquals(100, (int) compositeConverter.convert("100", Integer.class)); - assertEquals(Integer.MAX_VALUE, (int) compositeConverter.convert(String.valueOf(Integer.MAX_VALUE), Integer.class)); - assertEquals(Integer.MIN_VALUE, (int) compositeConverter.convert(String.valueOf(Integer.MIN_VALUE), Integer.class)); + assertEquals(Integer.MAX_VALUE, + (int) compositeConverter.convert(String.valueOf(Integer.MAX_VALUE), Integer.class)); + assertEquals(Integer.MIN_VALUE, + (int) compositeConverter.convert(String.valueOf(Integer.MIN_VALUE), Integer.class)); } - @Test(expected = IllegalArgumentException.class) - public void testConvertIntegerIllegal() { - compositeConverter.convert("aaa", Integer.class); + @Test + void testConvertIntegerIllegal() { + assertThrows(IllegalArgumentException.class, () -> { + compositeConverter.convert("aaa", Integer.class); + }); } @Test - public void testConvertLongForEmptyProperty() { + void testConvertLongForEmptyProperty() { assertNull(compositeConverter.convert(null, Long.class)); } @Test - public void testConvertLong() { + void testConvertLong() { assertEquals(100L, (long) compositeConverter.convert("100", Long.class)); assertEquals(Long.MAX_VALUE, (long) compositeConverter.convert(String.valueOf(Long.MAX_VALUE), Long.class)); assertEquals(Long.MIN_VALUE, (long) compositeConverter.convert(String.valueOf(Long.MIN_VALUE), Long.class)); } - @Test(expected = IllegalArgumentException.class) - public void testConvertLongIllegal() { - compositeConverter.convert("aaa", Long.class); + @Test + void testConvertLongIllegal() { + assertThrows(IllegalArgumentException.class, () -> { + compositeConverter.convert("aaa", Long.class); + }); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/logging/NacosLoggingTest.java b/client/src/test/java/com/alibaba/nacos/client/logging/NacosLoggingTest.java index b2d94d42404..bdd3f4d9701 100644 --- a/client/src/test/java/com/alibaba/nacos/client/logging/NacosLoggingTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/logging/NacosLoggingTest.java @@ -20,21 +20,21 @@ import com.alibaba.nacos.common.logging.NacosLoggingAdapter; import com.alibaba.nacos.common.logging.NacosLoggingProperties; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.mockito.Mockito.doThrow; -@RunWith(MockitoJUnitRunner.class) -public class NacosLoggingTest { +@ExtendWith(MockitoExtension.class) +class NacosLoggingTest { @Mock NacosLoggingAdapter loggingAdapter; @@ -43,8 +43,8 @@ public class NacosLoggingTest { NacosLogging instance; - @Before - public void setUp() throws NoSuchFieldException, IllegalAccessException { + @BeforeEach + void setUp() throws NoSuchFieldException, IllegalAccessException { loggingProperties = new NacosLoggingProperties("", new Properties()); instance = NacosLogging.getInstance(); Field loggingPropertiesField = NacosLogging.class.getDeclaredField("loggingProperties"); @@ -53,13 +53,13 @@ public void setUp() throws NoSuchFieldException, IllegalAccessException { } @Test - public void testGetInstance() { + void testGetInstance() { NacosLogging instance = NacosLogging.getInstance(); - Assert.assertNotNull(instance); + assertNotNull(instance); } @Test - public void testLoadConfiguration() throws NoSuchFieldException, IllegalAccessException { + void testLoadConfiguration() throws NoSuchFieldException, IllegalAccessException { instance = NacosLogging.getInstance(); Field nacosLogging = NacosLogging.class.getDeclaredField("loggingAdapter"); nacosLogging.setAccessible(true); @@ -69,7 +69,7 @@ public void testLoadConfiguration() throws NoSuchFieldException, IllegalAccessEx } @Test - public void testLoadConfigurationWithException() throws NoSuchFieldException, IllegalAccessException { + void testLoadConfigurationWithException() throws NoSuchFieldException, IllegalAccessException { instance = NacosLogging.getInstance(); Field nacosLoggingField = NacosLogging.class.getDeclaredField("loggingAdapter"); nacosLoggingField.setAccessible(true); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingMaintainServiceTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingMaintainServiceTest.java index e5a84b6e022..50580d0e526 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingMaintainServiceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingMaintainServiceTest.java @@ -29,10 +29,9 @@ import com.alibaba.nacos.client.naming.core.ServerListManager; import com.alibaba.nacos.client.naming.remote.http.NamingHttpClientProxy; import com.alibaba.nacos.client.security.SecurityProxy; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.mockito.ArgumentMatcher; import java.lang.reflect.Field; @@ -41,12 +40,13 @@ import java.util.Properties; import java.util.concurrent.ScheduledExecutorService; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -public class NacosNamingMaintainServiceTest { +class NacosNamingMaintainServiceTest { private NacosNamingMaintainService nacosNamingMaintainService; @@ -58,18 +58,18 @@ public class NacosNamingMaintainServiceTest { private ScheduledExecutorService executorService; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { Properties prop = new Properties(); prop.setProperty(PropertyKeyConst.NAMESPACE, "public"); prop.setProperty("serverAddr", "localhost"); - + nacosNamingMaintainService = new NacosNamingMaintainService(prop); serverProxy = mock(NamingHttpClientProxy.class); serverListManager = mock(ServerListManager.class); securityProxy = mock(SecurityProxy.class); executorService = mock(ScheduledExecutorService.class); - + Field serverProxyField = NacosNamingMaintainService.class.getDeclaredField("serverProxy"); serverProxyField.setAccessible(true); serverProxyField.set(nacosNamingMaintainService, serverProxy); @@ -84,18 +84,18 @@ public void setUp() throws Exception { executorServiceField.set(nacosNamingMaintainService, executorService); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { } @Test - public void testConstructor() throws NacosException { + void testConstructor() throws NacosException { NacosNamingMaintainService client = new NacosNamingMaintainService("localhost"); - Assert.assertNotNull(client); + assertNotNull(client); } @Test - public void testUpdateInstance1() throws NacosException { + void testUpdateInstance1() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -107,7 +107,7 @@ public void testUpdateInstance1() throws NacosException { } @Test - public void testUpdateInstance2() throws NacosException { + void testUpdateInstance2() throws NacosException { //given String serviceName = "service1"; Instance instance = new Instance(); @@ -118,7 +118,7 @@ public void testUpdateInstance2() throws NacosException { } @Test - public void testQueryService1() throws NacosException { + void testQueryService1() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -129,7 +129,7 @@ public void testQueryService1() throws NacosException { } @Test - public void testQueryService2() throws NacosException { + void testQueryService2() throws NacosException { //given String serviceName = "service1"; Instance instance = new Instance(); @@ -140,7 +140,7 @@ public void testQueryService2() throws NacosException { } @Test - public void testCreateService1() throws NacosException { + void testCreateService1() throws NacosException { //given String serviceName = "service1"; //when @@ -157,7 +157,7 @@ public boolean matches(Service service) { } @Test - public void testCreateService2() throws NacosException { + void testCreateService2() throws NacosException { //given String serviceName = "service1"; String groupName = "groupName"; @@ -175,7 +175,7 @@ public boolean matches(Service service) { } @Test - public void testCreateService3() throws NacosException { + void testCreateService3() throws NacosException { //given String serviceName = "service1"; String groupName = "groupName"; @@ -194,7 +194,7 @@ public boolean matches(Service service) { } @Test - public void testCreateService5() throws NacosException { + void testCreateService5() throws NacosException { //given String serviceName = "service1"; String groupName = "groupName"; @@ -214,7 +214,7 @@ public boolean matches(Service service) { } @Test - public void testCreateService4() throws NacosException { + void testCreateService4() throws NacosException { //given Service service = new Service(); AbstractSelector selector = new NoneSelector(); @@ -225,7 +225,7 @@ public void testCreateService4() throws NacosException { } @Test - public void testDeleteService1() throws NacosException { + void testDeleteService1() throws NacosException { //given String serviceName = "service1"; //when @@ -235,7 +235,7 @@ public void testDeleteService1() throws NacosException { } @Test - public void testDeleteService2() throws NacosException { + void testDeleteService2() throws NacosException { //given String serviceName = "service1"; String groupName = "groupName"; @@ -246,7 +246,7 @@ public void testDeleteService2() throws NacosException { } @Test - public void testUpdateService1() throws NacosException { + void testUpdateService1() throws NacosException { //given String serviceName = "service1"; String groupName = "groupName"; @@ -265,7 +265,7 @@ public boolean matches(Service service) { } @Test - public void testUpdateService2() throws NacosException { + void testUpdateService2() throws NacosException { //given String serviceName = "service1"; String groupName = "groupName"; @@ -287,7 +287,7 @@ public boolean matches(Service service) { } @Test - public void testUpdateService3() throws NacosException { + void testUpdateService3() throws NacosException { //given Service service = new Service(); AbstractSelector selector = new NoneSelector(); @@ -298,7 +298,7 @@ public void testUpdateService3() throws NacosException { } @Test - public void testShutDown() throws NacosException { + void testShutDown() throws NacosException { //when nacosNamingMaintainService.shutDown(); //then diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java index 8a6e5a95e32..02fa6ce13f3 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/NacosNamingServiceTest.java @@ -32,15 +32,12 @@ import com.alibaba.nacos.client.naming.remote.http.NamingHttpClientProxy; import com.alibaba.nacos.client.naming.utils.CollectionUtils; import com.alibaba.nacos.client.naming.utils.UtilAndComs; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; import java.util.ArrayList; @@ -49,7 +46,10 @@ import java.util.List; import java.util.Properties; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.argThat; @@ -60,11 +60,8 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class NacosNamingServiceTest { - - @Rule - public ExpectedException expectedException = ExpectedException.none(); +@ExtendWith(MockitoExtension.class) +class NacosNamingServiceTest { @Mock private NamingClientProxy proxy; @@ -77,8 +74,8 @@ public class NacosNamingServiceTest { private NacosNamingService client; - @Before - public void before() throws NoSuchFieldException, NacosException, IllegalAccessException { + @BeforeEach + void before() throws NoSuchFieldException, NacosException, IllegalAccessException { Properties prop = new Properties(); prop.setProperty("serverAddr", "localhost"); prop.put(PropertyKeyConst.NAMESPACE, "test"); @@ -86,8 +83,8 @@ public void before() throws NoSuchFieldException, NacosException, IllegalAccessE injectMocks(client); } - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { client.shutDown(); } @@ -118,7 +115,7 @@ private void injectMocks(NacosNamingService client) throws NoSuchFieldException, } @Test - public void testRegisterInstance1() throws NacosException { + void testRegisterInstance1() throws NacosException { //given String serviceName = "service1"; String ip = "1.1.1.1"; @@ -133,7 +130,7 @@ public void testRegisterInstance1() throws NacosException { } @Test - public void testBatchRegisterInstance() throws NacosException { + void testBatchRegisterInstance() throws NacosException { Instance instance = new Instance(); String serviceName = "service1"; String ip = "1.1.1.1"; @@ -152,7 +149,7 @@ public void testBatchRegisterInstance() throws NacosException { } @Test - public void testBatchRegisterInstanceWithGroupNamePrefix() throws NacosException { + void testBatchRegisterInstanceWithGroupNamePrefix() throws NacosException { Instance instance = new Instance(); String serviceName = "service1"; String ip = "1.1.1.1"; @@ -171,7 +168,7 @@ public void testBatchRegisterInstanceWithGroupNamePrefix() throws NacosException } @Test - public void testBatchRegisterInstanceWithWrongGroupNamePrefix() throws NacosException { + void testBatchRegisterInstanceWithWrongGroupNamePrefix() throws NacosException { Instance instance = new Instance(); String serviceName = "service1"; String ip = "1.1.1.1"; @@ -186,13 +183,13 @@ public void testBatchRegisterInstanceWithWrongGroupNamePrefix() throws NacosExce try { client.batchRegisterInstance(serviceName, Constants.DEFAULT_GROUP, instanceList); } catch (Exception e) { - Assert.assertTrue(e instanceof NacosException); - Assert.assertTrue(e.getMessage().contains("wrong group name prefix of instance service name")); + assertTrue(e instanceof NacosException); + assertTrue(e.getMessage().contains("wrong group name prefix of instance service name")); } } @Test - public void testBatchDeRegisterInstance() throws NacosException { + void testBatchDeRegisterInstance() throws NacosException { Instance instance = new Instance(); String serviceName = "service1"; String ip = "1.1.1.1"; @@ -207,13 +204,13 @@ public void testBatchDeRegisterInstance() throws NacosException { try { client.batchDeregisterInstance(serviceName, Constants.DEFAULT_GROUP, instanceList); } catch (Exception e) { - Assert.assertTrue(e instanceof NacosException); - Assert.assertTrue(e.getMessage().contains("not found")); + assertTrue(e instanceof NacosException); + assertTrue(e.getMessage().contains("not found")); } } @Test - public void testRegisterInstance2() throws NacosException { + void testRegisterInstance2() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -229,7 +226,7 @@ public void testRegisterInstance2() throws NacosException { } @Test - public void testRegisterInstance3() throws NacosException { + void testRegisterInstance3() throws NacosException { //given String serviceName = "service1"; String clusterName = "cluster1"; @@ -245,7 +242,7 @@ public void testRegisterInstance3() throws NacosException { } @Test - public void testRegisterInstance4() throws NacosException { + void testRegisterInstance4() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -262,7 +259,7 @@ public void testRegisterInstance4() throws NacosException { } @Test - public void testRegisterInstance5() throws NacosException { + void testRegisterInstance5() throws NacosException { //given String serviceName = "service1"; Instance instance = new Instance(); @@ -273,7 +270,7 @@ public void testRegisterInstance5() throws NacosException { } @Test - public void testRegisterInstance6() throws NacosException { + void testRegisterInstance6() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -285,22 +282,23 @@ public void testRegisterInstance6() throws NacosException { } @Test - public void testRegisterInstance7() throws NacosException { - expectedException.expect(NacosException.class); - expectedException.expectMessage( - "Instance 'clusterName' should be characters with only 0-9a-zA-Z-. (current: cluster1,cluster2)"); - - //given - String serviceName = "service1"; - String groupName = "group1"; - Instance instance = new Instance(); - instance.setClusterName("cluster1,cluster2"); - //when - client.registerInstance(serviceName, groupName, instance); + void testRegisterInstance7() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { + + //given + String serviceName = "service1"; + String groupName = "group1"; + Instance instance = new Instance(); + instance.setClusterName("cluster1,cluster2"); + //when + client.registerInstance(serviceName, groupName, instance); + }); + assertTrue(exception.getMessage().contains( + "Instance 'clusterName' should be characters with only 0-9a-zA-Z-. (current: cluster1,cluster2)")); } @Test - public void testDeregisterInstance1() throws NacosException { + void testDeregisterInstance1() throws NacosException { //given String serviceName = "service1"; String ip = "1.1.1.1"; @@ -315,7 +313,7 @@ public void testDeregisterInstance1() throws NacosException { } @Test - public void testDeregisterInstance2() throws NacosException { + void testDeregisterInstance2() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -331,7 +329,7 @@ public void testDeregisterInstance2() throws NacosException { } @Test - public void testDeregisterInstance3() throws NacosException { + void testDeregisterInstance3() throws NacosException { //given String serviceName = "service1"; String clusterName = "cluster1"; @@ -347,7 +345,7 @@ public void testDeregisterInstance3() throws NacosException { } @Test - public void testDeregisterInstance4() throws NacosException { + void testDeregisterInstance4() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -364,7 +362,7 @@ public void testDeregisterInstance4() throws NacosException { } @Test - public void testDeregisterInstance5() throws NacosException { + void testDeregisterInstance5() throws NacosException { //given String serviceName = "service1"; Instance instance = new Instance(); @@ -375,7 +373,7 @@ public void testDeregisterInstance5() throws NacosException { } @Test - public void testDeregisterInstance6() throws NacosException { + void testDeregisterInstance6() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -387,7 +385,7 @@ public void testDeregisterInstance6() throws NacosException { } @Test - public void testGetAllInstances1() throws NacosException { + void testGetAllInstances1() throws NacosException { //given String serviceName = "service1"; //when @@ -397,7 +395,7 @@ public void testGetAllInstances1() throws NacosException { } @Test - public void testGetAllInstances2() throws NacosException { + void testGetAllInstances2() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -408,7 +406,7 @@ public void testGetAllInstances2() throws NacosException { } @Test - public void testGetAllInstances3() throws NacosException { + void testGetAllInstances3() throws NacosException { //given String serviceName = "service1"; //when @@ -418,7 +416,7 @@ public void testGetAllInstances3() throws NacosException { } @Test - public void testGetAllInstances4() throws NacosException { + void testGetAllInstances4() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -430,7 +428,7 @@ public void testGetAllInstances4() throws NacosException { } @Test - public void testGetAllInstances5() throws NacosException { + void testGetAllInstances5() throws NacosException { //given String serviceName = "service1"; List clusterList = Arrays.asList("cluster1", "cluster2"); @@ -441,7 +439,7 @@ public void testGetAllInstances5() throws NacosException { } @Test - public void testGetAllInstances6() throws NacosException { + void testGetAllInstances6() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -454,19 +452,19 @@ public void testGetAllInstances6() throws NacosException { } @Test - public void testGetAllInstances7() throws NacosException { + void testGetAllInstances7() throws NacosException { //given String serviceName = "service1"; List clusterList = Arrays.asList("cluster1", "cluster2"); //when client.getAllInstances(serviceName, clusterList, false); //then - verify(proxy, times(1)) - .queryInstancesOfService(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2", false); + verify(proxy, times(1)).queryInstancesOfService(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2", + false); } @Test - public void testGetAllInstances8() throws NacosException { + void testGetAllInstances8() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -478,7 +476,7 @@ public void testGetAllInstances8() throws NacosException { } @Test - public void testGetAllInstanceFromFailover() throws NacosException { + void testGetAllInstanceFromFailover() throws NacosException { when(serviceInfoHolder.isFailoverSwitch()).thenReturn(true); ServiceInfo serviceInfo = new ServiceInfo("group1@@service1"); serviceInfo.setHosts(Collections.singletonList(new Instance())); @@ -490,7 +488,7 @@ public void testGetAllInstanceFromFailover() throws NacosException { } @Test - public void testGetAllInstanceFromFailoverEmpty() throws NacosException { + void testGetAllInstanceFromFailoverEmpty() throws NacosException { when(serviceInfoHolder.isFailoverSwitch()).thenReturn(true); ServiceInfo serviceInfo = new ServiceInfo("group1@@service1"); when(serviceInfoHolder.getFailoverServiceInfo(anyString(), anyString(), anyString())).thenReturn(serviceInfo); @@ -500,7 +498,7 @@ public void testGetAllInstanceFromFailoverEmpty() throws NacosException { } @Test - public void testSelectInstances1() throws NacosException { + void testSelectInstances1() throws NacosException { //given String serviceName = "service1"; //when @@ -510,7 +508,7 @@ public void testSelectInstances1() throws NacosException { } @Test - public void testSelectInstances2() throws NacosException { + void testSelectInstances2() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -521,7 +519,7 @@ public void testSelectInstances2() throws NacosException { } @Test - public void testSelectInstances3() throws NacosException { + void testSelectInstances3() throws NacosException { //given String serviceName = "service1"; //when @@ -531,7 +529,7 @@ public void testSelectInstances3() throws NacosException { } @Test - public void testSelectInstances4() throws NacosException { + void testSelectInstances4() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -543,7 +541,7 @@ public void testSelectInstances4() throws NacosException { } @Test - public void testSelectInstances5() throws NacosException { + void testSelectInstances5() throws NacosException { //given String serviceName = "service1"; List clusterList = Arrays.asList("cluster1", "cluster2"); @@ -554,7 +552,7 @@ public void testSelectInstances5() throws NacosException { } @Test - public void testSelectInstances6() throws NacosException { + void testSelectInstances6() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -567,19 +565,19 @@ public void testSelectInstances6() throws NacosException { } @Test - public void testSelectInstances7() throws NacosException { + void testSelectInstances7() throws NacosException { //given String serviceName = "service1"; List clusterList = Arrays.asList("cluster1", "cluster2"); //when client.selectInstances(serviceName, clusterList, true, false); //then - verify(proxy, times(1)) - .queryInstancesOfService(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2", false); + verify(proxy, times(1)).queryInstancesOfService(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2", + false); } @Test - public void testSelectInstances8() throws NacosException { + void testSelectInstances8() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -591,7 +589,7 @@ public void testSelectInstances8() throws NacosException { } @Test - public void testSelectInstancesWithHealthyFlag() throws NacosException { + void testSelectInstancesWithHealthyFlag() throws NacosException { //given Instance healthyInstance = new Instance(); healthyInstance.setHealthy(true); @@ -623,11 +621,11 @@ public void testSelectInstancesWithHealthyFlag() throws NacosException { List instances = client.selectInstances(serviceName, groupName, clusterList, true, false); //then assertEquals(1, instances.size()); - Assert.assertSame(healthyInstance, instances.get(0)); + assertSame(healthyInstance, instances.get(0)); } @Test - public void testSelectOneHealthyInstance1() throws NacosException { + void testSelectOneHealthyInstance1() throws NacosException { //given Instance healthyInstance = new Instance(); healthyInstance.setIp("1.1.1.1"); @@ -646,7 +644,7 @@ public void testSelectOneHealthyInstance1() throws NacosException { } @Test - public void testSelectOneHealthyInstance2() throws NacosException { + void testSelectOneHealthyInstance2() throws NacosException { //given Instance healthyInstance = new Instance(); healthyInstance.setIp("1.1.1.1"); @@ -666,7 +664,7 @@ public void testSelectOneHealthyInstance2() throws NacosException { } @Test - public void testSelectOneHealthyInstance3() throws NacosException { + void testSelectOneHealthyInstance3() throws NacosException { //given Instance healthyInstance = new Instance(); healthyInstance.setIp("1.1.1.1"); @@ -675,8 +673,8 @@ public void testSelectOneHealthyInstance3() throws NacosException { hosts.add(healthyInstance); ServiceInfo infoWithHealthyInstance = new ServiceInfo(); infoWithHealthyInstance.setHosts(hosts); - when(proxy.queryInstancesOfService(anyString(), anyString(), anyString(), anyBoolean())) - .thenReturn(infoWithHealthyInstance); + when(proxy.queryInstancesOfService(anyString(), anyString(), anyString(), anyBoolean())).thenReturn( + infoWithHealthyInstance); String serviceName = "service1"; //when @@ -686,7 +684,7 @@ public void testSelectOneHealthyInstance3() throws NacosException { } @Test - public void testSelectOneHealthyInstance4() throws NacosException { + void testSelectOneHealthyInstance4() throws NacosException { //given Instance healthyInstance = new Instance(); healthyInstance.setIp("1.1.1.1"); @@ -695,8 +693,8 @@ public void testSelectOneHealthyInstance4() throws NacosException { hosts.add(healthyInstance); ServiceInfo infoWithHealthyInstance = new ServiceInfo(); infoWithHealthyInstance.setHosts(hosts); - when(proxy.queryInstancesOfService(anyString(), anyString(), anyString(), anyBoolean())) - .thenReturn(infoWithHealthyInstance); + when(proxy.queryInstancesOfService(anyString(), anyString(), anyString(), anyBoolean())).thenReturn( + infoWithHealthyInstance); String serviceName = "service1"; String groupName = "group1"; @@ -708,7 +706,7 @@ public void testSelectOneHealthyInstance4() throws NacosException { } @Test - public void testSelectOneHealthyInstance5() throws NacosException { + void testSelectOneHealthyInstance5() throws NacosException { //given Instance healthyInstance = new Instance(); healthyInstance.setIp("1.1.1.1"); @@ -728,7 +726,7 @@ public void testSelectOneHealthyInstance5() throws NacosException { } @Test - public void testSelectOneHealthyInstance6() throws NacosException { + void testSelectOneHealthyInstance6() throws NacosException { //given Instance healthyInstance = new Instance(); healthyInstance.setIp("1.1.1.1"); @@ -750,7 +748,7 @@ public void testSelectOneHealthyInstance6() throws NacosException { } @Test - public void testSelectOneHealthyInstance7() throws NacosException { + void testSelectOneHealthyInstance7() throws NacosException { //given Instance healthyInstance = new Instance(); healthyInstance.setIp("1.1.1.1"); @@ -759,20 +757,20 @@ public void testSelectOneHealthyInstance7() throws NacosException { hosts.add(healthyInstance); ServiceInfo infoWithHealthyInstance = new ServiceInfo(); infoWithHealthyInstance.setHosts(hosts); - when(proxy.queryInstancesOfService(anyString(), anyString(), anyString(), anyBoolean())) - .thenReturn(infoWithHealthyInstance); + when(proxy.queryInstancesOfService(anyString(), anyString(), anyString(), anyBoolean())).thenReturn( + infoWithHealthyInstance); String serviceName = "service1"; List clusterList = Arrays.asList("cluster1", "cluster2"); //when client.selectOneHealthyInstance(serviceName, clusterList, false); //then - verify(proxy, times(1)) - .queryInstancesOfService(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2", false); + verify(proxy, times(1)).queryInstancesOfService(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2", + false); } @Test - public void testSelectOneHealthyInstance8() throws NacosException { + void testSelectOneHealthyInstance8() throws NacosException { //given Instance healthyInstance = new Instance(); healthyInstance.setIp("1.1.1.1"); @@ -781,8 +779,8 @@ public void testSelectOneHealthyInstance8() throws NacosException { hosts.add(healthyInstance); ServiceInfo infoWithHealthyInstance = new ServiceInfo(); infoWithHealthyInstance.setHosts(hosts); - when(proxy.queryInstancesOfService(anyString(), anyString(), anyString(), anyBoolean())) - .thenReturn(infoWithHealthyInstance); + when(proxy.queryInstancesOfService(anyString(), anyString(), anyString(), anyBoolean())).thenReturn( + infoWithHealthyInstance); String serviceName = "service1"; String groupName = "group1"; @@ -794,7 +792,7 @@ public void testSelectOneHealthyInstance8() throws NacosException { } @Test - public void testSubscribe1() throws NacosException { + void testSubscribe1() throws NacosException { //given String serviceName = "service1"; EventListener listener = event -> { @@ -808,7 +806,7 @@ public void testSubscribe1() throws NacosException { } @Test - public void testSubscribe2() throws NacosException { + void testSubscribe2() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -823,7 +821,7 @@ public void testSubscribe2() throws NacosException { } @Test - public void testSubscribe3() throws NacosException { + void testSubscribe3() throws NacosException { //given String serviceName = "service1"; List clusterList = Arrays.asList("cluster1", "cluster2"); @@ -833,13 +831,13 @@ public void testSubscribe3() throws NacosException { //when client.subscribe(serviceName, clusterList, listener); //then - verify(changeNotifier, times(1)) - .registerListener(Constants.DEFAULT_GROUP, serviceName, "cluster1,cluster2", listener); + verify(changeNotifier, times(1)).registerListener(Constants.DEFAULT_GROUP, serviceName, "cluster1,cluster2", + listener); verify(proxy, times(1)).subscribe(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2"); } @Test - public void testSubscribe4() throws NacosException { + void testSubscribe4() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -855,7 +853,7 @@ public void testSubscribe4() throws NacosException { } @Test - public void testSubscribeWithNullListener() throws NacosException { + void testSubscribeWithNullListener() throws NacosException { String serviceName = "service1"; String groupName = "group1"; //when @@ -867,7 +865,7 @@ public void testSubscribeWithNullListener() throws NacosException { } @Test - public void testUnSubscribe1() throws NacosException { + void testUnSubscribe1() throws NacosException { //given String serviceName = "service1"; EventListener listener = event -> { @@ -880,7 +878,7 @@ public void testUnSubscribe1() throws NacosException { } @Test - public void testUnSubscribe2() throws NacosException { + void testUnSubscribe2() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -894,7 +892,7 @@ public void testUnSubscribe2() throws NacosException { } @Test - public void testUnSubscribe3() throws NacosException { + void testUnSubscribe3() throws NacosException { //given String serviceName = "service1"; List clusterList = Arrays.asList("cluster1", "cluster2"); @@ -903,13 +901,13 @@ public void testUnSubscribe3() throws NacosException { }; client.unsubscribe(serviceName, clusterList, listener); //then - verify(changeNotifier, times(1)) - .deregisterListener(Constants.DEFAULT_GROUP, serviceName, "cluster1,cluster2", listener); + verify(changeNotifier, times(1)).deregisterListener(Constants.DEFAULT_GROUP, serviceName, "cluster1,cluster2", + listener); verify(proxy, times(1)).unsubscribe(serviceName, Constants.DEFAULT_GROUP, "cluster1,cluster2"); } @Test - public void testUnSubscribe4() throws NacosException { + void testUnSubscribe4() throws NacosException { //given String serviceName = "service1"; String groupName = "group1"; @@ -924,7 +922,7 @@ public void testUnSubscribe4() throws NacosException { } @Test - public void testGetServicesOfServer1() throws NacosException { + void testGetServicesOfServer1() throws NacosException { //given int pageNo = 1; int pageSize = 10; @@ -935,7 +933,7 @@ public void testGetServicesOfServer1() throws NacosException { } @Test - public void testGetServicesOfServer2() throws NacosException { + void testGetServicesOfServer2() throws NacosException { //given int pageNo = 1; int pageSize = 10; @@ -947,7 +945,7 @@ public void testGetServicesOfServer2() throws NacosException { } @Test - public void testGetServicesOfServer3() throws NacosException { + void testGetServicesOfServer3() throws NacosException { //given int pageNo = 1; int pageSize = 10; @@ -964,7 +962,7 @@ public String getType() { } @Test - public void testGetServicesOfServer4() throws NacosException { + void testGetServicesOfServer4() throws NacosException { //given int pageNo = 1; int pageSize = 10; @@ -983,7 +981,7 @@ public String getType() { } @Test - public void testGetSubscribeServices() { + void testGetSubscribeServices() { //when client.getSubscribeServices(); //then @@ -991,7 +989,7 @@ public void testGetSubscribeServices() { } @Test - public void testGetServerStatus() { + void testGetServerStatus() { //given when(proxy.serverHealthy()).thenReturn(true); //when @@ -1001,7 +999,7 @@ public void testGetServerStatus() { } @Test - public void testGetServerStatusFail() { + void testGetServerStatusFail() { //given when(proxy.serverHealthy()).thenReturn(false); //when @@ -1011,7 +1009,7 @@ public void testGetServerStatusFail() { } @Test - public void testShutDown() throws NacosException { + void testShutDown() throws NacosException { //when client.shutDown(); //then @@ -1019,7 +1017,7 @@ public void testShutDown() throws NacosException { } @Test - public void testConstructorWithServerList() throws NacosException, NoSuchFieldException, IllegalAccessException { + void testConstructorWithServerList() throws NacosException, NoSuchFieldException, IllegalAccessException { NacosNamingService namingService = new NacosNamingService("localhost"); try { Field namespaceField = NacosNamingService.class.getDeclaredField("namespace"); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/backups/FailoverReactorTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/backups/FailoverReactorTest.java index 26cad59f79a..8c480ada321 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/backups/FailoverReactorTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/backups/FailoverReactorTest.java @@ -20,13 +20,12 @@ import com.alibaba.nacos.api.naming.pojo.ServiceInfo; import com.alibaba.nacos.client.naming.cache.ServiceInfoHolder; import com.alibaba.nacos.common.utils.ReflectUtils; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; @@ -37,14 +36,15 @@ import java.util.UUID; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class FailoverReactorTest { +@ExtendWith(MockitoExtension.class) +class FailoverReactorTest { @Mock ServiceInfoHolder holder; @@ -54,33 +54,33 @@ public class FailoverReactorTest { FailoverReactor failoverReactor; - @Before - public void setUp() throws NoSuchFieldException, IllegalAccessException { + @BeforeEach + void setUp() throws NoSuchFieldException, IllegalAccessException { failoverReactor = new FailoverReactor(holder, UUID.randomUUID().toString()); Field failoverDataSourceField = FailoverReactor.class.getDeclaredField("failoverDataSource"); failoverDataSourceField.setAccessible(true); failoverDataSourceField.set(failoverReactor, failoverDataSource); } - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { failoverReactor.shutdown(); } @Test - public void testIsFailoverSwitch() throws NacosException { - Assert.assertFalse(failoverReactor.isFailoverSwitch()); + void testIsFailoverSwitch() throws NacosException { + assertFalse(failoverReactor.isFailoverSwitch()); } @Test - public void testGetService() throws NacosException { + void testGetService() throws NacosException { ServiceInfo info = failoverReactor.getService("aa@@bb"); assertEquals(new ServiceInfo("aa@@bb").toString(), info.toString()); } @Test - public void testRefreshFromDisabledToEnabled() throws InterruptedException { + void testRefreshFromDisabledToEnabled() throws InterruptedException { // make sure the first no delay refresh thread finished. TimeUnit.MILLISECONDS.sleep(500); FailoverSwitch mockFailoverSwitch = new FailoverSwitch(true); @@ -97,7 +97,7 @@ public void testRefreshFromDisabledToEnabled() throws InterruptedException { } @Test - public void testRefreshFromDisabledToEnabledWithException() throws InterruptedException { + void testRefreshFromDisabledToEnabledWithException() throws InterruptedException { // make sure the first no delay refresh thread finished. TimeUnit.MILLISECONDS.sleep(500); FailoverSwitch mockFailoverSwitch = new FailoverSwitch(true); @@ -109,8 +109,7 @@ public void testRefreshFromDisabledToEnabledWithException() throws InterruptedEx } @Test - public void testRefreshFromEnabledToDisabled() - throws InterruptedException, NoSuchFieldException, IllegalAccessException { + void testRefreshFromEnabledToDisabled() throws InterruptedException, NoSuchFieldException, IllegalAccessException { // make sure the first no delay refresh thread finished. TimeUnit.MILLISECONDS.sleep(500); FailoverSwitch mockFailoverSwitch = new FailoverSwitch(false); @@ -133,7 +132,7 @@ public void testRefreshFromEnabledToDisabled() } @Test - public void testFailoverServiceCntMetrics() + void testFailoverServiceCntMetrics() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Method method = FailoverReactor.class.getDeclaredMethod("failoverServiceCntMetrics"); method.setAccessible(true); @@ -142,7 +141,7 @@ public void testFailoverServiceCntMetrics() } @Test - public void testFailoverServiceCntMetricsClear() + void testFailoverServiceCntMetricsClear() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException { Field field = FailoverReactor.class.getDeclaredField("meterMap"); field.setAccessible(true); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/backups/datasource/DiskFailoverDataSourceTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/backups/datasource/DiskFailoverDataSourceTest.java index 7a0b3066610..e839e815b79 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/backups/datasource/DiskFailoverDataSourceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/backups/datasource/DiskFailoverDataSourceTest.java @@ -19,35 +19,34 @@ import com.alibaba.nacos.api.naming.pojo.ServiceInfo; import com.alibaba.nacos.client.naming.backups.FailoverData; import com.alibaba.nacos.client.naming.backups.FailoverSwitch; -import com.alibaba.nacos.client.naming.cache.DiskCacheTest; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class DiskFailoverDataSourceTest { +class DiskFailoverDataSourceTest { DiskFailoverDataSource dataSource; - @Before - public void setUp() { + @BeforeEach + void setUp() { dataSource = new DiskFailoverDataSource(); } @Test - public void testGetSwitchWithNonExistFailoverSwitchFile() { + void testGetSwitchWithNonExistFailoverSwitchFile() { FailoverSwitch actual = dataSource.getSwitch(); assertFalse(actual.getEnabled()); } @Test - public void testGetSwitchForFailoverDisabled() throws NoSuchFieldException, IllegalAccessException { - String dir = DiskCacheTest.class.getResource("/").getPath() + "/failover_test/disabled"; + void testGetSwitchForFailoverDisabled() throws NoSuchFieldException, IllegalAccessException { + String dir = DiskFailoverDataSourceTest.class.getResource("/").getPath() + "/failover_test/disabled"; injectFailOverDir(dir); assertFalse(dataSource.getSwitch().getEnabled()); Map actual = dataSource.getFailoverData(); @@ -55,8 +54,8 @@ public void testGetSwitchForFailoverDisabled() throws NoSuchFieldException, Ille } @Test - public void testGetSwitchForFailoverEnabled() throws NoSuchFieldException, IllegalAccessException { - String dir = DiskCacheTest.class.getResource("/").getPath() + "/failover_test/enabled"; + void testGetSwitchForFailoverEnabled() throws NoSuchFieldException, IllegalAccessException { + String dir = DiskFailoverDataSourceTest.class.getResource("/").getPath() + "/failover_test/enabled"; injectFailOverDir(dir); assertTrue(dataSource.getSwitch().getEnabled()); Map actual = dataSource.getFailoverData(); @@ -68,7 +67,7 @@ public void testGetSwitchForFailoverEnabled() throws NoSuchFieldException, Illeg } @Test - public void testGetFailoverDataForFailoverDisabled() { + void testGetFailoverDataForFailoverDisabled() { Map actual = dataSource.getFailoverData(); assertTrue(actual.isEmpty()); } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/cache/DiskCacheTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/cache/DiskCacheTest.java index e6f638ef767..a99fdda69de 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/cache/DiskCacheTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/cache/DiskCacheTest.java @@ -18,10 +18,9 @@ import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ServiceInfo; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.io.File; import java.io.UnsupportedEncodingException; @@ -29,11 +28,12 @@ import java.util.List; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; -public class DiskCacheTest { +class DiskCacheTest { private static final String CACHE_DIR = DiskCacheTest.class.getResource("/").getPath() + "cache/"; @@ -41,8 +41,8 @@ public class DiskCacheTest { private Instance instance; - @Before - public void setUp() { + @BeforeEach + void setUp() { System.out.println(CACHE_DIR); serviceInfo = new ServiceInfo("G@@testName", "testClusters"); instance = new Instance(); @@ -54,8 +54,8 @@ public void setUp() { serviceInfo.setHosts(Collections.singletonList(instance)); } - @After - public void tearDown() { + @AfterEach + void tearDown() { File file = new File(CACHE_DIR); if (file.exists() && file.list().length > 0) { for (File each : file.listFiles()) { @@ -66,7 +66,7 @@ public void tearDown() { } @Test - public void testCache() { + void testCache() { DiskCache.write(serviceInfo, CACHE_DIR); Map actual = DiskCache.read(CACHE_DIR); assertEquals(1, actual.size()); @@ -75,7 +75,7 @@ public void testCache() { } @Test - public void testWriteCacheWithErrorPath() { + void testWriteCacheWithErrorPath() { File file = new File(CACHE_DIR, serviceInfo.getKeyEncoded()); try { file.mkdirs(); @@ -87,7 +87,7 @@ public void testWriteCacheWithErrorPath() { } @Test - public void testReadCacheForAllSituation() { + void testReadCacheForAllSituation() { String dir = DiskCacheTest.class.getResource("/").getPath() + "/disk_cache_test"; Map actual = DiskCache.read(dir); assertEquals(2, actual.size()); @@ -98,28 +98,32 @@ public void testReadCacheForAllSituation() { } @Test - public void testReadCacheForNullFile() { + void testReadCacheForNullFile() { Map actual = DiskCache.read(null); assertTrue(actual.isEmpty()); } @Test - public void testParseServiceInfoFromNonExistFile() throws UnsupportedEncodingException { + void testParseServiceInfoFromNonExistFile() throws UnsupportedEncodingException { File file = new File("non%40%40exist%40%40file"); Map actual = DiskCache.parseServiceInfoFromCache(file); assertTrue(actual.isEmpty()); } - @Test(expected = IllegalStateException.class) - public void testCreateFileIfAbsentForDir() throws Throwable { - File file = mock(File.class); - DiskCache.createFileIfAbsent(file, true); + @Test + void testCreateFileIfAbsentForDir() throws Throwable { + assertThrows(IllegalStateException.class, () -> { + File file = mock(File.class); + DiskCache.createFileIfAbsent(file, true); + }); } - @Test(expected = IllegalStateException.class) - public void testCreateFileIfAbsentForFile() throws Throwable { - File file = mock(File.class); - DiskCache.createFileIfAbsent(file, false); + @Test + void testCreateFileIfAbsentForFile() throws Throwable { + assertThrows(IllegalStateException.class, () -> { + File file = mock(File.class); + DiskCache.createFileIfAbsent(file, false); + }); } private void assertServiceInfo(ServiceInfo actual, ServiceInfo expected) { @@ -148,8 +152,8 @@ private void assertInstance(Instance actual, Instance expected) { } @Test - public void testGetLineSeparator() { + void testGetLineSeparator() { String lineSeparator = DiskCache.getLineSeparator(); - Assert.assertTrue(lineSeparator.length() > 0); + assertTrue(lineSeparator.length() > 0); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolderTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolderTest.java index 9104cb8b0d8..ebfd6ec3c55 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolderTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/cache/ServiceInfoHolderTest.java @@ -24,46 +24,49 @@ import com.alibaba.nacos.api.naming.pojo.ServiceInfo; import com.alibaba.nacos.client.env.NacosClientProperties; import com.alibaba.nacos.client.naming.backups.FailoverReactor; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ScheduledExecutorService; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class ServiceInfoHolderTest { +class ServiceInfoHolderTest { NacosClientProperties nacosClientProperties; ServiceInfoHolder holder; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(); holder = new ServiceInfoHolder("aa", "scope-001", nacosClientProperties); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { } @Test - public void testGetServiceInfoMap() throws NoSuchFieldException, IllegalAccessException { - Assert.assertEquals(0, holder.getServiceInfoMap().size()); + void testGetServiceInfoMap() throws NoSuchFieldException, IllegalAccessException { + assertEquals(0, holder.getServiceInfoMap().size()); Field fieldNotifierEventScope = ServiceInfoHolder.class.getDeclaredField("notifierEventScope"); fieldNotifierEventScope.setAccessible(true); - Assert.assertEquals("scope-001", fieldNotifierEventScope.get(holder)); + assertEquals("scope-001", fieldNotifierEventScope.get(holder)); } @Test - public void testProcessServiceInfo() { + void testProcessServiceInfo() { ServiceInfo info = new ServiceInfo("a@@b@@c"); Instance instance1 = createInstance("1.1.1.1", 1); Instance instance2 = createInstance("1.1.1.2", 2); @@ -73,7 +76,7 @@ public void testProcessServiceInfo() { info.setHosts(hosts); ServiceInfo actual1 = holder.processServiceInfo(info); - Assert.assertEquals(info, actual1); + assertEquals(info, actual1); Instance newInstance1 = createInstance("1.1.1.1", 1); newInstance1.setWeight(2.0); @@ -85,7 +88,7 @@ public void testProcessServiceInfo() { info2.setHosts(hosts2); ServiceInfo actual2 = holder.processServiceInfo(info2); - Assert.assertEquals(info2, actual2); + assertEquals(info2, actual2); } private Instance createInstance(String ip, int port) { @@ -96,17 +99,17 @@ private Instance createInstance(String ip, int port) { } @Test - public void testProcessServiceInfo2() { + void testProcessServiceInfo2() { String json = "{\"groupName\":\"a\",\"name\":\"b\",\"clusters\":\"c\"}"; ServiceInfo actual = holder.processServiceInfo(json); ServiceInfo expect = new ServiceInfo("a@@b@@c"); expect.setJsonFromServer(json); - Assert.assertEquals(expect.getKey(), actual.getKey()); + assertEquals(expect.getKey(), actual.getKey()); } @Test - public void testProcessServiceInfoWithPushEmpty() throws NacosException { + void testProcessServiceInfoWithPushEmpty() throws NacosException { ServiceInfo oldInfo = new ServiceInfo("a@@b@@c"); Instance instance1 = createInstance("1.1.1.1", 1); Instance instance2 = createInstance("1.1.1.2", 2); @@ -124,17 +127,17 @@ public void testProcessServiceInfoWithPushEmpty() throws NacosException { final ServiceInfo actual = holder.processServiceInfo(newInfo); - Assert.assertEquals(oldInfo.getKey(), actual.getKey()); - Assert.assertEquals(2, actual.getHosts().size()); + assertEquals(oldInfo.getKey(), actual.getKey()); + assertEquals(2, actual.getHosts().size()); } @Test - public void testProcessNullServiceInfo() { - Assert.assertNull(holder.processServiceInfo(new ServiceInfo())); + void testProcessNullServiceInfo() { + assertNull(holder.processServiceInfo(new ServiceInfo())); } @Test - public void testProcessServiceInfoForOlder() { + void testProcessServiceInfoForOlder() { ServiceInfo info = new ServiceInfo("a@@b@@c"); Instance instance1 = createInstance("1.1.1.1", 1); Instance instance2 = createInstance("1.1.1.2", 2); @@ -147,11 +150,11 @@ public void testProcessServiceInfoForOlder() { ServiceInfo olderInfo = new ServiceInfo("a@@b@@c"); olderInfo.setLastRefTime(0L); final ServiceInfo actual = holder.processServiceInfo(olderInfo); - Assert.assertEquals(olderInfo, actual); + assertEquals(olderInfo, actual); } @Test - public void testGetServiceInfo() { + void testGetServiceInfo() { ServiceInfo info = new ServiceInfo("a@@b@@c"); Instance instance1 = createInstance("1.1.1.1", 1); List hosts = new ArrayList<>(); @@ -163,47 +166,47 @@ public void testGetServiceInfo() { String groupName = "a"; String clusters = "c"; ServiceInfo actual = holder.getServiceInfo(serviceName, groupName, clusters); - Assert.assertEquals(expect.getKey(), actual.getKey()); - Assert.assertEquals(expect.getHosts().size(), actual.getHosts().size()); - Assert.assertEquals(expect.getHosts().get(0), actual.getHosts().get(0)); + assertEquals(expect.getKey(), actual.getKey()); + assertEquals(expect.getHosts().size(), actual.getHosts().size()); + assertEquals(expect.getHosts().get(0), actual.getHosts().get(0)); } @Test - public void testShutdown() throws NacosException, NoSuchFieldException, IllegalAccessException { + void testShutdown() throws NacosException, NoSuchFieldException, IllegalAccessException { Field field = ServiceInfoHolder.class.getDeclaredField("failoverReactor"); field.setAccessible(true); FailoverReactor reactor = (FailoverReactor) field.get(holder); Field executorService = FailoverReactor.class.getDeclaredField("executorService"); executorService.setAccessible(true); ScheduledExecutorService pool = (ScheduledExecutorService) executorService.get(reactor); - Assert.assertFalse(pool.isShutdown()); + assertFalse(pool.isShutdown()); holder.shutdown(); - Assert.assertTrue(pool.isShutdown()); + assertTrue(pool.isShutdown()); } @Test - public void testConstructWithCacheLoad() throws NacosException { + void testConstructWithCacheLoad() throws NacosException { nacosClientProperties.setProperty(PropertyKeyConst.NAMING_LOAD_CACHE_AT_START, "true"); nacosClientProperties.setProperty(PropertyKeyConst.NAMING_CACHE_REGISTRY_DIR, "non-exist"); holder.shutdown(); holder = new ServiceInfoHolder("aa", "scope-001", nacosClientProperties); - Assert.assertEquals(System.getProperty("user.home") + "/nacos/non-exist/naming/aa", holder.getCacheDir()); - Assert.assertTrue(holder.getServiceInfoMap().isEmpty()); + assertEquals(System.getProperty("user.home") + "/nacos/non-exist/naming/aa", holder.getCacheDir()); + assertTrue(holder.getServiceInfoMap().isEmpty()); } @Test - public void testIsFailoverSwitch() throws IllegalAccessException, NoSuchFieldException, NacosException { + void testIsFailoverSwitch() throws IllegalAccessException, NoSuchFieldException, NacosException { FailoverReactor mock = injectMockFailoverReactor(); when(mock.isFailoverSwitch()).thenReturn(true); - Assert.assertTrue(holder.isFailoverSwitch()); + assertTrue(holder.isFailoverSwitch()); } @Test - public void testGetFailoverServiceInfo() throws IllegalAccessException, NoSuchFieldException, NacosException { + void testGetFailoverServiceInfo() throws IllegalAccessException, NoSuchFieldException, NacosException { FailoverReactor mock = injectMockFailoverReactor(); ServiceInfo serviceInfo = new ServiceInfo("a@@b@@c"); when(mock.getService("a@@b@@c")).thenReturn(serviceInfo); - Assert.assertEquals(serviceInfo, holder.getFailoverServiceInfo("b", "a", "c")); + assertEquals(serviceInfo, holder.getFailoverServiceInfo("b", "a", "c")); } private FailoverReactor injectMockFailoverReactor() diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/core/BalancerTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/core/BalancerTest.java index cc2801d2e91..a26652cfe3a 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/core/BalancerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/core/BalancerTest.java @@ -18,36 +18,35 @@ import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ServiceInfo; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; -public class BalancerTest { - - @Rule - public final ExpectedException thrown = ExpectedException.none(); +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class BalancerTest { @Test - public void testGetHostByRandomWeightNull() { - Assert.assertNull(Balancer.getHostByRandomWeight(null)); - Assert.assertNull(Balancer.getHostByRandomWeight(new ArrayList<>())); + void testGetHostByRandomWeightNull() { + assertNull(Balancer.getHostByRandomWeight(null)); + assertNull(Balancer.getHostByRandomWeight(new ArrayList<>())); } @Test - public void testGetHostByRandomWeight() { + void testGetHostByRandomWeight() { List list = new ArrayList<>(); Instance instance1 = new Instance(); list.add(instance1); final Instance actual = Balancer.getHostByRandomWeight(list); - Assert.assertEquals(instance1, actual); + assertEquals(instance1, actual); } @Test - public void testSelectHost() { + void testSelectHost() { List hosts = new ArrayList<>(); Instance instance1 = new Instance(); hosts.add(instance1); @@ -55,15 +54,16 @@ public void testSelectHost() { serviceInfo.setHosts(hosts); final Instance actual = Balancer.RandomByWeight.selectHost(serviceInfo); - Assert.assertEquals(instance1, actual); + assertEquals(instance1, actual); } @Test - public void testSelectHostEmpty() { - thrown.expect(IllegalStateException.class); - thrown.expectMessage("no host to srv for serviceInfo: null"); - ServiceInfo serviceInfo = new ServiceInfo(); - - Balancer.RandomByWeight.selectHost(serviceInfo); + void testSelectHostEmpty() { + Throwable exception = assertThrows(IllegalStateException.class, () -> { + ServiceInfo serviceInfo = new ServiceInfo(); + + Balancer.RandomByWeight.selectHost(serviceInfo); + }); + assertTrue(exception.getMessage().contains("no host to srv for serviceInfo: null")); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/core/ProtectModeTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/core/ProtectModeTest.java index 3954d84c808..23951d6d5ff 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/core/ProtectModeTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/core/ProtectModeTest.java @@ -16,22 +16,23 @@ package com.alibaba.nacos.client.naming.core; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class ProtectModeTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class ProtectModeTest { @Test - public void testProtectThresholdDefault() { + void testProtectThresholdDefault() { final ProtectMode protectMode = new ProtectMode(); - Assert.assertEquals(0.8f, protectMode.getProtectThreshold(), 0.01f); + assertEquals(0.8f, protectMode.getProtectThreshold(), 0.01f); } @Test - public void testSetProtectThreshold() { + void testSetProtectThreshold() { final ProtectMode protectMode = new ProtectMode(); float expect = 0.7f; protectMode.setProtectThreshold(expect); - Assert.assertEquals(expect, protectMode.getProtectThreshold(), 0.01f); + assertEquals(expect, protectMode.getProtectThreshold(), 0.01f); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/core/ServerListManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/core/ServerListManagerTest.java index 4dbeb9deeec..3fadc114998 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/core/ServerListManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/core/ServerListManagerTest.java @@ -22,14 +22,16 @@ import com.alibaba.nacos.common.http.HttpClientBeanHolder; import com.alibaba.nacos.common.http.HttpRestResult; import com.alibaba.nacos.common.http.client.NacosRestTemplate; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.io.IOException; import java.lang.reflect.Field; @@ -39,11 +41,16 @@ import java.util.Map; import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; -@RunWith(MockitoJUnitRunner.class) -public class ServerListManagerTest { +@ExtendWith(MockitoExtension.class) +// todo remove strictness lenient +@MockitoSettings(strictness = Strictness.LENIENT) +class ServerListManagerTest { private static final String NS = "ns"; @@ -58,14 +65,14 @@ public class ServerListManagerTest { ServerListManager serverListManager; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { clientProperties = NacosClientProperties.PROTOTYPE.derive(); Field restMapField = HttpClientBeanHolder.class.getDeclaredField("SINGLETON_REST"); restMapField.setAccessible(true); Map restMap = (Map) restMapField.get(null); - cachedNacosRestTemplate = restMap - .get("com.alibaba.nacos.client.naming.remote.http.NamingHttpClientManager$NamingHttpClientFactory"); + cachedNacosRestTemplate = restMap.get( + "com.alibaba.nacos.client.naming.remote.http.NamingHttpClientManager$NamingHttpClientFactory"); restMap.put("com.alibaba.nacos.client.naming.remote.http.NamingHttpClientManager$NamingHttpClientFactory", nacosRestTemplate); httpRestResult = new HttpRestResult<>(); @@ -74,8 +81,8 @@ public void setUp() throws Exception { Mockito.when(nacosRestTemplate.get(any(), any(), any(), any())).thenReturn(httpRestResult); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { if (null != cachedNacosRestTemplate) { Field restMapField = HttpClientBeanHolder.class.getDeclaredField("SINGLETON_REST"); restMapField.setAccessible(true); @@ -88,107 +95,109 @@ public void tearDown() throws Exception { } } - @Test(expected = NacosLoadException.class) - public void testConstructError() { - serverListManager = new ServerListManager(new Properties()); + @Test + void testConstructError() { + assertThrows(NacosLoadException.class, () -> { + serverListManager = new ServerListManager(new Properties()); + }); } @Test - public void testConstructWithAddr() { + void testConstructWithAddr() { Properties properties = new Properties(); properties.put(PropertyKeyConst.SERVER_ADDR, "127.0.0.1:8848,127.0.0.1:8849"); serverListManager = new ServerListManager(properties); final List serverList = serverListManager.getServerList(); - Assert.assertEquals(2, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); - Assert.assertEquals("127.0.0.1:8849", serverList.get(1)); + assertEquals(2, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals("127.0.0.1:8849", serverList.get(1)); } @Test - public void testConstructWithAddrTryToRefresh() + void testConstructWithAddrTryToRefresh() throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, NoSuchFieldException { Properties properties = new Properties(); properties.put(PropertyKeyConst.SERVER_ADDR, "127.0.0.1:8848,127.0.0.1:8849"); serverListManager = new ServerListManager(properties); List serverList = serverListManager.getServerList(); - Assert.assertEquals(2, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); - Assert.assertEquals("127.0.0.1:8849", serverList.get(1)); + assertEquals(2, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals("127.0.0.1:8849", serverList.get(1)); mockThreadInvoke(serverListManager, false); serverList = serverListManager.getServerList(); - Assert.assertEquals(2, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); - Assert.assertEquals("127.0.0.1:8849", serverList.get(1)); + assertEquals(2, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals("127.0.0.1:8849", serverList.get(1)); } @Test - public void testConstructWithEndpointAndRefresh() throws Exception { + void testConstructWithEndpointAndRefresh() throws Exception { Properties properties = new Properties(); properties.put(PropertyKeyConst.ENDPOINT, "127.0.0.1"); serverListManager = new ServerListManager(properties); List serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); httpRestResult.setData("127.0.0.1:8848\n127.0.0.1:8948"); mockThreadInvoke(serverListManager, true); serverList = serverListManager.getServerList(); - Assert.assertEquals(2, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); - Assert.assertEquals("127.0.0.1:8948", serverList.get(1)); + assertEquals(2, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals("127.0.0.1:8948", serverList.get(1)); } @Test - public void testConstructWithEndpointAndTimedNotNeedRefresh() throws Exception { + void testConstructWithEndpointAndTimedNotNeedRefresh() throws Exception { Properties properties = new Properties(); properties.put(PropertyKeyConst.ENDPOINT, "127.0.0.1"); serverListManager = new ServerListManager(properties); List serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); httpRestResult.setData("127.0.0.1:8848\n127.0.0.1:8948"); mockThreadInvoke(serverListManager, false); serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); } @Test - public void testConstructWithEndpointAndRefreshEmpty() throws Exception { + void testConstructWithEndpointAndRefreshEmpty() throws Exception { Properties properties = new Properties(); properties.put(PropertyKeyConst.ENDPOINT, "127.0.0.1"); serverListManager = new ServerListManager(properties); List serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); httpRestResult.setData(""); mockThreadInvoke(serverListManager, true); serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); } @Test - public void testConstructWithEndpointAndRefreshException() + void testConstructWithEndpointAndRefreshException() throws InvocationTargetException, NoSuchMethodException, IllegalAccessException, NoSuchFieldException { Properties properties = new Properties(); properties.put(PropertyKeyConst.ENDPOINT, "127.0.0.1"); serverListManager = new ServerListManager(properties); List serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); httpRestResult.setCode(500); mockThreadInvoke(serverListManager, true); serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); } @Test - public void testConstructWithEndpointWithCustomPathAndName() throws Exception { + void testConstructWithEndpointWithCustomPathAndName() throws Exception { clientProperties.setProperty(PropertyKeyConst.CONTEXT_PATH, "aaa"); clientProperties.setProperty(PropertyKeyConst.CLUSTER_NAME, "bbb"); clientProperties.setProperty(PropertyKeyConst.ENDPOINT, "127.0.0.1"); @@ -197,12 +206,12 @@ public void testConstructWithEndpointWithCustomPathAndName() throws Exception { .thenReturn(httpRestResult); serverListManager = new ServerListManager(clientProperties, "test"); List serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); } @Test - public void testConstructWithEndpointWithEndpointPathAndName() throws Exception { + void testConstructWithEndpointWithEndpointPathAndName() throws Exception { clientProperties.setProperty(PropertyKeyConst.ENDPOINT_CONTEXT_PATH, "aaa"); clientProperties.setProperty(PropertyKeyConst.CLUSTER_NAME, "bbb"); clientProperties.setProperty(PropertyKeyConst.ENDPOINT, "127.0.0.1"); @@ -211,12 +220,12 @@ public void testConstructWithEndpointWithEndpointPathAndName() throws Exception .thenReturn(httpRestResult); serverListManager = new ServerListManager(clientProperties, "test"); List serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); } @Test - public void testConstructEndpointContextPathPriority() throws Exception { + void testConstructEndpointContextPathPriority() throws Exception { clientProperties.setProperty(PropertyKeyConst.ENDPOINT_CONTEXT_PATH, "aaa"); clientProperties.setProperty(PropertyKeyConst.CONTEXT_PATH, "bbb"); clientProperties.setProperty(PropertyKeyConst.CLUSTER_NAME, "ccc"); @@ -226,12 +235,12 @@ public void testConstructEndpointContextPathPriority() throws Exception { .thenReturn(httpRestResult); serverListManager = new ServerListManager(clientProperties, "test"); List serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); } @Test - public void testConstructEndpointContextPathIsEmpty() throws Exception { + void testConstructEndpointContextPathIsEmpty() throws Exception { clientProperties.setProperty(PropertyKeyConst.ENDPOINT_CONTEXT_PATH, ""); clientProperties.setProperty(PropertyKeyConst.CONTEXT_PATH, "bbb"); clientProperties.setProperty(PropertyKeyConst.CLUSTER_NAME, "ccc"); @@ -241,38 +250,36 @@ public void testConstructEndpointContextPathIsEmpty() throws Exception { .thenReturn(httpRestResult); serverListManager = new ServerListManager(clientProperties, "test"); List serverList = serverListManager.getServerList(); - Assert.assertEquals(1, serverList.size()); - Assert.assertEquals("127.0.0.1:8848", serverList.get(0)); + assertEquals(1, serverList.size()); + assertEquals("127.0.0.1:8848", serverList.get(0)); } @Test - public void testIsDomain() throws IOException { + void testIsDomain() throws IOException { Properties properties = new Properties(); properties.put(PropertyKeyConst.SERVER_ADDR, "127.0.0.1:8848"); serverListManager = new ServerListManager(properties); - Assert.assertTrue(serverListManager.isDomain()); - Assert.assertEquals("127.0.0.1:8848", serverListManager.getNacosDomain()); + assertTrue(serverListManager.isDomain()); + assertEquals("127.0.0.1:8848", serverListManager.getNacosDomain()); } @Test - public void testGetCurrentServer() { + void testGetCurrentServer() { Properties properties = new Properties(); properties.put(PropertyKeyConst.SERVER_ADDR, "127.0.0.1:8848"); final ServerListManager serverListManager = new ServerListManager(properties); - Assert.assertEquals("127.0.0.1:8848", serverListManager.getCurrentServer()); - Assert.assertEquals("127.0.0.1:8848", serverListManager.genNextServer()); + assertEquals("127.0.0.1:8848", serverListManager.getCurrentServer()); + assertEquals("127.0.0.1:8848", serverListManager.genNextServer()); } @Test - public void testShutdown() { + void testShutdown() { Properties properties = new Properties(); properties.put(PropertyKeyConst.SERVER_ADDR, "127.0.0.1:8848"); final ServerListManager serverListManager = new ServerListManager(properties); - try { + Assertions.assertDoesNotThrow(() -> { serverListManager.shutdown(); - } catch (Exception e) { - Assert.fail(); - } + }); } private void mockThreadInvoke(ServerListManager serverListManager, boolean expectedInvoked) diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/core/ServiceInfoUpdateServiceTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/core/ServiceInfoUpdateServiceTest.java index aaffa64adb4..f6833d7d5ef 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/core/ServiceInfoUpdateServiceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/core/ServiceInfoUpdateServiceTest.java @@ -24,13 +24,15 @@ import com.alibaba.nacos.client.naming.cache.ServiceInfoHolder; import com.alibaba.nacos.client.naming.event.InstancesChangeNotifier; import com.alibaba.nacos.client.naming.remote.NamingClientProxy; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.lang.reflect.Field; import java.util.Collections; @@ -40,11 +42,13 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class ServiceInfoUpdateServiceTest { +@ExtendWith(MockitoExtension.class) +// todo remove strictness lenient +@MockitoSettings(strictness = Strictness.LENIENT) +class ServiceInfoUpdateServiceTest { String serviceName = "aa"; @@ -67,8 +71,8 @@ public class ServiceInfoUpdateServiceTest { ServiceInfoUpdateService serviceInfoUpdateService; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(); info = new ServiceInfo(); info.setName(serviceName); @@ -78,15 +82,15 @@ public void setUp() throws Exception { when(proxy.queryInstancesOfService(serviceName, group, clusters, false)).thenReturn(info); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { if (null != serviceInfoUpdateService) { serviceInfoUpdateService.shutdown(); } } @Test - public void testScheduleUpdateWithoutOpen() throws InterruptedException, NacosException { + void testScheduleUpdateWithoutOpen() throws InterruptedException, NacosException { serviceInfoUpdateService = new ServiceInfoUpdateService(null, holder, proxy, notifier); serviceInfoUpdateService.scheduleUpdateIfAbsent(serviceName, group, clusters); TimeUnit.MILLISECONDS.sleep(1500); @@ -94,7 +98,7 @@ public void testScheduleUpdateWithoutOpen() throws InterruptedException, NacosEx } @Test - public void testScheduleUpdateIfAbsent() throws InterruptedException, NacosException { + void testScheduleUpdateIfAbsent() throws InterruptedException, NacosException { info.setCacheMillis(10000L); nacosClientProperties.setProperty(PropertyKeyConst.NAMING_ASYNC_QUERY_SUBSCRIBE_SERVICE, "true"); serviceInfoUpdateService = new ServiceInfoUpdateService(nacosClientProperties, holder, proxy, notifier); @@ -104,7 +108,7 @@ public void testScheduleUpdateIfAbsent() throws InterruptedException, NacosExcep } @Test - public void testScheduleUpdateIfAbsentDuplicate() throws InterruptedException, NacosException { + void testScheduleUpdateIfAbsentDuplicate() throws InterruptedException, NacosException { info.setCacheMillis(10000L); nacosClientProperties.setProperty(PropertyKeyConst.NAMING_ASYNC_QUERY_SUBSCRIBE_SERVICE, "true"); serviceInfoUpdateService = new ServiceInfoUpdateService(nacosClientProperties, holder, proxy, notifier); @@ -116,7 +120,7 @@ public void testScheduleUpdateIfAbsentDuplicate() throws InterruptedException, N } @Test - public void testScheduleUpdateIfAbsentUpdateOlder() throws InterruptedException, NacosException { + void testScheduleUpdateIfAbsentUpdateOlder() throws InterruptedException, NacosException { info.setCacheMillis(10000L); nacosClientProperties.setProperty(PropertyKeyConst.NAMING_ASYNC_QUERY_SUBSCRIBE_SERVICE, "true"); serviceInfoUpdateService = new ServiceInfoUpdateService(nacosClientProperties, holder, proxy, notifier); @@ -129,7 +133,7 @@ public void testScheduleUpdateIfAbsentUpdateOlder() throws InterruptedException, } @Test - public void testScheduleUpdateIfAbsentUpdateOlderWithInstance() throws InterruptedException, NacosException { + void testScheduleUpdateIfAbsentUpdateOlderWithInstance() throws InterruptedException, NacosException { info.setCacheMillis(10000L); nacosClientProperties.setProperty(PropertyKeyConst.NAMING_ASYNC_QUERY_SUBSCRIBE_SERVICE, "true"); serviceInfoUpdateService = new ServiceInfoUpdateService(nacosClientProperties, holder, proxy, notifier); @@ -143,43 +147,43 @@ public void testScheduleUpdateIfAbsentUpdateOlderWithInstance() throws Interrupt } @Test - public void testScheduleUpdateIfAbsentWith403Exception() + void testScheduleUpdateIfAbsentWith403Exception() throws InterruptedException, NacosException, NoSuchFieldException, IllegalAccessException { nacosClientProperties.setProperty(PropertyKeyConst.NAMING_ASYNC_QUERY_SUBSCRIBE_SERVICE, "true"); serviceInfoUpdateService = new ServiceInfoUpdateService(nacosClientProperties, holder, proxy, notifier); serviceInfoUpdateService.scheduleUpdateIfAbsent(serviceName, group, clusters); - when(proxy.queryInstancesOfService(serviceName, group, clusters, false)) - .thenThrow(new NacosException(403, "test")); + when(proxy.queryInstancesOfService(serviceName, group, clusters, false)).thenThrow( + new NacosException(403, "test")); TimeUnit.MILLISECONDS.sleep(1500); assertTrue(getScheduleFuture().getDelay(TimeUnit.MILLISECONDS) > 1000); } @Test - public void testScheduleUpdateIfAbsentWith500Exception() + void testScheduleUpdateIfAbsentWith500Exception() throws InterruptedException, NacosException, NoSuchFieldException, IllegalAccessException { nacosClientProperties.setProperty(PropertyKeyConst.NAMING_ASYNC_QUERY_SUBSCRIBE_SERVICE, "true"); serviceInfoUpdateService = new ServiceInfoUpdateService(nacosClientProperties, holder, proxy, notifier); serviceInfoUpdateService.scheduleUpdateIfAbsent(serviceName, group, clusters); - when(proxy.queryInstancesOfService(serviceName, group, clusters, false)) - .thenThrow(new NacosException(500, "test")); + when(proxy.queryInstancesOfService(serviceName, group, clusters, false)).thenThrow( + new NacosException(500, "test")); TimeUnit.MILLISECONDS.sleep(1500); assertTrue(getScheduleFuture().getDelay(TimeUnit.MILLISECONDS) > 2000); } @Test - public void testScheduleUpdateIfAbsentWithOtherException() + void testScheduleUpdateIfAbsentWithOtherException() throws InterruptedException, NacosException, NoSuchFieldException, IllegalAccessException { nacosClientProperties.setProperty(PropertyKeyConst.NAMING_ASYNC_QUERY_SUBSCRIBE_SERVICE, "true"); serviceInfoUpdateService = new ServiceInfoUpdateService(nacosClientProperties, holder, proxy, notifier); serviceInfoUpdateService.scheduleUpdateIfAbsent(serviceName, group, clusters); - when(proxy.queryInstancesOfService(serviceName, group, clusters, false)) - .thenThrow(new RuntimeException("test")); + when(proxy.queryInstancesOfService(serviceName, group, clusters, false)).thenThrow( + new RuntimeException("test")); TimeUnit.MILLISECONDS.sleep(1500); assertTrue(getScheduleFuture().getDelay(TimeUnit.MILLISECONDS) > 1000); } @Test - public void testStopScheduleUpdateIfAbsent() throws InterruptedException, NacosException { + void testStopScheduleUpdateIfAbsent() throws InterruptedException, NacosException { info.setCacheMillis(10000L); nacosClientProperties.setProperty(PropertyKeyConst.NAMING_ASYNC_QUERY_SUBSCRIBE_SERVICE, "true"); serviceInfoUpdateService = new ServiceInfoUpdateService(nacosClientProperties, holder, proxy, notifier); @@ -190,7 +194,7 @@ public void testStopScheduleUpdateIfAbsent() throws InterruptedException, NacosE } @Test - public void testStopUpdateIfContainWithoutOpen() throws NacosException, InterruptedException { + void testStopUpdateIfContainWithoutOpen() throws NacosException, InterruptedException { serviceInfoUpdateService = new ServiceInfoUpdateService(nacosClientProperties, holder, proxy, notifier); serviceInfoUpdateService.scheduleUpdateIfAbsent(serviceName, group, clusters); TimeUnit.MILLISECONDS.sleep(1500); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java index 17cdfff75c4..4f22b4af69b 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeEventTest.java @@ -17,16 +17,17 @@ package com.alibaba.nacos.client.naming.event; import com.alibaba.nacos.api.naming.pojo.Instance; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; -public class InstancesChangeEventTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class InstancesChangeEventTest { @Test - public void testGetServiceName() { + void testGetServiceName() { String eventScope = "scope-001"; String serviceName = "a"; String groupName = "b"; @@ -35,12 +36,12 @@ public void testGetServiceName() { Instance ins = new Instance(); hosts.add(ins); InstancesChangeEvent event = new InstancesChangeEvent(eventScope, serviceName, groupName, clusters, hosts); - Assert.assertEquals(eventScope, event.scope()); - Assert.assertEquals(serviceName, event.getServiceName()); - Assert.assertEquals(clusters, event.getClusters()); - Assert.assertEquals(groupName, event.getGroupName()); + assertEquals(eventScope, event.scope()); + assertEquals(serviceName, event.getServiceName()); + assertEquals(clusters, event.getClusters()); + assertEquals(groupName, event.getGroupName()); List hosts1 = event.getHosts(); - Assert.assertEquals(hosts.size(), hosts1.size()); - Assert.assertEquals(hosts.get(0), hosts1.get(0)); + assertEquals(hosts.size(), hosts1.size()); + assertEquals(hosts.get(0), hosts1.get(0)); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java index 858ac881336..b8eeb9496e4 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/event/InstancesChangeNotifierTest.java @@ -20,24 +20,26 @@ import com.alibaba.nacos.api.naming.listener.EventListener; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ServiceInfo; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Executor; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.when; -public class InstancesChangeNotifierTest { +class InstancesChangeNotifierTest { @Test - public void testRegisterListener() { + void testRegisterListener() { String eventScope = "scope-001"; String group = "a"; String name = "b"; @@ -46,20 +48,20 @@ public void testRegisterListener() { EventListener listener = Mockito.mock(EventListener.class); instancesChangeNotifier.registerListener(group, name, clusters, listener); List subscribeServices = instancesChangeNotifier.getSubscribeServices(); - Assert.assertEquals(1, subscribeServices.size()); - Assert.assertEquals(group, subscribeServices.get(0).getGroupName()); - Assert.assertEquals(name, subscribeServices.get(0).getName()); - Assert.assertEquals(clusters, subscribeServices.get(0).getClusters()); + assertEquals(1, subscribeServices.size()); + assertEquals(group, subscribeServices.get(0).getGroupName()); + assertEquals(name, subscribeServices.get(0).getName()); + assertEquals(clusters, subscribeServices.get(0).getClusters()); List hosts = new ArrayList<>(); Instance ins = new Instance(); hosts.add(ins); InstancesChangeEvent event = new InstancesChangeEvent(eventScope, name, group, clusters, hosts); - Assert.assertEquals(true, instancesChangeNotifier.scopeMatches(event)); + assertTrue(instancesChangeNotifier.scopeMatches(event)); } @Test - public void testDeregisterListener() { + void testDeregisterListener() { String eventScope = "scope-001"; String group = "a"; String name = "b"; @@ -68,33 +70,33 @@ public void testDeregisterListener() { EventListener listener = Mockito.mock(EventListener.class); instancesChangeNotifier.registerListener(group, name, clusters, listener); List subscribeServices = instancesChangeNotifier.getSubscribeServices(); - Assert.assertEquals(1, subscribeServices.size()); + assertEquals(1, subscribeServices.size()); instancesChangeNotifier.deregisterListener(group, name, clusters, listener); List subscribeServices2 = instancesChangeNotifier.getSubscribeServices(); - Assert.assertEquals(0, subscribeServices2.size()); + assertEquals(0, subscribeServices2.size()); instancesChangeNotifier.deregisterListener(group, name, clusters, listener); - Assert.assertEquals(0, subscribeServices2.size()); + assertEquals(0, subscribeServices2.size()); } @Test - public void testIsSubscribed() { + void testIsSubscribed() { String eventScope = "scope-001"; String group = "a"; String name = "b"; String clusters = "c"; InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); EventListener listener = Mockito.mock(EventListener.class); - Assert.assertFalse(instancesChangeNotifier.isSubscribed(group, name, clusters)); + assertFalse(instancesChangeNotifier.isSubscribed(group, name, clusters)); instancesChangeNotifier.registerListener(group, name, clusters, listener); - Assert.assertTrue(instancesChangeNotifier.isSubscribed(group, name, clusters)); + assertTrue(instancesChangeNotifier.isSubscribed(group, name, clusters)); } @Test - public void testOnEvent() { + void testOnEvent() { String eventScope = "scope-001"; String group = "a"; String name = "b"; @@ -113,7 +115,7 @@ public void testOnEvent() { } @Test - public void testOnEventWithoutListener() { + void testOnEventWithoutListener() { String eventScope = "scope-001"; String group = "a"; String name = "b"; @@ -130,7 +132,7 @@ public void testOnEventWithoutListener() { } @Test - public void testOnEventByExecutor() { + void testOnEventByExecutor() { String eventScope = "scope-001"; String group = "a"; String name = "b"; @@ -151,9 +153,9 @@ public void testOnEventByExecutor() { } @Test - public void testSubscribeType() { + void testSubscribeType() { String eventScope = "scope-001"; InstancesChangeNotifier instancesChangeNotifier = new InstancesChangeNotifier(eventScope); - Assert.assertEquals(InstancesChangeEvent.class, instancesChangeNotifier.subscribeType()); + assertEquals(InstancesChangeEvent.class, instancesChangeNotifier.subscribeType()); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxyTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxyTest.java index 22863f57d92..b2b60a68d30 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxyTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/AbstractNamingClientProxyTest.java @@ -31,21 +31,22 @@ import com.alibaba.nacos.client.utils.AppNameUtils; import com.alibaba.nacos.common.notify.Event; import com.alibaba.nacos.plugin.auth.api.RequestResource; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.HashMap; import java.util.List; import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class AbstractNamingClientProxyTest { +@ExtendWith(MockitoExtension.class) +class AbstractNamingClientProxyTest { @Mock private SecurityProxy sc; @@ -54,16 +55,16 @@ public class AbstractNamingClientProxyTest { * test get security headers for accessToken. */ @Test - public void testGetSecurityHeadersForAccessToken() { + void testGetSecurityHeadersForAccessToken() { AbstractNamingClientProxy proxy = new MockNamingClientProxy(sc); String token = "aa"; Map keyMap = new HashMap<>(); keyMap.put(Constants.ACCESS_TOKEN, token); when(sc.getIdentityContext(any(RequestResource.class))).thenReturn(keyMap); Map securityHeaders = proxy.getSecurityHeaders("", "", ""); - Assert.assertEquals(2, securityHeaders.size()); - Assert.assertEquals(token, securityHeaders.get(Constants.ACCESS_TOKEN)); - Assert.assertEquals(AppNameUtils.getAppName(), securityHeaders.get("app")); + assertEquals(2, securityHeaders.size()); + assertEquals(token, securityHeaders.get(Constants.ACCESS_TOKEN)); + assertEquals(AppNameUtils.getAppName(), securityHeaders.get("app")); } /** @@ -72,7 +73,7 @@ public void testGetSecurityHeadersForAccessToken() { * @throws Exception exception */ @Test - public void testGetSecurityHeadersForRam() throws Exception { + void testGetSecurityHeadersForRam() throws Exception { String ak = "aa"; String sk = "bb"; Map mockIdentityContext = new HashMap<>(); @@ -84,12 +85,12 @@ public void testGetSecurityHeadersForRam() throws Exception { when(sc.getIdentityContext(any(RequestResource.class))).thenReturn(mockIdentityContext); AbstractNamingClientProxy proxy = new MockNamingClientProxy(sc); Map spasHeaders = proxy.getSecurityHeaders("", "", serviceName); - Assert.assertEquals(4, spasHeaders.size()); - Assert.assertEquals(AppNameUtils.getAppName(), spasHeaders.get("app")); - Assert.assertEquals(ak, spasHeaders.get("ak")); - Assert.assertTrue(spasHeaders.get("data").endsWith("@@" + serviceName)); + assertEquals(4, spasHeaders.size()); + assertEquals(AppNameUtils.getAppName(), spasHeaders.get("app")); + assertEquals(ak, spasHeaders.get("ak")); + assertTrue(spasHeaders.get("data").endsWith("@@" + serviceName)); String expectSign = SignUtil.sign(spasHeaders.get("data"), sk); - Assert.assertEquals(expectSign, spasHeaders.get("signature")); + assertEquals(expectSign, spasHeaders.get("signature")); } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/NamingClientProxyDelegateTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/NamingClientProxyDelegateTest.java index d1074f93dc3..bdc3ac6cec1 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/NamingClientProxyDelegateTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/NamingClientProxyDelegateTest.java @@ -31,27 +31,31 @@ import com.alibaba.nacos.client.naming.event.InstancesChangeNotifier; import com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy; import com.alibaba.nacos.client.naming.remote.http.NamingHttpClientProxy; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class NamingClientProxyDelegateTest { +@ExtendWith(MockitoExtension.class) +class NamingClientProxyDelegateTest { private static final String TEST_NAMESPACE = "ns1"; @@ -67,8 +71,8 @@ public class NamingClientProxyDelegateTest { NacosClientProperties nacosClientProperties; - @Before - public void setUp() throws NacosException, NoSuchFieldException, IllegalAccessException { + @BeforeEach + void setUp() throws NacosException, NoSuchFieldException, IllegalAccessException { Properties props = new Properties(); props.setProperty("serverAddr", "localhost"); nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(props); @@ -79,13 +83,13 @@ public void setUp() throws NacosException, NoSuchFieldException, IllegalAccessEx grpcClientProxyField.set(delegate, mockGrpcClient); } - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { delegate.shutdown(); } @Test - public void testRegisterEphemeralServiceByGrpc() throws NacosException { + void testRegisterEphemeralServiceByGrpc() throws NacosException { String serviceName = "service1"; String groupName = "group1"; Instance instance = new Instance(); @@ -99,7 +103,7 @@ public void testRegisterEphemeralServiceByGrpc() throws NacosException { } @Test - public void testBatchRegisterServiceByGrpc() throws NacosException { + void testBatchRegisterServiceByGrpc() throws NacosException { String serviceName = "service1"; String groupName = "group1"; Instance instance = new Instance(); @@ -114,7 +118,7 @@ public void testBatchRegisterServiceByGrpc() throws NacosException { } @Test - public void testBatchDeregisterServiceByGrpc() throws NacosException { + void testBatchDeregisterServiceByGrpc() throws NacosException { String serviceName = "service1"; String groupName = "group1"; List instanceList = new ArrayList<>(); @@ -127,7 +131,7 @@ public void testBatchDeregisterServiceByGrpc() throws NacosException { } @Test - public void testRegisterPersistentServiceByGrpc() throws NacosException { + void testRegisterPersistentServiceByGrpc() throws NacosException { String serviceName = "service1"; String groupName = "group1"; Instance instance = new Instance(); @@ -138,15 +142,14 @@ public void testRegisterPersistentServiceByGrpc() throws NacosException { // persistent instance instance.setEphemeral(false); // when server support register persistent instance by grpc, will use grpc to register - when(mockGrpcClient.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)) - .thenReturn(true); + when(mockGrpcClient.isAbilitySupportedByServer( + AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)).thenReturn(true); delegate.registerService(serviceName, groupName, instance); verify(mockGrpcClient, times(1)).registerService(serviceName, groupName, instance); } @Test - public void testRegisterPersistentServiceByHttp() - throws NacosException, NoSuchFieldException, IllegalAccessException { + void testRegisterPersistentServiceByHttp() throws NacosException, NoSuchFieldException, IllegalAccessException { NamingHttpClientProxy mockHttpClient = Mockito.mock(NamingHttpClientProxy.class); Field mockHttpClientField = NamingClientProxyDelegate.class.getDeclaredField("httpClientProxy"); mockHttpClientField.setAccessible(true); @@ -167,7 +170,7 @@ public void testRegisterPersistentServiceByHttp() } @Test - public void testDeregisterEphemeralServiceGrpc() throws NacosException { + void testDeregisterEphemeralServiceGrpc() throws NacosException { String serviceName = "service1"; String groupName = "group1"; Instance instance = new Instance(); @@ -182,7 +185,7 @@ public void testDeregisterEphemeralServiceGrpc() throws NacosException { } @Test - public void testDeregisterPersistentServiceGrpc() throws NacosException { + void testDeregisterPersistentServiceGrpc() throws NacosException { String serviceName = "service1"; String groupName = "group1"; Instance instance = new Instance(); @@ -193,15 +196,14 @@ public void testDeregisterPersistentServiceGrpc() throws NacosException { // persistent instance instance.setEphemeral(false); // when server support deregister persistent instance by grpc, will use grpc to deregister - when(mockGrpcClient.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)) - .thenReturn(true); + when(mockGrpcClient.isAbilitySupportedByServer( + AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)).thenReturn(true); delegate.deregisterService(serviceName, groupName, instance); verify(mockGrpcClient, times(1)).deregisterService(serviceName, groupName, instance); } @Test - public void testDeregisterPersistentServiceHttp() - throws NacosException, NoSuchFieldException, IllegalAccessException { + void testDeregisterPersistentServiceHttp() throws NacosException, NoSuchFieldException, IllegalAccessException { NamingHttpClientProxy mockHttpClient = Mockito.mock(NamingHttpClientProxy.class); Field mockHttpClientField = NamingClientProxyDelegate.class.getDeclaredField("httpClientProxy"); mockHttpClientField.setAccessible(true); @@ -221,19 +223,17 @@ public void testDeregisterPersistentServiceHttp() } @Test - public void testUpdateInstance() { + void testUpdateInstance() { String serviceName = "service1"; String groupName = "group1"; Instance instance = new Instance(); - try { + Assertions.assertDoesNotThrow(() -> { delegate.updateInstance(serviceName, groupName, instance); - } catch (Exception e) { - Assert.fail(); - } + }); } @Test - public void testQueryInstancesOfService() throws NacosException { + void testQueryInstancesOfService() throws NacosException { String serviceName = "service1"; String groupName = "group1"; String clusters = "cluster1"; @@ -242,38 +242,34 @@ public void testQueryInstancesOfService() throws NacosException { } @Test - public void testQueryService() throws NacosException { + void testQueryService() throws NacosException { Service service = delegate.queryService("a", "b"); - Assert.assertNull(service); + assertNull(service); } @Test - public void testCreateService() { + void testCreateService() { Service service = new Service(); - try { + Assertions.assertDoesNotThrow(() -> { delegate.createService(service, new NoneSelector()); - } catch (Exception e) { - Assert.fail(); - } + }); } @Test - public void testDeleteService() throws NacosException { - Assert.assertFalse(delegate.deleteService("service", "group1")); + void testDeleteService() throws NacosException { + assertFalse(delegate.deleteService("service", "group1")); } @Test - public void testUpdateService() { + void testUpdateService() { Service service = new Service(); - try { + Assertions.assertDoesNotThrow(() -> { delegate.updateService(service, new ExpressionSelector()); - } catch (Exception e) { - Assert.fail(); - } + }); } @Test - public void testGetServiceList() throws NacosException { + void testGetServiceList() throws NacosException { AbstractSelector selector = new ExpressionSelector(); int pageNo = 1; int pageSize = 10; @@ -284,7 +280,7 @@ public void testGetServiceList() throws NacosException { } @Test - public void testSubscribe() throws NacosException { + void testSubscribe() throws NacosException { String serviceName = "service1"; String groupName = "group1"; String clusters = "cluster1"; @@ -295,14 +291,14 @@ public void testSubscribe() throws NacosException { when(mockGrpcClient.subscribe(serviceName, groupName, clusters)).thenReturn(info); ServiceInfo actual = delegate.subscribe(serviceName, groupName, clusters); - Assert.assertEquals(info, actual); + assertEquals(info, actual); verify(mockGrpcClient, times(1)).subscribe(serviceName, groupName, clusters); verify(holder, times(1)).processServiceInfo(info); } @Test - public void testUnsubscribe() throws NacosException { + void testUnsubscribe() throws NacosException { String serviceName = "service1"; String groupName = "group1"; String clusters = "cluster1"; @@ -311,23 +307,23 @@ public void testUnsubscribe() throws NacosException { } @Test - public void testServerHealthy() { + void testServerHealthy() { Mockito.when(mockGrpcClient.serverHealthy()).thenReturn(true); - Assert.assertTrue(delegate.serverHealthy()); + assertTrue(delegate.serverHealthy()); } @Test - public void testIsSubscribed() throws NacosException { + void testIsSubscribed() throws NacosException { String serviceName = "service1"; String groupName = "group1"; String clusters = "cluster1"; - Assert.assertFalse(delegate.isSubscribed(serviceName, groupName, clusters)); + assertFalse(delegate.isSubscribed(serviceName, groupName, clusters)); when(mockGrpcClient.isSubscribed(serviceName, groupName, clusters)).thenReturn(true); - Assert.assertTrue(delegate.isSubscribed(serviceName, groupName, clusters)); + assertTrue(delegate.isSubscribed(serviceName, groupName, clusters)); } @Test - public void testShutdown() throws NacosException { + void testShutdown() throws NacosException { delegate.shutdown(); verify(mockGrpcClient, times(1)).shutdown(); } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxyTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxyTest.java index 901d6d4a7b2..18b7f6ef3a1 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxyTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/NamingGrpcClientProxyTest.java @@ -60,16 +60,15 @@ import com.alibaba.nacos.common.remote.client.grpc.GrpcClient; import com.alibaba.nacos.common.remote.client.grpc.GrpcClientConfig; import com.alibaba.nacos.common.remote.client.grpc.GrpcConstants; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.lang.reflect.Field; import java.util.ArrayList; @@ -83,8 +82,13 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.doThrow; @@ -92,11 +96,10 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class NamingGrpcClientProxyTest { - - @Rule - public ExpectedException expectedException = ExpectedException.none(); +@ExtendWith(MockitoExtension.class) +// todo remove strictness lenient +@MockitoSettings(strictness = Strictness.LENIENT) +class NamingGrpcClientProxyTest { private static final String NAMESPACE_ID = "ns1"; @@ -132,11 +135,8 @@ public class NamingGrpcClientProxyTest { private String uuid; - @Rule - public final ExpectedException thrown = ExpectedException.none(); - - @Before - public void setUp() throws NacosException, NoSuchFieldException, IllegalAccessException { + @BeforeEach + void setUp() throws NacosException, NoSuchFieldException, IllegalAccessException { System.setProperty(GrpcConstants.GRPC_RETRY_TIMES, "1"); System.setProperty(GrpcConstants.GRPC_SERVER_CHECK_TIMEOUT, "100"); List serverList = Stream.of(ORIGIN_SERVER, "anotherServer").collect(Collectors.toList()); @@ -151,7 +151,7 @@ public void setUp() throws NacosException, NoSuchFieldException, IllegalAccessEx uuidField.setAccessible(true); uuid = (String) uuidField.get(client); - Assert.assertNotNull(RpcClientFactory.getClient(uuid)); + assertNotNull(RpcClientFactory.getClient(uuid)); Field rpcClientField = NamingGrpcClientProxy.class.getDeclaredField("rpcClient"); rpcClientField.setAccessible(true); ((RpcClient) rpcClientField.get(client)).shutdown(); @@ -171,15 +171,15 @@ public void setUp() throws NacosException, NoSuchFieldException, IllegalAccessEx persistentInstance.setEphemeral(false); } - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { System.clearProperty(GrpcConstants.GRPC_RETRY_TIMES); System.clearProperty(GrpcConstants.GRPC_SERVER_CHECK_TIMEOUT); client.shutdown(); } @Test - public void testRegisterService() throws NacosException { + void testRegisterService() throws NacosException { client.registerService(SERVICE_NAME, GROUP_NAME, instance); verify(this.rpcClient, times(1)).request(argThat(request -> { if (request instanceof InstanceRequest) { @@ -191,7 +191,7 @@ public void testRegisterService() throws NacosException { } @Test - public void testRegisterPersistentService() throws NacosException { + void testRegisterPersistentService() throws NacosException { client.registerService(SERVICE_NAME, GROUP_NAME, persistentInstance); verify(this.rpcClient, times(1)).request(argThat(request -> { if (request instanceof PersistentInstanceRequest) { @@ -203,39 +203,41 @@ public void testRegisterPersistentService() throws NacosException { } @Test - public void testRegisterServiceThrowsNacosException() throws NacosException { - expectedException.expect(NacosException.class); - expectedException.expectMessage("err args"); - - when(this.rpcClient.request(Mockito.any())).thenReturn(ErrorResponse.build(400, "err args")); - - try { - client.registerService(SERVICE_NAME, GROUP_NAME, instance); - } catch (NacosException ex) { - Assert.assertNull(ex.getCause()); + void testRegisterServiceThrowsNacosException() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { - throw ex; - } + when(this.rpcClient.request(Mockito.any())).thenReturn(ErrorResponse.build(400, "err args")); + + try { + client.registerService(SERVICE_NAME, GROUP_NAME, instance); + } catch (NacosException ex) { + assertNull(ex.getCause()); + + throw ex; + } + }); + assertTrue(exception.getMessage().contains("err args")); } @Test - public void testRegisterServiceThrowsException() throws NacosException { - expectedException.expect(NacosException.class); - expectedException.expectMessage("Request nacos server failed: "); - - when(this.rpcClient.request(Mockito.any())).thenReturn(null); - - try { - client.registerService(SERVICE_NAME, GROUP_NAME, instance); - } catch (NacosException ex) { - Assert.assertEquals(NullPointerException.class, ex.getCause().getClass()); + void testRegisterServiceThrowsException() throws NacosException { + Throwable exception = assertThrows(NacosException.class, () -> { - throw ex; - } + when(this.rpcClient.request(Mockito.any())).thenReturn(null); + + try { + client.registerService(SERVICE_NAME, GROUP_NAME, instance); + } catch (NacosException ex) { + assertEquals(NullPointerException.class, ex.getCause().getClass()); + + throw ex; + } + }); + assertTrue(exception.getMessage().contains("Request nacos server failed: ")); } @Test - public void testDeregisterService() throws NacosException { + void testDeregisterService() throws NacosException { client.deregisterService(SERVICE_NAME, GROUP_NAME, instance); verify(this.rpcClient, times(1)).request(argThat(request -> { if (request instanceof InstanceRequest) { @@ -247,7 +249,7 @@ public void testDeregisterService() throws NacosException { } @Test - public void testDeregisterPersistentService() throws NacosException { + void testDeregisterPersistentService() throws NacosException { client.deregisterService(SERVICE_NAME, GROUP_NAME, persistentInstance); verify(this.rpcClient, times(1)).request(argThat(request -> { if (request instanceof PersistentInstanceRequest) { @@ -259,7 +261,7 @@ public void testDeregisterPersistentService() throws NacosException { } @Test - public void testDeregisterServiceForBatchRegistered() throws NacosException { + void testDeregisterServiceForBatchRegistered() throws NacosException { try { List instanceList = new ArrayList<>(); instance.setHealthy(true); @@ -286,7 +288,7 @@ public void testDeregisterServiceForBatchRegistered() throws NacosException { } @Test - public void testBatchRegisterService() throws NacosException { + void testBatchRegisterService() throws NacosException { List instanceList = new ArrayList<>(); instance.setHealthy(true); instanceList.add(instance); @@ -303,42 +305,50 @@ public void testBatchRegisterService() throws NacosException { })); } - @Test(expected = NacosException.class) - public void testBatchDeregisterServiceWithEmptyInstances() throws NacosException { - client.batchDeregisterService(SERVICE_NAME, GROUP_NAME, Collections.EMPTY_LIST); + @Test + void testBatchDeregisterServiceWithEmptyInstances() throws NacosException { + assertThrows(NacosException.class, () -> { + client.batchDeregisterService(SERVICE_NAME, GROUP_NAME, Collections.EMPTY_LIST); + }); } - @Test(expected = NacosException.class) - public void testBatchDeregisterServiceWithoutCacheData() throws NacosException { - List instanceList = new ArrayList<>(); - instance.setHealthy(true); - instanceList.add(instance); - client.batchDeregisterService(SERVICE_NAME, GROUP_NAME, instanceList); + @Test + void testBatchDeregisterServiceWithoutCacheData() throws NacosException { + assertThrows(NacosException.class, () -> { + List instanceList = new ArrayList<>(); + instance.setHealthy(true); + instanceList.add(instance); + client.batchDeregisterService(SERVICE_NAME, GROUP_NAME, instanceList); + }); } - @Test(expected = NacosException.class) - public void testBatchDeregisterServiceNotBatchData() throws NacosException { - client.registerService(SERVICE_NAME, GROUP_NAME, instance); - List instanceList = new ArrayList<>(); - instance.setHealthy(true); - instanceList.add(instance); - client.batchDeregisterService(SERVICE_NAME, GROUP_NAME, instanceList); + @Test + void testBatchDeregisterServiceNotBatchData() throws NacosException { + assertThrows(NacosException.class, () -> { + client.registerService(SERVICE_NAME, GROUP_NAME, instance); + List instanceList = new ArrayList<>(); + instance.setHealthy(true); + instanceList.add(instance); + client.batchDeregisterService(SERVICE_NAME, GROUP_NAME, instanceList); + }); } - @Test(expected = NacosException.class) - public void testBatchDeregisterServiceWithEmptyBatchData() throws NacosException { - try { - client.batchRegisterService(SERVICE_NAME, GROUP_NAME, Collections.EMPTY_LIST); - } catch (Exception ignored) { - } - List instanceList = new ArrayList<>(); - instance.setHealthy(true); - instanceList.add(instance); - client.batchDeregisterService(SERVICE_NAME, GROUP_NAME, instanceList); + @Test + void testBatchDeregisterServiceWithEmptyBatchData() throws NacosException { + assertThrows(NacosException.class, () -> { + try { + client.batchRegisterService(SERVICE_NAME, GROUP_NAME, Collections.EMPTY_LIST); + } catch (Exception ignored) { + } + List instanceList = new ArrayList<>(); + instance.setHealthy(true); + instanceList.add(instance); + client.batchDeregisterService(SERVICE_NAME, GROUP_NAME, instanceList); + }); } @Test - public void testBatchDeregisterService() throws NacosException { + void testBatchDeregisterService() throws NacosException { try { List instanceList = new ArrayList<>(); instance.setHealthy(true); @@ -365,7 +375,7 @@ public void testBatchDeregisterService() throws NacosException { } @Test - public void testBatchDeregisterServiceWithOtherPortInstance() throws NacosException { + void testBatchDeregisterServiceWithOtherPortInstance() throws NacosException { try { List instanceList = new ArrayList<>(); instance.setHealthy(true); @@ -395,29 +405,29 @@ public void testBatchDeregisterServiceWithOtherPortInstance() throws NacosExcept } @Test - public void testUpdateInstance() throws Exception { + void testUpdateInstance() throws Exception { //TODO thrown.expect(UnsupportedOperationException.class); client.updateInstance(SERVICE_NAME, GROUP_NAME, instance); } @Test - public void testQueryInstancesOfService() throws Exception { + void testQueryInstancesOfService() throws Exception { QueryServiceResponse res = new QueryServiceResponse(); ServiceInfo info = new ServiceInfo(GROUP_NAME + "@@" + SERVICE_NAME + "@@" + CLUSTERS); res.setServiceInfo(info); when(this.rpcClient.request(any())).thenReturn(res); ServiceInfo actual = client.queryInstancesOfService(SERVICE_NAME, GROUP_NAME, CLUSTERS, false); - Assert.assertEquals(info, actual); + assertEquals(info, actual); } @Test - public void testQueryService() throws Exception { + void testQueryService() throws Exception { Service service = client.queryService(SERVICE_NAME, GROUP_NAME); - Assert.assertNull(service); + assertNull(service); } @Test - public void testCreateService() throws Exception { + void testCreateService() throws Exception { //TODO thrown.expect(UnsupportedOperationException.class); Service service = new Service(); AbstractSelector selector = new NoneSelector(); @@ -425,13 +435,13 @@ public void testCreateService() throws Exception { } @Test - public void testDeleteService() throws Exception { + void testDeleteService() throws Exception { //TODO thrown.expect(UnsupportedOperationException.class); assertFalse(client.deleteService(SERVICE_NAME, GROUP_NAME)); } @Test - public void testUpdateService() throws NacosException { + void testUpdateService() throws NacosException { //TODO thrown.expect(UnsupportedOperationException.class); Service service = new Service(); AbstractSelector selector = new NoneSelector(); @@ -439,7 +449,7 @@ public void testUpdateService() throws NacosException { } @Test - public void testGetServiceList() throws Exception { + void testGetServiceList() throws Exception { ServiceListResponse res = new ServiceListResponse(); List services = Arrays.asList("service1", "service2"); res.setServiceNames(services); @@ -447,12 +457,12 @@ public void testGetServiceList() throws Exception { when(this.rpcClient.request(any())).thenReturn(res); AbstractSelector selector = new NoneSelector(); ListView serviceList = client.getServiceList(1, 10, GROUP_NAME, selector); - Assert.assertEquals(5, serviceList.getCount()); - Assert.assertEquals(services, serviceList.getData()); + assertEquals(5, serviceList.getCount()); + assertEquals(services, serviceList.getData()); } @Test - public void testGetServiceListForLabelSelector() throws Exception { + void testGetServiceListForLabelSelector() throws Exception { ServiceListResponse res = new ServiceListResponse(); List services = Arrays.asList("service1", "service2"); res.setServiceNames(services); @@ -460,22 +470,22 @@ public void testGetServiceListForLabelSelector() throws Exception { when(this.rpcClient.request(any())).thenReturn(res); AbstractSelector selector = new ExpressionSelector(); ListView serviceList = client.getServiceList(1, 10, GROUP_NAME, selector); - Assert.assertEquals(5, serviceList.getCount()); - Assert.assertEquals(services, serviceList.getData()); + assertEquals(5, serviceList.getCount()); + assertEquals(services, serviceList.getData()); } @Test - public void testSubscribe() throws Exception { + void testSubscribe() throws Exception { SubscribeServiceResponse res = new SubscribeServiceResponse(); ServiceInfo info = new ServiceInfo(GROUP_NAME + "@@" + SERVICE_NAME + "@@" + CLUSTERS); res.setServiceInfo(info); when(this.rpcClient.request(any())).thenReturn(res); ServiceInfo actual = client.subscribe(SERVICE_NAME, GROUP_NAME, CLUSTERS); - Assert.assertEquals(info, actual); + assertEquals(info, actual); } @Test - public void testUnsubscribe() throws Exception { + void testUnsubscribe() throws Exception { SubscribeServiceResponse res = new SubscribeServiceResponse(); ServiceInfo info = new ServiceInfo(GROUP_NAME + "@@" + SERVICE_NAME + "@@" + CLUSTERS); res.setServiceInfo(info); @@ -486,16 +496,16 @@ public void testUnsubscribe() throws Exception { SubscribeServiceRequest request1 = (SubscribeServiceRequest) request; // verify request fields - return !request1.isSubscribe() && SERVICE_NAME.equals(request1.getServiceName()) && GROUP_NAME - .equals(request1.getGroupName()) && CLUSTERS.equals(request1.getClusters()) && NAMESPACE_ID - .equals(request1.getNamespace()); + return !request1.isSubscribe() && SERVICE_NAME.equals(request1.getServiceName()) && GROUP_NAME.equals( + request1.getGroupName()) && CLUSTERS.equals(request1.getClusters()) && NAMESPACE_ID.equals( + request1.getNamespace()); } return false; })); } @Test - public void testIsSubscribed() throws NacosException { + void testIsSubscribed() throws NacosException { SubscribeServiceResponse res = new SubscribeServiceResponse(); ServiceInfo info = new ServiceInfo(GROUP_NAME + "@@" + SERVICE_NAME + "@@" + CLUSTERS); res.setServiceInfo(info); @@ -506,53 +516,53 @@ public void testIsSubscribed() throws NacosException { } @Test - public void testServerHealthy() { + void testServerHealthy() { when(this.rpcClient.isRunning()).thenReturn(true); - Assert.assertTrue(client.serverHealthy()); + assertTrue(client.serverHealthy()); verify(this.rpcClient, times(1)).isRunning(); } @Test - public void testIsAbilitySupportedByServer1() { - when(this.rpcClient.getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)) - .thenReturn(AbilityStatus.SUPPORTED); - Assert.assertTrue(client.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); + void testIsAbilitySupportedByServer1() { + when(this.rpcClient.getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)).thenReturn( + AbilityStatus.SUPPORTED); + assertTrue(client.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); verify(this.rpcClient, times(1)).getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC); } @Test - public void testIsAbilitySupportedByServer2() { - when(this.rpcClient.getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)) - .thenReturn(AbilityStatus.NOT_SUPPORTED); - Assert.assertFalse(client.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); + void testIsAbilitySupportedByServer2() { + when(this.rpcClient.getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)).thenReturn( + AbilityStatus.NOT_SUPPORTED); + assertFalse(client.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); verify(this.rpcClient, times(1)).getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC); } @Test - public void testIsAbilitySupportedByServer3() { - when(this.rpcClient.getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)) - .thenReturn(AbilityStatus.UNKNOWN); - Assert.assertFalse(client.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); + void testIsAbilitySupportedByServer3() { + when(this.rpcClient.getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)).thenReturn( + AbilityStatus.UNKNOWN); + assertFalse(client.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); verify(this.rpcClient, times(1)).getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC); } @Test - public void testIsAbilitySupportedByServer4() { - when(this.rpcClient.getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)) - .thenReturn(null); - Assert.assertFalse(client.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); + void testIsAbilitySupportedByServer4() { + when(this.rpcClient.getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)).thenReturn( + null); + assertFalse(client.isAbilitySupportedByServer(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC)); verify(this.rpcClient, times(1)).getConnectionAbility(AbilityKey.SERVER_SUPPORT_PERSISTENT_INSTANCE_BY_GRPC); } @Test - public void testShutdown() throws Exception { + void testShutdown() throws Exception { client.shutdown(); - Assert.assertNull(RpcClientFactory.getClient(uuid)); + assertNull(RpcClientFactory.getClient(uuid)); //verify(this.rpcClient, times(1)).shutdown(); } @Test - public void testShutdownWithException() throws NoSuchFieldException, IllegalAccessException, NacosException { + void testShutdownWithException() throws NoSuchFieldException, IllegalAccessException, NacosException { Field field = RpcClientFactory.class.getDeclaredField("CLIENT_MAP"); field.setAccessible(true); Map map = (Map) field.get(RpcClientFactory.class); @@ -566,14 +576,14 @@ public void testShutdownWithException() throws NoSuchFieldException, IllegalAcce } @Test - public void testIsEnable() { + void testIsEnable() { when(this.rpcClient.isRunning()).thenReturn(true); - Assert.assertTrue(client.isEnable()); + assertTrue(client.isEnable()); verify(this.rpcClient, times(1)).isRunning(); } @Test - public void testServerListChanged() throws Exception { + void testServerListChanged() throws Exception { RpcClient rpc = new RpcClient(new RpcClientConfig() { @Override @@ -664,11 +674,11 @@ public void close() { while (!rpc.isRunning()) { TimeUnit.MILLISECONDS.sleep(200); if (--retry < 0) { - Assert.fail("rpc is not running"); + fail("rpc is not running"); } } - Assert.assertEquals(ORIGIN_SERVER, rpc.getCurrentServer().getServerIp()); + assertEquals(ORIGIN_SERVER, rpc.getCurrentServer().getServerIp()); String newServer = "www.aliyun.com"; when(factory.genNextServer()).thenReturn(newServer); @@ -679,15 +689,15 @@ public void close() { while (ORIGIN_SERVER.equals(rpc.getCurrentServer().getServerIp())) { TimeUnit.MILLISECONDS.sleep(200); if (--retry < 0) { - Assert.fail("failed to auth switch server"); + fail("failed to auth switch server"); } } - Assert.assertEquals(newServer, rpc.getCurrentServer().getServerIp()); + assertEquals(newServer, rpc.getCurrentServer().getServerIp()); } @Test - public void testConfigAppNameLabels() throws Exception { + void testConfigAppNameLabels() throws Exception { final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(prop); client = new NamingGrpcClientProxy(NAMESPACE_ID, proxy, factory, nacosClientProperties, holder); Field rpcClientField = NamingGrpcClientProxy.class.getDeclaredField("rpcClient"); @@ -697,6 +707,6 @@ public void testConfigAppNameLabels() throws Exception { clientConfig.setAccessible(true); GrpcClientConfig config = (GrpcClientConfig) clientConfig.get(rpcClient); String appName = config.labels().get(Constants.APPNAME); - Assert.assertNotNull(appName); + assertNotNull(appName); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/NamingPushRequestHandlerTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/NamingPushRequestHandlerTest.java index 791f3c5a540..341c26e1dcd 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/NamingPushRequestHandlerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/NamingPushRequestHandlerTest.java @@ -27,17 +27,18 @@ import com.alibaba.nacos.client.naming.cache.ServiceInfoHolder; import com.alibaba.nacos.client.naming.remote.TestConnection; import com.alibaba.nacos.common.remote.client.RpcClient; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -public class NamingPushRequestHandlerTest { +class NamingPushRequestHandlerTest { @Test - public void testRequestReply() { + void testRequestReply() { //given ServiceInfoHolder holder = mock(ServiceInfoHolder.class); NamingPushRequestHandler handler = new NamingPushRequestHandler(holder); @@ -46,15 +47,14 @@ public void testRequestReply() { //when Response response = handler.requestReply(req, new TestConnection(new RpcClient.ServerInfo())); //then - Assert.assertTrue(response instanceof NotifySubscriberResponse); + assertTrue(response instanceof NotifySubscriberResponse); verify(holder, times(1)).processServiceInfo(info); } @Test - public void testRequestReplyOtherType() { + void testRequestReplyOtherType() { ServiceInfoHolder holder = mock(ServiceInfoHolder.class); NamingPushRequestHandler handler = new NamingPushRequestHandler(holder); - Assert.assertNull( - handler.requestReply(new HealthCheckRequest(), new TestConnection(new RpcClient.ServerInfo()))); + assertNull(handler.requestReply(new HealthCheckRequest(), new TestConnection(new RpcClient.ServerInfo()))); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/NamingGrpcRedoServiceTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/NamingGrpcRedoServiceTest.java index 23681502af4..61c31fc51ef 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/NamingGrpcRedoServiceTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/NamingGrpcRedoServiceTest.java @@ -18,20 +18,20 @@ import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.api.naming.pojo.Instance; -import com.alibaba.nacos.client.naming.remote.TestConnection; import com.alibaba.nacos.client.env.NacosClientProperties; +import com.alibaba.nacos.client.naming.remote.TestConnection; import com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy; import com.alibaba.nacos.client.naming.remote.gprc.redo.data.BatchInstanceRedoData; import com.alibaba.nacos.client.naming.remote.gprc.redo.data.InstanceRedoData; import com.alibaba.nacos.client.naming.remote.gprc.redo.data.SubscriberRedoData; import com.alibaba.nacos.common.remote.client.RpcClient; import com.alibaba.nacos.common.utils.ReflectUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; import java.util.ArrayList; @@ -40,12 +40,12 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ScheduledExecutorService; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; -@RunWith(MockitoJUnitRunner.class) -public class NamingGrpcRedoServiceTest { +@ExtendWith(MockitoExtension.class) +class NamingGrpcRedoServiceTest { private static final String SERVICE = "service"; @@ -58,8 +58,8 @@ public class NamingGrpcRedoServiceTest { private NamingGrpcRedoService redoService; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { Properties prop = new Properties(); NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(prop); redoService = new NamingGrpcRedoService(clientProxy, nacosClientProperties); @@ -68,56 +68,56 @@ public void setUp() throws Exception { redoExecutor.shutdownNow(); } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { redoService.shutdown(); } @Test - public void testDefaultProperties() throws Exception { + void testDefaultProperties() throws Exception { Field redoThreadCountField = NamingGrpcRedoService.class.getDeclaredField("redoThreadCount"); redoThreadCountField.setAccessible(true); - + Field redoDelayTimeField = NamingGrpcRedoService.class.getDeclaredField("redoDelayTime"); redoDelayTimeField.setAccessible(true); - + Long redoDelayTimeValue = (Long) redoDelayTimeField.get(redoService); Integer redoThreadCountValue = (Integer) redoThreadCountField.get(redoService); - + assertEquals(Long.valueOf(3000L), redoDelayTimeValue); assertEquals(Integer.valueOf(1), redoThreadCountValue); } - + @Test - public void testCustomProperties() throws Exception { + void testCustomProperties() throws Exception { Properties prop = new Properties(); prop.setProperty(PropertyKeyConst.REDO_DELAY_TIME, "4000"); prop.setProperty(PropertyKeyConst.REDO_DELAY_THREAD_COUNT, "2"); NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(prop); - + NamingGrpcRedoService redoService = new NamingGrpcRedoService(clientProxy, nacosClientProperties); - + Field redoThreadCountField = NamingGrpcRedoService.class.getDeclaredField("redoThreadCount"); redoThreadCountField.setAccessible(true); - + Field redoDelayTimeField = NamingGrpcRedoService.class.getDeclaredField("redoDelayTime"); redoDelayTimeField.setAccessible(true); - + Long redoDelayTimeValue = (Long) redoDelayTimeField.get(redoService); Integer redoThreadCountValue = (Integer) redoThreadCountField.get(redoService); assertEquals(Long.valueOf(4000L), redoDelayTimeValue); assertEquals(Integer.valueOf(2), redoThreadCountValue); } - + @Test - public void testOnConnected() { + void testOnConnected() { assertFalse(redoService.isConnected()); redoService.onConnected(new TestConnection(new RpcClient.ServerInfo())); assertTrue(redoService.isConnected()); } @Test - public void testOnDisConnect() { + void testOnDisConnect() { redoService.onConnected(new TestConnection(new RpcClient.ServerInfo())); redoService.cacheInstanceForRedo(SERVICE, GROUP, new Instance()); redoService.instanceRegistered(SERVICE, GROUP); @@ -133,7 +133,7 @@ public void testOnDisConnect() { } @Test - public void testCacheInstanceForRedo() { + void testCacheInstanceForRedo() { ConcurrentMap registeredInstances = getInstanceRedoDataMap(); assertTrue(registeredInstances.isEmpty()); Instance instance = new Instance(); @@ -149,7 +149,7 @@ public void testCacheInstanceForRedo() { } @Test - public void testCacheInstanceForRedoByBatchInstanceRedoData() { + void testCacheInstanceForRedoByBatchInstanceRedoData() { ConcurrentMap registeredInstances = getInstanceRedoDataMap(); assertTrue(registeredInstances.isEmpty()); Instance instance = new Instance(); @@ -167,7 +167,7 @@ public void testCacheInstanceForRedoByBatchInstanceRedoData() { } @Test - public void testInstanceRegistered() { + void testInstanceRegistered() { ConcurrentMap registeredInstances = getInstanceRedoDataMap(); redoService.cacheInstanceForRedo(SERVICE, GROUP, new Instance()); redoService.instanceRegistered(SERVICE, GROUP); @@ -176,7 +176,7 @@ public void testInstanceRegistered() { } @Test - public void testInstanceDeregister() { + void testInstanceDeregister() { ConcurrentMap registeredInstances = getInstanceRedoDataMap(); redoService.cacheInstanceForRedo(SERVICE, GROUP, new Instance()); redoService.instanceDeregister(SERVICE, GROUP); @@ -186,7 +186,7 @@ public void testInstanceDeregister() { } @Test - public void testInstanceDeregistered() { + void testInstanceDeregistered() { ConcurrentMap registeredInstances = getInstanceRedoDataMap(); redoService.cacheInstanceForRedo(SERVICE, GROUP, new Instance()); redoService.instanceDeregistered(SERVICE, GROUP); @@ -196,7 +196,7 @@ public void testInstanceDeregistered() { } @Test - public void testRemoveInstanceForRedo() { + void testRemoveInstanceForRedo() { ConcurrentMap registeredInstances = getInstanceRedoDataMap(); assertTrue(registeredInstances.isEmpty()); redoService.cacheInstanceForRedo(SERVICE, GROUP, new Instance()); @@ -207,7 +207,7 @@ public void testRemoveInstanceForRedo() { } @Test - public void testFindInstanceRedoData() { + void testFindInstanceRedoData() { redoService.cacheInstanceForRedo(SERVICE, GROUP, new Instance()); assertFalse(redoService.findInstanceRedoData().isEmpty()); redoService.instanceRegistered(SERVICE, GROUP); @@ -222,7 +222,7 @@ private ConcurrentMap getInstanceRedoDataMap() { } @Test - public void testCacheSubscriberForRedo() { + void testCacheSubscriberForRedo() { ConcurrentMap subscribes = getSubscriberRedoDataMap(); assertTrue(subscribes.isEmpty()); redoService.cacheSubscriberForRedo(SERVICE, GROUP, CLUSTER); @@ -236,7 +236,7 @@ public void testCacheSubscriberForRedo() { } @Test - public void testSubscriberRegistered() { + void testSubscriberRegistered() { ConcurrentMap subscribes = getSubscriberRedoDataMap(); redoService.cacheSubscriberForRedo(SERVICE, GROUP, CLUSTER); redoService.subscriberRegistered(SERVICE, GROUP, CLUSTER); @@ -245,7 +245,7 @@ public void testSubscriberRegistered() { } @Test - public void testSubscriberDeregister() { + void testSubscriberDeregister() { ConcurrentMap subscribes = getSubscriberRedoDataMap(); redoService.cacheSubscriberForRedo(SERVICE, GROUP, CLUSTER); redoService.subscriberDeregister(SERVICE, GROUP, CLUSTER); @@ -254,7 +254,7 @@ public void testSubscriberDeregister() { } @Test - public void testIsSubscriberRegistered() { + void testIsSubscriberRegistered() { assertFalse(redoService.isSubscriberRegistered(SERVICE, GROUP, CLUSTER)); redoService.cacheSubscriberForRedo(SERVICE, GROUP, CLUSTER); redoService.subscriberRegistered(SERVICE, GROUP, CLUSTER); @@ -262,7 +262,7 @@ public void testIsSubscriberRegistered() { } @Test - public void testRemoveSubscriberForRedo() { + void testRemoveSubscriberForRedo() { ConcurrentMap subscribes = getSubscriberRedoDataMap(); assertTrue(subscribes.isEmpty()); redoService.cacheSubscriberForRedo(SERVICE, GROUP, CLUSTER); @@ -273,7 +273,7 @@ public void testRemoveSubscriberForRedo() { } @Test - public void testFindSubscriberRedoData() { + void testFindSubscriberRedoData() { redoService.cacheSubscriberForRedo(SERVICE, GROUP, CLUSTER); assertFalse(redoService.findSubscriberRedoData().isEmpty()); redoService.subscriberRegistered(SERVICE, GROUP, CLUSTER); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/RedoScheduledTaskTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/RedoScheduledTaskTest.java index 2df4d75207c..de86b8bd5db 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/RedoScheduledTaskTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/RedoScheduledTaskTest.java @@ -22,11 +22,13 @@ import com.alibaba.nacos.client.naming.remote.gprc.redo.data.BatchInstanceRedoData; import com.alibaba.nacos.client.naming.remote.gprc.redo.data.InstanceRedoData; import com.alibaba.nacos.client.naming.remote.gprc.redo.data.SubscriberRedoData; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.util.Collections; import java.util.HashSet; @@ -37,8 +39,10 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class RedoScheduledTaskTest { +@ExtendWith(MockitoExtension.class) +// todo remove strictness lenient +@MockitoSettings(strictness = Strictness.LENIENT) +class RedoScheduledTaskTest { private static final String SERVICE = "service"; @@ -56,15 +60,15 @@ public class RedoScheduledTaskTest { private RedoScheduledTask redoTask; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { redoTask = new RedoScheduledTask(clientProxy, redoService); when(clientProxy.isEnable()).thenReturn(true); when(redoService.isConnected()).thenReturn(true); } @Test - public void testRunRedoRegisterInstance() throws NacosException { + void testRunRedoRegisterInstance() throws NacosException { Set mockData = generateMockInstanceData(false, false, true); when(redoService.findInstanceRedoData()).thenReturn(mockData); redoTask.run(); @@ -72,9 +76,9 @@ public void testRunRedoRegisterInstance() throws NacosException { } @Test - public void testRunRedoRegisterBatchInstance() throws NacosException { - BatchInstanceRedoData redoData = BatchInstanceRedoData - .build(SERVICE, GROUP, Collections.singletonList(INSTANCE)); + void testRunRedoRegisterBatchInstance() throws NacosException { + BatchInstanceRedoData redoData = BatchInstanceRedoData.build(SERVICE, GROUP, + Collections.singletonList(INSTANCE)); redoData.setRegistered(false); redoData.setUnregistering(false); redoData.setExpectedRegistered(true); @@ -86,7 +90,7 @@ public void testRunRedoRegisterBatchInstance() throws NacosException { } @Test - public void testRunRedoDeregisterInstance() throws NacosException { + void testRunRedoDeregisterInstance() throws NacosException { Set mockData = generateMockInstanceData(true, true, false); when(redoService.findInstanceRedoData()).thenReturn(mockData); redoTask.run(); @@ -94,7 +98,7 @@ public void testRunRedoDeregisterInstance() throws NacosException { } @Test - public void testRunRedoRemoveInstanceRedoData() throws NacosException { + void testRunRedoRemoveInstanceRedoData() throws NacosException { Set mockData = generateMockInstanceData(false, true, false); when(redoService.findInstanceRedoData()).thenReturn(mockData); redoTask.run(); @@ -102,7 +106,7 @@ public void testRunRedoRemoveInstanceRedoData() throws NacosException { } @Test - public void testRunRedoRegisterInstanceWithClientDisabled() throws NacosException { + void testRunRedoRegisterInstanceWithClientDisabled() throws NacosException { when(clientProxy.isEnable()).thenReturn(false); Set mockData = generateMockInstanceData(false, false, true); when(redoService.findInstanceRedoData()).thenReturn(mockData); @@ -111,7 +115,7 @@ public void testRunRedoRegisterInstanceWithClientDisabled() throws NacosExceptio } @Test - public void testRunRedoDeregisterInstanceWithClientDisabled() throws NacosException { + void testRunRedoDeregisterInstanceWithClientDisabled() throws NacosException { when(clientProxy.isEnable()).thenReturn(false); Set mockData = generateMockInstanceData(true, true, false); when(redoService.findInstanceRedoData()).thenReturn(mockData); @@ -120,7 +124,7 @@ public void testRunRedoDeregisterInstanceWithClientDisabled() throws NacosExcept } @Test - public void testRunRedoRegisterInstanceWithNacosException() throws NacosException { + void testRunRedoRegisterInstanceWithNacosException() throws NacosException { Set mockData = generateMockInstanceData(false, false, true); when(redoService.findInstanceRedoData()).thenReturn(mockData); doThrow(new NacosException()).when(clientProxy).doRegisterService(SERVICE, GROUP, INSTANCE); @@ -129,7 +133,7 @@ public void testRunRedoRegisterInstanceWithNacosException() throws NacosExceptio } @Test - public void testRunRedoRegisterInstanceWithOtherException() throws NacosException { + void testRunRedoRegisterInstanceWithOtherException() throws NacosException { Set mockData = generateMockInstanceData(false, false, true); when(redoService.findInstanceRedoData()).thenReturn(mockData); doThrow(new RuntimeException("test")).when(clientProxy).doRegisterService(SERVICE, GROUP, INSTANCE); @@ -149,7 +153,7 @@ private Set generateMockInstanceData(boolean registered, boole } @Test - public void testRunRedoRegisterSubscriber() throws NacosException { + void testRunRedoRegisterSubscriber() throws NacosException { Set mockData = generateMockSubscriberData(false, false, true); when(redoService.findSubscriberRedoData()).thenReturn(mockData); redoTask.run(); @@ -157,7 +161,7 @@ public void testRunRedoRegisterSubscriber() throws NacosException { } @Test - public void testRunRedoDeregisterSubscriber() throws NacosException { + void testRunRedoDeregisterSubscriber() throws NacosException { Set mockData = generateMockSubscriberData(true, true, false); when(redoService.findSubscriberRedoData()).thenReturn(mockData); redoTask.run(); @@ -165,7 +169,7 @@ public void testRunRedoDeregisterSubscriber() throws NacosException { } @Test - public void testRunRedoRemoveSubscriberRedoData() throws NacosException { + void testRunRedoRemoveSubscriberRedoData() throws NacosException { Set mockData = generateMockSubscriberData(false, true, false); when(redoService.findSubscriberRedoData()).thenReturn(mockData); redoTask.run(); @@ -173,7 +177,7 @@ public void testRunRedoRemoveSubscriberRedoData() throws NacosException { } @Test - public void testRunRedoRegisterSubscriberWithClientDisabled() throws NacosException { + void testRunRedoRegisterSubscriberWithClientDisabled() throws NacosException { when(clientProxy.isEnable()).thenReturn(false); Set mockData = generateMockSubscriberData(false, false, true); when(redoService.findSubscriberRedoData()).thenReturn(mockData); @@ -182,7 +186,7 @@ public void testRunRedoRegisterSubscriberWithClientDisabled() throws NacosExcept } @Test - public void testRunRedoDeRegisterSubscriberWithClientDisabled() throws NacosException { + void testRunRedoDeRegisterSubscriberWithClientDisabled() throws NacosException { when(clientProxy.isEnable()).thenReturn(false); Set mockData = generateMockSubscriberData(true, true, false); when(redoService.findSubscriberRedoData()).thenReturn(mockData); @@ -191,7 +195,7 @@ public void testRunRedoDeRegisterSubscriberWithClientDisabled() throws NacosExce } @Test - public void testRunRedoRegisterSubscriberWithNacosException() throws NacosException { + void testRunRedoRegisterSubscriberWithNacosException() throws NacosException { Set mockData = generateMockSubscriberData(false, false, true); when(redoService.findSubscriberRedoData()).thenReturn(mockData); doThrow(new NacosException()).when(clientProxy).doSubscribe(SERVICE, GROUP, CLUSTER); @@ -211,7 +215,7 @@ private Set generateMockSubscriberData(boolean registered, b } @Test - public void testRunRedoWithDisconnection() { + void testRunRedoWithDisconnection() { when(redoService.isConnected()).thenReturn(false); redoTask.run(); verify(redoService, never()).findInstanceRedoData(); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/data/BatchInstanceRedoDataTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/data/BatchInstanceRedoDataTest.java index e9f033e1031..2dee36e902a 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/data/BatchInstanceRedoDataTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/data/BatchInstanceRedoDataTest.java @@ -17,36 +17,34 @@ package com.alibaba.nacos.client.naming.remote.gprc.redo.data; import com.alibaba.nacos.api.naming.pojo.Instance; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Collections; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; -public class BatchInstanceRedoDataTest { +class BatchInstanceRedoDataTest { @Test @SuppressWarnings("all") - public void testEquals() { + void testEquals() { BatchInstanceRedoData redoData1 = new BatchInstanceRedoData("a", "b"); redoData1.setInstances(Collections.singletonList(new Instance())); BatchInstanceRedoData redoData2 = new BatchInstanceRedoData("a", "b"); redoData2.setInstances(Collections.singletonList(new Instance())); - assertTrue(redoData1.equals(redoData1)); - assertTrue(redoData1.equals(redoData2)); + assertEquals(redoData1, redoData1); + assertEquals(redoData1, redoData2); redoData2.getInstances().get(0).setIp("1.1.1.1"); - assertFalse(redoData1.equals(null)); - assertFalse(redoData1.equals(redoData2)); - assertFalse(redoData1.equals(redoData2)); + assertNotEquals(null, redoData1); + assertNotEquals(redoData1, redoData2); + assertNotEquals(redoData1, redoData2); BatchInstanceRedoData redoData3 = new BatchInstanceRedoData("c", "b"); - assertFalse(redoData1.equals(redoData3)); + assertNotEquals(redoData1, redoData3); } @Test - public void testHashCode() { + void testHashCode() { BatchInstanceRedoData redoData1 = new BatchInstanceRedoData("a", "b"); redoData1.setInstances(Collections.singletonList(new Instance())); BatchInstanceRedoData redoData2 = new BatchInstanceRedoData("a", "b"); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/data/InstanceRedoDataTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/data/InstanceRedoDataTest.java index ddbc79b05c4..46b2d070218 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/data/InstanceRedoDataTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/gprc/redo/data/InstanceRedoDataTest.java @@ -17,28 +17,26 @@ package com.alibaba.nacos.client.naming.remote.gprc.redo.data; import com.alibaba.nacos.api.naming.pojo.Instance; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; -public class InstanceRedoDataTest { +class InstanceRedoDataTest { @Test - public void testEquals() { + void testEquals() { InstanceRedoData redoData1 = new InstanceRedoData("a", "b"); - assertTrue(redoData1.equals(redoData1)); - assertFalse(redoData1.equals(null)); + assertEquals(redoData1, redoData1); + assertNotEquals(null, redoData1); BatchInstanceRedoData redoData2 = new BatchInstanceRedoData("a", "b"); - assertFalse(redoData1.equals(redoData2)); + assertNotEquals(redoData1, redoData2); InstanceRedoData redoData3 = new InstanceRedoData("a", "b"); - assertTrue(redoData1.equals(redoData3)); + assertEquals(redoData1, redoData3); } @Test - public void testHashCode() { + void testHashCode() { InstanceRedoData redoData1 = new InstanceRedoData("a", "b"); redoData1.set(new Instance()); InstanceRedoData redoData2 = new InstanceRedoData("a", "b"); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientManagerTest.java index ac318b86a99..5b4a44bdc2c 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientManagerTest.java @@ -22,8 +22,7 @@ import com.alibaba.nacos.common.http.HttpClientBeanHolder; import com.alibaba.nacos.common.http.client.NacosRestTemplate; import com.alibaba.nacos.common.http.client.request.HttpClientRequest; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import java.io.IOException; @@ -31,31 +30,32 @@ import java.util.Map; import static com.alibaba.nacos.common.constant.RequestUrlConstants.HTTP_PREFIX; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -public class NamingHttpClientManagerTest { +class NamingHttpClientManagerTest { @Test - public void testGetInstance() { - Assert.assertNotNull(NamingHttpClientManager.getInstance()); + void testGetInstance() { + assertNotNull(NamingHttpClientManager.getInstance()); } @Test - public void testGetPrefix() { + void testGetPrefix() { assertEquals(HTTP_PREFIX, NamingHttpClientManager.getInstance().getPrefix()); } @Test - public void testGetNacosRestTemplate() { - Assert.assertNotNull(NamingHttpClientManager.getInstance().getNacosRestTemplate()); + void testGetNacosRestTemplate() { + assertNotNull(NamingHttpClientManager.getInstance().getNacosRestTemplate()); } @Test - public void testShutdown() throws NoSuchFieldException, IllegalAccessException, NacosException, IOException { + void testShutdown() throws NoSuchFieldException, IllegalAccessException, NacosException, IOException { //given NamingHttpClientManager instance = NamingHttpClientManager.getInstance(); @@ -70,7 +70,7 @@ public void testShutdown() throws NoSuchFieldException, IllegalAccessException, } @Test - public void testShutdownWithException() throws Exception { + void testShutdownWithException() throws Exception { String key = "com.alibaba.nacos.client.naming.remote.http.NamingHttpClientManager$NamingHttpClientFactory"; try { HttpClientBeanHolder.shutdownNacosSyncRest(key); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientProxyTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientProxyTest.java index 3ffcc78f423..28e09582226 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientProxyTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientProxyTest.java @@ -34,15 +34,14 @@ import com.alibaba.nacos.common.http.client.NacosRestTemplate; import com.alibaba.nacos.common.utils.HttpMethod; import com.alibaba.nacos.common.utils.ReflectUtils; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.lang.reflect.Field; import java.util.Arrays; @@ -52,9 +51,11 @@ import java.util.Map; import java.util.Properties; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.endsWith; import static org.mockito.ArgumentMatchers.eq; @@ -64,11 +65,10 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class NamingHttpClientProxyTest { - - @Rule - public final ExpectedException thrown = ExpectedException.none(); +@ExtendWith(MockitoExtension.class) +// todo remove strictness lenient +@MockitoSettings(strictness = Strictness.LENIENT) +class NamingHttpClientProxyTest { @Mock private SecurityProxy proxy; @@ -80,33 +80,33 @@ public class NamingHttpClientProxyTest { private NamingHttpClientProxy clientProxy; - @Before - public void setUp() { + @BeforeEach + void setUp() { when(mgr.getServerList()).thenReturn(Arrays.asList("localhost")); props = new Properties(); final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(props); clientProxy = new NamingHttpClientProxy("namespaceId", proxy, mgr, nacosClientProperties); } - @After - public void tearDown() throws NacosException { + @AfterEach + void tearDown() throws NacosException { clientProxy.shutdown(); System.clearProperty(SystemPropertyKeyConst.NAMING_SERVER_PORT); } @Test - public void testOnEvent() { + void testOnEvent() { clientProxy.onEvent(new ServerListChangedEvent()); // Do nothing } @Test - public void testSubscribeType() { + void testSubscribeType() { assertEquals(ServerListChangedEvent.class, clientProxy.subscribeType()); } @Test - public void testRegisterService() throws Exception { + void testRegisterService() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -128,81 +128,88 @@ public void testRegisterService() throws Exception { verify(nacosRestTemplate, times(1)).exchangeForm(any(), any(), any(), any(), any(), any()); } - @Test(expected = UnsupportedOperationException.class) - public void testRegisterEphemeralInstance() throws NacosException { - Instance instance = new Instance(); - clientProxy.registerService("a", "b", instance); + @Test + void testRegisterEphemeralInstance() throws NacosException { + assertThrows(UnsupportedOperationException.class, () -> { + Instance instance = new Instance(); + clientProxy.registerService("a", "b", instance); + }); } @Test - public void testRegisterServiceThrowsNacosException() throws Exception { - thrown.expect(NacosException.class); - thrown.expectMessage("failed to req API"); - - NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); - HttpRestResult a = new HttpRestResult(); - a.setCode(503); - when(nacosRestTemplate.exchangeForm(any(), any(), any(), any(), any(), any())).thenReturn(a); - - final Field nacosRestTemplateField = NamingHttpClientProxy.class.getDeclaredField("nacosRestTemplate"); - nacosRestTemplateField.setAccessible(true); - nacosRestTemplateField.set(clientProxy, nacosRestTemplate); - String serviceName = "service1"; - String groupName = "group1"; - Instance instance = new Instance(); - instance.setEphemeral(false); - try { - clientProxy.registerService(serviceName, groupName, instance); - } catch (NacosException ex) { - // verify the `NacosException` is directly thrown - assertEquals(null, ex.getCause()); + void testRegisterServiceThrowsNacosException() throws Exception { + Throwable exception = assertThrows(NacosException.class, () -> { + + NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); + HttpRestResult a = new HttpRestResult(); + a.setCode(503); + when(nacosRestTemplate.exchangeForm(any(), any(), any(), any(), any(), any())).thenReturn(a); - throw ex; - } + final Field nacosRestTemplateField = NamingHttpClientProxy.class.getDeclaredField("nacosRestTemplate"); + nacosRestTemplateField.setAccessible(true); + nacosRestTemplateField.set(clientProxy, nacosRestTemplate); + String serviceName = "service1"; + String groupName = "group1"; + Instance instance = new Instance(); + instance.setEphemeral(false); + try { + clientProxy.registerService(serviceName, groupName, instance); + } catch (NacosException ex) { + // verify the `NacosException` is directly thrown + assertNull(ex.getCause()); + + throw ex; + } + }); + assertTrue(exception.getMessage().contains("failed to req API")); } @Test - public void testRegisterServiceThrowsException() throws Exception { - // assert throw NacosException - thrown.expect(NacosException.class); - - NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); - HttpRestResult a = new HttpRestResult(); - a.setCode(503); - // makes exchangeForm failed with a NullPointerException - when(nacosRestTemplate.exchangeForm(any(), any(), any(), any(), any(), any())).thenReturn(null); - - final Field nacosRestTemplateField = NamingHttpClientProxy.class.getDeclaredField("nacosRestTemplate"); - nacosRestTemplateField.setAccessible(true); - nacosRestTemplateField.set(clientProxy, nacosRestTemplate); - String serviceName = "service1"; - String groupName = "group1"; - Instance instance = new Instance(); - instance.setEphemeral(false); - - try { - clientProxy.registerService(serviceName, groupName, instance); - } catch (NacosException ex) { - // verify the `NacosException` is directly thrown - Assert.assertTrue(ex.getErrMsg().contains("java.lang.NullPointerException")); - assertEquals(NacosException.SERVER_ERROR, ex.getErrCode()); + void testRegisterServiceThrowsException() throws Exception { + assertThrows(NacosException.class, () -> { + + NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); + HttpRestResult a = new HttpRestResult(); + a.setCode(503); + // makes exchangeForm failed with a NullPointerException + when(nacosRestTemplate.exchangeForm(any(), any(), any(), any(), any(), any())).thenReturn(null); + + final Field nacosRestTemplateField = NamingHttpClientProxy.class.getDeclaredField("nacosRestTemplate"); + nacosRestTemplateField.setAccessible(true); + nacosRestTemplateField.set(clientProxy, nacosRestTemplate); + String serviceName = "service1"; + String groupName = "group1"; + Instance instance = new Instance(); + instance.setEphemeral(false); - throw ex; - } + try { + clientProxy.registerService(serviceName, groupName, instance); + } catch (NacosException ex) { + // verify the `NacosException` is directly thrown + assertTrue(ex.getErrMsg().contains("java.lang.NullPointerException")); + assertEquals(NacosException.SERVER_ERROR, ex.getErrCode()); + + throw ex; + } + }); } - @Test(expected = UnsupportedOperationException.class) - public void testBatchRegisterService() { - clientProxy.batchRegisterService("a", "b", null); + @Test + void testBatchRegisterService() { + assertThrows(UnsupportedOperationException.class, () -> { + clientProxy.batchRegisterService("a", "b", null); + }); } - @Test(expected = UnsupportedOperationException.class) - public void testBatchDeregisterService() { - clientProxy.batchDeregisterService("a", "b", null); + @Test + void testBatchDeregisterService() { + assertThrows(UnsupportedOperationException.class, () -> { + clientProxy.batchDeregisterService("a", "b", null); + }); } @Test - public void testDeregisterService() throws Exception { + void testDeregisterService() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -225,7 +232,7 @@ public void testDeregisterService() throws Exception { } @Test - public void testDeregisterServiceForEphemeral() throws Exception { + void testDeregisterServiceForEphemeral() throws Exception { NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); final Field nacosRestTemplateField = NamingHttpClientProxy.class.getDeclaredField("nacosRestTemplate"); nacosRestTemplateField.setAccessible(true); @@ -237,7 +244,7 @@ public void testDeregisterServiceForEphemeral() throws Exception { } @Test - public void testUpdateInstance() throws Exception { + void testUpdateInstance() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -259,17 +266,17 @@ public void testUpdateInstance() throws Exception { } @Test - public void testQueryInstancesOfServiceThrowsException() { + void testQueryInstancesOfServiceThrowsException() { //assert exception String serviceName = "service1"; String groupName = "group1"; String clusters = "cluster1"; - Assert.assertThrows(UnsupportedOperationException.class, + assertThrows(UnsupportedOperationException.class, () -> clientProxy.queryInstancesOfService(serviceName, groupName, clusters, false)); } @Test - public void testQueryService() throws Exception { + void testQueryService() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -287,14 +294,14 @@ public void testQueryService() throws Exception { //when Service service = clientProxy.queryService(serviceName, groupName); //then - verify(nacosRestTemplate, times(1)) - .exchangeForm(endsWith(UtilAndComs.nacosUrlService), any(), any(), any(), eq(HttpMethod.GET), any()); + verify(nacosRestTemplate, times(1)).exchangeForm(endsWith(UtilAndComs.nacosUrlService), any(), any(), any(), + eq(HttpMethod.GET), any()); assertEquals(serviceName, service.getName()); assertEquals(groupName, service.getGroupName()); } @Test - public void testCreateService() throws Exception { + void testCreateService() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -309,12 +316,12 @@ public void testCreateService() throws Exception { //when clientProxy.createService(new Service(), new NoneSelector()); //then - verify(nacosRestTemplate, times(1)) - .exchangeForm(endsWith(UtilAndComs.nacosUrlService), any(), any(), any(), eq(HttpMethod.POST), any()); + verify(nacosRestTemplate, times(1)).exchangeForm(endsWith(UtilAndComs.nacosUrlService), any(), any(), any(), + eq(HttpMethod.POST), any()); } @Test - public void testDeleteService() throws Exception { + void testDeleteService() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -331,12 +338,12 @@ public void testDeleteService() throws Exception { //when clientProxy.deleteService(serviceName, groupName); //then - verify(nacosRestTemplate, times(1)) - .exchangeForm(endsWith(UtilAndComs.nacosUrlService), any(), any(), any(), eq(HttpMethod.DELETE), any()); + verify(nacosRestTemplate, times(1)).exchangeForm(endsWith(UtilAndComs.nacosUrlService), any(), any(), any(), + eq(HttpMethod.DELETE), any()); } @Test - public void testUpdateService() throws Exception { + void testUpdateService() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -353,13 +360,13 @@ public void testUpdateService() throws Exception { //when clientProxy.updateService(new Service(), new NoneSelector()); //then - verify(nacosRestTemplate, times(1)) - .exchangeForm(endsWith(UtilAndComs.nacosUrlService), any(), any(), any(), eq(HttpMethod.PUT), any()); + verify(nacosRestTemplate, times(1)).exchangeForm(endsWith(UtilAndComs.nacosUrlService), any(), any(), any(), + eq(HttpMethod.PUT), any()); } @Test - public void testServerHealthy() throws Exception { + void testServerHealthy() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -374,16 +381,16 @@ public void testServerHealthy() throws Exception { //when boolean serverHealthy = clientProxy.serverHealthy(); //then - verify(nacosRestTemplate, times(1)) - .exchangeForm(endsWith("/operator/metrics"), any(), any(), any(), eq(HttpMethod.GET), any()); - Assert.assertTrue(serverHealthy); + verify(nacosRestTemplate, times(1)).exchangeForm(endsWith("/operator/metrics"), any(), any(), any(), + eq(HttpMethod.GET), any()); + assertTrue(serverHealthy); } @Test - public void testServerHealthyForException() throws Exception { + void testServerHealthyForException() throws Exception { NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); - when(nacosRestTemplate.exchangeForm(any(), any(), any(), any(), any(), any())) - .thenThrow(new RuntimeException("test")); + when(nacosRestTemplate.exchangeForm(any(), any(), any(), any(), any(), any())).thenThrow( + new RuntimeException("test")); final Field nacosRestTemplateField = NamingHttpClientProxy.class.getDeclaredField("nacosRestTemplate"); nacosRestTemplateField.setAccessible(true); nacosRestTemplateField.set(clientProxy, nacosRestTemplate); @@ -391,7 +398,7 @@ public void testServerHealthyForException() throws Exception { } @Test - public void testGetServiceList() throws Exception { + void testGetServiceList() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -407,15 +414,15 @@ public void testGetServiceList() throws Exception { //when ListView serviceList = clientProxy.getServiceList(1, 10, groupName, new NoneSelector()); //then - verify(nacosRestTemplate, times(1)) - .exchangeForm(endsWith("/service/list"), any(), any(), any(), eq(HttpMethod.GET), any()); + verify(nacosRestTemplate, times(1)).exchangeForm(endsWith("/service/list"), any(), any(), any(), + eq(HttpMethod.GET), any()); assertEquals(2, serviceList.getCount()); assertEquals("aaa", serviceList.getData().get(0)); assertEquals("bbb", serviceList.getData().get(1)); } @Test - public void testGetServiceListWithLabelSelector() throws Exception { + void testGetServiceListWithLabelSelector() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); HttpRestResult a = new HttpRestResult(); @@ -431,25 +438,27 @@ public void testGetServiceListWithLabelSelector() throws Exception { //when ListView serviceList = clientProxy.getServiceList(1, 10, groupName, new ExpressionSelector()); //then - verify(nacosRestTemplate, times(1)) - .exchangeForm(endsWith("/service/list"), any(), any(), any(), eq(HttpMethod.GET), any()); + verify(nacosRestTemplate, times(1)).exchangeForm(endsWith("/service/list"), any(), any(), any(), + eq(HttpMethod.GET), any()); assertEquals(2, serviceList.getCount()); assertEquals("aaa", serviceList.getData().get(0)); assertEquals("bbb", serviceList.getData().get(1)); } - @Test(expected = UnsupportedOperationException.class) - public void testSubscribe() throws Exception { - String groupName = "group1"; - String serviceName = "serviceName"; - String clusters = "clusters"; - - //when - clientProxy.subscribe(serviceName, groupName, clusters); + @Test + void testSubscribe() throws Exception { + assertThrows(UnsupportedOperationException.class, () -> { + String groupName = "group1"; + String serviceName = "serviceName"; + String clusters = "clusters"; + + //when + clientProxy.subscribe(serviceName, groupName, clusters); + }); } @Test - public void testUnsubscribe() throws Exception { + void testUnsubscribe() throws Exception { String groupName = "group1"; String serviceName = "serviceName"; String clusters = "clusters"; @@ -460,12 +469,12 @@ public void testUnsubscribe() throws Exception { } @Test - public void testIsSubscribed() throws NacosException { + void testIsSubscribed() throws NacosException { assertTrue(clientProxy.isSubscribed("serviceName", "group1", "clusters")); } @Test - public void testReqApi() throws Exception { + void testReqApi() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); @@ -491,7 +500,7 @@ public void testReqApi() throws Exception { } @Test - public void testReqApi2() throws Exception { + void testReqApi2() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); @@ -517,7 +526,7 @@ public void testReqApi2() throws Exception { } @Test - public void testReqApi3() throws Exception { + void testReqApi3() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); @@ -544,36 +553,38 @@ public void testReqApi3() throws Exception { } @Test - public void testCallServerFail() throws Exception { - //then - thrown.expect(NacosException.class); - - //given - NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); - - when(nacosRestTemplate.exchangeForm(any(), any(), any(), any(), any(), any())).thenAnswer(invocationOnMock -> { - //return url - HttpRestResult res = new HttpRestResult(); - res.setMessage("fail"); - res.setCode(400); - return res; + void testCallServerFail() throws Exception { + assertThrows(NacosException.class, () -> { + + //given + NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); + + when(nacosRestTemplate.exchangeForm(any(), any(), any(), any(), any(), any())).thenAnswer( + invocationOnMock -> { + //return url + HttpRestResult res = new HttpRestResult(); + res.setMessage("fail"); + res.setCode(400); + return res; + }); + + final Field nacosRestTemplateField = NamingHttpClientProxy.class.getDeclaredField("nacosRestTemplate"); + nacosRestTemplateField.setAccessible(true); + nacosRestTemplateField.set(clientProxy, nacosRestTemplate); + String api = "/api"; + Map params = new HashMap<>(); + Map body = new HashMap<>(); + String method = HttpMethod.GET; + String curServer = "127.0.0.1"; + //when + clientProxy.callServer(api, params, body, curServer, method); + }); - final Field nacosRestTemplateField = NamingHttpClientProxy.class.getDeclaredField("nacosRestTemplate"); - nacosRestTemplateField.setAccessible(true); - nacosRestTemplateField.set(clientProxy, nacosRestTemplate); - String api = "/api"; - Map params = new HashMap<>(); - Map body = new HashMap<>(); - String method = HttpMethod.GET; - String curServer = "127.0.0.1"; - //when - clientProxy.callServer(api, params, body, curServer, method); - } @Test - public void testCallServerFail304() throws Exception { + void testCallServerFail304() throws Exception { //given NacosRestTemplate nacosRestTemplate = mock(NacosRestTemplate.class); @@ -600,7 +611,7 @@ public void testCallServerFail304() throws Exception { } @Test - public void testGetNamespaceId() { + void testGetNamespaceId() { String namespaceId = "aaa"; final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(props); NamingHttpClientProxy clientProxy = new NamingHttpClientProxy(namespaceId, proxy, mgr, nacosClientProperties); @@ -609,7 +620,7 @@ public void testGetNamespaceId() { } @Test - public void testSetServerPort() { + void testSetServerPort() { clientProxy.setServerPort(1234); assertEquals(1234, ReflectUtils.getFieldValue(clientProxy, "serverPort")); System.setProperty(SystemPropertyKeyConst.NAMING_SERVER_PORT, "1111"); @@ -617,20 +628,23 @@ public void testSetServerPort() { assertEquals(1111, ReflectUtils.getFieldValue(clientProxy, "serverPort")); } - @Test(expected = NacosException.class) - public void testReqApiForEmptyServer() throws NacosException { - Map params = new HashMap<>(); - clientProxy - .reqApi("api", params, Collections.emptyMap(), Collections.emptyList(), HttpMethod.GET); + @Test + void testReqApiForEmptyServer() throws NacosException { + assertThrows(NacosException.class, () -> { + Map params = new HashMap<>(); + clientProxy.reqApi("api", params, Collections.emptyMap(), Collections.emptyList(), HttpMethod.GET); + }); } - @Test(expected = NacosException.class) - public void testRegApiForDomain() throws NacosException { - Map params = new HashMap<>(); - when(mgr.isDomain()).thenReturn(true); - when(mgr.getNacosDomain()).thenReturn("http://test.nacos.domain"); - clientProxy - .reqApi("api", params, Collections.emptyMap(), Collections.emptyList(), HttpMethod.GET); + @Test + void testRegApiForDomain() throws NacosException { + assertThrows(NacosException.class, () -> { + Map params = new HashMap<>(); + when(mgr.isDomain()).thenReturn(true); + when(mgr.getNacosDomain()).thenReturn("http://test.nacos.domain"); + clientProxy.reqApi("api", params, Collections.emptyMap(), Collections.emptyList(), HttpMethod.GET); + + }); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/utils/CacheDirUtilTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/utils/CacheDirUtilTest.java index 32a8599037c..5abbc54a57c 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/utils/CacheDirUtilTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/utils/CacheDirUtilTest.java @@ -18,28 +18,28 @@ import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.client.env.NacosClientProperties; -import org.junit.After; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class CacheDirUtilTest { +class CacheDirUtilTest { - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { System.clearProperty("user.home"); System.clearProperty("JM.SNAPSHOT.PATH"); } @Test - public void testInitCacheDirWithDefaultRootAndWithoutCache() { + void testInitCacheDirWithDefaultRootAndWithoutCache() { System.setProperty("user.home", "/home/admin"); String actual = CacheDirUtil.initCacheDir("test", NacosClientProperties.PROTOTYPE.derive()); assertEquals("/home/admin/nacos/naming/test", actual); } @Test - public void testInitCacheDirWithDefaultRootAndWithCache() { + void testInitCacheDirWithDefaultRootAndWithCache() { System.setProperty("user.home", "/home/admin"); NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.NAMING_CACHE_REGISTRY_DIR, "custom"); @@ -48,14 +48,14 @@ public void testInitCacheDirWithDefaultRootAndWithCache() { } @Test - public void testInitCacheDirWithJmSnapshotPathRootAndWithoutCache() { + void testInitCacheDirWithJmSnapshotPathRootAndWithoutCache() { System.setProperty("JM.SNAPSHOT.PATH", "/home/snapshot"); String actual = CacheDirUtil.initCacheDir("test", NacosClientProperties.PROTOTYPE.derive()); assertEquals("/home/snapshot/nacos/naming/test", actual); } @Test - public void testInitCacheDirWithJmSnapshotPathRootAndWithCache() { + void testInitCacheDirWithJmSnapshotPathRootAndWithCache() { System.setProperty("user.home", "/home/snapshot"); NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.NAMING_CACHE_REGISTRY_DIR, "custom"); diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/utils/ChooserTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/utils/ChooserTest.java index 8f62917f88a..30b4e24a952 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/utils/ChooserTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/utils/ChooserTest.java @@ -17,7 +17,7 @@ package com.alibaba.nacos.client.naming.utils; import com.alibaba.nacos.api.naming.pojo.Instance; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Collections; @@ -25,16 +25,17 @@ import java.util.List; import java.util.concurrent.ThreadLocalRandom; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class ChooserTest { +class ChooserTest { @Test - public void testChooser() { + void testChooser() { //Test the correctness of Chooser, the weight of the final selected instance must be greater than 0 List hosts = getInstanceList(); Instance target = getRandomInstance(hosts); @@ -42,14 +43,14 @@ public void testChooser() { } @Test - public void testChooserRandomForEmptyList() { + void testChooserRandomForEmptyList() { Chooser chooser = new Chooser<>("test"); assertEquals("test", chooser.getUniqueKey()); assertNull(chooser.random()); } @Test - public void testChooserRandomForOneSizeList() { + void testChooserRandomForOneSizeList() { List> list = new LinkedList<>(); list.add(new Pair<>("test", 1)); Chooser chooser = new Chooser<>("test", list); @@ -59,7 +60,7 @@ public void testChooserRandomForOneSizeList() { } @Test - public void testChooserRandom() { + void testChooserRandom() { List> list = new LinkedList<>(); list.add(new Pair<>("test", 1)); list.add(new Pair<>("test2", 1)); @@ -70,7 +71,7 @@ public void testChooserRandom() { } @Test - public void testOnlyOneInstanceWeightIsNotZero() { + void testOnlyOneInstanceWeightIsNotZero() { // If there is only one instance whose weight is not zero, it will be selected List hosts = getOneInstanceNotZeroList(); @@ -79,7 +80,7 @@ public void testOnlyOneInstanceWeightIsNotZero() { } @Test - public void testInstanceWeightAllZero() { + void testInstanceWeightAllZero() { // Throw an IllegalStateException when all instances have a weight of zero. List hosts = getInstanceWeightAllZero(); @@ -90,16 +91,18 @@ public void testInstanceWeightAllZero() { } } - @Test(expected = IllegalStateException.class) - public void testRandomWithWeightForNaNAndInfinity() { - List> list = new LinkedList<>(); - list.add(new Pair<>("test", Double.NaN)); - list.add(new Pair<>("test2", Double.POSITIVE_INFINITY)); - new Chooser<>("test", list); + @Test + void testRandomWithWeightForNaNAndInfinity() { + assertThrows(IllegalStateException.class, () -> { + List> list = new LinkedList<>(); + list.add(new Pair<>("test", Double.NaN)); + list.add(new Pair<>("test2", Double.POSITIVE_INFINITY)); + new Chooser<>("test", list); + }); } @Test - public void testRefresh() { + void testRefresh() { Chooser chooser = new Chooser<>("test"); assertEquals("test", chooser.getUniqueKey()); assertNull(chooser.random()); @@ -112,43 +115,43 @@ public void testRefresh() { } @Test - public void testEqualsHashCode() { + void testEqualsHashCode() { List> list = new LinkedList<>(); list.add(new Pair<>("test", 1)); list.add(new Pair<>("test2", 1)); Chooser chooser = new Chooser<>("test", list); assertEquals("test".hashCode(), chooser.hashCode()); - assertTrue(chooser.equals(chooser)); - assertFalse(chooser.equals(null)); - assertFalse(chooser.equals("test")); + assertEquals(chooser, chooser); + assertNotEquals(null, chooser); + assertNotEquals("test", chooser); Chooser chooser1 = new Chooser<>(null, null); - assertFalse(chooser.equals(chooser1)); - assertFalse(chooser1.equals(chooser)); + assertNotEquals(chooser, chooser1); + assertNotEquals(chooser1, chooser); Chooser chooser2 = new Chooser<>("test", Collections.emptyList()); - assertFalse(chooser.equals(chooser2)); - assertFalse(chooser2.equals(chooser)); + assertNotEquals(chooser, chooser2); + assertNotEquals(chooser2, chooser); Chooser chooser3 = new Chooser<>("test1", list); - assertFalse(chooser.equals(chooser3)); + assertNotEquals(chooser, chooser3); Chooser chooser4 = new Chooser<>("test", list); - assertTrue(chooser.equals(chooser4)); + assertEquals(chooser, chooser4); } @Test - public void testRefEqualsHashCode() { + void testRefEqualsHashCode() { List> list = new LinkedList<>(); list.add(new Pair<>("test", 1)); list.add(new Pair<>("test2", 1)); Chooser chooser = new Chooser<>("test", list); Chooser.Ref ref = chooser.getRef(); assertEquals(list.hashCode(), ref.hashCode()); - assertTrue(ref.equals(ref)); - assertFalse(ref.equals(null)); - assertFalse(ref.equals(chooser)); + assertEquals(ref, ref); + assertNotEquals(null, ref); + assertNotEquals(ref, chooser); Chooser.Ref ref1 = new Chooser<>("test", null).getRef(); - assertFalse(ref.equals(ref1)); - assertFalse(ref1.equals(ref)); + assertNotEquals(ref, ref1); + assertNotEquals(ref1, ref); Chooser.Ref ref2 = new Chooser<>("test", list).getRef(); - assertTrue(ref.equals(ref2)); + assertEquals(ref, ref2); } private List getInstanceList() { diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/utils/CollectionUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/utils/CollectionUtilsTest.java index fdcb20993d9..433c4cb5d8a 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/utils/CollectionUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/utils/CollectionUtilsTest.java @@ -16,53 +16,56 @@ package com.alibaba.nacos.client.naming.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; -public class CollectionUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class CollectionUtilsTest { @Test - public void testSubtract() { - List subtract = (List) CollectionUtils - .subtract(Arrays.asList("a", "b"), Arrays.asList("b", "c")); - Assert.assertEquals(1, subtract.size()); - Assert.assertEquals("a", subtract.get(0)); + void testSubtract() { + List subtract = (List) CollectionUtils.subtract(Arrays.asList("a", "b"), + Arrays.asList("b", "c")); + assertEquals(1, subtract.size()); + assertEquals("a", subtract.get(0)); } @Test - public void testGetCardinalityMap() { + void testGetCardinalityMap() { List list1 = Arrays.asList("2", "2", "3"); Map map1 = CollectionUtils.getCardinalityMap(list1); - Assert.assertEquals(2, map1.size()); - Assert.assertEquals(2, map1.get("2").intValue()); - Assert.assertEquals(1, map1.get("3").intValue()); + assertEquals(2, map1.size()); + assertEquals(2, map1.get("2").intValue()); + assertEquals(1, map1.get("3").intValue()); } @Test - public void testIsEqualCollection() { + void testIsEqualCollection() { List list1 = Arrays.asList("2", "2", "3"); List list2 = Arrays.asList("3", "2", "2"); List list3 = Arrays.asList("3", "2", "3"); List list4 = Arrays.asList("3", "2"); + assertTrue(CollectionUtils.isEqualCollection(list1, list2)); + assertFalse(CollectionUtils.isEqualCollection(list1, list3)); + assertFalse(CollectionUtils.isEqualCollection(list1, list4)); List list5 = Arrays.asList("3", "2", "1"); + assertFalse(CollectionUtils.isEqualCollection(list1, list5)); List list6 = Arrays.asList("2", "2", "1"); - Assert.assertTrue(CollectionUtils.isEqualCollection(list1, list2)); - Assert.assertFalse(CollectionUtils.isEqualCollection(list1, list3)); - Assert.assertFalse(CollectionUtils.isEqualCollection(list1, list4)); - Assert.assertFalse(CollectionUtils.isEqualCollection(list1, list5)); - Assert.assertFalse(CollectionUtils.isEqualCollection(list1, list6)); + assertFalse(CollectionUtils.isEqualCollection(list1, list6)); } @Test - public void testIsEmpty() { - Assert.assertTrue(CollectionUtils.isEmpty(null)); - Assert.assertTrue(CollectionUtils.isEmpty(new ArrayList())); - Assert.assertFalse(CollectionUtils.isEmpty(Arrays.asList("aa"))); + void testIsEmpty() { + assertTrue(CollectionUtils.isEmpty(null)); + assertTrue(CollectionUtils.isEmpty(new ArrayList())); + assertFalse(CollectionUtils.isEmpty(Arrays.asList("aa"))); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/utils/ConcurrentDiskUtilTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/utils/ConcurrentDiskUtilTest.java index 545df8d0d5f..467f3146687 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/utils/ConcurrentDiskUtilTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/utils/ConcurrentDiskUtilTest.java @@ -17,8 +17,7 @@ package com.alibaba.nacos.client.naming.utils; import com.alibaba.nacos.client.utils.ConcurrentDiskUtil; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.File; import java.io.IOException; @@ -28,76 +27,83 @@ import java.nio.channels.FileChannel; import java.nio.charset.StandardCharsets; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class ConcurrentDiskUtilTest { +class ConcurrentDiskUtilTest { @Test - public void testReadAndWrite() throws IOException { + void testReadAndWrite() throws IOException { File tempFile = File.createTempFile("aaa", "bbb"); String fileName = tempFile.getAbsolutePath(); String content = "hello"; String charset = "UTF-8"; ConcurrentDiskUtil.writeFileContent(fileName, content, charset); String actualContent = ConcurrentDiskUtil.getFileContent(fileName, charset); - Assert.assertEquals(content, actualContent); + assertEquals(content, actualContent); } @Test - public void testReadAndWrite2() throws IOException { + void testReadAndWrite2() throws IOException { File tempFile = File.createTempFile("aaa", "bbb"); String content = "hello"; String charset = "UTF-8"; ConcurrentDiskUtil.writeFileContent(tempFile, content, charset); String actualContent = ConcurrentDiskUtil.getFileContent(tempFile, charset); - Assert.assertEquals(content, actualContent); + assertEquals(content, actualContent); } @Test - public void testByteBufferToString() throws IOException { + void testByteBufferToString() throws IOException { String msg = "test buff to string"; ByteBuffer buff = ByteBuffer.wrap(msg.getBytes(StandardCharsets.UTF_8)); String actual = ConcurrentDiskUtil.byteBufferToString(buff, "UTF-8"); - Assert.assertEquals(msg, actual); + assertEquals(msg, actual); } @Test - public void testWriteFileContent() throws IOException { + void testWriteFileContent() throws IOException { File file = mock(File.class); - Assert.assertFalse(ConcurrentDiskUtil.writeFileContent(file, "hello", "UTF-8")); + assertFalse(ConcurrentDiskUtil.writeFileContent(file, "hello", "UTF-8")); } - @Test(expected = IOException.class) - public void testTryLockFailure() throws Throwable { - Method method = ConcurrentDiskUtil.class - .getDeclaredMethod("tryLock", File.class, FileChannel.class, boolean.class); - method.setAccessible(true); - File file = new File("non-exist"); - FileChannel channel = mock(FileChannel.class); - when(channel.tryLock(anyLong(), anyLong(), anyBoolean())).thenThrow(new RuntimeException()); - try { - method.invoke(null, file, channel, true); - } catch (InvocationTargetException e) { - throw e.getCause(); - } + @Test + void testTryLockFailure() throws Throwable { + assertThrows(IOException.class, () -> { + Method method = ConcurrentDiskUtil.class.getDeclaredMethod("tryLock", File.class, FileChannel.class, + boolean.class); + method.setAccessible(true); + File file = new File("non-exist"); + FileChannel channel = mock(FileChannel.class); + when(channel.tryLock(anyLong(), anyLong(), anyBoolean())).thenThrow(new RuntimeException()); + try { + method.invoke(null, file, channel, true); + } catch (InvocationTargetException e) { + throw e.getCause(); + } + }); } - @Test(expected = IOException.class) - public void testTryLockFailureForIntercept() throws Throwable { - Method method = ConcurrentDiskUtil.class - .getDeclaredMethod("tryLock", File.class, FileChannel.class, boolean.class); - method.setAccessible(true); - File file = new File("non-exist"); - FileChannel channel = mock(FileChannel.class); - Thread.currentThread().interrupt(); - when(channel.tryLock(anyLong(), anyLong(), anyBoolean())).thenThrow(new RuntimeException()); - try { - method.invoke(null, file, channel, true); - } catch (InvocationTargetException e) { - throw e.getCause(); - } + @Test + void testTryLockFailureForIntercept() throws Throwable { + assertThrows(IOException.class, () -> { + Method method = ConcurrentDiskUtil.class.getDeclaredMethod("tryLock", File.class, FileChannel.class, + boolean.class); + method.setAccessible(true); + File file = new File("non-exist"); + FileChannel channel = mock(FileChannel.class); + Thread.currentThread().interrupt(); + when(channel.tryLock(anyLong(), anyLong(), anyBoolean())).thenThrow(new RuntimeException()); + try { + method.invoke(null, file, channel, true); + } catch (InvocationTargetException e) { + throw e.getCause(); + } + }); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/utils/GenericPollerTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/utils/GenericPollerTest.java index b081427fbfc..6a4d02ab9bf 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/utils/GenericPollerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/utils/GenericPollerTest.java @@ -16,29 +16,30 @@ package com.alibaba.nacos.client.naming.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Arrays; -public class GenericPollerTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class GenericPollerTest { @Test - public void testNext() { + void testNext() { String item1 = "item1"; String item2 = "item2"; GenericPoller poller = new GenericPoller<>(Arrays.asList(item1, item2)); - Assert.assertEquals(item1, poller.next()); - Assert.assertEquals(item2, poller.next()); - Assert.assertEquals(item1, poller.next()); + assertEquals(item1, poller.next()); + assertEquals(item2, poller.next()); + assertEquals(item1, poller.next()); } @Test - public void testRefresh() { + void testRefresh() { String item1 = "item1"; String item2 = "item2"; GenericPoller poller = new GenericPoller<>(Arrays.asList(item1, item2)); Poller poller1 = poller.refresh(Arrays.asList(item2)); - Assert.assertEquals(item2, poller1.next()); + assertEquals(item2, poller1.next()); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/utils/InitUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/utils/InitUtilsTest.java index b64cca489f0..e69d56df043 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/utils/InitUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/utils/InitUtilsTest.java @@ -19,14 +19,15 @@ import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.api.SystemPropertyKeyConst; import com.alibaba.nacos.client.env.NacosClientProperties; -import org.junit.After; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; -public class InitUtilsTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class InitUtilsTest { - @After - public void tearDown() { + @AfterEach + void tearDown() { System.clearProperty(SystemPropertyKeyConst.IS_USE_CLOUD_NAMESPACE_PARSING); System.clearProperty(SystemPropertyKeyConst.ANS_NAMESPACE); System.clearProperty(PropertyKeyConst.NAMESPACE); @@ -42,125 +43,125 @@ public void tearDown() { * current namespace priority 1. system.Properties 2. user.Properties 3. default value */ @Test - public void testInitNamespaceForDefault() { + void testInitNamespaceForDefault() { //DEFAULT final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); String actual = InitUtils.initNamespaceForNaming(properties); - Assert.assertEquals(UtilAndComs.DEFAULT_NAMESPACE_ID, actual); + assertEquals(UtilAndComs.DEFAULT_NAMESPACE_ID, actual); } @Test - public void testInitNamespaceFromAnsWithCloudParsing() { + void testInitNamespaceFromAnsWithCloudParsing() { String expect = "ans"; System.setProperty(SystemPropertyKeyConst.ANS_NAMESPACE, expect); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.IS_USE_CLOUD_NAMESPACE_PARSING, "true"); String actual = InitUtils.initNamespaceForNaming(properties); - Assert.assertEquals(expect, actual); + assertEquals(expect, actual); } @Test - public void testInitNamespaceFromAliwareWithCloudParsing() { + void testInitNamespaceFromAliwareWithCloudParsing() { String expect = "aliware"; System.setProperty(SystemPropertyKeyConst.IS_USE_CLOUD_NAMESPACE_PARSING, "true"); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.SystemEnv.ALIBABA_ALIWARE_NAMESPACE, expect); String actual = InitUtils.initNamespaceForNaming(properties); - Assert.assertEquals(expect, actual); + assertEquals(expect, actual); } @Test - public void testInitNamespaceFromJvmNamespaceWithCloudParsing() { + void testInitNamespaceFromJvmNamespaceWithCloudParsing() { String expect = "jvm_namespace"; System.setProperty(PropertyKeyConst.NAMESPACE, expect); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); String ns = InitUtils.initNamespaceForNaming(properties); - Assert.assertEquals(expect, ns); + assertEquals(expect, ns); } @Test - public void testInitNamespaceFromPropNamespaceWithCloudParsing() { + void testInitNamespaceFromPropNamespaceWithCloudParsing() { final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); String expect = "ns1"; properties.setProperty(PropertyKeyConst.NAMESPACE, expect); String ns = InitUtils.initNamespaceForNaming(properties); - Assert.assertEquals(expect, ns); + assertEquals(expect, ns); } @Test - public void testInitNamespaceFromDefaultNamespaceWithCloudParsing() { + void testInitNamespaceFromDefaultNamespaceWithCloudParsing() { final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.IS_USE_CLOUD_NAMESPACE_PARSING, "true"); String actual = InitUtils.initNamespaceForNaming(properties); - Assert.assertEquals(UtilAndComs.DEFAULT_NAMESPACE_ID, actual); + assertEquals(UtilAndComs.DEFAULT_NAMESPACE_ID, actual); } @Test - public void testInitNamespaceFromJvmNamespaceWithoutCloudParsing() { + void testInitNamespaceFromJvmNamespaceWithoutCloudParsing() { System.setProperty(SystemPropertyKeyConst.ANS_NAMESPACE, "ans"); String expect = "jvm_namespace"; System.setProperty(PropertyKeyConst.NAMESPACE, expect); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.IS_USE_CLOUD_NAMESPACE_PARSING, "false"); String ns = InitUtils.initNamespaceForNaming(properties); - Assert.assertEquals(expect, ns); + assertEquals(expect, ns); } @Test - public void testInitNamespaceFromPropNamespaceWithoutCloudParsing() { + void testInitNamespaceFromPropNamespaceWithoutCloudParsing() { System.setProperty(SystemPropertyKeyConst.ANS_NAMESPACE, "ans"); System.setProperty(SystemPropertyKeyConst.IS_USE_CLOUD_NAMESPACE_PARSING, "false"); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); String expect = "ns1"; properties.setProperty(PropertyKeyConst.NAMESPACE, expect); String ns = InitUtils.initNamespaceForNaming(properties); - Assert.assertEquals(expect, ns); + assertEquals(expect, ns); } @Test - public void testInitNamespaceFromDefaultNamespaceWithoutCloudParsing() { + void testInitNamespaceFromDefaultNamespaceWithoutCloudParsing() { System.setProperty(SystemPropertyKeyConst.ANS_NAMESPACE, "ans"); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.IS_USE_CLOUD_NAMESPACE_PARSING, "false"); String actual = InitUtils.initNamespaceForNaming(properties); - Assert.assertEquals(UtilAndComs.DEFAULT_NAMESPACE_ID, actual); + assertEquals(UtilAndComs.DEFAULT_NAMESPACE_ID, actual); } @Test - public void testInitWebRootContext() { + void testInitWebRootContext() { String ctx = "/aaa"; final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.CONTEXT_PATH, ctx); InitUtils.initWebRootContext(properties); - Assert.assertEquals(ctx, UtilAndComs.webContext); - Assert.assertEquals(ctx + "/v1/ns", UtilAndComs.nacosUrlBase); - Assert.assertEquals(ctx + "/v1/ns/instance", UtilAndComs.nacosUrlInstance); + assertEquals(ctx, UtilAndComs.webContext); + assertEquals(ctx + "/v1/ns", UtilAndComs.nacosUrlBase); + assertEquals(ctx + "/v1/ns/instance", UtilAndComs.nacosUrlInstance); } @Test - public void testInitWebRootContextWithoutValue() { + void testInitWebRootContextWithoutValue() { final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); InitUtils.initWebRootContext(properties); - Assert.assertEquals("/nacos", UtilAndComs.webContext); - Assert.assertEquals("/nacos/v1/ns", UtilAndComs.nacosUrlBase); - Assert.assertEquals("/nacos/v1/ns/instance", UtilAndComs.nacosUrlInstance); + assertEquals("/nacos", UtilAndComs.webContext); + assertEquals("/nacos/v1/ns", UtilAndComs.nacosUrlBase); + assertEquals("/nacos/v1/ns/instance", UtilAndComs.nacosUrlInstance); } @Test - public void testInitEndpointForNullProperties() { - Assert.assertEquals("", InitUtils.initEndpoint(null)); + void testInitEndpointForNullProperties() { + assertEquals("", InitUtils.initEndpoint(null)); } @Test - public void testInitEndpointFromDefaultWithoutCloudParsing() { + void testInitEndpointFromDefaultWithoutCloudParsing() { System.setProperty(SystemPropertyKeyConst.IS_USE_ENDPOINT_PARSING_RULE, "false"); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); String actual = InitUtils.initEndpoint(properties); - Assert.assertEquals("", actual); + assertEquals("", actual); } @Test - public void testInitEndpointFromPropertiesWithoutCloudParsing() { + void testInitEndpointFromPropertiesWithoutCloudParsing() { System.setProperty(SystemPropertyKeyConst.IS_USE_ENDPOINT_PARSING_RULE, "false"); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); String endpoint = "1.1.1.1"; @@ -168,11 +169,11 @@ public void testInitEndpointFromPropertiesWithoutCloudParsing() { properties.setProperty(PropertyKeyConst.ENDPOINT, endpoint); properties.setProperty(PropertyKeyConst.ENDPOINT_PORT, endpointPort); String actual = InitUtils.initEndpoint(properties); - Assert.assertEquals(endpoint + ":" + endpointPort, actual); + assertEquals(endpoint + ":" + endpointPort, actual); } @Test - public void testInitEndpointFromAliwareWithoutCloudParsing() { + void testInitEndpointFromAliwareWithoutCloudParsing() { String endpoint = "aliware_endpoint"; String endpointPort = "1234"; System.setProperty(SystemPropertyKeyConst.IS_USE_ENDPOINT_PARSING_RULE, "false"); @@ -181,19 +182,19 @@ public void testInitEndpointFromAliwareWithoutCloudParsing() { final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.ENDPOINT_PORT, endpointPort + "1"); String actual = InitUtils.initEndpoint(properties); - Assert.assertEquals("", actual); + assertEquals("", actual); } @Test - public void testInitEndpointFromDefaultWithCloudParsing() { + void testInitEndpointFromDefaultWithCloudParsing() { System.setProperty(SystemPropertyKeyConst.IS_USE_ENDPOINT_PARSING_RULE, "true"); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); String actual = InitUtils.initEndpoint(properties); - Assert.assertEquals("", actual); + assertEquals("", actual); } @Test - public void testInitEndpointFromPropertiesWithCloudParsing() { + void testInitEndpointFromPropertiesWithCloudParsing() { System.setProperty(SystemPropertyKeyConst.IS_USE_ENDPOINT_PARSING_RULE, "true"); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); String endpoint = "1.1.1.1"; @@ -201,11 +202,11 @@ public void testInitEndpointFromPropertiesWithCloudParsing() { properties.setProperty(PropertyKeyConst.ENDPOINT, endpoint); properties.setProperty(PropertyKeyConst.ENDPOINT_PORT, endpointPort); String actual = InitUtils.initEndpoint(properties); - Assert.assertEquals(endpoint + ":" + endpointPort, actual); + assertEquals(endpoint + ":" + endpointPort, actual); } @Test - public void testInitEndpointFromAliwareWithCloudParsing() { + void testInitEndpointFromAliwareWithCloudParsing() { String endpoint = "aliware_endpoint"; String endpointPort = "1234"; System.setProperty(SystemPropertyKeyConst.IS_USE_ENDPOINT_PARSING_RULE, "true"); @@ -214,11 +215,11 @@ public void testInitEndpointFromAliwareWithCloudParsing() { final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); properties.setProperty(PropertyKeyConst.ENDPOINT_PORT, endpointPort + "1"); String actual = InitUtils.initEndpoint(properties); - Assert.assertEquals(endpoint + ":" + endpointPort, actual); + assertEquals(endpoint + ":" + endpointPort, actual); } @Test - public void testInitEndpointAns() { + void testInitEndpointAns() { try { System.setProperty(PropertyKeyConst.IS_USE_ENDPOINT_PARSING_RULE, "true"); final NacosClientProperties properties = NacosClientProperties.PROTOTYPE.derive(); @@ -226,7 +227,7 @@ public void testInitEndpointAns() { properties.setProperty(PropertyKeyConst.ENDPOINT, endpoint); String actual = InitUtils.initEndpoint(properties); //defaultEndpointPort is "8080"; - Assert.assertEquals("test.com:8080", actual); + assertEquals("test.com:8080", actual); } finally { System.clearProperty(PropertyKeyConst.IS_USE_ENDPOINT_PARSING_RULE); } diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/utils/NamingHttpUtilTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/utils/NamingHttpUtilTest.java index eda626ba41b..c28d634a04f 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/utils/NamingHttpUtilTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/utils/NamingHttpUtilTest.java @@ -19,20 +19,22 @@ import com.alibaba.nacos.common.constant.HttpHeaderConsts; import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.common.utils.VersionUtils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class NamingHttpUtilTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class NamingHttpUtilTest { @Test - public void testBuilderHeader() { + void testBuilderHeader() { Header header = NamingHttpUtil.builderHeader(); - Assert.assertNotNull(header); - Assert.assertEquals(header.getValue(HttpHeaderConsts.CLIENT_VERSION_HEADER), VersionUtils.version); - Assert.assertEquals(header.getValue(HttpHeaderConsts.USER_AGENT_HEADER), VersionUtils.getFullClientVersion()); - Assert.assertEquals(header.getValue(HttpHeaderConsts.ACCEPT_ENCODING), "gzip,deflate,sdch"); - Assert.assertEquals(header.getValue(HttpHeaderConsts.CONNECTION), "Keep-Alive"); - Assert.assertNotNull(header.getValue(HttpHeaderConsts.REQUEST_ID)); - Assert.assertEquals(header.getValue(HttpHeaderConsts.REQUEST_MODULE), "Naming"); + assertNotNull(header); + assertEquals(header.getValue(HttpHeaderConsts.CLIENT_VERSION_HEADER), VersionUtils.version); + assertEquals(header.getValue(HttpHeaderConsts.USER_AGENT_HEADER), VersionUtils.getFullClientVersion()); + assertEquals("gzip,deflate,sdch", header.getValue(HttpHeaderConsts.ACCEPT_ENCODING)); + assertEquals("Keep-Alive", header.getValue(HttpHeaderConsts.CONNECTION)); + assertNotNull(header.getValue(HttpHeaderConsts.REQUEST_ID)); + assertEquals("Naming", header.getValue(HttpHeaderConsts.REQUEST_MODULE)); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/naming/utils/PairTest.java b/client/src/test/java/com/alibaba/nacos/client/naming/utils/PairTest.java index bbdf66b5dc5..069f27a91d1 100644 --- a/client/src/test/java/com/alibaba/nacos/client/naming/utils/PairTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/naming/utils/PairTest.java @@ -16,17 +16,18 @@ package com.alibaba.nacos.client.naming.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class PairTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class PairTest { @Test - public void testItem() { + void testItem() { String item = "aa"; double weight = 1.0; Pair pair = new Pair<>(item, weight); - Assert.assertEquals(weight, pair.weight(), 0.01); - Assert.assertEquals(item, pair.item()); + assertEquals(weight, pair.weight(), 0.01); + assertEquals(item, pair.item()); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/security/SecurityProxyTest.java b/client/src/test/java/com/alibaba/nacos/client/security/SecurityProxyTest.java index ee75d48914a..24288008357 100644 --- a/client/src/test/java/com/alibaba/nacos/client/security/SecurityProxyTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/security/SecurityProxyTest.java @@ -23,12 +23,13 @@ import com.alibaba.nacos.common.http.param.Header; import com.alibaba.nacos.plugin.auth.api.RequestResource; import com.alibaba.nacos.plugin.auth.spi.client.ClientAuthPluginManager; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.lang.reflect.Field; import java.util.ArrayList; @@ -37,21 +38,25 @@ import java.util.Map; import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class SecurityProxyTest { +@ExtendWith(MockitoExtension.class) +// todo remove strictness lenient +@MockitoSettings(strictness = Strictness.LENIENT) +class SecurityProxyTest { private SecurityProxy securityProxy; @Mock private NacosRestTemplate nacosRestTemplate; - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { //given HttpRestResult result = new HttpRestResult<>(); result.setData("{\"accessToken\":\"ttttttttttttttttt\",\"tokenTtl\":1000}"); @@ -64,7 +69,7 @@ public void setUp() throws Exception { } @Test - public void testLoginClientAuthService() throws Exception { + void testLoginClientAuthService() throws Exception { Properties properties = new Properties(); properties.setProperty(PropertyKeyConst.USERNAME, "aaa"); properties.setProperty(PropertyKeyConst.PASSWORD, "123456"); @@ -73,7 +78,7 @@ public void testLoginClientAuthService() throws Exception { } @Test - public void testGetIdentityContext() { + void testGetIdentityContext() { Properties properties = new Properties(); properties.setProperty(PropertyKeyConst.USERNAME, "aaa"); properties.setProperty(PropertyKeyConst.PASSWORD, "123456"); @@ -81,11 +86,11 @@ public void testGetIdentityContext() { //when Map keyMap = securityProxy.getIdentityContext(null); //then - Assert.assertEquals("ttttttttttttttttt", keyMap.get(NacosAuthLoginConstant.ACCESSTOKEN)); + assertEquals("ttttttttttttttttt", keyMap.get(NacosAuthLoginConstant.ACCESSTOKEN)); } @Test - public void testLoginWithoutAnyPlugin() throws NoSuchFieldException, IllegalAccessException { + void testLoginWithoutAnyPlugin() throws NoSuchFieldException, IllegalAccessException { Field clientAuthPluginManagerField = SecurityProxy.class.getDeclaredField("clientAuthPluginManager"); clientAuthPluginManagerField.setAccessible(true); ClientAuthPluginManager clientAuthPluginManager = mock(ClientAuthPluginManager.class); @@ -93,6 +98,6 @@ public void testLoginWithoutAnyPlugin() throws NoSuchFieldException, IllegalAcce when(clientAuthPluginManager.getAuthServiceSpiImplSet()).thenReturn(Collections.emptySet()); securityProxy.login(new Properties()); Map header = securityProxy.getIdentityContext(new RequestResource()); - Assert.assertTrue(header.isEmpty()); + assertTrue(header.isEmpty()); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/AppNameUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/AppNameUtilsTest.java index 95ddb0265c9..1d41c1ee44f 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/AppNameUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/AppNameUtilsTest.java @@ -19,20 +19,20 @@ package com.alibaba.nacos.client.utils; import com.alibaba.nacos.client.constant.Constants; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; -public class AppNameUtilsTest { +class AppNameUtilsTest { - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { } - @After - public void tearDown() throws Exception { + @AfterEach + void tearDown() throws Exception { System.clearProperty(Constants.SysEnv.PROJECT_NAME); System.clearProperty("jboss.server.home.dir"); System.clearProperty("jetty.home"); @@ -40,34 +40,34 @@ public void tearDown() throws Exception { } @Test - public void testGetAppNameByDefault() { + void testGetAppNameByDefault() { String appName = AppNameUtils.getAppName(); assertEquals("unknown", appName); } @Test - public void testGetAppNameByProjectName() { + void testGetAppNameByProjectName() { System.setProperty(Constants.SysEnv.PROJECT_NAME, "testAppName"); String appName = AppNameUtils.getAppName(); assertEquals("testAppName", appName); } @Test - public void testGetAppNameByServerTypeForJboss() { + void testGetAppNameByServerTypeForJboss() { System.setProperty("jboss.server.home.dir", "/home/admin/testAppName/"); String appName = AppNameUtils.getAppName(); assertEquals("testAppName", appName); } @Test - public void testGetAppNameByServerTypeForJetty() { + void testGetAppNameByServerTypeForJetty() { System.setProperty("jetty.home", "/home/admin/testAppName/"); String appName = AppNameUtils.getAppName(); assertEquals("testAppName", appName); } @Test - public void testGetAppNameByServerTypeForTomcat() { + void testGetAppNameByServerTypeForTomcat() { System.setProperty("catalina.base", "/home/admin/testAppName/"); String appName = AppNameUtils.getAppName(); assertEquals("testAppName", appName); diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/ContextPathUtilTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/ContextPathUtilTest.java index c1953d8b1e7..3692872939e 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/ContextPathUtilTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/ContextPathUtilTest.java @@ -16,9 +16,9 @@ package com.alibaba.nacos.client.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * ContextPathUtil test. @@ -26,10 +26,10 @@ * @author Wei.Wang * @date 2020/11/26 3:13 PM */ -public class ContextPathUtilTest { +class ContextPathUtilTest { @Test - public void testNormalizeContextPath() { + void testNormalizeContextPath() { assertEquals("/nacos", ContextPathUtil.normalizeContextPath("/nacos")); assertEquals("/nacos", ContextPathUtil.normalizeContextPath("nacos")); assertEquals("", ContextPathUtil.normalizeContextPath("/")); diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/EnvUtilTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/EnvUtilTest.java index 1be9575ef4e..8a8185ed9fc 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/EnvUtilTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/EnvUtilTest.java @@ -19,8 +19,7 @@ package com.alibaba.nacos.client.utils; import com.alibaba.nacos.api.common.Constants; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.Arrays; import java.util.Collections; @@ -28,45 +27,48 @@ import java.util.List; import java.util.Map; -public class EnvUtilTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +class EnvUtilTest { @Test - public void testSetSelfEnv() { + void testSetSelfEnv() { Map> headers = new HashMap<>(); headers.put(Constants.AMORY_TAG, Arrays.asList("a", "1")); headers.put(Constants.VIPSERVER_TAG, Arrays.asList("b", "2")); headers.put(Constants.LOCATION_TAG, Arrays.asList("c", "3")); EnvUtil.setSelfEnv(headers); - Assert.assertEquals("a,1", EnvUtil.getSelfAmoryTag()); - Assert.assertEquals("b,2", EnvUtil.getSelfVipserverTag()); - Assert.assertEquals("c,3", EnvUtil.getSelfLocationTag()); + assertEquals("a,1", EnvUtil.getSelfAmoryTag()); + assertEquals("b,2", EnvUtil.getSelfVipserverTag()); + assertEquals("c,3", EnvUtil.getSelfLocationTag()); // reset by empty list headers.put(Constants.AMORY_TAG, Collections.emptyList()); headers.put(Constants.VIPSERVER_TAG, Collections.emptyList()); headers.put(Constants.LOCATION_TAG, Collections.emptyList()); EnvUtil.setSelfEnv(headers); - Assert.assertNull(EnvUtil.getSelfAmoryTag()); - Assert.assertNull(EnvUtil.getSelfVipserverTag()); - Assert.assertNull(EnvUtil.getSelfLocationTag()); + assertNull(EnvUtil.getSelfAmoryTag()); + assertNull(EnvUtil.getSelfVipserverTag()); + assertNull(EnvUtil.getSelfLocationTag()); } @Test - public void testSetSelfEnv2() { + void testSetSelfEnv2() { Map> headers = new HashMap<>(); headers.put(Constants.AMORY_TAG, Arrays.asList("a", "1")); headers.put(Constants.VIPSERVER_TAG, Arrays.asList("b", "2")); headers.put(Constants.LOCATION_TAG, Arrays.asList("c", "3")); EnvUtil.setSelfEnv(headers); - Assert.assertEquals("a,1", EnvUtil.getSelfAmoryTag()); - Assert.assertEquals("b,2", EnvUtil.getSelfVipserverTag()); - Assert.assertEquals("c,3", EnvUtil.getSelfLocationTag()); + assertEquals("a,1", EnvUtil.getSelfAmoryTag()); + assertEquals("b,2", EnvUtil.getSelfVipserverTag()); + assertEquals("c,3", EnvUtil.getSelfLocationTag()); // reset headers.put(Constants.AMORY_TAG, null); headers.put(Constants.VIPSERVER_TAG, null); headers.put(Constants.LOCATION_TAG, null); EnvUtil.setSelfEnv(headers); - Assert.assertNull(EnvUtil.getSelfAmoryTag()); - Assert.assertNull(EnvUtil.getSelfVipserverTag()); - Assert.assertNull(EnvUtil.getSelfLocationTag()); + assertNull(EnvUtil.getSelfAmoryTag()); + assertNull(EnvUtil.getSelfVipserverTag()); + assertNull(EnvUtil.getSelfLocationTag()); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/LogUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/LogUtilsTest.java index ec04b5a4e7b..d158de997fa 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/LogUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/LogUtilsTest.java @@ -16,16 +16,17 @@ package com.alibaba.nacos.client.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.slf4j.Logger; -public class LogUtilsTest { +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class LogUtilsTest { @Test - public void testLogger() { + void testLogger() { Logger logger = LogUtils.logger(LogUtilsTest.class); - Assert.assertNotNull(logger); + assertNotNull(logger); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/ParamUtilTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/ParamUtilTest.java index 7f16b04f607..5fa229bf58c 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/ParamUtilTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/ParamUtilTest.java @@ -22,17 +22,18 @@ import com.alibaba.nacos.client.env.NacosClientProperties; import com.alibaba.nacos.common.utils.MD5Utils; import com.alibaba.nacos.common.utils.VersionUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Properties; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; -public class ParamUtilTest { +class ParamUtilTest { private String defaultAppKey; @@ -48,8 +49,8 @@ public class ParamUtilTest { private String defaultNodesPath; - @Before - public void before() { + @BeforeEach + void before() { defaultAppKey = ""; defaultAppName = "unknown"; defaultContextPath = "nacos"; @@ -59,8 +60,8 @@ public void before() { defaultNodesPath = "serverlist"; } - @After - public void after() { + @AfterEach + void after() { ParamUtil.setAppKey(defaultAppKey); ParamUtil.setAppName(defaultAppName); ParamUtil.setDefaultContextPath(defaultContextPath); @@ -74,7 +75,7 @@ public void after() { } @Test - public void testGetAppKey() { + void testGetAppKey() { String defaultVal = ParamUtil.getAppKey(); assertEquals(defaultAppKey, defaultVal); @@ -84,7 +85,7 @@ public void testGetAppKey() { } @Test - public void testGetAppName() { + void testGetAppName() { String defaultVal = ParamUtil.getAppName(); assertEquals(defaultAppName, defaultVal); @@ -94,7 +95,7 @@ public void testGetAppName() { } @Test - public void testGetDefaultContextPath() { + void testGetDefaultContextPath() { String defaultVal = ParamUtil.getDefaultContextPath(); assertEquals(defaultContextPath, defaultVal); @@ -104,7 +105,7 @@ public void testGetDefaultContextPath() { } @Test - public void testGetClientVersion() { + void testGetClientVersion() { String defaultVal = ParamUtil.getClientVersion(); assertEquals(defaultVersion, defaultVal); @@ -114,7 +115,7 @@ public void testGetClientVersion() { } @Test - public void testSetConnectTimeout() { + void testSetConnectTimeout() { int defaultVal = ParamUtil.getConnectTimeout(); assertEquals(defaultConnectTimeout, defaultVal); @@ -124,7 +125,7 @@ public void testSetConnectTimeout() { } @Test - public void testGetPerTaskConfigSize() { + void testGetPerTaskConfigSize() { double defaultVal = ParamUtil.getPerTaskConfigSize(); assertEquals(defaultPerTaskConfigSize, defaultVal, 0.01); @@ -134,13 +135,13 @@ public void testGetPerTaskConfigSize() { } @Test - public void testGetDefaultServerPort() { + void testGetDefaultServerPort() { String actual = ParamUtil.getDefaultServerPort(); assertEquals("8848", actual); } @Test - public void testGetDefaultNodesPath() { + void testGetDefaultNodesPath() { String defaultVal = ParamUtil.getDefaultNodesPath(); assertEquals("serverlist", defaultVal); @@ -150,7 +151,7 @@ public void testGetDefaultNodesPath() { } @Test - public void testParseNamespace() { + void testParseNamespace() { String expect = "test"; Properties properties = new Properties(); properties.setProperty(PropertyKeyConst.NAMESPACE, expect); @@ -161,50 +162,54 @@ public void testParseNamespace() { } @Test - public void testParsingEndpointRule() { + void testParsingEndpointRule() { String url = "${test:www.example.com}"; String actual = ParamUtil.parsingEndpointRule(url); assertEquals("www.example.com", actual); } - @Test(expected = IllegalArgumentException.class) - public void testInitConnectionTimeoutWithException() throws Throwable { - Method method = ParamUtil.class.getDeclaredMethod("initConnectionTimeout"); - method.setAccessible(true); - System.setProperty("NACOS.CONNECT.TIMEOUT", "test"); - try { - method.invoke(null); - } catch (InvocationTargetException e) { - throw e.getCause(); - } + @Test + void testInitConnectionTimeoutWithException() throws Throwable { + assertThrows(IllegalArgumentException.class, () -> { + Method method = ParamUtil.class.getDeclaredMethod("initConnectionTimeout"); + method.setAccessible(true); + System.setProperty("NACOS.CONNECT.TIMEOUT", "test"); + try { + method.invoke(null); + } catch (InvocationTargetException e) { + throw e.getCause(); + } + }); } - @Test(expected = IllegalArgumentException.class) - public void testInitPerTaskConfigSizeWithException() throws Throwable { - Method method = ParamUtil.class.getDeclaredMethod("initPerTaskConfigSize"); - method.setAccessible(true); - System.setProperty("PER_TASK_CONFIG_SIZE", "test"); - try { - method.invoke(null); - } catch (InvocationTargetException e) { - throw e.getCause(); - } + @Test + void testInitPerTaskConfigSizeWithException() throws Throwable { + assertThrows(IllegalArgumentException.class, () -> { + Method method = ParamUtil.class.getDeclaredMethod("initPerTaskConfigSize"); + method.setAccessible(true); + System.setProperty("PER_TASK_CONFIG_SIZE", "test"); + try { + method.invoke(null); + } catch (InvocationTargetException e) { + throw e.getCause(); + } + }); } @Test - public void testParsingEndpointRuleFromSystem() { + void testParsingEndpointRuleFromSystem() { System.setProperty(PropertyKeyConst.SystemEnv.ALIBABA_ALIWARE_ENDPOINT_URL, "alibaba_aliware_endpoint_url"); assertEquals("alibaba_aliware_endpoint_url", ParamUtil.parsingEndpointRule(null)); } @Test - public void testParsingEndpointRuleFromSystemWithParam() { + void testParsingEndpointRuleFromSystemWithParam() { System.setProperty(PropertyKeyConst.SystemEnv.ALIBABA_ALIWARE_ENDPOINT_URL, "alibaba_aliware_endpoint_url"); assertEquals("alibaba_aliware_endpoint_url", ParamUtil.parsingEndpointRule("${abc:xxx}")); } @Test - public void testSimplyEnvNameIfOverLimit() { + void testSimplyEnvNameIfOverLimit() { StringBuilder envNameOverLimitBuilder = new StringBuilder("test"); for (int i = 0; i < 50; i++) { envNameOverLimitBuilder.append(i); @@ -215,7 +220,8 @@ public void testSimplyEnvNameIfOverLimit() { assertEquals(expect, actual); } - @Test public void testSimplyEnvNameNotOverLimit() { + @Test + void testSimplyEnvNameNotOverLimit() { String expect = "test"; assertEquals(expect, ParamUtil.simplyEnvNameIfOverLimit(expect)); } diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/PreInitUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/PreInitUtilsTest.java index 67969c8ef48..19b6c6f0b8e 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/PreInitUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/PreInitUtilsTest.java @@ -16,14 +16,14 @@ package com.alibaba.nacos.client.utils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.concurrent.TimeUnit; -public class PreInitUtilsTest { +class PreInitUtilsTest { @Test - public void testAsyncPreLoadCostComponent() throws InterruptedException { + void testAsyncPreLoadCostComponent() throws InterruptedException { // There is no things need to be assert. // The method will called when nacos-client init to async to load some components to reduce the sync load time. PreInitUtils.asyncPreLoadCostComponent(); diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/StringUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/StringUtilsTest.java index 1550888822b..95d13c20c20 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/StringUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/StringUtilsTest.java @@ -17,7 +17,7 @@ package com.alibaba.nacos.client.utils; import com.alibaba.nacos.common.utils.StringUtils; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.Collection; @@ -27,15 +27,15 @@ import static com.alibaba.nacos.common.utils.StringUtils.isNotEmpty; import static com.alibaba.nacos.common.utils.StringUtils.join; import static com.alibaba.nacos.common.utils.StringUtils.substringBetween; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -public class StringUtilsTest { +class StringUtilsTest { @Test - public void testisNotBlank() { + void testisNotBlank() { assertTrue(isNotBlank("foo")); assertFalse(isNotBlank(" ")); @@ -43,20 +43,20 @@ public void testisNotBlank() { } @Test - public void testIsNotEmpty() { + void testIsNotEmpty() { assertFalse(isNotEmpty("")); assertTrue(isNotEmpty("foo")); } @Test - public void testDefaultIfEmpty() { + void testDefaultIfEmpty() { assertEquals("foo", defaultIfEmpty("", "foo")); assertEquals("bar", defaultIfEmpty("bar", "foo")); } @Test - public void testEquals() { + void testEquals() { assertTrue(StringUtils.equals("foo", "foo")); assertFalse(StringUtils.equals("bar", "foo")); @@ -65,7 +65,7 @@ public void testEquals() { } @Test - public void testSubstringBetween() { + void testSubstringBetween() { assertNull(substringBetween(null, null, null)); assertNull(substringBetween("", "foo", "")); assertNull(substringBetween("foo", "bar", "baz")); @@ -74,7 +74,7 @@ public void testSubstringBetween() { } @Test - public void testJoin() { + void testJoin() { assertNull(join(null, "")); Collection collection = new ArrayList(); diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/TemplateUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/TemplateUtilsTest.java index 0af54f40bd6..497a3cb2462 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/TemplateUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/TemplateUtilsTest.java @@ -18,21 +18,21 @@ package com.alibaba.nacos.client.utils; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import java.util.concurrent.Callable; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class TemplateUtilsTest { +class TemplateUtilsTest { @Test - public void testStringNotEmptyAndThenExecuteSuccess() { + void testStringNotEmptyAndThenExecuteSuccess() { String word = "run"; Runnable task = Mockito.mock(Runnable.class); TemplateUtils.stringNotEmptyAndThenExecute(word, task); @@ -40,7 +40,7 @@ public void testStringNotEmptyAndThenExecuteSuccess() { } @Test - public void testStringNotEmptyAndThenExecuteFail() { + void testStringNotEmptyAndThenExecuteFail() { String word = ""; Runnable task = Mockito.mock(Runnable.class); TemplateUtils.stringNotEmptyAndThenExecute(word, task); @@ -48,7 +48,7 @@ public void testStringNotEmptyAndThenExecuteFail() { } @Test - public void testStringNotEmptyAndThenExecuteException() { + void testStringNotEmptyAndThenExecuteException() { String word = "run"; Runnable task = Mockito.mock(Runnable.class); doThrow(new RuntimeException("test")).when(task).run(); @@ -58,22 +58,22 @@ public void testStringNotEmptyAndThenExecuteException() { } @Test - public void testStringEmptyAndThenExecuteSuccess() { + void testStringEmptyAndThenExecuteSuccess() { String word = " "; String actual = TemplateUtils.stringEmptyAndThenExecute(word, () -> "call"); - Assert.assertEquals("", actual); + assertEquals("", actual); } @Test - public void testStringEmptyAndThenExecuteFail() { + void testStringEmptyAndThenExecuteFail() { String word = ""; final String expect = "call"; String actual = TemplateUtils.stringEmptyAndThenExecute(word, () -> expect); - Assert.assertEquals(expect, actual); + assertEquals(expect, actual); } @Test - public void testStringEmptyAndThenExecuteException() throws Exception { + void testStringEmptyAndThenExecuteException() throws Exception { Callable callable = mock(Callable.class); when(callable.call()).thenThrow(new RuntimeException("test")); String actual = TemplateUtils.stringEmptyAndThenExecute(null, callable); @@ -81,22 +81,22 @@ public void testStringEmptyAndThenExecuteException() throws Exception { } @Test - public void testStringBlankAndThenExecuteSuccess() { + void testStringBlankAndThenExecuteSuccess() { String word = "success"; String actual = TemplateUtils.stringBlankAndThenExecute(word, () -> "call"); - Assert.assertEquals(word, actual); + assertEquals(word, actual); } @Test - public void testStringBlankAndThenExecuteFail() { + void testStringBlankAndThenExecuteFail() { String word = " "; final String expect = "call"; String actual = TemplateUtils.stringBlankAndThenExecute(word, () -> expect); - Assert.assertEquals(expect, actual); + assertEquals(expect, actual); } @Test - public void testStringBlankAndThenExecuteException() throws Exception { + void testStringBlankAndThenExecuteException() throws Exception { Callable callable = mock(Callable.class); when(callable.call()).thenThrow(new RuntimeException("test")); String actual = TemplateUtils.stringBlankAndThenExecute(null, callable); diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/TenantUtilTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/TenantUtilTest.java index 4b00504bc3a..a64f3396fbc 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/TenantUtilTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/TenantUtilTest.java @@ -18,32 +18,33 @@ package com.alibaba.nacos.client.utils; -import org.junit.After; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; -public class TenantUtilTest { +import static org.junit.jupiter.api.Assertions.assertEquals; + +class TenantUtilTest { - @After - public void tearDown() { + @AfterEach + void tearDown() { System.clearProperty("acm.namespace"); System.clearProperty("ans.namespace"); } @Test - public void testGetUserTenantForAcm() { + void testGetUserTenantForAcm() { String expect = "test"; System.setProperty("acm.namespace", expect); String actual = TenantUtil.getUserTenantForAcm(); - Assert.assertEquals(expect, actual); + assertEquals(expect, actual); } @Test - public void testGetUserTenantForAns() { + void testGetUserTenantForAns() { String expect = "test"; System.setProperty("ans.namespace", expect); String actual = TenantUtil.getUserTenantForAns(); - Assert.assertEquals(expect, actual); + assertEquals(expect, actual); } } diff --git a/client/src/test/java/com/alibaba/nacos/client/utils/ValidatorUtilsTest.java b/client/src/test/java/com/alibaba/nacos/client/utils/ValidatorUtilsTest.java index a14536facc1..5cefb91b3cf 100644 --- a/client/src/test/java/com/alibaba/nacos/client/utils/ValidatorUtilsTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/utils/ValidatorUtilsTest.java @@ -17,17 +17,18 @@ package com.alibaba.nacos.client.utils; import com.alibaba.nacos.api.PropertyKeyConst; -import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.client.env.NacosClientProperties; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import java.util.Properties; -public class ValidatorUtilsTest { +import static org.junit.jupiter.api.Assertions.assertThrows; + +class ValidatorUtilsTest { @Test - public void testContextPathLegal() { + void testContextPathLegal() { String contextPath1 = "/nacos"; ValidatorUtils.checkContextPath(contextPath1); String contextPath2 = "nacos"; @@ -40,39 +41,45 @@ public void testContextPathLegal() { ValidatorUtils.checkContextPath(null); } - @Test(expected = IllegalArgumentException.class) - public void testContextPathIllegal1() { - String contextPath1 = "//nacos/"; - ValidatorUtils.checkContextPath(contextPath1); + @Test + void testContextPathIllegal1() { + assertThrows(IllegalArgumentException.class, () -> { + String contextPath1 = "//nacos/"; + ValidatorUtils.checkContextPath(contextPath1); + }); } - @Test(expected = IllegalArgumentException.class) - public void testContextPathIllegal2() { - String contextPath2 = "/nacos//"; - ValidatorUtils.checkContextPath(contextPath2); + @Test + void testContextPathIllegal2() { + assertThrows(IllegalArgumentException.class, () -> { + String contextPath2 = "/nacos//"; + ValidatorUtils.checkContextPath(contextPath2); + }); } - @Test(expected = IllegalArgumentException.class) - public void testContextPathIllegal3() { - String contextPath3 = "///"; - ValidatorUtils.checkContextPath(contextPath3); + @Test + void testContextPathIllegal3() { + assertThrows(IllegalArgumentException.class, () -> { + String contextPath3 = "///"; + ValidatorUtils.checkContextPath(contextPath3); + }); } - @Test(expected = IllegalArgumentException.class) - public void testContextPathIllegal4() { - String contextPath4 = "//"; - ValidatorUtils.checkContextPath(contextPath4); + @Test + void testContextPathIllegal4() { + assertThrows(IllegalArgumentException.class, () -> { + String contextPath4 = "//"; + ValidatorUtils.checkContextPath(contextPath4); + }); } @Test - public void testCheckInitParam() { - try { + void testCheckInitParam() { + Assertions.assertDoesNotThrow(() -> { Properties properties = new Properties(); properties.setProperty(PropertyKeyConst.CONTEXT_PATH, "test"); final NacosClientProperties nacosClientProperties = NacosClientProperties.PROTOTYPE.derive(properties); ValidatorUtils.checkInitParam(nacosClientProperties); - } catch (NacosException e) { - Assert.fail(); - } + }); } } From bc039bc125e6033de74b4b6c030f605bd769ee5a Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Wed, 29 May 2024 10:43:13 +0800 Subject: [PATCH 027/110] upgrade module naocs-console from junit4 to junit5 (#12136) --- .../controller/HealthControllerTest.java | 58 +++++----- .../controller/NamespaceControllerTest.java | 64 +++++------ .../controller/ServerStateControllerTest.java | 34 +++--- .../controller/v2/HealthControllerV2Test.java | 58 +++++----- .../v2/NamespaceControllerV2Test.java | 107 +++++++++--------- .../ConsoleExceptionHandlerTest.java | 46 ++++---- .../NacosApiExceptionHandlerTest.java | 40 +++---- .../nacos/console/filter/XssFilterTest.java | 12 +- .../paramcheck/ParamExtractorTest.java | 22 ++-- 9 files changed, 216 insertions(+), 225 deletions(-) diff --git a/console/src/test/java/com/alibaba/nacos/console/controller/HealthControllerTest.java b/console/src/test/java/com/alibaba/nacos/console/controller/HealthControllerTest.java index e5731e34fc9..cd139527559 100644 --- a/console/src/test/java/com/alibaba/nacos/console/controller/HealthControllerTest.java +++ b/console/src/test/java/com/alibaba/nacos/console/controller/HealthControllerTest.java @@ -22,24 +22,24 @@ import com.alibaba.nacos.naming.cluster.NamingReadinessCheckService; import com.alibaba.nacos.naming.cluster.ServerStatus; import com.alibaba.nacos.naming.cluster.ServerStatusManager; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.http.ResponseEntity; import java.lang.reflect.Field; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; -@RunWith(MockitoJUnitRunner.class) -public class HealthControllerTest { +@ExtendWith(MockitoExtension.class) +class HealthControllerTest { @InjectMocks private HealthController healthController; @@ -50,68 +50,66 @@ public class HealthControllerTest { @Mock private ServerStatusManager serverStatusManager; - @Before - public void setUp() { + @BeforeEach + void setUp() { // auto register to module health checker holder. new NamingReadinessCheckService(serverStatusManager); new ConfigReadinessCheckService(configInfoPersistService); } - @After - public void tearDown() throws IllegalAccessException, NoSuchFieldException { + @AfterEach + void tearDown() throws IllegalAccessException, NoSuchFieldException { Field moduleHealthCheckersField = ModuleHealthCheckerHolder.class.getDeclaredField("moduleHealthCheckers"); moduleHealthCheckersField.setAccessible(true); ((List) moduleHealthCheckersField.get(ModuleHealthCheckerHolder.getInstance())).clear(); } @Test - public void testLiveness() throws Exception { + void testLiveness() throws Exception { ResponseEntity response = healthController.liveness(); - Assert.assertEquals(200, response.getStatusCodeValue()); + assertEquals(200, response.getStatusCodeValue()); } @Test - public void testReadinessSuccess() throws Exception { + void testReadinessSuccess() throws Exception { Mockito.when(configInfoPersistService.configInfoCount(any(String.class))).thenReturn(0); Mockito.when(serverStatusManager.getServerStatus()).thenReturn(ServerStatus.UP); ResponseEntity response = healthController.readiness(null); - Assert.assertEquals(200, response.getStatusCodeValue()); - Assert.assertEquals("OK", response.getBody()); + assertEquals(200, response.getStatusCodeValue()); + assertEquals("OK", response.getBody()); } @Test - public void testReadinessBothFailure() { + void testReadinessBothFailure() { // Config and Naming are not in readiness Mockito.when(configInfoPersistService.configInfoCount(any(String.class))) .thenThrow(new RuntimeException("HealthControllerTest.testReadiness")); - Mockito.when(serverStatusManager.getServerStatus()) - .thenThrow(new RuntimeException("HealthControllerTest.testReadiness")); + Mockito.when(serverStatusManager.getServerStatus()).thenThrow(new RuntimeException("HealthControllerTest.testReadiness")); ResponseEntity response = healthController.readiness(null); - Assert.assertEquals(500, response.getStatusCodeValue()); - Assert.assertEquals("naming and config not in readiness", response.getBody()); + assertEquals(500, response.getStatusCodeValue()); + assertEquals("naming and config not in readiness", response.getBody()); } @Test - public void testReadinessConfigFailure() { + void testReadinessConfigFailure() { // Config is not in readiness Mockito.when(configInfoPersistService.configInfoCount(any(String.class))) .thenThrow(new RuntimeException("HealthControllerTest.testReadiness")); Mockito.when(serverStatusManager.getServerStatus()).thenReturn(ServerStatus.UP); ResponseEntity response = healthController.readiness(null); - Assert.assertEquals(500, response.getStatusCodeValue()); - Assert.assertEquals("config not in readiness", response.getBody()); + assertEquals(500, response.getStatusCodeValue()); + assertEquals("config not in readiness", response.getBody()); } @Test - public void testReadinessNamingFailure() { + void testReadinessNamingFailure() { // Naming is not in readiness Mockito.when(configInfoPersistService.configInfoCount(any(String.class))).thenReturn(0); - Mockito.when(serverStatusManager.getServerStatus()) - .thenThrow(new RuntimeException("HealthControllerTest.testReadiness")); + Mockito.when(serverStatusManager.getServerStatus()).thenThrow(new RuntimeException("HealthControllerTest.testReadiness")); ResponseEntity response = healthController.readiness(null); - Assert.assertEquals(500, response.getStatusCodeValue()); - Assert.assertEquals("naming not in readiness", response.getBody()); + assertEquals(500, response.getStatusCodeValue()); + assertEquals("naming not in readiness", response.getBody()); } } diff --git a/console/src/test/java/com/alibaba/nacos/console/controller/NamespaceControllerTest.java b/console/src/test/java/com/alibaba/nacos/console/controller/NamespaceControllerTest.java index c1f4c1e0212..5fc208a687b 100644 --- a/console/src/test/java/com/alibaba/nacos/console/controller/NamespaceControllerTest.java +++ b/console/src/test/java/com/alibaba/nacos/console/controller/NamespaceControllerTest.java @@ -18,22 +18,22 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.common.model.RestResult; -import com.alibaba.nacos.core.namespace.repository.NamespacePersistService; import com.alibaba.nacos.core.namespace.model.Namespace; +import com.alibaba.nacos.core.namespace.repository.NamespacePersistService; import com.alibaba.nacos.core.service.NamespaceOperationService; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.Collections; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.matches; @@ -41,8 +41,8 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@RunWith(MockitoJUnitRunner.class) -public class NamespaceControllerTest { +@ExtendWith(MockitoExtension.class) +class NamespaceControllerTest { @InjectMocks private NamespaceController namespaceController; @@ -53,13 +53,13 @@ public class NamespaceControllerTest { @Mock private NamespaceOperationService namespaceOperationService; - @Before - public void setUp() { + @BeforeEach + void setUp() { } @Test - public void testGetNamespaces() throws Exception { + void testGetNamespaces() throws Exception { Namespace namespace = new Namespace("", "public"); when(namespaceOperationService.getNamespaceList()).thenReturn(Collections.singletonList(namespace)); RestResult> actual = namespaceController.getNamespaces(); @@ -69,20 +69,20 @@ public void testGetNamespaces() throws Exception { } @Test - public void testGetNamespaceByNamespaceId() throws Exception { + void testGetNamespaceByNamespaceId() throws Exception { Namespace namespace = new Namespace("", "public", "", 0, 0, 0); when(namespaceOperationService.getNamespace("")).thenReturn(namespace); assertEquals(namespace, namespaceController.getNamespace("")); } @Test - public void testCreateNamespaceWithCustomId() throws Exception { + void testCreateNamespaceWithCustomId() throws Exception { namespaceController.createNamespace("test-Id", "testName", "testDesc"); verify(namespaceOperationService).createNamespace("test-Id", "testName", "testDesc"); } - + @Test - public void testCreateNamespaceWithIllegalName() { + void testCreateNamespaceWithIllegalName() { assertFalse(namespaceController.createNamespace(null, "test@Name", "testDesc")); assertFalse(namespaceController.createNamespace(null, "test#Name", "testDesc")); assertFalse(namespaceController.createNamespace(null, "test$Name", "testDesc")); @@ -91,21 +91,21 @@ public void testCreateNamespaceWithIllegalName() { assertFalse(namespaceController.createNamespace(null, "test&Name", "testDesc")); assertFalse(namespaceController.createNamespace(null, "test*Name", "testDesc")); } - + @Test - public void testCreateNamespaceWithNonUniqueId() throws Exception { + void testCreateNamespaceWithNonUniqueId() throws Exception { when(namespacePersistService.tenantInfoCountByTenantId("test-Id")).thenReturn(1); assertFalse(namespaceController.createNamespace("test-Id", "testNam2", "testDesc")); } @Test - public void testCreateNamespaceWithIllegalCustomId() throws Exception { + void testCreateNamespaceWithIllegalCustomId() throws Exception { assertFalse(namespaceController.createNamespace("test.Id", "testName", "testDesc")); verify(namespaceOperationService, never()).createNamespace("test.Id", "testName", "testDesc"); } @Test - public void testCreateNamespaceWithLongCustomId() throws Exception { + void testCreateNamespaceWithLongCustomId() throws Exception { StringBuilder longId = new StringBuilder(); for (int i = 0; i < 129; i++) { longId.append("a"); @@ -115,22 +115,20 @@ public void testCreateNamespaceWithLongCustomId() throws Exception { } @Test - public void testCreateNamespaceWithAutoId() throws Exception { + void testCreateNamespaceWithAutoId() throws Exception { assertFalse(namespaceController.createNamespace("", "testName", "testDesc")); - verify(namespaceOperationService) - .createNamespace(matches("[A-Za-z\\d]{8}-[A-Za-z\\d]{4}-[A-Za-z\\d]{4}-[A-Za-z\\d]{4}-[A-Za-z\\d]{12}"), - eq("testName"), eq("testDesc")); + verify(namespaceOperationService).createNamespace( + matches("[A-Za-z\\d]{8}-[A-Za-z\\d]{4}-[A-Za-z\\d]{4}-[A-Za-z\\d]{4}-[A-Za-z\\d]{12}"), eq("testName"), eq("testDesc")); } @Test - public void testCreateNamespaceFailure() throws NacosException { - when(namespaceOperationService.createNamespace(anyString(), anyString(), anyString())) - .thenThrow(new NacosException(500, "test")); + void testCreateNamespaceFailure() throws NacosException { + when(namespaceOperationService.createNamespace(anyString(), anyString(), anyString())).thenThrow(new NacosException(500, "test")); assertFalse(namespaceController.createNamespace("", "testName", "testDesc")); } @Test - public void testCheckNamespaceIdExist() throws Exception { + void testCheckNamespaceIdExist() throws Exception { when(namespacePersistService.tenantInfoCountByTenantId("public")).thenReturn(1); when(namespacePersistService.tenantInfoCountByTenantId("123")).thenReturn(0); assertFalse(namespaceController.checkNamespaceIdExist("")); @@ -139,13 +137,13 @@ public void testCheckNamespaceIdExist() throws Exception { } @Test - public void testEditNamespace() { + void testEditNamespace() { namespaceController.editNamespace("test-Id", "testName", "testDesc"); verify(namespaceOperationService).editNamespace("test-Id", "testName", "testDesc"); } - + @Test - public void testEditNamespaceWithIllegalName() { + void testEditNamespaceWithIllegalName() { assertFalse(namespaceController.createNamespace(null, "test@Name", "testDesc")); assertFalse(namespaceController.createNamespace(null, "test#Name", "testDesc")); assertFalse(namespaceController.createNamespace(null, "test$Name", "testDesc")); @@ -156,7 +154,7 @@ public void testEditNamespaceWithIllegalName() { } @Test - public void deleteConfig() throws Exception { + void deleteConfig() throws Exception { namespaceController.deleteNamespace("test-Id"); verify(namespaceOperationService).removeNamespace("test-Id"); } diff --git a/console/src/test/java/com/alibaba/nacos/console/controller/ServerStateControllerTest.java b/console/src/test/java/com/alibaba/nacos/console/controller/ServerStateControllerTest.java index 7a0249690a0..a37082a84ef 100644 --- a/console/src/test/java/com/alibaba/nacos/console/controller/ServerStateControllerTest.java +++ b/console/src/test/java/com/alibaba/nacos/console/controller/ServerStateControllerTest.java @@ -21,12 +21,11 @@ import com.alibaba.nacos.sys.env.Constants; import com.alibaba.nacos.sys.env.EnvUtil; import com.fasterxml.jackson.databind.node.ObjectNode; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.mock.env.MockEnvironment; import org.springframework.mock.web.MockHttpServletResponse; @@ -35,6 +34,8 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import static org.junit.jupiter.api.Assertions.assertEquals; + /** * ServerStateController unit test. * @@ -43,34 +44,33 @@ * @Date: 2022/8/13 10:54 * @Description: TODO */ -@RunWith(MockitoJUnitRunner.class) -public class ServerStateControllerTest { +@ExtendWith(MockitoExtension.class) +class ServerStateControllerTest { + + private static final String CONSOLE_URL = "/v1/console/server/state"; @InjectMocks private ServerStateController serverStateController; private MockMvc mockmvc; - private static final String CONSOLE_URL = "/v1/console/server/state"; - private ConfigurableEnvironment environment; - @Before - public void setUp() { + @BeforeEach + void setUp() { environment = new MockEnvironment(); EnvUtil.setEnvironment(environment); mockmvc = MockMvcBuilders.standaloneSetup(serverStateController).build(); } @Test - public void serverState() throws Exception { + void serverState() throws Exception { MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(CONSOLE_URL); MockHttpServletResponse response = mockmvc.perform(builder).andReturn().getResponse(); - Assert.assertEquals(200, response.getStatus()); + assertEquals(200, response.getStatus()); ObjectNode responseContent = JacksonUtils.toObj(response.getContentAsByteArray(), ObjectNode.class); - Assert.assertEquals(EnvUtil.STANDALONE_MODE_CLUSTER, - responseContent.get(Constants.STARTUP_MODE_STATE).asText()); - Assert.assertEquals("null", responseContent.get(Constants.FUNCTION_MODE_STATE).asText()); - Assert.assertEquals(VersionUtils.version, responseContent.get(Constants.NACOS_VERSION).asText()); + assertEquals(EnvUtil.STANDALONE_MODE_CLUSTER, responseContent.get(Constants.STARTUP_MODE_STATE).asText()); + assertEquals("null", responseContent.get(Constants.FUNCTION_MODE_STATE).asText()); + assertEquals(VersionUtils.version, responseContent.get(Constants.NACOS_VERSION).asText()); } } diff --git a/console/src/test/java/com/alibaba/nacos/console/controller/v2/HealthControllerV2Test.java b/console/src/test/java/com/alibaba/nacos/console/controller/v2/HealthControllerV2Test.java index f725339cc5a..e64e08a9213 100644 --- a/console/src/test/java/com/alibaba/nacos/console/controller/v2/HealthControllerV2Test.java +++ b/console/src/test/java/com/alibaba/nacos/console/controller/v2/HealthControllerV2Test.java @@ -23,19 +23,19 @@ import com.alibaba.nacos.naming.cluster.NamingReadinessCheckService; import com.alibaba.nacos.naming.cluster.ServerStatus; import com.alibaba.nacos.naming.cluster.ServerStatusManager; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.lang.reflect.Field; import java.util.List; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; /** @@ -43,8 +43,8 @@ * * @author DiligenceLai */ -@RunWith(MockitoJUnitRunner.class) -public class HealthControllerV2Test { +@ExtendWith(MockitoExtension.class) +class HealthControllerV2Test { @InjectMocks private HealthControllerV2 healthControllerV2; @@ -55,68 +55,66 @@ public class HealthControllerV2Test { @Mock private ServerStatusManager serverStatusManager; - @Before - public void setUp() { + @BeforeEach + void setUp() { // auto register to module health checker holder. new NamingReadinessCheckService(serverStatusManager); new ConfigReadinessCheckService(configInfoPersistService); } - @After - public void tearDown() throws IllegalAccessException, NoSuchFieldException { + @AfterEach + void tearDown() throws IllegalAccessException, NoSuchFieldException { Field moduleHealthCheckersField = ModuleHealthCheckerHolder.class.getDeclaredField("moduleHealthCheckers"); moduleHealthCheckersField.setAccessible(true); ((List) moduleHealthCheckersField.get(ModuleHealthCheckerHolder.getInstance())).clear(); } @Test - public void testLiveness() throws Exception { + void testLiveness() throws Exception { Result result = healthControllerV2.liveness(); - Assert.assertEquals(0, result.getCode().intValue()); + assertEquals(0, result.getCode().intValue()); } @Test - public void testReadinessSuccess() throws Exception { + void testReadinessSuccess() throws Exception { Mockito.when(configInfoPersistService.configInfoCount(any(String.class))).thenReturn(0); Mockito.when(serverStatusManager.getServerStatus()).thenReturn(ServerStatus.UP); Result result = healthControllerV2.readiness(null); - Assert.assertEquals(0, result.getCode().intValue()); - Assert.assertEquals("success", result.getMessage()); + assertEquals(0, result.getCode().intValue()); + assertEquals("success", result.getMessage()); } @Test - public void testReadinessBothFailure() { + void testReadinessBothFailure() { // Config and Naming are not in readiness Mockito.when(configInfoPersistService.configInfoCount(any(String.class))) .thenThrow(new RuntimeException("HealthControllerV2Test.testReadiness")); - Mockito.when(serverStatusManager.getServerStatus()) - .thenThrow(new RuntimeException("HealthControllerV2Test.testReadiness")); + Mockito.when(serverStatusManager.getServerStatus()).thenThrow(new RuntimeException("HealthControllerV2Test.testReadiness")); Result result = healthControllerV2.readiness(null); - Assert.assertEquals(30000, result.getCode().intValue()); - Assert.assertEquals("naming and config not in readiness", result.getMessage()); + assertEquals(30000, result.getCode().intValue()); + assertEquals("naming and config not in readiness", result.getMessage()); } @Test - public void testReadinessConfigFailure() { + void testReadinessConfigFailure() { // Config is not in readiness Mockito.when(configInfoPersistService.configInfoCount(any(String.class))) .thenThrow(new RuntimeException("HealthControllerV2Test.testReadiness")); Mockito.when(serverStatusManager.getServerStatus()).thenReturn(ServerStatus.UP); Result result = healthControllerV2.readiness(null); - Assert.assertEquals(30000, result.getCode().intValue()); - Assert.assertEquals("config not in readiness", result.getMessage()); + assertEquals(30000, result.getCode().intValue()); + assertEquals("config not in readiness", result.getMessage()); } @Test - public void testReadinessNamingFailure() { + void testReadinessNamingFailure() { // Naming is not in readiness Mockito.when(configInfoPersistService.configInfoCount(any(String.class))).thenReturn(0); - Mockito.when(serverStatusManager.getServerStatus()) - .thenThrow(new RuntimeException("HealthControllerV2Test.testReadiness")); + Mockito.when(serverStatusManager.getServerStatus()).thenThrow(new RuntimeException("HealthControllerV2Test.testReadiness")); Result result = healthControllerV2.readiness(null); - Assert.assertEquals(30000, result.getCode().intValue()); - Assert.assertEquals("naming not in readiness", result.getMessage()); + assertEquals(30000, result.getCode().intValue()); + assertEquals("naming not in readiness", result.getMessage()); } } diff --git a/console/src/test/java/com/alibaba/nacos/console/controller/v2/NamespaceControllerV2Test.java b/console/src/test/java/com/alibaba/nacos/console/controller/v2/NamespaceControllerV2Test.java index 16fd58aba06..658b0706a6f 100644 --- a/console/src/test/java/com/alibaba/nacos/console/controller/v2/NamespaceControllerV2Test.java +++ b/console/src/test/java/com/alibaba/nacos/console/controller/v2/NamespaceControllerV2Test.java @@ -19,22 +19,23 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.model.v2.ErrorCode; import com.alibaba.nacos.api.model.v2.Result; -import com.alibaba.nacos.core.namespace.model.NamespaceTypeEnum; import com.alibaba.nacos.core.namespace.model.Namespace; +import com.alibaba.nacos.core.namespace.model.NamespaceTypeEnum; import com.alibaba.nacos.core.namespace.model.form.NamespaceForm; import com.alibaba.nacos.core.namespace.repository.NamespacePersistService; import com.alibaba.nacos.core.service.NamespaceOperationService; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import java.util.Collections; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThrows; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -44,30 +45,30 @@ * @author dongyafei * @date 2022/8/16 */ -@RunWith(MockitoJUnitRunner.class) -public class NamespaceControllerV2Test { +@ExtendWith(MockitoExtension.class) +class NamespaceControllerV2Test { + + private static final String TEST_NAMESPACE_ID = "testId"; + + private static final String TEST_NAMESPACE_NAME = "testName"; + + private static final String TEST_NAMESPACE_DESC = "testDesc"; private NamespaceControllerV2 namespaceControllerV2; @Mock private NamespaceOperationService namespaceOperationService; - + @Mock private NamespacePersistService namespacePersistService; - private static final String TEST_NAMESPACE_ID = "testId"; - - private static final String TEST_NAMESPACE_NAME = "testName"; - - private static final String TEST_NAMESPACE_DESC = "testDesc"; - - @Before - public void setUp() throws Exception { + @BeforeEach + void setUp() throws Exception { namespaceControllerV2 = new NamespaceControllerV2(namespaceOperationService, namespacePersistService); } @Test - public void testGetNamespaceList() { + void testGetNamespaceList() { Namespace namespace = new Namespace(); namespace.setNamespace(TEST_NAMESPACE_ID); namespace.setNamespaceShowName(TEST_NAMESPACE_NAME); @@ -89,7 +90,7 @@ public void testGetNamespaceList() { } @Test - public void testGetNamespace() throws NacosException { + void testGetNamespace() throws NacosException { Namespace namespaceAllInfo = new Namespace(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC, 200, 1, NamespaceTypeEnum.GLOBAL.getType()); when(namespaceOperationService.getNamespace(TEST_NAMESPACE_ID)).thenReturn(namespaceAllInfo); @@ -105,49 +106,48 @@ public void testGetNamespace() throws NacosException { } @Test - public void testCreateNamespace() throws NacosException { - when(namespaceOperationService.createNamespace(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC)) - .thenReturn(true); - Result result = namespaceControllerV2 - .createNamespace(new NamespaceForm(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC)); + void testCreateNamespace() throws NacosException { + when(namespaceOperationService.createNamespace(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC)).thenReturn(true); + Result result = namespaceControllerV2.createNamespace( + new NamespaceForm(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC)); verify(namespaceOperationService).createNamespace(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC); assertEquals(ErrorCode.SUCCESS.getCode(), result.getCode()); - assertEquals(true, result.getData()); + assertTrue(result.getData()); } - + @Test - public void testCreateNamespaceWithIllegalName() { + void testCreateNamespaceWithIllegalName() { NamespaceForm form = new NamespaceForm(); form.setNamespaceDesc("testDesc"); form.setNamespaceName("test@Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test$Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test#Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test%Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test^Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test&Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test*Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName(""); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); } - + @Test - public void testCreateNamespaceWithNonUniqueId() { + void testCreateNamespaceWithNonUniqueId() { when(namespacePersistService.tenantInfoCountByTenantId("test-id")).thenReturn(1); NamespaceForm form = new NamespaceForm(); form.setNamespaceId("test-id"); @@ -157,54 +157,53 @@ public void testCreateNamespaceWithNonUniqueId() { } @Test - public void testEditNamespace() throws NacosException { - when(namespaceOperationService.editNamespace(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC)) - .thenReturn(true); - Result result = namespaceControllerV2 - .editNamespace(new NamespaceForm(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC)); + void testEditNamespace() throws NacosException { + when(namespaceOperationService.editNamespace(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC)).thenReturn(true); + Result result = namespaceControllerV2.editNamespace( + new NamespaceForm(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC)); verify(namespaceOperationService).editNamespace(TEST_NAMESPACE_ID, TEST_NAMESPACE_NAME, TEST_NAMESPACE_DESC); assertEquals(ErrorCode.SUCCESS.getCode(), result.getCode()); - assertEquals(true, result.getData()); + assertTrue(result.getData()); } - + @Test - public void testEditNamespaceWithIllegalName() { + void testEditNamespaceWithIllegalName() { NamespaceForm form = new NamespaceForm(); form.setNamespaceId("test-id"); form.setNamespaceDesc("testDesc"); - + form.setNamespaceName("test@Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test#Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test$Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test%Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test^Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test&Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); - + form.setNamespaceName("test*Name"); assertThrows(NacosException.class, () -> namespaceControllerV2.createNamespace(form)); } @Test - public void testDeleteNamespace() { + void testDeleteNamespace() { when(namespaceOperationService.removeNamespace(TEST_NAMESPACE_ID)).thenReturn(true); Result result = namespaceControllerV2.deleteNamespace(TEST_NAMESPACE_ID); verify(namespaceOperationService).removeNamespace(TEST_NAMESPACE_ID); assertEquals(ErrorCode.SUCCESS.getCode(), result.getCode()); - assertEquals(true, result.getData()); + assertTrue(result.getData()); } } diff --git a/console/src/test/java/com/alibaba/nacos/console/exception/ConsoleExceptionHandlerTest.java b/console/src/test/java/com/alibaba/nacos/console/exception/ConsoleExceptionHandlerTest.java index 6b0e30a307a..c1a0fd24edc 100644 --- a/console/src/test/java/com/alibaba/nacos/console/exception/ConsoleExceptionHandlerTest.java +++ b/console/src/test/java/com/alibaba/nacos/console/exception/ConsoleExceptionHandlerTest.java @@ -19,55 +19,55 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; import com.alibaba.nacos.console.controller.v2.HealthControllerV2; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; + import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -@RunWith(SpringRunner.class) +@ExtendWith(SpringExtension.class) @WebMvcTest(ConsoleExceptionHandlerTest.class) -public class ConsoleExceptionHandlerTest { +class ConsoleExceptionHandlerTest { + private MockMvc mockMvc; - + @Autowired private WebApplicationContext context; - + @MockBean private HealthControllerV2 healthControllerV2; - - @Before - public void before() { + + @BeforeEach + void before() { mockMvc = MockMvcBuilders.webAppContextSetup(context).build(); } - + @Test - public void testNacosRunTimeExceptionHandler() throws Exception { + void testNacosRunTimeExceptionHandler() throws Exception { // 设置HealthControllerV2的行为,使其抛出NacosRuntimeException并被ConsoleExceptionHandler捕获处理 - when(healthControllerV2.liveness()) - .thenThrow(new NacosRuntimeException(NacosException.INVALID_PARAM)) - .thenThrow(new NacosRuntimeException(NacosException.SERVER_ERROR)) - .thenThrow(new NacosRuntimeException(503)); - + when(healthControllerV2.liveness()).thenThrow(new NacosRuntimeException(NacosException.INVALID_PARAM)) + .thenThrow(new NacosRuntimeException(NacosException.SERVER_ERROR)).thenThrow(new NacosRuntimeException(503)); + // 执行请求并验证响应码 - ResultActions resultActions = mockMvc.perform(get("/v2/console/health/liveness")); + ResultActions resultActions = mockMvc.perform(get("/v2/console/health/liveness")); resultActions.andExpect(MockMvcResultMatchers.status().is(NacosException.INVALID_PARAM)); - + // 执行请求并验证响应码 - ResultActions resultActions1 = mockMvc.perform(get("/v2/console/health/liveness")); + ResultActions resultActions1 = mockMvc.perform(get("/v2/console/health/liveness")); resultActions1.andExpect(MockMvcResultMatchers.status().is(NacosException.SERVER_ERROR)); - + // 执行请求并验证响应码 - ResultActions resultActions2 = mockMvc.perform(get("/v2/console/health/liveness")); + ResultActions resultActions2 = mockMvc.perform(get("/v2/console/health/liveness")); resultActions2.andExpect(MockMvcResultMatchers.status().is(503)); } } \ No newline at end of file diff --git a/console/src/test/java/com/alibaba/nacos/console/exception/NacosApiExceptionHandlerTest.java b/console/src/test/java/com/alibaba/nacos/console/exception/NacosApiExceptionHandlerTest.java index 41784642f2d..920a1030333 100644 --- a/console/src/test/java/com/alibaba/nacos/console/exception/NacosApiExceptionHandlerTest.java +++ b/console/src/test/java/com/alibaba/nacos/console/exception/NacosApiExceptionHandlerTest.java @@ -19,8 +19,8 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException; import com.alibaba.nacos.console.controller.v2.NamespaceControllerV2; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; @@ -31,44 +31,44 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; + import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; @RunWith(SpringRunner.class) @WebMvcTest(NacosApiExceptionHandler.class) -public class NacosApiExceptionHandlerTest { +class NacosApiExceptionHandlerTest { + private MockMvc mockMvc; - + @Autowired private WebApplicationContext context; - + @MockBean private NamespaceControllerV2 namespaceControllerV2; - - @Before - public void before() { + + @BeforeEach + void before() { mockMvc = MockMvcBuilders.webAppContextSetup(context).build(); } - + @Test - public void testNacosRunTimeExceptionHandler() throws Exception { + void testNacosRunTimeExceptionHandler() throws Exception { // 设置NamespaceControllerV2的行为,使其抛出NacosRuntimeException并被NacosApiExceptionHandler捕获处理 - when(namespaceControllerV2.createNamespace(any())) - .thenThrow(new NacosRuntimeException(NacosException.INVALID_PARAM)) - .thenThrow(new NacosRuntimeException(NacosException.SERVER_ERROR)) - .thenThrow(new NacosRuntimeException(503)); - + when(namespaceControllerV2.createNamespace(any())).thenThrow(new NacosRuntimeException(NacosException.INVALID_PARAM)) + .thenThrow(new NacosRuntimeException(NacosException.SERVER_ERROR)).thenThrow(new NacosRuntimeException(503)); + // 执行请求并验证响应码 - ResultActions resultActions = mockMvc.perform(post("/v2/console/namespace")); + ResultActions resultActions = mockMvc.perform(post("/v2/console/namespace")); resultActions.andExpect(MockMvcResultMatchers.status().is(NacosException.INVALID_PARAM)); - + // 执行请求并验证响应码 - ResultActions resultActions1 = mockMvc.perform(post("/v2/console/namespace")); + ResultActions resultActions1 = mockMvc.perform(post("/v2/console/namespace")); resultActions1.andExpect(MockMvcResultMatchers.status().is(NacosException.SERVER_ERROR)); - + // 执行请求并验证响应码 - ResultActions resultActions2 = mockMvc.perform(post("/v2/console/namespace")); + ResultActions resultActions2 = mockMvc.perform(post("/v2/console/namespace")); resultActions2.andExpect(MockMvcResultMatchers.status().is(503)); } } \ No newline at end of file diff --git a/console/src/test/java/com/alibaba/nacos/console/filter/XssFilterTest.java b/console/src/test/java/com/alibaba/nacos/console/filter/XssFilterTest.java index 45212445625..6598092264c 100644 --- a/console/src/test/java/com/alibaba/nacos/console/filter/XssFilterTest.java +++ b/console/src/test/java/com/alibaba/nacos/console/filter/XssFilterTest.java @@ -16,11 +16,11 @@ package com.alibaba.nacos.console.filter; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import javax.servlet.FilterChain; import javax.servlet.ServletException; @@ -28,8 +28,8 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; -@RunWith(MockitoJUnitRunner.class) -public class XssFilterTest { +@ExtendWith(MockitoExtension.class) +class XssFilterTest { private static final String CONTENT_SECURITY_POLICY_HEADER = "Content-Security-Policy"; @@ -45,7 +45,7 @@ public class XssFilterTest { private FilterChain filterChain; @Test - public void testSetResponseHeader() throws ServletException, IOException { + void testSetResponseHeader() throws ServletException, IOException { XssFilter xssFilter = new XssFilter(); xssFilter.doFilterInternal(request, response, filterChain); Mockito.verify(response).setHeader(CONTENT_SECURITY_POLICY_HEADER, CONTENT_SECURITY_POLICY); diff --git a/console/src/test/java/com/alibaba/nacos/console/paramcheck/ParamExtractorTest.java b/console/src/test/java/com/alibaba/nacos/console/paramcheck/ParamExtractorTest.java index f14029bafd5..ba6f68589b1 100644 --- a/console/src/test/java/com/alibaba/nacos/console/paramcheck/ParamExtractorTest.java +++ b/console/src/test/java/com/alibaba/nacos/console/paramcheck/ParamExtractorTest.java @@ -22,19 +22,19 @@ import com.alibaba.nacos.core.paramcheck.ExtractorManager; import com.alibaba.nacos.core.paramcheck.ParamCheckerFilter; import com.alibaba.nacos.sys.env.EnvUtil; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.mockito.internal.verification.Times; -import org.mockito.junit.MockitoJUnitRunner; +import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import java.lang.reflect.Method; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Param Console ExtractorTest. @@ -42,8 +42,8 @@ * @author 985492783@qq.com * @date 2023/11/9 17:07 */ -@RunWith(MockitoJUnitRunner.class) -public class ParamExtractorTest { +@ExtendWith(MockitoExtension.class) +class ParamExtractorTest { @Mock private ControllerMethodsCache methodsCache; @@ -51,16 +51,14 @@ public class ParamExtractorTest { private ParamCheckerFilter filter; @Test - public void testDefaultFilter() throws Exception { + void testDefaultFilter() throws Exception { MockedStatic mockedStatic = Mockito.mockStatic(EnvUtil.class); final Method check = NamespaceController.class.getMethod("getNamespaces"); - ExtractorManager.Extractor annotation = NamespaceController.class.getAnnotation( - ExtractorManager.Extractor.class); + ExtractorManager.Extractor annotation = NamespaceController.class.getAnnotation(ExtractorManager.Extractor.class); AbstractHttpParamExtractor httpExtractor = Mockito.spy(ExtractorManager.getHttpExtractor(annotation)); MockedStatic managerMockedStatic = Mockito.mockStatic(ExtractorManager.class); - mockedStatic.when(() -> EnvUtil.getProperty(Mockito.any(), Mockito.any(), Mockito.any())) - .thenAnswer((k) -> k.getArgument(2)); + mockedStatic.when(() -> EnvUtil.getProperty(Mockito.any(), Mockito.any(), Mockito.any())).thenAnswer((k) -> k.getArgument(2)); filter = new ParamCheckerFilter(methodsCache); managerMockedStatic.when(() -> ExtractorManager.getHttpExtractor(annotation)).thenReturn(httpExtractor); @@ -71,7 +69,7 @@ public void testDefaultFilter() throws Exception { filter.doFilter(request, response, (servletRequest, servletResponse) -> { }); - assertEquals(httpExtractor.getClass(), ConsoleDefaultHttpParamExtractor.class); + assertEquals(ConsoleDefaultHttpParamExtractor.class, httpExtractor.getClass()); Mockito.verify(httpExtractor, new Times(1)).extractParam(Mockito.any()); managerMockedStatic.close(); mockedStatic.close(); From 0a797223c0bc149203f5ec7bf66394879e0dc701 Mon Sep 17 00:00:00 2001 From: xpy01xpy <49626679+xpy01xpy@users.noreply.github.com> Date: Thu, 30 May 2024 14:53:41 +0800 Subject: [PATCH 028/110] [ISSUE#11957] Console support init password for nacos username (#12148) * feat:add register pagg * fix:i18n * console-ui build * fix * fix --- console-ui/src/globalLib.js | 19 ++ console-ui/src/index.js | 2 + console-ui/src/locales/zh-CN.js | 2 + console-ui/src/pages/Register/Register.jsx | 160 +++++++++ console-ui/src/pages/Register/index.jsx | 4 + console-ui/src/pages/Register/index.scss | 142 ++++++++ console-ui/src/pages/Welcome/Welcome.js | 10 +- console-ui/src/reducers/base.js | 6 +- .../src/main/resources/static/css/main.css | 21 +- console/src/main/resources/static/index.html | 4 +- console/src/main/resources/static/js/main.js | 318 +++++++++--------- 11 files changed, 525 insertions(+), 163 deletions(-) create mode 100644 console-ui/src/pages/Register/Register.jsx create mode 100644 console-ui/src/pages/Register/index.jsx create mode 100644 console-ui/src/pages/Register/index.scss diff --git a/console-ui/src/globalLib.js b/console-ui/src/globalLib.js index 41e387eed21..c2542702ddf 100644 --- a/console-ui/src/globalLib.js +++ b/console-ui/src/globalLib.js @@ -27,6 +27,23 @@ function goLogin() { window.location = `${base_url}#/login`; } +function goRegister() { + const url = window.location.href; + localStorage.removeItem('token'); + const base_url = url.split('#')[0]; + window.location = `${base_url}#/register`; +} + +function generateRandomPassword(length) { + const charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + let password = ''; + for (let i = 0; i < length; i++) { + const randomIndex = Math.floor(Math.random() * charset.length); + password += charset[randomIndex]; + } + return password; +} + const global = window; /** @@ -564,5 +581,7 @@ export { setParam, setParams, goLogin, + goRegister, + generateRandomPassword, request, }; diff --git a/console-ui/src/index.js b/console-ui/src/index.js index 714dfe9038c..3e2bdc97b05 100644 --- a/console-ui/src/index.js +++ b/console-ui/src/index.js @@ -32,6 +32,7 @@ import Layout from './layouts/MainLayout'; import { LANGUAGE_KEY, REDUX_DEVTOOLS, THEME } from './constants'; import Login from './pages/Login'; +import Register from './pages/Register'; import Namespace from './pages/NameSpace'; import Newconfig from './pages/ConfigurationManagement/NewConfig'; import Configsync from './pages/ConfigurationManagement/ConfigSync'; @@ -136,6 +137,7 @@ class App extends React.Component { {loginPageEnabled && loginPageEnabled === 'false' ? null : ( )} + {/* */} {consoleUiEnable && diff --git a/console-ui/src/locales/zh-CN.js b/console-ui/src/locales/zh-CN.js index be1e40357dd..bdb2677b25b 100644 --- a/console-ui/src/locales/zh-CN.js +++ b/console-ui/src/locales/zh-CN.js @@ -27,10 +27,12 @@ const I18N_CONF = { }, Login: { login: '登录', + initPassword: '初始化密码', internalSysTip1: '内部系统,不可暴露到公网', submit: '提交', pleaseInputUsername: '请输入用户名', pleaseInputPassword: '请输入密码', + pleaseInputPasswordTips: '请输入密码(若密码为空,将使用随机密码)', invalidUsernameOrPassword: '用户名或密码错误', passwordRequired: '密码不能为空', usernameRequired: '用户名不能为空', diff --git a/console-ui/src/pages/Register/Register.jsx b/console-ui/src/pages/Register/Register.jsx new file mode 100644 index 00000000000..8f91313df9d --- /dev/null +++ b/console-ui/src/pages/Register/Register.jsx @@ -0,0 +1,160 @@ +import React from 'react'; +import { Card, Form, Input, Message, ConfigProvider, Field, Dialog } from '@alifd/next'; +import { withRouter } from 'react-router-dom'; + +import './index.scss'; +import Header from '../../layouts/Header'; +import PropTypes from 'prop-types'; +import { admin, guide, state } from '../../reducers/base'; +import { connect } from 'react-redux'; +import { generateRandomPassword } from '../../globalLib'; + +const FormItem = Form.Item; + +@withRouter +@ConfigProvider.config +@connect(state => ({ ...state.locale })) +class Register extends React.Component { + static displayName = 'Register'; + + static propTypes = { + locale: PropTypes.object, + history: PropTypes.object, + }; + + constructor(props) { + super(props); + this.state = { + consoleUiEnable: true, + guideMsg: '', + }; + this.field = new Field(this); + } + + componentDidMount() { + if (localStorage.getItem('token')) { + const [baseUrl] = location.href.split('#'); + location.href = `${baseUrl}#/`; + } + this.handleSearch(); + } + + handleSearch = () => { + state().then(res => { + if (res?.console_ui_enabled === 'false') { + this.setState({ consoleUiEnable: true }); + guide().then(res => { + this.setState({ guideMsg: res?.data }); + }); + } else { + this.setState({ consoleUiEnable: false }); + } + }); + }; + + handleSubmit = () => { + const { locale = {} } = this.props; + this.field.validate((errors, values) => { + if (errors) { + return; + } + + const data = { + password: generateRandomPassword(10), + ...values + }; + + admin(data) + .then(res => { + if (res.username && res.password) { + localStorage.setItem('token', JSON.stringify(res)); + Dialog.alert({ + title: locale.Login.initPassword + locale.ListeningToQuery.success, + content: locale.Password.newPassword + ':' + res.password, + onOk: () => { + this.props.history.push('/'); + } + }); + } + }) + .catch(() => { + Message.error({ + content: locale.Login.invalidUsernameOrPassword, + }); + }); + }); + }; + + onKeyDown = event => { + // 'keypress' event misbehaves on mobile so we track 'Enter' key via 'keydown' event + if (event.key === 'Enter') { + event.preventDefault(); + event.stopPropagation(); + this.handleSubmit(); + } + }; + + render() { + const { locale = {} } = this.props; + const { consoleUiEnable, guideMsg } = this.state; + + return ( +
    +
    +
    +
    + +

    {locale.Login.productDesc}

    +
    +
    +
    +
    +
    +
    + +
    {locale.Login.initPassword}
    +
    +
    {locale.Login.internalSysTip1}
    +
    {locale.Login.internalSysTip2}
    +
    + {!consoleUiEnable && ( +
    + + + + + + + + {locale.Login.submit} + +
    + )} + {consoleUiEnable && ( + +
    + + )} + +
    +
    + ); + } +} + +export default Register; diff --git a/console-ui/src/pages/Register/index.jsx b/console-ui/src/pages/Register/index.jsx new file mode 100644 index 00000000000..17cef2d4b96 --- /dev/null +++ b/console-ui/src/pages/Register/index.jsx @@ -0,0 +1,4 @@ + +import Register from './Register'; + +export default Register; diff --git a/console-ui/src/pages/Register/index.scss b/console-ui/src/pages/Register/index.scss new file mode 100644 index 00000000000..2a16a44a154 --- /dev/null +++ b/console-ui/src/pages/Register/index.scss @@ -0,0 +1,142 @@ +/*! + * Copyright 1999-2018 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +$animationDuration: 2s; + +// 品牌色 +$brandColor: #2e3034; +$mobileWidth: 640px; +// 页面主体最大宽度 +$contentWidth: 1280px; + +@keyframes slashStar { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +.home-page { + .top-section { + position: relative; + height: 100vh; + .login-panel { + position: absolute; + right: 40px; + width: 480px; + height: 540px; + top: 90px; + border: 0px; + input, + input::-webkit-input-placeholder { + font-size: 16px; + } + .login-header { + width: 100%; + line-height: 45px; + font-size: 32px; + margin-top: 58px; + text-align: center; + } + .internal-sys-tip { + width: 100%; + line-height: 25px; + font-size: 20px; + margin-top: 25px; + text-align: center; + font-weight: 800; + color: #ff0000cc; + } + .login-form { + width: 360px; + margin: 40px auto auto auto; + input { + height: 60px; + } + button { + width: 100%; + height: 60px; + font-size: 16px; + background: #4190ff 100%; + color: white; + border: 0px; + } + } + } + .animation { + position: absolute; + width: 6px; + height: 6px; + border-radius: 50%; + background-color: #1be1f6; + &1 { + left: 15%; + top: 70%; + animation: slashStar $animationDuration ease-in-out 0.3s infinite; + } + &2 { + left: 34%; + top: 35%; + animation: slashStar $animationDuration ease-in-out 1.2s infinite; + } + &3 { + left: 53%; + top: 20%; + animation: slashStar $animationDuration ease-in-out 0.5s infinite; + } + &4 { + left: 72%; + top: 64%; + animation: slashStar $animationDuration ease-in-out 0.8s infinite; + } + &5 { + left: 87%; + top: 30%; + animation: slashStar $animationDuration ease-in-out 1.5s infinite; + } + } + .vertical-middle { + position: absolute; + left: 0; + top: 50%; + margin-top: -47px; + transform: translateY(-50%); + } + .product-area { + width: 600px; + margin-left: 40px; + } + .product-logo { + display: block; + width: 257px; + height: 50px; + margin: 0; + } + .product-desc { + opacity: 0.8; + font-family: Avenir-Medium; + font-size: 24px; + color: #fff; + max-width: 780px; + margin: 12px auto 30px; + text-align: left; + line-height: 30px; + } + } +} diff --git a/console-ui/src/pages/Welcome/Welcome.js b/console-ui/src/pages/Welcome/Welcome.js index 9556749d6e8..9b541dfa63b 100644 --- a/console-ui/src/pages/Welcome/Welcome.js +++ b/console-ui/src/pages/Welcome/Welcome.js @@ -23,10 +23,18 @@ import { Redirect } from 'react-router-dom'; class Welcome extends React.Component { static propTypes = { functionMode: PropTypes.string, + authAdminRequest: PropTypes.string, }; render() { - const { functionMode } = this.props; + const { functionMode, authAdminRequest } = this.props; + if (authAdminRequest && authAdminRequest === 'true') { + return ( + <> + + + ); + } const path = functionMode === 'naming' ? 'serviceManagement' : 'configurationManagement'; return <>{functionMode !== '' && }; } diff --git a/console-ui/src/reducers/base.js b/console-ui/src/reducers/base.js index d9492239144..b773ec77191 100644 --- a/console-ui/src/reducers/base.js +++ b/console-ui/src/reducers/base.js @@ -25,6 +25,7 @@ const initialState = { authEnabled: '', notice: '', consoleUiEnable: '', + authAdminRequest: '', guideMsg: '', }; @@ -33,6 +34,7 @@ const initialState = { * @param {*} param0 */ const login = user => request.post('v1/auth/users/login', user); +const admin = user => request.post('v1/auth/users/admin', user); /** * 单独在login处调用 获取提示信息 @@ -57,6 +59,7 @@ const getState = () => dispatch => functionMode: res.function_mode, loginPageEnabled: res.login_page_enabled, authEnabled: res.auth_enabled, + authAdminRequest: res.auth_admin_request, consoleUiEnable: res.console_ui_enabled, startupMode: res.startup_mode, }, @@ -72,6 +75,7 @@ const getState = () => dispatch => loginPageEnabled: null, authEnabled: null, consoleUiEnable: null, + authAdminRequest: null, }, }); }); @@ -129,4 +133,4 @@ export default (state = initialState, action) => { } }; -export { getState, login, getNotice, getGuide, guide, state }; +export { getState, login, getNotice, getGuide, guide, state, admin }; diff --git a/console/src/main/resources/static/css/main.css b/console/src/main/resources/static/css/main.css index 0b2bd1c3922..ba64f14b775 100644 --- a/console/src/main/resources/static/css/main.css +++ b/console/src/main/resources/static/css/main.css @@ -1,4 +1,4 @@ -@font-face{font-family:NextIcon;src:url(../console-ui/public/icons/icon-font.eot);src:url(../console-ui/public/icons/icon-font.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/icons/icon-font.woff2) format("woff2"),url(../console-ui/public/icons/icon-font.woff) format("woff"),url(../console-ui/public/icons/icon-font.ttf) format("truetype"),url(../console-ui/public/icons/icon-font.svg#NextIcon) format("svg");font-display:swap}.next-overlay-wrapper .next-overlay-backdrop{background-color:rgba(0,0,0,.2)}.next-loading-fusion-reactor{width:48px;height:48px}.next-loading-fusion-reactor .next-loading-dot{background:#5584ff}.next-loading-medium-fusion-reactor{width:32px;height:32px}.next-message.next-message-success.next-inline{background-color:#e4fdda;border-color:#e4fdda}.next-message.next-message-success.next-addon .next-message-symbol,.next-message.next-message-success.next-inline .next-message-symbol{color:#46bc15}.next-message.next-message-success.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-success.next-toast .next-message-symbol{color:#46bc15}.next-message.next-message-warning.next-inline{background-color:#fff3e0;border-color:#fff3e0}.next-message.next-message-warning.next-addon .next-message-symbol,.next-message.next-message-warning.next-inline .next-message-symbol{color:#ff9300}.next-message.next-message-warning.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-warning.next-toast .next-message-symbol{color:#ff9300}.next-message.next-message-error.next-addon .next-message-symbol,.next-message.next-message-error.next-inline .next-message-symbol{color:#ff3000}.next-message.next-message-error.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-error.next-toast .next-message-symbol{color:#ff3000}.next-message.next-message-notice.next-inline{background-color:#e3f2fd;border-color:#e3f2fd}.next-message.next-message-notice.next-addon .next-message-symbol,.next-message.next-message-notice.next-inline .next-message-symbol{color:#4494f9}.next-message.next-message-notice.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-notice.next-toast .next-message-symbol{color:#4494f9}.next-message.next-message-help.next-inline{background-color:#e3fff8;border-color:#e3fff8}.next-message.next-message-help.next-addon .next-message-symbol,.next-message.next-message-help.next-inline .next-message-symbol{color:#01c1b2}.next-message.next-message-help.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-help.next-toast .next-message-symbol{color:#01c1b2}.next-message.next-message-loading.next-addon .next-message-symbol,.next-message.next-message-loading.next-inline .next-message-symbol{color:#5584ff}.next-message.next-message-loading.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-loading.next-toast .next-message-symbol{color:#5584ff}.next-message.next-large .next-message-content,.next-message.next-medium .next-message-content{font-size:12px}.next-btn.next-small{padding:0 8px;height:20px}.next-btn.next-small.next-btn-loading:before{left:8px}.next-btn.next-medium{padding:0 12px;height:28px;font-size:12px}.next-btn.next-medium>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-alone:before,.next-btn.next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-first:before,.next-btn.next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px}.next-btn.next-medium.next-btn-loading:before{width:12px;height:12px;font-size:12px;line-height:12px;left:12px}.next-btn.next-medium>.next-btn-custom-loading-icon.show{width:12px}.next-btn.next-large{padding:0 16px}.next-btn.next-large>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-alone:before,.next-btn.next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-first:before,.next-btn.next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-last:before{width:16px;font-size:16px}.next-btn.next-large.next-btn-loading:before{width:16px;height:16px;font-size:16px;line-height:16px;left:16px}.next-btn.next-large>.next-btn-custom-loading-icon.show{width:16px}.next-btn.next-btn-normal{border-color:#c4c6cf}.next-btn.next-btn-normal.active,.next-btn.next-btn-normal.hover,.next-btn.next-btn-normal:active,.next-btn.next-btn-normal:focus,.next-btn.next-btn-normal:hover{background:#f2f3f7;border-color:#a0a2ad}.next-btn.next-btn-primary{background:#5584ff}.next-btn.next-btn-primary.active,.next-btn.next-btn-primary.hover,.next-btn.next-btn-primary:active,.next-btn.next-btn-primary:focus,.next-btn.next-btn-primary:hover{background:#3e71f7}.next-btn.next-btn-secondary{border-color:#5584ff}.next-btn.next-btn-secondary,.next-btn.next-btn-secondary.visited,.next-btn.next-btn-secondary:link,.next-btn.next-btn-secondary:visited{color:#5584ff}.next-btn.next-btn-secondary.active,.next-btn.next-btn-secondary.hover,.next-btn.next-btn-secondary:active,.next-btn.next-btn-secondary:focus,.next-btn.next-btn-secondary:hover{background:#3e71f7;border-color:#3e71f7}.next-btn.disabled.next-btn-normal,.next-btn.disabled.next-btn-normal.active,.next-btn.disabled.next-btn-normal.hover,.next-btn.disabled.next-btn-normal:active,.next-btn.disabled.next-btn-normal:focus,.next-btn.disabled.next-btn-normal:hover,.next-btn.disabled.next-btn-primary,.next-btn.disabled.next-btn-primary.active,.next-btn.disabled.next-btn-primary.hover,.next-btn.disabled.next-btn-primary:active,.next-btn.disabled.next-btn-primary:focus,.next-btn.disabled.next-btn-primary:hover,.next-btn.disabled.next-btn-secondary,.next-btn.disabled.next-btn-secondary.active,.next-btn.disabled.next-btn-secondary.hover,.next-btn.disabled.next-btn-secondary:active,.next-btn.disabled.next-btn-secondary:focus,.next-btn.disabled.next-btn-secondary:hover,.next-btn[disabled].next-btn-normal,.next-btn[disabled].next-btn-normal.active,.next-btn[disabled].next-btn-normal.hover,.next-btn[disabled].next-btn-normal:active,.next-btn[disabled].next-btn-normal:focus,.next-btn[disabled].next-btn-normal:hover,.next-btn[disabled].next-btn-primary,.next-btn[disabled].next-btn-primary.active,.next-btn[disabled].next-btn-primary.hover,.next-btn[disabled].next-btn-primary:active,.next-btn[disabled].next-btn-primary:focus,.next-btn[disabled].next-btn-primary:hover,.next-btn[disabled].next-btn-secondary,.next-btn[disabled].next-btn-secondary.active,.next-btn[disabled].next-btn-secondary.hover,.next-btn[disabled].next-btn-secondary:active,.next-btn[disabled].next-btn-secondary:focus,.next-btn[disabled].next-btn-secondary:hover{background:#f7f8fa;border-color:#e6e7eb}.next-btn-warning.next-btn-primary{background:#ff3000;border-color:#ff3000}.next-btn-warning.next-btn-primary.active,.next-btn-warning.next-btn-primary.hover,.next-btn-warning.next-btn-primary:active,.next-btn-warning.next-btn-primary:focus,.next-btn-warning.next-btn-primary:hover{background:#e72b00;border-color:#e72b00}.next-btn-warning.next-btn-primary.disabled,.next-btn-warning.next-btn-primary.disabled.active,.next-btn-warning.next-btn-primary.disabled.hover,.next-btn-warning.next-btn-primary.disabled:active,.next-btn-warning.next-btn-primary.disabled:focus,.next-btn-warning.next-btn-primary.disabled:hover,.next-btn-warning.next-btn-primary[disabled],.next-btn-warning.next-btn-primary[disabled].active,.next-btn-warning.next-btn-primary[disabled].hover,.next-btn-warning.next-btn-primary[disabled]:active,.next-btn-warning.next-btn-primary[disabled]:focus,.next-btn-warning.next-btn-primary[disabled]:hover{background:#f7f8fa;border-color:#dcdee3}.next-btn-warning.next-btn-normal{border-color:#ff3000}.next-btn-warning.next-btn-normal,.next-btn-warning.next-btn-normal.visited,.next-btn-warning.next-btn-normal:link,.next-btn-warning.next-btn-normal:visited{color:#ff3000}.next-btn-warning.next-btn-normal.active,.next-btn-warning.next-btn-normal.hover,.next-btn-warning.next-btn-normal:active,.next-btn-warning.next-btn-normal:focus,.next-btn-warning.next-btn-normal:hover{background:#e72b00;border-color:#e72b00}.next-btn-warning.next-btn-normal.disabled,.next-btn-warning.next-btn-normal.disabled.active,.next-btn-warning.next-btn-normal.disabled.hover,.next-btn-warning.next-btn-normal.disabled:active,.next-btn-warning.next-btn-normal.disabled:focus,.next-btn-warning.next-btn-normal.disabled:hover,.next-btn-warning.next-btn-normal[disabled],.next-btn-warning.next-btn-normal[disabled].active,.next-btn-warning.next-btn-normal[disabled].hover,.next-btn-warning.next-btn-normal[disabled]:active,.next-btn-warning.next-btn-normal[disabled]:focus,.next-btn-warning.next-btn-normal[disabled]:hover{background:#f7f8fa;border-color:#e6e7eb}.next-btn-text.next-btn-primary,.next-btn-text.next-btn-primary.visited,.next-btn-text.next-btn-primary:link,.next-btn-text.next-btn-primary:visited{color:#5584ff}.next-btn-text.next-btn-primary.active,.next-btn-text.next-btn-primary.hover,.next-btn-text.next-btn-primary:active,.next-btn-text.next-btn-primary:focus,.next-btn-text.next-btn-primary:hover{color:#3e71f7}.next-btn-text.next-btn-normal.active,.next-btn-text.next-btn-normal.hover,.next-btn-text.next-btn-normal:active,.next-btn-text.next-btn-normal:focus,.next-btn-text.next-btn-normal:hover,.next-btn-text.next-btn-secondary.active,.next-btn-text.next-btn-secondary.hover,.next-btn-text.next-btn-secondary:active,.next-btn-text.next-btn-secondary:focus,.next-btn-text.next-btn-secondary:hover{color:#5584ff}.next-btn-text.next-large>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-alone:before,.next-btn-text.next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-first:before,.next-btn-text.next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-last:before{width:16px;font-size:16px}.next-btn-text.next-large.next-btn-loading:before{width:16px;height:16px;font-size:16px;line-height:16px}.next-btn-text.next-large>.next-btn-custom-loading-icon.show{width:16px}.next-btn-text.next-medium{font-size:12px}.next-btn-text.next-medium>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-alone:before,.next-btn-text.next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-first:before,.next-btn-text.next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px}.next-btn-text.next-medium.next-btn-loading:before{width:12px;height:12px;font-size:12px;line-height:12px}.next-btn-text.next-medium>.next-btn-custom-loading-icon.show{width:12px}.next-btn-group>.next-btn-primary:not(:first-child).disabled,.next-btn-group>.next-btn-primary:not(:first-child)[disabled]{border-left-color:#e6e7eb}.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child).disabled,.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child)[disabled]{border-right-color:#e6e7eb}.next-btn.next-small[dir=rtl].next-btn-loading{padding-left:8px;padding-right:24px}.next-btn.next-small[dir=rtl].next-btn-loading:after{right:8px}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first:before,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px}.next-btn.next-medium[dir=rtl].next-btn-loading{padding-left:12px;padding-right:28px}.next-btn.next-medium[dir=rtl].next-btn-loading:after{right:12px}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first:before,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last:before{width:16px;font-size:16px}.next-btn.next-large[dir=rtl].next-btn-loading{padding-left:16px;padding-right:36px}.next-btn.next-large[dir=rtl].next-btn-loading:after{right:16px}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first:before,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last:before{width:16px;font-size:16px}.next-btn-text[dir=rtl].next-large.next-btn-loading{padding-right:20px}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first:before,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px}.next-btn-text[dir=rtl].next-medium.next-btn-loading{padding-right:16px}.next-dialog{border:1px solid #dcdee3;border-radius:3px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-dialog-body{font-size:12px}.next-dialog-close .next-dialog-close-icon.next-icon{margin-top:-6px;margin-left:-6px;width:12px;height:12px}.next-dialog-close .next-dialog-close-icon.next-icon:before{width:12px;height:12px;font-size:12px}.next-radio-wrapper .next-radio-inner{border:1px solid #c4c6cf}.next-radio-wrapper.checked .next-radio-inner{border-color:#5584ff;background:#5584ff}.next-radio-wrapper.disabled .next-radio-inner{border-color:#e6e7eb;background:#f7f8fa}.next-radio-wrapper.disabled .next-radio-inner.hovered,.next-radio-wrapper.disabled .next-radio-inner:hover{border-color:#e6e7eb}.next-radio-wrapper.disabled.checked .next-radio-inner{border-color:#e6e7eb;background:#f7f8fa}.next-radio-wrapper:not(.disabled).hovered .next-radio-inner,.next-radio-wrapper:not(.disabled):hover .next-radio-inner{border-color:#5584ff;background-color:#dee8ff}.next-radio-wrapper.checked:not(.disabled).hovered .next-radio-inner,.next-radio-wrapper.checked:not(.disabled):hover .next-radio-inner{background:#3e71f7}.next-radio-button>label{border:1px solid #c4c6cf}.next-radio-button>label.hovered,.next-radio-button>label:hover{border-color:#a0a2ad;background-color:#f2f3f7}.next-radio-button>label.checked{border-color:#5584ff}.next-radio-button>label.checked .next-radio-label{color:#5584ff}.next-radio-button>label.disabled{border-color:#e6e7eb;background-color:#f7f8fa}.next-radio-button>label.checked.disabled{border-color:#e6e7eb;background-color:#f2f3f7}.next-radio-button-medium>label{height:28px;line-height:28px}.next-radio-button-medium .next-radio-label{height:26px;line-height:26px;font-size:12px}.next-radio-label{font-size:12px}.next-checkbox-wrapper .next-checkbox-inner{border:1px solid #c4c6cf}.next-checkbox-wrapper .next-checkbox-inner>.next-icon{left:4px}.next-checkbox-wrapper .next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper .next-checkbox-inner>.next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-checkbox-wrapper .next-checkbox-inner>.next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-checkbox-wrapper .next-checkbox-inner>.next-icon:before{width:16px;font-size:16px}}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner{background-color:#5584ff}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:16px;font-size:16px}}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner{background-color:#5584ff}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:16px;font-size:16px}}.next-checkbox-wrapper.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.hovered>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper:not(.disabled):hover>.next-checkbox>.next-checkbox-inner{border-color:#5584ff;background-color:#dee8ff}.next-checkbox-wrapper.checked:not(.disabled).hovered>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.checked:not(.disabled):hover>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.indeterminate:not(.disabled).hovered>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.indeterminate:not(.disabled):hover>.next-checkbox .next-checkbox-inner{background-color:#3e71f7}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner,.next-checkbox-wrapper.disabled .next-checkbox-inner{border-color:#e6e7eb;background:#f7f8fa}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner.hovered,.next-checkbox-wrapper.disabled.checked .next-checkbox-inner:hover,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner.hovered,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner:hover{border-color:#e6e7eb}.next-checkbox-wrapper.disabled.checked.focused .next-checkbox-inner{border-color:#e6e7eb;background:#f7f8fa}.next-checkbox-label{font-size:12px}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon{margin-right:-16px}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon .next-icon-remote,.next-menu[dir=rtl] .next-menu-icon-selected.next-icon:before{width:12px;font-size:12px}.next-menu{border:1px solid #dcdee3}.next-menu,.next-menu-item-helper{font-size:12px}.next-menu-item.next-selected .next-menu-icon-selected{color:#5584ff}.next-menu-item:not(.next-disabled).next-focused,.next-menu-item:not(.next-disabled).next-selected.next-focused,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover,.next-menu-item:not(.next-disabled).next-selected:focus,.next-menu-item:not(.next-disabled).next-selected:focus:hover,.next-menu-item:not(.next-disabled).next-selected:hover,.next-menu-item:not(.next-disabled):hover{background-color:#f2f3f7}.next-menu-item:not(.next-disabled).next-focused .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected.next-focused .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:focus .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:focus:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled):hover .next-menu-icon-selected{color:#5584ff}.next-menu-item-inner{font-size:12px}.next-menu-divider{border-bottom:1px solid #e6e7eb}.next-menu .next-menu-icon-selected.next-icon .next-icon-remote,.next-menu .next-menu-icon-selected.next-icon:before{width:12px;font-size:12px}.next-menu .next-menu-icon-arrow.next-icon .next-icon-remote,.next-menu .next-menu-icon-arrow.next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-menu .next-menu-icon-arrow.next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-menu .next-menu-icon-arrow.next-icon:before{width:16px;font-size:16px}}.next-menu .next-menu-icon-arrow-down.next-open .next-icon-remote,.next-menu .next-menu-icon-arrow-down.next-open:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-menu .next-menu-icon-arrow-down.next-open{transform:scale(.5) rotate(180deg);margin-left:-4px;margin-right:-4px}.next-menu .next-menu-icon-arrow-down.next-open:before{width:16px;font-size:16px}}.next-menu .next-menu-icon-arrow-right.next-open .next-icon-remote,.next-menu .next-menu-icon-arrow-right.next-open:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-menu .next-menu-icon-arrow-right.next-open{transform:scale(.5) rotate(-90deg);margin-left:-4px;margin-right:-4px}.next-menu .next-menu-icon-arrow-right.next-open:before{width:16px;font-size:16px}}.next-input{border:1px solid #c4c6cf}.next-input.next-small{height:20px}.next-input.next-small input{height:18px;line-height:18px \0 }.next-input.next-small .next-input-text-field{height:18px;line-height:18px}.next-input.next-small .next-icon .next-icon-remote,.next-input.next-small .next-icon:before{width:12px;font-size:12px}.next-input.next-medium{height:28px}.next-input.next-medium .next-input-inner,.next-input.next-medium .next-input-label{font-size:12px}.next-input.next-medium input{height:26px;line-height:26px \0 ;font-size:12px}.next-input.next-medium input::placeholder{font-size:12px}.next-input.next-medium .next-input-text-field{font-size:12px;height:26px;line-height:26px}.next-input.next-medium .next-icon .next-icon-remote,.next-input.next-medium .next-icon:before{width:12px;font-size:12px}.next-input.next-large .next-icon .next-icon-remote,.next-input.next-large .next-icon:before{width:16px;font-size:16px}.next-input.next-input-textarea.next-small textarea,.next-input.next-input-textarea textarea{font-size:12px}.next-input.next-focus,.next-input:hover{border-color:#a0a2ad}.next-input.next-focus{border-color:#5584ff;box-shadow:0 0 0 2px rgba(85,132,255,.2)}.next-input.next-warning,.next-input.next-warning.next-focus,.next-input.next-warning:hover{border-color:#ff9300}.next-input.next-warning.next-focus{box-shadow:0 0 0 2px rgba(255,147,0,.2)}.next-input.next-error,.next-input.next-error.next-focus,.next-input.next-error:hover{border-color:#ff3000}.next-input.next-error.next-focus{box-shadow:0 0 0 2px rgba(255,48,0,.2)}.next-input-control .next-input-len.next-error{color:#ff3000}.next-input-control .next-input-len.next-warning,.next-input-control .next-input-warning-icon{color:#ff9300}.next-input-control .next-input-success-icon{color:#46bc15}.next-input-control .next-input-loading-icon{color:#4494f9}.next-input input::-moz-placeholder,.next-input textarea::-moz-placeholder{color:#999}.next-input input:-ms-input-placeholder,.next-input textarea:-ms-input-placeholder{color:#999}.next-input input::-webkit-input-placeholder,.next-input textarea::-webkit-input-placeholder{color:#999}.next-input.next-disabled,.next-input.next-disabled:hover{border-color:#e6e7eb;background-color:#f7f8fa}.next-input-group-text{background-color:#f2f3f7;border:1px solid #c4c6cf}.next-input-group-text.next-disabled,.next-input-group-text.next-disabled:hover{border-color:#e6e7eb;background-color:#f7f8fa}.next-form-preview.next-form-item.next-medium .next-form-item-label,.next-input-group-text.next-medium{font-size:12px}.next-form-responsive-grid.next-small .next-form-item.next-left .next-form-item-label{margin-top:4px;margin-bottom:4px}.next-form-responsive-grid.next-medium .next-form-item.next-left .next-form-item-label{margin-top:8px;margin-bottom:8px}.next-form-item.has-error>.next-form-item-control>.next-form-item-help{color:#ff3000}.next-form-item.has-warning>.next-form-item-control>.next-form-item-help{color:#ff9300}.next-form-item .next-form-item-label,.next-form-item .next-form-text-align,.next-form-item p{line-height:28px}.next-form-item .next-checkbox-group,.next-form-item .next-checkbox-wrapper,.next-form-item .next-radio-group,.next-form-item .next-radio-wrapper,.next-form-item .next-rating{line-height:24px}.next-form-item .next-form-preview{font-size:12px}.next-form-item .next-form-preview.next-input-textarea>p{font-size:12px;min-height:16.8px;margin-top:5.6px}.next-form-item .next-form-item-label{font-size:12px}.next-form-item.next-small .next-checkbox-group,.next-form-item.next-small .next-checkbox-wrapper,.next-form-item.next-small .next-form-item-label,.next-form-item.next-small .next-form-text-align,.next-form-item.next-small .next-radio-group,.next-form-item.next-small .next-radio-wrapper,.next-form-item.next-small .next-rating,.next-form-item.next-small p{line-height:20px}.next-form-item-label.next-left>label[required]:after,.next-form-item-label label[required]:before{color:#ff3000} +@font-face{font-family:NextIcon;src:url(../console-ui/public/icons/icon-font.eot);src:url(../console-ui/public/icons/icon-font.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/icons/icon-font.woff2) format("woff2"),url(../console-ui/public/icons/icon-font.woff) format("woff"),url(../console-ui/public/icons/icon-font.ttf) format("truetype"),url(../console-ui/public/icons/icon-font.svg#NextIcon) format("svg");font-display:swap}.next-overlay-wrapper .next-overlay-backdrop{background-color:rgba(0,0,0,.2)}.next-loading-fusion-reactor{width:48px;height:48px}.next-loading-fusion-reactor .next-loading-dot{background:#5584ff}.next-loading-medium-fusion-reactor{width:32px;height:32px}.next-message.next-message-success.next-inline{background-color:#e4fdda;border-color:#e4fdda}.next-message.next-message-success.next-addon .next-message-symbol,.next-message.next-message-success.next-inline .next-message-symbol{color:#46bc15}.next-message.next-message-success.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-success.next-toast .next-message-symbol{color:#46bc15}.next-message.next-message-warning.next-inline{background-color:#fff3e0;border-color:#fff3e0}.next-message.next-message-warning.next-addon .next-message-symbol,.next-message.next-message-warning.next-inline .next-message-symbol{color:#ff9300}.next-message.next-message-warning.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-warning.next-toast .next-message-symbol{color:#ff9300}.next-message.next-message-error.next-addon .next-message-symbol,.next-message.next-message-error.next-inline .next-message-symbol{color:#ff3000}.next-message.next-message-error.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-error.next-toast .next-message-symbol{color:#ff3000}.next-message.next-message-notice.next-inline{background-color:#e3f2fd;border-color:#e3f2fd}.next-message.next-message-notice.next-addon .next-message-symbol,.next-message.next-message-notice.next-inline .next-message-symbol{color:#4494f9}.next-message.next-message-notice.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-notice.next-toast .next-message-symbol{color:#4494f9}.next-message.next-message-help.next-inline{background-color:#e3fff8;border-color:#e3fff8}.next-message.next-message-help.next-addon .next-message-symbol,.next-message.next-message-help.next-inline .next-message-symbol{color:#01c1b2}.next-message.next-message-help.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-help.next-toast .next-message-symbol{color:#01c1b2}.next-message.next-message-loading.next-addon .next-message-symbol,.next-message.next-message-loading.next-inline .next-message-symbol{color:#5584ff}.next-message.next-message-loading.next-toast{box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-message.next-message-loading.next-toast .next-message-symbol{color:#5584ff}.next-message.next-large .next-message-content,.next-message.next-medium .next-message-content{font-size:12px}.next-btn.next-small{padding:0 8px;height:20px}.next-btn.next-small.next-btn-loading:before{left:8px}.next-btn.next-medium{padding:0 12px;height:28px;font-size:12px}.next-btn.next-medium>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-alone:before,.next-btn.next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-first:before,.next-btn.next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px}.next-btn.next-medium.next-btn-loading:before{width:12px;height:12px;font-size:12px;line-height:12px;left:12px}.next-btn.next-medium>.next-btn-custom-loading-icon.show{width:12px}.next-btn.next-large{padding:0 16px}.next-btn.next-large>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-alone:before,.next-btn.next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-first:before,.next-btn.next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-last:before{width:16px;font-size:16px}.next-btn.next-large.next-btn-loading:before{width:16px;height:16px;font-size:16px;line-height:16px;left:16px}.next-btn.next-large>.next-btn-custom-loading-icon.show{width:16px}.next-btn.next-btn-normal{border-color:#c4c6cf}.next-btn.next-btn-normal.active,.next-btn.next-btn-normal.hover,.next-btn.next-btn-normal:active,.next-btn.next-btn-normal:focus,.next-btn.next-btn-normal:hover{background:#f2f3f7;border-color:#a0a2ad}.next-btn.next-btn-primary{background:#5584ff}.next-btn.next-btn-primary.active,.next-btn.next-btn-primary.hover,.next-btn.next-btn-primary:active,.next-btn.next-btn-primary:focus,.next-btn.next-btn-primary:hover{background:#3e71f7}.next-btn.next-btn-secondary{border-color:#5584ff}.next-btn.next-btn-secondary,.next-btn.next-btn-secondary.visited,.next-btn.next-btn-secondary:link,.next-btn.next-btn-secondary:visited{color:#5584ff}.next-btn.next-btn-secondary.active,.next-btn.next-btn-secondary.hover,.next-btn.next-btn-secondary:active,.next-btn.next-btn-secondary:focus,.next-btn.next-btn-secondary:hover{background:#3e71f7;border-color:#3e71f7}.next-btn.disabled.next-btn-normal,.next-btn.disabled.next-btn-normal.active,.next-btn.disabled.next-btn-normal.hover,.next-btn.disabled.next-btn-normal:active,.next-btn.disabled.next-btn-normal:focus,.next-btn.disabled.next-btn-normal:hover,.next-btn.disabled.next-btn-primary,.next-btn.disabled.next-btn-primary.active,.next-btn.disabled.next-btn-primary.hover,.next-btn.disabled.next-btn-primary:active,.next-btn.disabled.next-btn-primary:focus,.next-btn.disabled.next-btn-primary:hover,.next-btn.disabled.next-btn-secondary,.next-btn.disabled.next-btn-secondary.active,.next-btn.disabled.next-btn-secondary.hover,.next-btn.disabled.next-btn-secondary:active,.next-btn.disabled.next-btn-secondary:focus,.next-btn.disabled.next-btn-secondary:hover,.next-btn[disabled].next-btn-normal,.next-btn[disabled].next-btn-normal.active,.next-btn[disabled].next-btn-normal.hover,.next-btn[disabled].next-btn-normal:active,.next-btn[disabled].next-btn-normal:focus,.next-btn[disabled].next-btn-normal:hover,.next-btn[disabled].next-btn-primary,.next-btn[disabled].next-btn-primary.active,.next-btn[disabled].next-btn-primary.hover,.next-btn[disabled].next-btn-primary:active,.next-btn[disabled].next-btn-primary:focus,.next-btn[disabled].next-btn-primary:hover,.next-btn[disabled].next-btn-secondary,.next-btn[disabled].next-btn-secondary.active,.next-btn[disabled].next-btn-secondary.hover,.next-btn[disabled].next-btn-secondary:active,.next-btn[disabled].next-btn-secondary:focus,.next-btn[disabled].next-btn-secondary:hover{background:#f7f8fa;border-color:#e6e7eb}.next-btn-warning.next-btn-primary{background:#ff3000;border-color:#ff3000}.next-btn-warning.next-btn-primary.active,.next-btn-warning.next-btn-primary.hover,.next-btn-warning.next-btn-primary:active,.next-btn-warning.next-btn-primary:focus,.next-btn-warning.next-btn-primary:hover{background:#e72b00;border-color:#e72b00}.next-btn-warning.next-btn-primary.disabled,.next-btn-warning.next-btn-primary.disabled.active,.next-btn-warning.next-btn-primary.disabled.hover,.next-btn-warning.next-btn-primary.disabled:active,.next-btn-warning.next-btn-primary.disabled:focus,.next-btn-warning.next-btn-primary.disabled:hover,.next-btn-warning.next-btn-primary[disabled],.next-btn-warning.next-btn-primary[disabled].active,.next-btn-warning.next-btn-primary[disabled].hover,.next-btn-warning.next-btn-primary[disabled]:active,.next-btn-warning.next-btn-primary[disabled]:focus,.next-btn-warning.next-btn-primary[disabled]:hover{background:#f7f8fa;border-color:#dcdee3}.next-btn-warning.next-btn-normal{border-color:#ff3000}.next-btn-warning.next-btn-normal,.next-btn-warning.next-btn-normal.visited,.next-btn-warning.next-btn-normal:link,.next-btn-warning.next-btn-normal:visited{color:#ff3000}.next-btn-warning.next-btn-normal.active,.next-btn-warning.next-btn-normal.hover,.next-btn-warning.next-btn-normal:active,.next-btn-warning.next-btn-normal:focus,.next-btn-warning.next-btn-normal:hover{background:#e72b00;border-color:#e72b00}.next-btn-warning.next-btn-normal.disabled,.next-btn-warning.next-btn-normal.disabled.active,.next-btn-warning.next-btn-normal.disabled.hover,.next-btn-warning.next-btn-normal.disabled:active,.next-btn-warning.next-btn-normal.disabled:focus,.next-btn-warning.next-btn-normal.disabled:hover,.next-btn-warning.next-btn-normal[disabled],.next-btn-warning.next-btn-normal[disabled].active,.next-btn-warning.next-btn-normal[disabled].hover,.next-btn-warning.next-btn-normal[disabled]:active,.next-btn-warning.next-btn-normal[disabled]:focus,.next-btn-warning.next-btn-normal[disabled]:hover{background:#f7f8fa;border-color:#e6e7eb}.next-btn-text.next-btn-primary,.next-btn-text.next-btn-primary.visited,.next-btn-text.next-btn-primary:link,.next-btn-text.next-btn-primary:visited{color:#5584ff}.next-btn-text.next-btn-primary.active,.next-btn-text.next-btn-primary.hover,.next-btn-text.next-btn-primary:active,.next-btn-text.next-btn-primary:focus,.next-btn-text.next-btn-primary:hover{color:#3e71f7}.next-btn-text.next-btn-normal.active,.next-btn-text.next-btn-normal.hover,.next-btn-text.next-btn-normal:active,.next-btn-text.next-btn-normal:focus,.next-btn-text.next-btn-normal:hover,.next-btn-text.next-btn-secondary.active,.next-btn-text.next-btn-secondary.hover,.next-btn-text.next-btn-secondary:active,.next-btn-text.next-btn-secondary:focus,.next-btn-text.next-btn-secondary:hover{color:#5584ff}.next-btn-text.next-large>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-alone:before,.next-btn-text.next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-first:before,.next-btn-text.next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-last:before{width:16px;font-size:16px}.next-btn-text.next-large.next-btn-loading:before{width:16px;height:16px;font-size:16px;line-height:16px}.next-btn-text.next-large>.next-btn-custom-loading-icon.show{width:16px}.next-btn-text.next-medium{font-size:12px}.next-btn-text.next-medium>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-alone:before,.next-btn-text.next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-first:before,.next-btn-text.next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px}.next-btn-text.next-medium.next-btn-loading:before{width:12px;height:12px;font-size:12px;line-height:12px}.next-btn-text.next-medium>.next-btn-custom-loading-icon.show{width:12px}.next-btn-group>.next-btn-primary:not(:first-child).disabled,.next-btn-group>.next-btn-primary:not(:first-child)[disabled]{border-left-color:#e6e7eb}.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child).disabled,.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child)[disabled]{border-right-color:#e6e7eb}.next-btn.next-small[dir=rtl].next-btn-loading{padding-left:8px;padding-right:24px}.next-btn.next-small[dir=rtl].next-btn-loading:after{right:8px}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first:before,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px}.next-btn.next-medium[dir=rtl].next-btn-loading{padding-left:12px;padding-right:28px}.next-btn.next-medium[dir=rtl].next-btn-loading:after{right:12px}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first:before,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last:before{width:16px;font-size:16px}.next-btn.next-large[dir=rtl].next-btn-loading{padding-left:16px;padding-right:36px}.next-btn.next-large[dir=rtl].next-btn-loading:after{right:16px}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first:before,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last:before{width:16px;font-size:16px}.next-btn-text[dir=rtl].next-large.next-btn-loading{padding-right:20px}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first:before,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px}.next-btn-text[dir=rtl].next-medium.next-btn-loading{padding-right:16px}.next-dialog{border:1px solid #dcdee3;border-radius:3px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-dialog-body{font-size:12px}.next-dialog-close .next-dialog-close-icon.next-icon{margin-top:-6px;margin-left:-6px;width:12px;height:12px}.next-dialog-close .next-dialog-close-icon.next-icon:before{width:12px;height:12px;font-size:12px}.next-radio-wrapper .next-radio-inner{border:1px solid #c4c6cf}.next-radio-wrapper.checked .next-radio-inner{border-color:#5584ff;background:#5584ff}.next-radio-wrapper.disabled .next-radio-inner{border-color:#e6e7eb;background:#f7f8fa}.next-radio-wrapper.disabled .next-radio-inner.hovered,.next-radio-wrapper.disabled .next-radio-inner:hover{border-color:#e6e7eb}.next-radio-wrapper.disabled.checked .next-radio-inner{border-color:#e6e7eb;background:#f7f8fa}.next-radio-wrapper:not(.disabled).hovered .next-radio-inner,.next-radio-wrapper:not(.disabled):hover .next-radio-inner{border-color:#5584ff;background-color:#dee8ff}.next-radio-wrapper.checked:not(.disabled).hovered .next-radio-inner,.next-radio-wrapper.checked:not(.disabled):hover .next-radio-inner{background:#3e71f7}.next-radio-button>label{border:1px solid #c4c6cf}.next-radio-button>label.hovered,.next-radio-button>label:hover{border-color:#a0a2ad;background-color:#f2f3f7}.next-radio-button>label.checked{border-color:#5584ff}.next-radio-button>label.checked .next-radio-label{color:#5584ff}.next-radio-button>label.disabled{border-color:#e6e7eb;background-color:#f7f8fa}.next-radio-button>label.checked.disabled{border-color:#e6e7eb;background-color:#f2f3f7}.next-radio-button-medium>label{height:28px;line-height:28px}.next-radio-button-medium .next-radio-label{height:26px;line-height:26px;font-size:12px}.next-radio-label{font-size:12px}.next-checkbox-wrapper .next-checkbox-inner{border:1px solid #c4c6cf}.next-checkbox-wrapper .next-checkbox-inner>.next-icon{left:4px}.next-checkbox-wrapper .next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper .next-checkbox-inner>.next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-checkbox-wrapper .next-checkbox-inner>.next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-checkbox-wrapper .next-checkbox-inner>.next-icon:before{width:16px;font-size:16px}}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner{background-color:#5584ff}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:16px;font-size:16px}}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner{background-color:#5584ff}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:16px;font-size:16px}}.next-checkbox-wrapper.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.hovered>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper:not(.disabled):hover>.next-checkbox>.next-checkbox-inner{border-color:#5584ff;background-color:#dee8ff}.next-checkbox-wrapper.checked:not(.disabled).hovered>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.checked:not(.disabled):hover>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.indeterminate:not(.disabled).hovered>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.indeterminate:not(.disabled):hover>.next-checkbox .next-checkbox-inner{background-color:#3e71f7}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner,.next-checkbox-wrapper.disabled .next-checkbox-inner{border-color:#e6e7eb;background:#f7f8fa}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner.hovered,.next-checkbox-wrapper.disabled.checked .next-checkbox-inner:hover,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner.hovered,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner:hover{border-color:#e6e7eb}.next-checkbox-wrapper.disabled.checked.focused .next-checkbox-inner{border-color:#e6e7eb;background:#f7f8fa}.next-checkbox-label{font-size:12px}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon{margin-right:-16px}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon .next-icon-remote,.next-menu[dir=rtl] .next-menu-icon-selected.next-icon:before{width:12px;font-size:12px}.next-menu{border:1px solid #dcdee3}.next-menu,.next-menu-item-helper{font-size:12px}.next-menu-item.next-selected .next-menu-icon-selected{color:#5584ff}.next-menu-item:not(.next-disabled).next-focused,.next-menu-item:not(.next-disabled).next-selected.next-focused,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover,.next-menu-item:not(.next-disabled).next-selected:focus,.next-menu-item:not(.next-disabled).next-selected:focus:hover,.next-menu-item:not(.next-disabled).next-selected:hover,.next-menu-item:not(.next-disabled):hover{background-color:#f2f3f7}.next-menu-item:not(.next-disabled).next-focused .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected.next-focused .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:focus .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:focus:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled):hover .next-menu-icon-selected{color:#5584ff}.next-menu-item-inner{font-size:12px}.next-menu-divider{border-bottom:1px solid #e6e7eb}.next-menu .next-menu-icon-selected.next-icon .next-icon-remote,.next-menu .next-menu-icon-selected.next-icon:before{width:12px;font-size:12px}.next-menu .next-menu-icon-arrow.next-icon .next-icon-remote,.next-menu .next-menu-icon-arrow.next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-menu .next-menu-icon-arrow.next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-menu .next-menu-icon-arrow.next-icon:before{width:16px;font-size:16px}}.next-menu .next-menu-icon-arrow-down.next-open .next-icon-remote,.next-menu .next-menu-icon-arrow-down.next-open:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-menu .next-menu-icon-arrow-down.next-open{transform:scale(.5) rotate(180deg);margin-left:-4px;margin-right:-4px}.next-menu .next-menu-icon-arrow-down.next-open:before{width:16px;font-size:16px}}.next-menu .next-menu-icon-arrow-right.next-open .next-icon-remote,.next-menu .next-menu-icon-arrow-right.next-open:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-menu .next-menu-icon-arrow-right.next-open{transform:scale(.5) rotate(-90deg);margin-left:-4px;margin-right:-4px}.next-menu .next-menu-icon-arrow-right.next-open:before{width:16px;font-size:16px}}.next-input{border:1px solid #c4c6cf}.next-input.next-small{height:20px}.next-input.next-small input{height:18px;line-height:18px \0 }.next-input.next-small .next-input-text-field{height:18px;line-height:18px}.next-input.next-small .next-icon .next-icon-remote,.next-input.next-small .next-icon:before{width:12px;font-size:12px}.next-input.next-medium{height:28px}.next-input.next-medium .next-input-inner,.next-input.next-medium .next-input-label{font-size:12px}.next-input.next-medium input{height:26px;line-height:26px \0 ;font-size:12px}.next-input.next-medium input::placeholder{font-size:12px}.next-input.next-medium .next-input-text-field{font-size:12px;height:26px;line-height:26px}.next-input.next-medium .next-icon .next-icon-remote,.next-input.next-medium .next-icon:before{width:12px;font-size:12px}.next-input.next-large .next-icon .next-icon-remote,.next-input.next-large .next-icon:before{width:16px;font-size:16px}.next-input.next-input-textarea.next-small textarea,.next-input.next-input-textarea textarea{font-size:12px}.next-input.next-input-textarea .next-input-textarea-control-line:after{color:#e6e7eb;font-size:12px}.next-input.next-focus,.next-input:hover{border-color:#a0a2ad}.next-input.next-focus{border-color:#5584ff;box-shadow:0 0 0 2px rgba(85,132,255,.2)}.next-input.next-warning,.next-input.next-warning.next-focus,.next-input.next-warning:hover{border-color:#ff9300}.next-input.next-warning.next-focus{box-shadow:0 0 0 2px rgba(255,147,0,.2)}.next-input.next-error,.next-input.next-error.next-focus,.next-input.next-error:hover{border-color:#ff3000}.next-input.next-error.next-focus{box-shadow:0 0 0 2px rgba(255,48,0,.2)}.next-input-control .next-input-len.next-error,.next-input-control .next-input-textarea-clear.next-error{color:#ff3000}.next-input-control .next-input-len.next-warning,.next-input-control .next-input-textarea-clear.next-warning,.next-input-control .next-input-warning-icon{color:#ff9300}.next-input-control .next-input-success-icon{color:#46bc15}.next-input-control .next-input-loading-icon{color:#4494f9}.next-input input::-moz-placeholder,.next-input textarea::-moz-placeholder{color:#999}.next-input input:-ms-input-placeholder,.next-input textarea:-ms-input-placeholder{color:#999}.next-input input::-webkit-input-placeholder,.next-input textarea::-webkit-input-placeholder{color:#999}.next-input.next-disabled,.next-input.next-disabled:hover{border-color:#e6e7eb;background-color:#f7f8fa}.next-input-group-text{background-color:#f2f3f7;border:1px solid #c4c6cf}.next-input-group-text.next-disabled,.next-input-group-text.next-disabled:hover{border-color:#e6e7eb;background-color:#f7f8fa}.next-form-preview.next-form-item.next-medium .next-form-item-label,.next-input-group-text.next-medium{font-size:12px}.next-form-responsive-grid.next-small .next-form-item.next-left .next-form-item-label{margin-top:4px;margin-bottom:4px}.next-form-responsive-grid.next-medium .next-form-item.next-left .next-form-item-label{margin-top:8px;margin-bottom:8px}.next-form-item.has-error>.next-form-item-control>.next-form-item-help{color:#ff3000}.next-form-item.has-warning>.next-form-item-control>.next-form-item-help{color:#ff9300}.next-form-item .next-form-item-label,.next-form-item .next-form-text-align,.next-form-item p{line-height:28px}.next-form-item .next-checkbox-group,.next-form-item .next-checkbox-wrapper,.next-form-item .next-radio-group,.next-form-item .next-radio-wrapper,.next-form-item .next-rating{line-height:24px}.next-form-item .next-form-preview{font-size:12px}.next-form-item .next-form-preview.next-input-textarea>p{font-size:12px;min-height:16.8px;margin-top:5.6px}.next-form-item .next-form-item-label{font-size:12px}.next-form-item.next-small .next-checkbox-group,.next-form-item.next-small .next-checkbox-wrapper,.next-form-item.next-small .next-form-item-label,.next-form-item.next-small .next-form-text-align,.next-form-item.next-small .next-radio-group,.next-form-item.next-small .next-radio-wrapper,.next-form-item.next-small .next-rating,.next-form-item.next-small p{line-height:20px}.next-form-item-label.next-left>label[required]:after,.next-form-item-label label[required]:before{color:#ff3000} /*! * Copyright 1999-2018 Alibaba Group Holding Ltd. * @@ -43,6 +43,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */.header-container-primary{background:#252a2f}.header-container-normal{background-color:#fff;box-shadow:0 2px 10px 0 rgba(0,0,0,.08)}.header-container .header-body{width:100%;margin:0 auto;height:66px;line-height:66px}.header-container .header-body .logo{margin-left:40px;width:96px;vertical-align:sub}.header-container .header-body .header-menu{float:right}.header-container .header-body .header-menu .header-menu-toggle{display:none;width:19px;margin-right:40px;margin-top:18px;cursor:pointer}.header-container .header-body ul{padding:0;margin:0}.header-container .header-body li{display:inline-block;margin-right:40px}.header-container .header-body .menu-item{font-family:Avenir-Heavy;font-size:14px}.header-container .header-body .menu-item-primary a{color:#fff;opacity:.6;font-family:Avenir-Medium}.header-container .header-body .menu-item-primary-active a,.header-container .header-body .menu-item-primary:hover a{opacity:1}.header-container .header-body .menu-item-normal a{color:#333;opacity:.6;font-family:Avenir-Medium}.header-container .header-body .menu-item-normal-active a,.header-container .header-body .menu-item-normal:hover a{opacity:1}.header-container .header-body .language-switch{float:right;display:inline-block;box-sizing:border-box;width:24px;height:24px;line-height:20px;margin-top:21px;margin-right:40px;text-align:center;border-radius:2px;cursor:pointer;font-family:PingFangSC-Medium;font-size:14px;opacity:.6}.header-container .header-body .logout{float:right;color:#fff;opacity:.6;font-family:Avenir-Medium;margin-right:40px}.header-container .header-body .language-switch:hover{opacity:1}.header-container .header-body .language-switch-primary{border:1px solid #fff;color:#fff}.header-container .header-body .language-switch-normal{border:1px solid #333;color:#333}@media screen and (max-width:640px){.header-container .header-body .logo{margin-left:20px}.header-container .header-body .language-switch{margin-right:20px}.header-container .header-body .header-menu ul{display:none}.header-container .header-body .header-menu .header-menu-toggle{display:inline-block;margin-right:20px}.header-container .header-body .header-menu-open ul{background-color:#f8f8f8;display:inline-block;position:absolute;right:0;top:66px;z-index:100}.header-container .header-body .header-menu-open li{width:200px;display:list-item;padding-left:30px;list-style:none;line-height:40px;margin-right:0}.header-container .header-body .header-menu-open li a{color:#333;display:inline-block;width:100%}.header-container .header-body .header-menu-open li:hover{background:#2e3034}.header-container .header-body .header-menu-open li:hover a{color:#fff;opactiy:1}.header-container .header-body .header-menu-open .menu-item-normal-active,.header-container .header-body .header-menu-open .menu-item-primary-active{background:#2e3034}.header-container .header-body .header-menu-open .menu-item-normal-active a,.header-container .header-body .header-menu-open .menu-item-primary-active a{color:#fff;opactiy:1}}.bone{width:24px;height:2px;position:relative}.bone:before{left:0}.bone:after,.bone:before{position:absolute;content:"";width:6px;height:6px;border-radius:50%;top:-2px}.bone:after{right:0}.bone-dark,.bone-dark:after,.bone-dark:before{background-color:#1161f6}.bone-light,.bone-light:after,.bone-light:before{background-color:#fff;opacity:.8}.footer-container{background:#f8f8f8}.footer-container .footer-body{max-width:1280px;margin:0 auto;padding:40px 40px 0}@media screen and (max-width:640px){.footer-container .footer-body{padding-left:20px;padding-right:20px}}.footer-container .footer-body img{display:block;width:125px;height:26px;margin-bottom:40px}.footer-container .footer-body .cols-container .col{display:inline-block;box-sizing:border-box;vertical-align:top}.footer-container .footer-body .cols-container .col-12{width:50%;padding-right:125px}.footer-container .footer-body .cols-container .col-6{width:25%}.footer-container .footer-body .cols-container h3{font-family:Avenir-Heavy;font-size:18px;color:#333;line-height:18px;margin-bottom:20px}.footer-container .footer-body .cols-container p{font-family:Avenir-Medium;font-size:12px;color:#999;line-height:18px}.footer-container .footer-body .cols-container dl{font-family:Avenir-Heavy;line-height:18px}.footer-container .footer-body .cols-container dt{font-weight:700;font-size:18px;color:#333;margin-bottom:20px}.footer-container .footer-body .cols-container dd{padding:0;margin:0}.footer-container .footer-body .cols-container dd a{text-decoration:none;display:block;font-size:14px;color:#999;margin:10px 0}.footer-container .footer-body .cols-container dd a:hover{color:#2e3034}.footer-container .footer-body .copyright{margin-top:44px;border-top:1px solid #ccc;min-height:60px;line-height:20px;text-align:center;font-family:Avenir-Medium;font-size:12px;color:#999;display:flex;align-items:center}.footer-container .footer-body .copyright span{display:inline-block;margin:0 auto}@media screen and (max-width:640px){.footer-container .footer-body .cols-container .col{width:100%;text-align:center;padding:0}}.button{box-sizing:border-box;display:inline-block;height:48px;line-height:48px;min-width:140px;font-family:Avenir-Heavy;font-size:16px;color:#fff;text-align:center;border-radius:4px;text-decoration:none}.button-primary{background:#4190ff}.button-normal{background:transparent;border:1px solid #fff}@font-face{font-family:octicons-link;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format("woff")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#24292e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .pl-c{color:#6a737d}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:#005cc5}.markdown-body .pl-e,.markdown-body .pl-en{color:#6f42c1}.markdown-body .pl-s .pl-s1,.markdown-body .pl-smi{color:#24292e}.markdown-body .pl-ent{color:#22863a}.markdown-body .pl-k{color:#d73a49}.markdown-body .pl-pds,.markdown-body .pl-s,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre{color:#032f62}.markdown-body .pl-smw,.markdown-body .pl-v{color:#e36209}.markdown-body .pl-bu{color:#b31d28}.markdown-body .pl-ii{color:#fafbfc;background-color:#b31d28}.markdown-body .pl-c2{color:#fafbfc;background-color:#d73a49}.markdown-body .pl-c2:before{content:"^M"}.markdown-body .pl-sr .pl-cce{font-weight:700;color:#22863a}.markdown-body .pl-ml{color:#735c0f}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:#005cc5}.markdown-body .pl-mi{font-style:italic;color:#24292e}.markdown-body .pl-mb{font-weight:700;color:#24292e}.markdown-body .pl-md{color:#b31d28;background-color:#ffeef0}.markdown-body .pl-mi1{color:#22863a;background-color:#f0fff4}.markdown-body .pl-mc{color:#e36209;background-color:#ffebda}.markdown-body .pl-mi2{color:#f6f8fa;background-color:#005cc5}.markdown-body .pl-mdr{font-weight:700;color:#6f42c1}.markdown-body .pl-ba{color:#586069}.markdown-body .pl-sg{color:#959da5}.markdown-body .pl-corl{text-decoration:underline;color:#032f62}.markdown-body .octicon{display:inline-block;vertical-align:text-top;fill:currentColor}.markdown-body a{background-color:transparent}.markdown-body a:active,.markdown-body a:hover{outline-width:0}.markdown-body strong{font-weight:inherit;font-weight:bolder}.markdown-body h1{margin:.67em 0}.markdown-body img{border-style:none}.markdown-body code,.markdown-body kbd,.markdown-body pre{font-family:monospace,monospace;font-size:1em}.markdown-body hr{box-sizing:content-box;overflow:visible}.markdown-body input{font:inherit;margin:0;overflow:visible}.markdown-body [type=checkbox]{box-sizing:border-box;padding:0}.markdown-body *{box-sizing:border-box}.markdown-body input{font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body a{color:#0366d6;text-decoration:none}.markdown-body a:hover{color:#0366d6;text-decoration:underline}.markdown-body strong{font-weight:600}.markdown-body hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border-bottom:1px solid #dfe2e5}.markdown-body hr:after,.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{clear:both}.markdown-body table{border-spacing:0;border-collapse:collapse}.markdown-body td,.markdown-body th{padding:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:0;margin-bottom:0}.markdown-body h1{font-size:32px;font-weight:600}.markdown-body h2{font-size:24px;font-weight:600}.markdown-body h3{font-size:20px;font-weight:600}.markdown-body h4{font-size:16px;font-weight:600}.markdown-body h5{font-size:14px;font-weight:600}.markdown-body h6{font-size:12px;font-weight:600}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{padding-left:0;margin-top:0;margin-bottom:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code,.markdown-body pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0}.markdown-body .octicon{vertical-align:text-bottom}.markdown-body .pl-0{padding-left:0!important}.markdown-body .pl-1{padding-left:4px!important}.markdown-body .pl-2{padding-left:8px!important}.markdown-body .pl-3{padding-left:16px!important}.markdown-body .pl-4{padding-left:24px!important}.markdown-body .pl-5{padding-left:32px!important}.markdown-body .pl-6{padding-left:40px!important}.markdown-body:after,.markdown-body:before{display:table;content:""}.markdown-body:after{clear:both}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body hr{height:.25em;padding:0;margin:24px 0;background-color:#e1e4e8;border:0}.markdown-body blockquote{padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body kbd{font-size:11px;border:1px solid #c6cbd1;border-bottom-color:#959da5;box-shadow:inset 0 -1px 0 #959da5}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#1b1f23;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1{font-size:2em}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eaecef}.markdown-body h2{font-size:1.5em}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:.875em}.markdown-body h6{font-size:.85em;color:#6a737d}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li{word-wrap:break-all}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table{display:block;width:100%;overflow:auto}.markdown-body table th{font-weight:600}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #dfe2e5}.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body img{max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body code{padding:.2em .4em;margin:0;font-size:85%;background-color:rgba(27,31,35,.05);border-radius:3px}.markdown-body pre{word-wrap:normal}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}.markdown-body pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .full-commit .btn-outline:not(:disabled):hover{color:#005cc5;border-color:#005cc5}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;line-height:10px;color:#444d56;vertical-align:middle;background-color:#fafbfc;border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1}.markdown-body :checked+.radio-label{position:relative;z-index:1;border-color:#0366d6}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}.markdown-body hr{border-bottom-color:#eee}.markdown-body pre code{display:block;overflow-x:auto;padding:.5em;background:#1e1e1e;color:#dcdcdc}.hljs-keyword,.hljs-link,.hljs-literal,.hljs-name,.hljs-symbol{color:#569cd6}.hljs-link{text-decoration:underline}.hljs-built_in,.hljs-type{color:#4ec9b0}.hljs-class,.hljs-number{color:#b8d7a3}.hljs-meta-string,.hljs-string{color:#d69d85}.hljs-regexp,.hljs-template-tag{color:#9a5334}.hljs-formula,.hljs-function,.hljs-params,.hljs-subst,.hljs-title{color:#dcdcdc}.hljs-comment,.hljs-quote{color:#57a64a;font-style:italic}.hljs-doctag{color:#608b4e}.hljs-meta,.hljs-meta-keyword,.hljs-tag{color:#9b9b9b}.hljs-template-variable,.hljs-variable{color:#bd63c5}.hljs-attr,.hljs-attribute,.hljs-builtin-name{color:#9cdcfe}.hljs-section{color:gold}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-bullet,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-selector-tag{color:#d7ba7d}.hljs-addition{background-color:#144212}.hljs-addition,.hljs-deletion{display:inline-block;width:100%}.hljs-deletion{background-color:#600}*{padding:0;margin:0}h1,h2,h3,h4,h5,h6{font-weight:400}.home-page .top-section{height:720px}.home-page .top-section .vertical-middle{width:100%}.home-page .top-section .product-logo{margin:0 auto}.home-page .top-section .button-area,.home-page .top-section .product-desc{text-align:center}.home-page .top-section .button-area .button:first-child{margin-right:20px}.home-page .top-section .version-note{text-align:center;margin:22px 0 10px}.home-page .top-section .version-note a{text-decoration:none;display:inline-block;font-family:Avenir-Heavy;font-size:14px;color:#fff;text-align:center;background:#46484b;border-radius:2px;line-height:24px;padding:0 6px;margin-right:10px}.home-page .top-section .release-date{font-family:Avenir-Medium;font-size:12px;color:#999;text-align:center}.home-page .function-section{max-width:832px;margin:0 auto;box-sizing:border-box;padding:82px 0}.home-page .function-section h3{font-family:Avenir-Heavy;font-size:36px;text-align:center;font-weight:400}.home-page .function-section .bone{margin:0 auto 45px}.home-page .function-section .func-item{margin-bottom:30px;position:relative}.home-page .function-section .func-item .col{display:inline-flex;align-items:center;vertical-align:middle;margin:0 auto;width:50%;max-width:750px;min-height:325px}.home-page .function-section .func-item .col img{width:325px}.home-page .function-section .func-item .col h4{font-weight:400;font-family:Avenir-Heavy;font-size:24px;color:#333;margin-bottom:20px}.home-page .function-section .func-item .col p{opacity:.8;font-family:Avenir-Medium;font-size:18px;color:#999;margin:0}.home-page .function-section .func-item .img{display:inline-block;text-align:center}@media screen and (max-width:830px){.home-page .function-section .func-item{text-align:center}.home-page .function-section .func-item .col{width:100%}.home-page .function-section .func-item .img{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);opacity:.1}}.home-page .feature-section{background:#2e3034}.home-page .feature-section .feature-section-body{max-width:1280px;margin:0 auto;position:relative;padding:80px 40px;color:#fff}.home-page .feature-section .feature-section-body h3{font-family:Avenir-Heavy;font-size:36px;text-align:center;margin:0;font-weight:400}.home-page .feature-section .feature-section-body .bone{margin:0 auto 45px}.home-page .feature-section .feature-section-body .feature-list{list-style:none;padding:0;margin:0}.home-page .feature-section .feature-section-body .feature-list .feature-list-item{vertical-align:top;display:inline-block;margin-bottom:48px;width:50%}.home-page .feature-section .feature-section-body .feature-list .feature-list-item ul{list-style:disc;padding-left:14px}.home-page .feature-section .feature-section-body .feature-list .feature-list-item ul li{font-family:Avenir-Medium;font-size:14px;color:#999}.home-page .feature-section .feature-section-body .feature-list .feature-list-item img{vertical-align:top;width:34px;margin-right:20px}.home-page .feature-section .feature-section-body .feature-list .feature-list-item div{display:inline-block;width:80%}.home-page .feature-section .feature-section-body .feature-list .feature-list-item div h4{font-family:Avenir-Heavy;font-size:20px;margin:5px 0 20px}.home-page .feature-section .feature-section-body .feature-list .feature-list-item div p{font-family:Avenir-Medium;font-size:14px;line-height:20px;color:#999}@media screen and (max-width:768px){.home-page .feature-section .feature-section-body .feature-list .feature-list-item{width:100%}}@media screen and (max-width:640px){.home-page .feature-section-body{padding-left:20px;padding-right:20px}}.product-nav-list li.selected a{background-color:#f4f6f8}.main-container{height:calc(100vh - 66px);background-color:#fff}.main-container .right-panel{background-color:#fff;width:calc(100% - 180px);padding:12px 32px;overflow:scroll}.main-container .nav-title{margin:0;text-align:center;font-size:14px;font-weight:700;height:60px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:var(--shell-brand-navigation-ver-divider-size,1px) var(--shell-brand-navigation-ver-divider-style,solid) var(--shell-brand-navigation-ver-divider-color,#eee);display:flex;justify-content:center;align-items:center}.main-container .nav-title span{margin-left:5px}.main-container .nav-mode{margin:0;text-align:center;font-size:12px;font-weight:700;height:45px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:var(--shell-brand-navigation-ver-divider-size,1px) var(--shell-brand-navigation-ver-divider-style,solid) var(--shell-brand-navigation-ver-divider-color,#eee);display:flex;justify-content:center;align-items:center}.main-container .nav-mode span{margin-left:5px}.main-container .nav-menu{padding:0;background:transparent;border:0;line-height:40px}.main-container .nav-menu .first-menu>.next-menu-item-inner,.main-container .nav-menu div.next-menu-item{color:#333}.main-container .nav-menu .next-menu-item-inner{height:40px;color:#666}.main-container .nav-menu .current-path{background-color:#f2f3f7}.main-container .go-back{text-align:center;color:#546478;font-size:20px;font-weight:700;padding:10px 0;margin-top:14px;cursor:pointer}.enable-dialog .next-dialog-body{padding-top:10px}.enable-dialog .next-dialog-close{display:none}.next-card{border:1px solid #dcdee3}.next-card-head{padding-left:16px;padding-right:16px}.next-card-head-show-bullet .next-card-title:before{background:#5584ff}.next-card-head-main{margin-top:8px;height:40px;line-height:40px}.next-card-extra{font-size:12px;color:#5584ff}.next-card-body{padding-bottom:12px;padding-left:16px;padding-right:16px}.next-card-show-divider>.next-card-head>.next-card-head-main{border-bottom:1px solid #e6e7eb}.next-card-show-divider>.next-card-body{padding-top:12px}.next-card-header{padding:0 16px;margin-bottom:12px;margin-top:12px}.next-card-actions{padding:12px 16px}.next-card-divider:before{border-bottom:1px solid #e6e7eb}.next-card-divider--inset{padding:0 16px}.next-card-content-container{margin-top:12px;padding-bottom:12px;padding-left:16px;padding-right:16px;font-size:12px} +/*! + * Copyright 1999-2018 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ /*! * Copyright 1999-2018 Alibaba Group Holding Ltd. * @@ -132,7 +147,7 @@ * 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. - */.next-balloon{font-size:12px}.next-balloon-title.next-balloon-closable .next-balloon-close{transform:translateY(18px)}.next-balloon-primary{border-color:#4494f9;background-color:#e3f2fd}.next-balloon-primary .next-balloon-close{transform:translateY(16px);font-size:12px}.next-balloon-primary .next-balloon-close .next-icon{width:12px;height:12px}.next-balloon-primary .next-balloon-close .next-icon:before{width:12px;height:12px;font-size:12px}.next-balloon-primary:after{border:1px solid #4494f9;background-color:#e3f2fd}.next-balloon-normal{border-color:#dcdee3;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-balloon-normal .next-balloon-close{transform:translateY(16px);font-size:12px}.next-balloon-normal .next-balloon-close .next-icon{width:12px;height:12px}.next-balloon-normal .next-balloon-close .next-icon:before{width:12px;height:12px;font-size:12px}.next-balloon-normal:after{border:1px solid #dcdee3}.next-balloon-tooltip{font-size:12px;color:#333}.next-balloon-tooltip,.next-balloon-tooltip .next-balloon-arrow .next-balloon-arrow-content{background-color:#f2f3f7;border:1px solid #dcdee3}.next-tag-checkable.next-tag-level-secondary:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-secondary:not(.disabled):not([disabled]):hover{color:#5584ff}.next-tag-default.next-tag-level-primary{border-color:#ebecf0;background-color:#ebecf0}.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]):hover{border-color:#e2e4e8;background-color:#e2e4e8}.disabled.next-tag-default.next-tag-level-primary,[disabled].next-tag-default.next-tag-level-primary{border-color:#f7f8fa;background-color:#f7f8fa}.next-tag-closable.next-tag-level-primary{border-color:#ebecf0;background-color:#ebecf0}.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]):hover{border-color:#e2e4e8;background-color:#e2e4e8}.disabled.next-tag-closable.next-tag-level-primary,[disabled].next-tag-closable.next-tag-level-primary{border-color:#f7f8fa;background-color:#f7f8fa}.next-tag-checkable.next-tag-level-primary{border-color:#ebecf0;background-color:#ebecf0}.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]):hover{border-color:#e2e4e8;background-color:#e2e4e8}.disabled.next-tag-checkable.next-tag-level-primary,[disabled].next-tag-checkable.next-tag-level-primary{border-color:#f7f8fa;background-color:#f7f8fa}.next-tag-checkable.next-tag-level-primary.checked{border-color:#5584ff;background-color:#5584ff}.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]):hover{border-color:#3e71f7;background-color:#3e71f7}.disabled.next-tag-checkable.next-tag-level-primary.checked,[disabled].next-tag-checkable.next-tag-level-primary.checked{border-color:#f7f8fa;background-color:#f7f8fa}.next-tag-default.next-tag-level-normal{border-color:#c4c6cf}.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]):hover{border-color:#a0a2ad}.disabled.next-tag-default.next-tag-level-normal,[disabled].next-tag-default.next-tag-level-normal{border-color:#e6e7eb;background-color:#f7f8fa}.next-tag-closable.next-tag-level-normal{border-color:#c4c6cf}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover{border-color:#a0a2ad}.disabled.next-tag-closable.next-tag-level-normal,[disabled].next-tag-closable.next-tag-level-normal{border-color:#e6e7eb}.next-tag-checkable.next-tag-level-normal.checked{color:#5584ff;border-color:#5584ff}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover{color:#3e71f7;border-color:#3e71f7}.next-tag-checkable.next-tag-level-secondary.checked{color:#5584ff;border-color:#5584ff}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover{color:#3e71f7;border-color:#3e71f7}.next-tag-checkable.next-tag-level-secondary.checked:before{background-color:#5584ff}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover:before,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover:before{background-color:#3e71f7}.next-tag-checkable.next-tag-level-secondary.checked:disabled:before,[disabled].next-tag-checkable.next-tag-level-secondary.checked:before{background-color:#e6e7eb}.next-tag-checkable.next-tag-level-normal,.next-tag-checkable.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-normal:not(.disabled):not([disabled]):hover{border-color:#c4c6cf}.disabled.next-tag-checkable.next-tag-level-normal,[disabled].next-tag-checkable.next-tag-level-normal{border-color:#e6e7eb;background-color:#f7f8fa}.next-tag-checkable.next-tag-level-normal.checked:before{background-color:#5584ff}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover:before,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover:before{background-color:#3e71f7}.next-tag-checkable.next-tag-level-normal.checked:disabled:before,[disabled].next-tag-checkable.next-tag-level-normal.checked:before{background-color:#e6e7eb}.next-tag-closable.next-tag-level-normal:before{background-color:#c4c6cf}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover:before,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover:before{background-color:#a0a2ad}.next-tag-closable.next-tag-level-normal:disabled:before,[disabled].next-tag-closable.next-tag-level-normal:before{background-color:#e6e7eb}.next-tag-large.next-tag-closable>.next-tag-body{max-width:calc(100% - 44px)}.next-tag-large.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-large.next-tag-closable>.next-tag-close-btn .next-icon:before{width:12px;font-size:12px}.next-tag-medium{height:28px;line-height:26px}.next-tag-medium.next-tag-closable>.next-tag-body{max-width:calc(100% - 32px)}.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon:before{width:16px;font-size:16px}}.next-tag-small{height:20px;line-height:18px}.next-tag-checkable.next-tag-level-secondary.disabled,.next-tag-checkable.next-tag-level-secondary[disabled]{border-color:#e6e7eb;background-color:#f7f8fa}.next-select-multiple .next-disabled .next-select-tag-compact{background:linear-gradient(90deg,transparent,#f7f8fa 10px)}.next-select-multiple.next-small .next-select-values,.next-select-tag.next-small .next-select-values{min-height:18px;padding-top:2px;padding-bottom:2px}.next-select-multiple.next-small .next-select-values-compact,.next-select-tag.next-small .next-select-values-compact{height:20px!important}.next-select-multiple.next-small .next-input-control,.next-select-multiple.next-small .next-input-inner,.next-select-multiple.next-small .next-input-label,.next-select-multiple.next-small .next-select-tag-compact,.next-select-tag.next-small .next-input-control,.next-select-tag.next-small .next-input-inner,.next-select-tag.next-small .next-input-label,.next-select-tag.next-small .next-select-tag-compact{line-height:18px}.next-select-multiple.next-medium .next-select-values,.next-select-tag.next-medium .next-select-values{min-height:26px;padding-top:3px;padding-bottom:3px}.next-select-multiple.next-medium .next-select-values-compact,.next-select-tag.next-medium .next-select-values-compact{height:28px!important}.next-select-multiple.next-medium .next-input-control,.next-select-multiple.next-medium .next-input-inner,.next-select-multiple.next-medium .next-input-label,.next-select-multiple.next-medium .next-select-tag-compact,.next-select-tag.next-medium .next-input-control,.next-select-tag.next-medium .next-input-inner,.next-select-tag.next-medium .next-input-label,.next-select-tag.next-medium .next-select-tag-compact{line-height:26px}.next-select-menu-wrapper{border:1px solid #dcdee3}.next-select-all{border-bottom:1px solid #dcdee3}.next-select-all:hover{color:#3e71f7}.next-select-all .next-menu-icon-selected.next-icon{color:#5584ff}.next-select-highlight{color:#5584ff;font-size:12px}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-small .next-select-values{line-height:20px}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-medium .next-select-values{line-height:28px}@media screen and (-webkit-min-device-pixel-ratio:0){.next-select-multiple .next-select-compact .next-select-tag-compact{background:linear-gradient(90deg,hsla(0,0%,100%,0),#fff 10px)}.next-select-multiple .next-disabled .next-select-tag-compact{background:linear-gradient(90deg,hsla(0,0%,100%,0),#f7f8fa 10px)}} + */.next-balloon{font-size:12px}.next-balloon-title.next-balloon-closable .next-balloon-close{transform:translateY(18px)}.next-balloon-primary{border-color:#4494f9;background-color:#e3f2fd}.next-balloon-primary .next-balloon-close{transform:translateY(16px);font-size:12px}.next-balloon-primary .next-balloon-close .next-icon{width:12px;height:12px}.next-balloon-primary .next-balloon-close .next-icon:before{width:12px;height:12px;font-size:12px}.next-balloon-primary .next-balloon-arrow .next-balloon-arrow-content{background-color:#e3f2fd;border:1px solid #4494f9}.next-balloon-normal{border-color:#dcdee3;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.next-balloon-normal .next-balloon-close{transform:translateY(16px);font-size:12px}.next-balloon-normal .next-balloon-close .next-icon{width:12px;height:12px}.next-balloon-normal .next-balloon-close .next-icon:before{width:12px;height:12px;font-size:12px}.next-balloon-normal .next-balloon-arrow .next-balloon-arrow-content{border:1px solid #dcdee3}.next-balloon-tooltip{font-size:12px;color:#333}.next-balloon-tooltip,.next-balloon-tooltip .next-balloon-arrow .next-balloon-arrow-content{background-color:#f2f3f7;border:1px solid #dcdee3}.next-tag-checkable.next-tag-level-secondary:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-secondary:not(.disabled):not([disabled]):hover{color:#5584ff}.next-tag-default.next-tag-level-primary{border-color:#ebecf0;background-color:#ebecf0}.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]):hover{border-color:#e2e4e8;background-color:#e2e4e8}.disabled.next-tag-default.next-tag-level-primary,[disabled].next-tag-default.next-tag-level-primary{border-color:#f7f8fa;background-color:#f7f8fa}.next-tag-closable.next-tag-level-primary{border-color:#ebecf0;background-color:#ebecf0}.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]):hover{border-color:#e2e4e8;background-color:#e2e4e8}.disabled.next-tag-closable.next-tag-level-primary,[disabled].next-tag-closable.next-tag-level-primary{border-color:#f7f8fa;background-color:#f7f8fa}.next-tag-checkable.next-tag-level-primary{border-color:#ebecf0;background-color:#ebecf0}.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]):hover{border-color:#e2e4e8;background-color:#e2e4e8}.disabled.next-tag-checkable.next-tag-level-primary,[disabled].next-tag-checkable.next-tag-level-primary{border-color:#f7f8fa;background-color:#f7f8fa}.next-tag-checkable.next-tag-level-primary.checked{border-color:#5584ff;background-color:#5584ff}.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]):hover{border-color:#3e71f7;background-color:#3e71f7}.disabled.next-tag-checkable.next-tag-level-primary.checked,[disabled].next-tag-checkable.next-tag-level-primary.checked{border-color:#f7f8fa;background-color:#f7f8fa}.next-tag-default.next-tag-level-normal{border-color:#c4c6cf}.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]):hover{border-color:#a0a2ad}.disabled.next-tag-default.next-tag-level-normal,[disabled].next-tag-default.next-tag-level-normal{border-color:#e6e7eb;background-color:#f7f8fa}.next-tag-closable.next-tag-level-normal{border-color:#c4c6cf}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover{border-color:#a0a2ad}.disabled.next-tag-closable.next-tag-level-normal,[disabled].next-tag-closable.next-tag-level-normal{border-color:#e6e7eb}.next-tag-checkable.next-tag-level-normal.checked{color:#5584ff;border-color:#5584ff}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover{color:#3e71f7;border-color:#3e71f7}.next-tag-checkable.next-tag-level-secondary.checked{color:#5584ff;border-color:#5584ff}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover{color:#3e71f7;border-color:#3e71f7}.next-tag-checkable.next-tag-level-secondary.checked:before{background-color:#5584ff}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover:before,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover:before{background-color:#3e71f7}.next-tag-checkable.next-tag-level-secondary.checked:disabled:before,[disabled].next-tag-checkable.next-tag-level-secondary.checked:before{background-color:#e6e7eb}.next-tag-checkable.next-tag-level-normal,.next-tag-checkable.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-normal:not(.disabled):not([disabled]):hover{border-color:#c4c6cf}.disabled.next-tag-checkable.next-tag-level-normal,[disabled].next-tag-checkable.next-tag-level-normal{border-color:#e6e7eb;background-color:#f7f8fa}.next-tag-checkable.next-tag-level-normal.checked:before{background-color:#5584ff}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover:before,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover:before{background-color:#3e71f7}.next-tag-checkable.next-tag-level-normal.checked:disabled:before,[disabled].next-tag-checkable.next-tag-level-normal.checked:before{background-color:#e6e7eb}.next-tag-closable.next-tag-level-normal:before{background-color:#c4c6cf}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover:before,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover:before{background-color:#a0a2ad}.next-tag-closable.next-tag-level-normal:disabled:before,[disabled].next-tag-closable.next-tag-level-normal:before{background-color:#e6e7eb}.next-tag-large.next-tag-closable>.next-tag-body{max-width:calc(100% - 44px)}.next-tag-large.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-large.next-tag-closable>.next-tag-close-btn .next-icon:before{width:12px;font-size:12px}.next-tag-medium{height:28px;line-height:26px}.next-tag-medium.next-tag-closable>.next-tag-body{max-width:calc(100% - 32px)}.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon:before{width:8px;font-size:8px}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon:before{width:16px;font-size:16px}}.next-tag-small{height:20px;line-height:18px}.next-tag-checkable.next-tag-level-secondary.disabled,.next-tag-checkable.next-tag-level-secondary[disabled]{border-color:#e6e7eb;background-color:#f7f8fa}.next-select-multiple .next-disabled .next-select-tag-compact{background:linear-gradient(90deg,transparent,#f7f8fa 10px)}.next-select-multiple.next-small .next-select-values,.next-select-tag.next-small .next-select-values{min-height:18px;padding-top:2px;padding-bottom:2px}.next-select-multiple.next-small .next-select-values-compact,.next-select-tag.next-small .next-select-values-compact{height:20px!important}.next-select-multiple.next-small .next-input-control,.next-select-multiple.next-small .next-input-inner,.next-select-multiple.next-small .next-input-label,.next-select-multiple.next-small .next-select-tag-compact,.next-select-tag.next-small .next-input-control,.next-select-tag.next-small .next-input-inner,.next-select-tag.next-small .next-input-label,.next-select-tag.next-small .next-select-tag-compact{line-height:18px}.next-select-multiple.next-medium .next-select-values,.next-select-tag.next-medium .next-select-values{min-height:26px;padding-top:3px;padding-bottom:3px}.next-select-multiple.next-medium .next-select-values-compact,.next-select-tag.next-medium .next-select-values-compact{height:28px!important}.next-select-multiple.next-medium .next-input-control,.next-select-multiple.next-medium .next-input-inner,.next-select-multiple.next-medium .next-input-label,.next-select-multiple.next-medium .next-select-tag-compact,.next-select-tag.next-medium .next-input-control,.next-select-tag.next-medium .next-input-inner,.next-select-tag.next-medium .next-input-label,.next-select-tag.next-medium .next-select-tag-compact{line-height:26px}.next-select-menu-wrapper{border:1px solid #dcdee3}.next-select-all{border-bottom:1px solid #dcdee3}.next-select-all:hover{color:#3e71f7}.next-select-all .next-menu-icon-selected.next-icon{color:#5584ff}.next-select-highlight{color:#5584ff;font-size:12px}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-small .next-select-values{line-height:20px}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-medium .next-select-values{line-height:28px}@media screen and (-webkit-min-device-pixel-ratio:0){.next-select-multiple .next-select-compact .next-select-tag-compact{background:linear-gradient(90deg,hsla(0,0%,100%,0),#fff 10px)}.next-select-multiple .next-disabled .next-select-tag-compact{background:linear-gradient(90deg,hsla(0,0%,100%,0),#f7f8fa 10px)}} /*! * Copyright 1999-2018 Alibaba Group Holding Ltd. * @@ -506,4 +521,4 @@ * 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. - */.dark{filter:grayscale(.25)}.dark .next-menu-item:not(.next-disabled).next-focused,.dark .next-shell-navigation.next-shell-mini.next-shell-aside{background-color:#2d2d2d!important;color:#fff!important;border-color:#3e3e3e}.dark .next-menu-item{color:#fff!important}.dark .next-nav-embeddable.next-normal .next-menu-sub-menu .next-menu-item,.dark .next-nav-embeddable.next-normal .next-nav-item.next-menu-item,.dark .next-nav-embeddable.next-primary .next-menu-sub-menu .next-menu-item,.dark .next-nav-embeddable.next-primary .next-nav-item.next-menu-item,.dark .next-nav-embeddable.next-secondary .next-menu-sub-menu .next-menu-item,.dark .next-nav-embeddable.next-secondary .next-nav-item.next-menu-item{background-color:#161616!important;color:#929299!important}.dark .next-menu-item:not(.next-disabled):hover{background-color:#424346!important}.dark .next-menu-item.next-selected,.dark .next-menu.next-normal .next-menu-item.next-selected,.dark .next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-focused,.dark .next-nav.next-normal .next-menu-sub-menu .next-menu-item:hover{background-color:#424346!important;color:#209bfa!important}.dark .main-container .right-panel,.dark .next-shell-brand .next-shell-main{background-color:#161616!important}.dark .main-container .right-panel::-webkit-scrollbar,.dark .main-container .right-panel::-webkit-scrollbar-corner,.dark .main-container .right-panel::-webkit-scrollbar-track{background-color:#161616!important}.dark .page-title{color:#fff}.dark .nav-mode,.dark .nav-title{border-color:#1c1d1f}.dark .next-message.next-message-notice.next-inline{background-color:#161616;border-color:#929299}.dark .next-message.next-message-notice.next-inline .next-message-content{color:#c9c9cc}.dark .namespacewrapper{background-color:#303030!important}.dark .namespacewrapper .naming-simple{color:#c9c9cc}.dark .next-table{border-color:#3e3e3e!important}.dark .next-table table{background-color:#303030!important}.dark .query_result_wrapper{color:#fff}.dark .next-table-header th{background-color:#4a4a4a!important;color:#fff}.dark .next-table-row{background-color:#303030!important;color:#c9c9cc}.dark .next-table-sort .next-icon{color:#fff}.dark .next-table td,.dark .next-table th{border-color:#3e3e3e!important}.dark .next-table-row.selected{background:#424346!important;color:#c9c9cc}.dark .next-table-row.hovered{background:#4a4a4a!important;color:#fff}.dark .next-table-header-fixer{background:#4a4a4a!important}.dark .next-table-cell-wrapper a{color:#209bfa}.dark form label{color:#c9c9cc!important}.dark .naming-copy{background:#303030!important;color:#fff!important}.dark .next-menu.next-ver{background-color:#2d2d2d;border-color:#424346}.dark .next-overlay-wrapper .opened .next-menu-item:not(.next-disabled):hover{background-color:#fff}.dark .next-dialog-header,.dark .next-message.next-large.next-title-content .next-message-title{color:#fff}.dark .next-overlay-wrapper .next-overlay-inner{border-color:#1c1d1f;background-color:#161616}.dark .next-input.next-input-textarea,.dark .next-input.next-medium{background-color:#303030!important;border-color:#8d8d93!important;caret-color:#c9c9cc!important}.dark .next-input.next-input-textarea em,.dark .next-input.next-input-textarea input,.dark .next-input.next-input-textarea textarea,.dark .next-input.next-medium em,.dark .next-input.next-medium input,.dark .next-input.next-medium textarea{color:#fff!important}.dark .next-input.next-input-textarea input::placeholder,.dark .next-input.next-medium input::placeholder{color:#929299}.dark .next-input.next-focus,.dark .next-input:hover{border-color:#b8b8bc!important}.dark .next-input.next-input-textarea,.dark .next-input.next-small{background-color:#303030!important;border-color:#8d8d93!important;caret-color:#c9c9cc!important}.dark .next-input.next-input-textarea em,.dark .next-input.next-input-textarea input,.dark .next-input.next-input-textarea textarea,.dark .next-input.next-small em,.dark .next-input.next-small input,.dark .next-input.next-small textarea{color:#fff!important}.dark .next-input.next-input-textarea input::placeholder,.dark .next-input.next-small input::placeholder{color:#929299}.dark .setting-box{background-color:#303030!important;color:#fff!important;border-color:#8d8d93}.dark .next-radio-group .next-radio-label{color:#c9c9cc!important}.dark .main-container{background-color:#161616}.dark .next-shell-brand .next-shell-main{color:#c9c9cc}.dark .next-shell-brand .next-shell-main h1{color:#fff}.dark .next-card-body,.dark .next-card-head,.dark .service-detail .cluster-card{background-color:#303030}.dark .next-card-title,.dark .next-form-item.next-small .next-form-item-label{color:#fff!important}.dark .next-card-subtitle{color:#c9c9cc}.dark .next-tag-group .next-tag-medium{color:#c9c9cc!important}.dark .next-form-item p{color:#c9c9cc}.dark .next-collapse-panel-title{background-color:#161616;color:#c9c9cc}.dark .next-collapse .next-collapse-panel-icon{color:#c9c9cc}.dark .next-collapse-panel-title:hover,.dark .next-collapse-panel-title:hover .next-collapse-panel-icon{background-color:#1c1d1f;color:#fff}.dark .next-collapse{border-color:#1c1d1f}.dark .next-collapse-panel-expanded>.next-collapse-panel-content{background-color:#2d2d2d}.dark .next-collapse-panel-expanded>.next-collapse-panel-content ul li pre{background-color:#303030;border-color:#1c1d1f;color:#c9c9cc}.dark .next-btn.next-btn-normal,.dark .next-btn.next-btn-secondary{background-color:#303030!important;border-color:#8d8d93!important;color:#c9c9cc!important}.dark .next-btn.next-btn-normal:hover,.dark .next-btn.next-btn-secondary:hover{background-color:#373737!important;color:#fff!important;border-color:#b8b8bc!important}.dark .next-pagination .next-pagination-item.next-current{background-color:#8d8d93!important;color:#fff!important}.dark .next-pagination.next-medium .next-pagination-item.next-next:not([disabled]) i,.dark .next-pagination.next-medium .next-pagination-item.next-prev:not([disabled]) i{color:#c9c9cc!important}.dark .next-switch-off .next-switch-btn,.dark .next-switch-on .next-switch-btn{background-color:#c9c9cc!important}.dark .next-switch-off:focus .next-switch-btn,.dark .next-switch-off:hover .next-switch-btn,.dark .next-switch-on:focus .next-switch-btn,.dark .next-switch-on:hover .next-switch-btn{background-color:#fff!important}.dark .next-switch-off{background-color:#303030!important;border-color:#8d8d93!important}.dark .next-switch-off:hover{border-color:#b8b8bc!important;background-color:#373737!important}:global(#root),body,html{height:100%}:global(.mainwrapper){position:absolute!important;top:0;bottom:0;left:0;right:0}:global(.sideleft){float:left;background-color:#eaedf1;position:absolute;top:0;bottom:0;z-index:2;overflow:hidden;width:180px}:global(.sideleft .toptitle){width:100%;height:70px;line-height:70px;background:#d9dee4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;text-indent:20px}:global(.maincontainer){position:absolute;width:auto;top:0;bottom:0;left:180px;right:0;overflow:hidden;overflow-y:auto;-o-transition:all .2s ease;-ms-transition:all .2s ease;-moz-transition:all .2s ease;-webkit-transition:all .2s ease}:global(.viewFramework-product-navbar .product-nav-list li .active){background-color:#fff!important}.next-menu .next-menu-icon-arrow-down{transform:rotate(0deg)!important}li.next-menu-item:not(.next-disabled).next-selected:focus:hover,li.next-menu-item:not(.next-disabled).next-selected:hover,li.next-menu-item:not(.next-disabled):hover{background:#e4f3fe;background:var(--nav-normal-sub-nav-hover-bg-color,#e4f3fe);color:#209bfa;color:var(--nav-normal-sub-nav-hover-text-color,#209bfa)}.next-menu.next-normal .next-menu-item.next-selected{background:#e4f3fe!important;background:var(--nav-normal-sub-nav-selected-bg-color,#e4f3fe)!important;color:#209bfa!important;color:var(--nav-normal-sub-nav-selected-text-color,#209bfa)!important}.clearfix:after{content:".";clear:both;display:block;height:0;overflow:hidden;visibility:hidden}.clearfix{zoom:1}.copy-icon{cursor:pointer;margin-left:4px;color:var(--color-link-1,#298dff)}.layouttitle{height:40px;width:200px;background-color:#09c;color:#fff;line-height:40px;text-align:center;margin:0;padding:0;font-weight:700}.linknav{height:30px;line-height:30px;text-align:center}.righttitle{height:40px;background-color:#000;width:100%;font-weight:700}.product-nav-icon{padding:15px 0 0;height:70px;margin:0}.envcontainer{padding-left:15px;margin-right:auto;margin-left:auto;max-height:450px;overflow:scroll;margin-bottom:100px;display:none;top:50px;left:230px;position:fixed;z-index:99999;width:435px;height:auto;background-color:#fff;border:1px solid #ddd;border-radius:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.envtop{height:50px;line-height:50px;position:fixed;top:0;left:320px;z-index:999;background-color:transparent;-webkit-font-smoothing:antialiased}.envcontainer-top{padding-left:15px;margin-right:auto;margin-left:auto;max-height:450px;overflow:auto;margin-bottom:100px;display:none;top:50px;left:0;position:absolute;z-index:99999;width:435px;height:auto;background-color:#fff;border:1px solid #ddd;border-radius:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.envcontainer-top .row{margin:0!important}.envcontainer-top .active{background-color:#546478}.envcontainer dl dd.active{background-color:#546478;color:#fff}.current-env{display:block;padding:0;font-size:14px;margin:0 0 5px;text-align:center}.current-env a{color:#666;text-decoration:none}.product-nav-title{height:70px;line-height:70px;margin:0;text-align:center;padding:0;font-size:14px;background:#d9dee4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333}.console-title{padding:16px 0}.topbar-nav-item-title{margin:0 0 10px 31px;color:#666;font-weight:700}.dl{height:100%;width:125px;overflow:auto;margin:0 15px 15px 0}.dd{height:24px;line-height:24px;overflow-x:hidden;padding-left:12px;margin-left:20px}.active{color:#fff}.dd:hover{cursor:pointer;opacity:.7;filter:70}.cm-s-xq-light span.cm-keyword{line-height:1em;font-weight:700;color:#5a5cad}.cm-s-xq-light span.cm-atom{color:#6c8cd5}.cm-s-xq-light span.cm-number{color:#164}.cm-s-xq-light span.cm-def{text-decoration:underline}.cm-s-xq-light span.cm-type,.cm-s-xq-light span.cm-variable,.cm-s-xq-light span.cm-variable-2,.cm-s-xq-light span.cm-variable-3{color:#000}.cm-s-xq-light span.cm-comment{color:#0080ff;font-style:italic}.cm-s-xq-light span.cm-string{color:red}.cm-s-xq-light span.cm-meta{color:#ff0}.cm-s-xq-light span.cm-qualifier{color:grey}.cm-s-xq-light span.cm-builtin{color:#7ea656}.cm-s-xq-light span.cm-bracket{color:#cc7}.cm-s-xq-light span.cm-tag{color:#3f7f7f}.cm-s-xq-light span.cm-attribute{color:#7f007f}.cm-s-xq-light span.cm-error{color:red}.cm-s-xq-light .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-xq-light .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important;background:#ff0}.CodeMirror{border:1px solid #eee}.CodeMirror-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:auto;z-index:9999}.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:infobackground;border:1px solid #000;border-radius:4px 4px 4px 4px;color:infotext;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-position:0 100%;background-repeat:repeat-x}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{padding-left:18px;background-position:0 0;background-repeat:no-repeat}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:100% 100%;width:100%;height:100%}@media(min-width:992px){.modal-lg{width:980px}}@media(min-width:768px)and (max-width:992px){.modal-lg{width:750px}}.modal-body table.narrow-table td{padding:8px 0}.add-on.form-control{margin-left:-4px;box-shadow:none;font-size:28px;line-height:32px;padding:0;vertical-align:top}.text-break{word-wrap:break-word;word-break:break-all;white-space:normal}.form-inline{margin-bottom:20px}.console-title{min-height:70px}.form-horizontal .form-group .checkbox{margin-left:0;margin-right:10px}.combox_border,.combox_select{border:1px solid #c2c2c2;width:245px}.combox_border{height:auto;display:inline-block;position:relative}.combox_input{border:0;padding-left:5px;width:85%;vertical-align:middle}.form-inline .combox_input.form-control{width:85%}.combox_button{width:12%;color:#666;text-align:center;vertical-align:middle;cursor:pointer;border-left:1px solid #c2c2c2}ul.combox_select{border-top:0;padding:0;position:absolute;left:-1px;top:20px;display:none;background:#fff;max-height:300px;overflow-y:auto}ul.combox_select li{overflow:hidden;height:30px;line-height:30px;cursor:pointer}ul.combox_select li a{display:block;line-height:28px;padding:0 8px;text-decoration:none;color:#666}ul.combox_select li a:hover{text-decoration:none;background:#f5f5f5}#combox-appanme.combox_border,#combox-appanme .combox_select{width:158px}#combox-appanme .form-control{height:30px}input.error,textarea.error{border:1px solid red}.form-inline .form-group{position:relative}label.error{margin:4px 0;color:red;font-weight:400;position:absolute;right:15px;bottom:-26px}ins{background-color:#c6ffc6;text-decoration:none}del{background-color:#ffc6c6}form.vertical-margin-lg .form-group{margin-bottom:22px}.namespacewrapper{padding:5px 15px;overflow:hidden;background-color:#efefef}.xrange-container{position:relative;border:1px solid #ccc;margin:0;padding:0}.xrange-container .cocofont,.xrange-container .iconfont{cursor:pointer}.xrange-container .label{display:flex;align-items:center;text-align:center;justify-content:space-between;cursor:pointer}.xrange-container .label.is-button{display:flex;border:1px solid #e6ebef;height:32px;padding:6px 12px;background-color:#f5f5f6}.xrange-container .label.is-button>i{font-size:13px}.xrange-container .label.is-empty{padding:0}.xrange-container .label.is-empty.is-button{padding:6px 12px}.xrange-container .label.is-empty>i{font-size:15px;margin-right:0}.xrange-container .label.is-empty>span,.xrange-container .label.is-empty b{display:none}.xrange-container .label>i{font-size:13px;text-align:center}.xrange-container .label>b{padding-top:3px}.xrange-container .label>span{min-width:100px;display:inline-flex;margin-bottom:8px}.xrange-layer{position:fixed;left:0;top:0;width:100%;height:100%;z-index:990;background-color:rgba(0,0,0,.05)}.xrange-panel{display:none;position:relative;right:1px;top:-8px;z-index:1000;border:1px solid #e6e7eb;border-radius:0;box-shadow:1px 1px 3px 0 transparent;width:111px;min-height:302px;background-color:#fff}.xrange-panel.visible{display:block}.xrange-panel .quick-list{display:flex;flex-direction:column;justify-content:space-around;box-sizing:content-box!important;align-items:center}.xrange-panel .quick-list>span{flex:0 0 auto;width:100%;line-height:20px;padding:6px 0 6px 27px;font-size:12px;-webkit-user-select:none;cursor:pointer}.xrange-panel .quick-list>span+span{margin-left:0}.xrange-panel .quick-list>span.active{background-color:#f2f3f7;color:#333;cursor:default}.xrange-panel .xrange-panel-footer{display:flex;align-items:center;justify-content:space-between;height:60px;background-color:#fff;position:absolute;top:300px;left:-539px;min-width:648px;padding:12px 108px 12px 12px}.xrange-panel .xrange-panel-footer .fn-left,.xrange-panel .xrange-panel-footer .fn-right{flex:0 0 auto}.xrange-panel .xrange-panel-footer button+button{margin-left:8px}.xrange-panel .picker-container{display:none;position:relative;margin-top:16px}.xrange-panel .picker-container .next-range-picker-panel{top:-273px!important;left:-540px!important;position:absolute!important;animation:none!important;z-index:999999;border-color:#e6ebef}.next-calendar-card .next-calendar-range-body{background:#fff!important;min-height:227px!important}.xrange-panel .picker-container+.next-range-picker{display:none}.xrange-panel .picker-container .next-date-picker-quick-tool{display:none!important}.xrange-panel.show-picker .picker-container{display:block;min-height:5px}.dingding{background:url(https://g.alicdn.com/cm-design/arms/1.1.27/styles/arms/images/dingding.png) no-repeat 0}.dingding,.wangwang{display:inline-block;padding:5px 0 5px 30px;height:24px;vertical-align:middle}.wangwang{background:url(https://g.alicdn.com/cm-design/arms/1.1.27/styles/arms/images/wangwang.png) no-repeat 0;background-size:24px}@media screen and (min-width:768px){.region-group-list{max-width:784px}}@media screen and (min-width:992px){.region-group-list{max-width:862px}}@media screen and (min-width:1200px){.region-group-list{max-width:600px}}@media screen and (min-width:1330px){.region-group-list{max-width:700px}}@media screen and (min-width:1500px){.region-group-list{max-width:1000px}}.next-switch-medium{border:1px solid transparent;width:48px!important;height:26px!important;border-radius:15px!important}.next-switch-medium>.next-switch-trigger{border:1px solid transparent;position:absolute;left:33px!important;width:24px!important;height:24px!important;border-radius:15px!important}.aliyun-advice{bottom:98px!important}.next-switch-medium>.next-switch-children{font-size:12px!important;position:absolute;height:24px!important;line-height:24px!important}.next-switch-on>.next-switch-trigger{box-shadow:1px 1px 3px 0 rgba(0,0,0,.32)!important;background-color:#fff;border-color:transparent;position:absolute;right:0!important}.next-switch-on>.next-switch-children{left:2px!important;font-size:12px!important}.next-switch-on[disabled]>.next-switch-trigger{position:absolute;right:0!important;box-shadow:1px 1px 3px 0 rgba(0,0,0,.32)!important;background-color:#e6e7eb;border-color:transparent}.next-switch-off>.next-switch-children{right:-6px;color:#979a9c!important}.next-switch-off[disabled]>.next-switch-trigger{left:0!important;box-shadow:1px 1px 3px 0 rgba(0,0,0,.32)!important;background-color:#e6e7eb;border-color:transparent}.next-switch-off>.next-switch-trigger{left:0!important;box-shadow:1px 1px 3px 0 rgba(0,0,0,.32);background-color:#fff;border-color:transparent}.next-switch-off,.next-switch-on{width:58px!important}.next-switch-on{position:relative}.next-menu .next-menu-icon-select{position:absolute;left:4px;top:0;color:#73777a!important}.next-table-cell-wrapper{hyphens:auto!important;word-break:break-word!important}.dash-page-container{height:100%;min-width:980px}.dash-page-container:after{content:"";display:table;clear:both}.dash-left-container{position:relative;float:left;width:77.52%;height:100%}.dash-title-show{width:100%;height:106px;background-color:#fff;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12);margin-bottom:19px;padding-top:20px;padding-bottom:20px;overflow:hidden}.dash-title-item{float:left;height:49px;width:33%;border-right:1px solid #ebecec;line-height:49px;padding-left:30px;padding-right:30px}.dash-title-word{height:19px;line-height:19px;font-size:14px;color:#73777a}.dash-title-num{height:45px;font-size:32px}.dash-title-item:last-child{border:none!important}.dash-menu-list{width:100%;height:104px;background-color:#fff;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12);margin-bottom:19px}.dash-menu-item{position:relative;float:left;width:33.33%;border-right:1px solid #eee;height:100%;padding-top:20px;padding-bottom:20px;cursor:pointer}.dash-menu-item.disabled{cursor:not-allowed;opacity:.7}.dash-menu-item:last-child{border:none}.dash-menu-item:hover{box-shadow:0 3px 6px 0 rgba(0,0,0,.12)}.dash-menu-conent-wrapper{padding-left:60px;padding-right:40px}.dash-menu-pic{position:absolute;width:32px;left:20px}.dash-menu-content-title{height:19px;line-height:19px;color:#373d41;margin-bottom:5px}.dash-menu-content-word{font-size:12px;color:#73777a}.dash-scene-wrapper{width:100%;background-color:#fff;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12);margin-bottom:20px}.dash-scene-title{position:relative;padding-left:20px;height:50px;line-height:50px;border-bottom:1px solid #f0f0f0}.dash-sceneitem{width:100%;height:80px;padding-top:24px}.dash-scenitem-out{border-bottom:1px solid #eee;height:100%}.dash-sceneitem:hover{box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 4px 0 rgba(0,0,0,.12);border-bottom:1px solid #f0f0f0}.dash-sceneitem-progresswrapper{position:relative;width:256px;height:6px}.dash-sceneitem-progresswrapper.green{background-color:#e2f5cf}.dash-sceneitem-progresswrapper.red{background-color:#ffe6e5}.dash-sceneitem-progresswrapper.green .dash-sceneitem-progressinner{height:100%;background-color:#a6e22e}.dash-sceneitem-progresswrapper.red .dash-sceneitem-progressinner{height:100%;background-color:#eb4c4d}.dash-sceneitem-iconshow{position:absolute;right:0;top:5px}.dash-sceneitem:hover.dash-sceneitem-out{border:none}.dash-sceneitem:after{display:table;content:"";clear:both}.dash-sceneitem-title{float:left;height:32.8px;padding-top:5px;width:14.47%;border-right:1px solid #f0f0f0;overflow:hidden;text-overflow:ellipsis}.scene-nomore-data{position:absolute;text-align:center;left:0;right:0;color:#eee;font-size:12px}.dash-sceneitem-content{position:relative;float:left;padding-top:5px;padding-left:30px;width:85.53%}.scene-title-link{position:absolute;right:20px;top:0;font-size:10px}.dash-bottom-show{width:100%;height:42px;line-height:42px;margin-top:18px;text-align:center;background-color:#fff;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12)}.dash-right-container{float:right;height:100%;width:22.44%;padding:10px;background-color:#fff}.dash-bottom-item,.dash-vl{color:#979a9c;margin-right:10px}.dash-doc{background-color:#fff;height:178px;width:100%;margin-bottom:14px}.dash-doc-title{width:100%;height:68px;line-height:68px;padding-left:20px;padding-right:20px;border-bottom:1px solid #eee}.dash-doc-content{width:100%;padding:15px}.dash-card-contentwrappers{width:100%;height:230px;margin-bottom:14px;background-color:#fff;border:1px solid #eee;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12)}.dash-card-title{width:100%;height:39px;line-height:39px;margin:0;padding-left:24px;padding-right:24px;color:#4a4a4a;border-bottom:1px solid #eee}.dash-card-contentlist{padding:20px}.dash-card-contentitem{position:relative;text-align:left;font-size:12px;margin-bottom:10px}.next-slick-dots-item button{height:4px!important;width:35px!important;border-radius:10px!important}.next-table-row.hovered{background-color:#f5f7f9!important}.alert-success-text{color:#4a4a4a;font-size:14px;margin:10px 0}.alert-success{border-color:#e0e0e0!important}.row-bg-green{background-color:#e4fdda!important}.row-bg-light-green{background-color:#e3fff8}.row-bg-orange{background-color:#fff3e0}.row-bg-red{background-color:#ffece4!important}/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}*,:after,:before{box-sizing:border-box}ol,ul{list-style:none;margin:0;padding:0}li{margin-left:0}hr{border:solid #e6e6e6;border-width:1px 0 0}a{text-decoration:none}a:link{color:#298dff}a:visited{color:#4a83c5}a:active,a:hover{color:#2580e7}a:active{text-decoration:underline}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-thin.eot);src:url(../console-ui/public/fonts/roboto-thin.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-thin.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-thin.woff) format("woff"),url(../console-ui/public/fonts/roboto-thin.ttf) format("truetype");font-weight:200;font-display:swap}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-light.eot);src:url(../console-ui/public/fonts/roboto-light.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-light.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-light.woff) format("woff"),url(../console-ui/public/fonts/roboto-light.ttf) format("truetype");font-weight:300;font-display:swap}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-regular.eot);src:url(../console-ui/public/fonts/roboto-regular.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-regular.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-regular.woff) format("woff"),url(../console-ui/public/fonts/roboto-regular.ttf) format("truetype");font-weight:400;font-display:swap}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-medium.eot);src:url(../console-ui/public/fonts/roboto-medium.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-medium.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-medium.woff) format("woff"),url(../console-ui/public/fonts/roboto-medium.ttf) format("truetype");font-weight:500;font-display:swap}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-bold.eot);src:url(../console-ui/public/fonts/roboto-bold.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-bold.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-bold.woff) format("woff"),url(../console-ui/public/fonts/roboto-bold.ttf) format("truetype");font-weight:700;font-display:swap}html{font-size:100%}body{font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142;color:#333}button,input,optgroup,select,textarea{font-family:inherit}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{font-weight:inherit}h1{margin-bottom:12px;font-size:24px;line-height:36px}h1,h2{font-weight:500}h2{margin-bottom:10px;font-size:20px;line-height:30px}h3,h4{margin-bottom:8px;font-size:16px}h3,h4,h5{font-weight:400;line-height:24px}h5{margin-bottom:7px;font-size:14px}h6{font-weight:500}h6,p{margin-bottom:7px;font-size:14px;line-height:20px}p{font-weight:400}strong{font-weight:500}small{font-size:75%}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-moz-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-ms-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-o-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-moz-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-ms-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-o-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-moz-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-ms-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-o-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@-moz-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@-ms-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@-o-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@-webkit-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@-moz-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@-ms-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@-o-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@-webkit-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@-moz-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@-ms-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@-o-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@-webkit-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@-moz-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@-ms-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@-o-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@-webkit-keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@-moz-keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@-ms-keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@-o-keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@-moz-keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@-ms-keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@-o-keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@-moz-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@-ms-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@-o-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@-moz-keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@-ms-keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@-o-keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@-moz-keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@-ms-keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@-o-keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@-webkit-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-moz-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-ms-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-o-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-moz-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-ms-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-o-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-moz-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-ms-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-o-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@-moz-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@-ms-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@-o-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@-webkit-keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-ms-keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-o-keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-webkit-keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@-moz-keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@-ms-keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@-o-keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@-webkit-keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-moz-keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-ms-keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-o-keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-webkit-keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-moz-keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-ms-keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-o-keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-webkit-keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@-moz-keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@-ms-keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@-o-keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@-webkit-keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-moz-keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-ms-keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-o-keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-webkit-keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-moz-keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-ms-keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-o-keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-webkit-keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@-moz-keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@-ms-keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@-o-keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-ms-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-o-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.fadeIn{-webkit-animation-name:fadeIn;-moz-animation-name:fadeIn;-ms-animation-name:fadeIn;-o-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeInDown{-webkit-animation-name:fadeInDown;-moz-animation-name:fadeInDown;-ms-animation-name:fadeInDown;-o-animation-name:fadeInDown;animation-name:fadeInDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInDown,.fadeInLeft{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeInLeft{-webkit-animation-name:fadeInLeft;-moz-animation-name:fadeInLeft;-ms-animation-name:fadeInLeft;-o-animation-name:fadeInLeft;animation-name:fadeInLeft;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInRight{-webkit-animation-name:fadeInRight;-moz-animation-name:fadeInRight;-ms-animation-name:fadeInRight;-o-animation-name:fadeInRight;animation-name:fadeInRight;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInRight,.fadeInUp{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeInUp{-webkit-animation-name:fadeInUp;-moz-animation-name:fadeInUp;-ms-animation-name:fadeInUp;-o-animation-name:fadeInUp;animation-name:fadeInUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOut{-webkit-animation-name:fadeOut;-moz-animation-name:fadeOut;-ms-animation-name:fadeOut;-o-animation-name:fadeOut;animation-name:fadeOut;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOut,.fadeOutDown{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeOutDown{-webkit-animation-name:fadeOutDown;-moz-animation-name:fadeOutDown;-ms-animation-name:fadeOutDown;-o-animation-name:fadeOutDown;animation-name:fadeOutDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;-moz-animation-name:fadeOutLeft;-ms-animation-name:fadeOutLeft;-o-animation-name:fadeOutLeft;animation-name:fadeOutLeft;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOutLeft,.fadeOutRight{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeOutRight{-webkit-animation-name:fadeOutRight;-moz-animation-name:fadeOutRight;-ms-animation-name:fadeOutRight;-o-animation-name:fadeOutRight;animation-name:fadeOutRight;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOutUp{-webkit-animation-name:fadeOutUp;-moz-animation-name:fadeOutUp;-ms-animation-name:fadeOutUp;-o-animation-name:fadeOutUp;animation-name:fadeOutUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideInUp{-webkit-animation-name:slideInUp;-moz-animation-name:slideInUp;-ms-animation-name:slideInUp;-o-animation-name:slideInUp;animation-name:slideInUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideInDown,.slideInUp{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideInDown{-webkit-animation-name:slideInDown;-moz-animation-name:slideInDown;-ms-animation-name:slideInDown;-o-animation-name:slideInDown;animation-name:slideInDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideInLeft{-webkit-animation-name:slideInLeft;-moz-animation-name:slideInLeft;-ms-animation-name:slideInLeft;-o-animation-name:slideInLeft;animation-name:slideInLeft;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideInLeft,.slideInRight{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideInRight{-webkit-animation-name:slideInRight;-moz-animation-name:slideInRight;-ms-animation-name:slideInRight;-o-animation-name:slideInRight;animation-name:slideInRight;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideOutUp{-webkit-animation-name:slideOutUp;-moz-animation-name:slideOutUp;-ms-animation-name:slideOutUp;-o-animation-name:slideOutUp;animation-name:slideOutUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideOutRight,.slideOutUp{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideOutRight{-webkit-animation-name:slideOutRight;-moz-animation-name:slideOutRight;-ms-animation-name:slideOutRight;-o-animation-name:slideOutRight;animation-name:slideOutRight;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideOutLeft{-webkit-animation-name:slideOutLeft;-moz-animation-name:slideOutLeft;-ms-animation-name:slideOutLeft;-o-animation-name:slideOutLeft;animation-name:slideOutLeft;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideOutDown,.slideOutLeft{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideOutDown{-webkit-animation-name:slideOutDown;-moz-animation-name:slideOutDown;-ms-animation-name:slideOutDown;-o-animation-name:slideOutDown;animation-name:slideOutDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.zoomIn{-webkit-animation-name:zoomIn;-moz-animation-name:zoomIn;-ms-animation-name:zoomIn;-o-animation-name:zoomIn;animation-name:zoomIn;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.zoomIn,.zoomOut{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.zoomOut{-webkit-animation-name:zoomOut;-moz-animation-name:zoomOut;-ms-animation-name:zoomOut;-o-animation-name:zoomOut;animation-name:zoomOut;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.expandInDown{-webkit-animation-name:expandInDown;-moz-animation-name:expandInDown;-ms-animation-name:expandInDown;-o-animation-name:expandInDown;animation-name:expandInDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.expandInDown,.expandOutUp{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.expandOutUp{-webkit-animation-name:expandOutUp;-moz-animation-name:expandOutUp;-ms-animation-name:expandOutUp;-o-animation-name:expandOutUp;animation-name:expandOutUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.15s;-moz-animation-duration:.15s;-ms-animation-duration:.15s;-o-animation-duration:.15s;animation-duration:.15s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.expandInUp{-webkit-animation-name:expandInUp;-moz-animation-name:expandInUp;-ms-animation-name:expandInUp;-o-animation-name:expandInUp;animation-name:expandInUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.expandInUp,.expandOutDown{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.expandOutDown{-webkit-animation-name:expandOutDown;-moz-animation-name:expandOutDown;-ms-animation-name:expandOutDown;-o-animation-name:expandOutDown;animation-name:expandOutDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.15s;-moz-animation-duration:.15s;-ms-animation-duration:.15s;-o-animation-duration:.15s;animation-duration:.15s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInDownSmall{-webkit-animation-name:fadeInDownSmall;-moz-animation-name:fadeInDownSmall;-ms-animation-name:fadeInDownSmall;-o-animation-name:fadeInDownSmall;animation-name:fadeInDownSmall;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInDownSmall,.fadeOutUpSmall{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeOutUpSmall{-webkit-animation-name:fadeOutUpSmall;-moz-animation-name:fadeOutUpSmall;-ms-animation-name:fadeOutUpSmall;-o-animation-name:fadeOutUpSmall;animation-name:fadeOutUpSmall;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.zoomInBig{-webkit-animation-name:zoomInBig;-moz-animation-name:zoomInBig;-ms-animation-name:zoomInBig;-o-animation-name:zoomInBig;animation-name:zoomInBig;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.2s;-moz-animation-duration:.2s;-ms-animation-duration:.2s;-o-animation-duration:.2s;animation-duration:.2s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);-moz-animation-timing-function:cubic-bezier(0,0,.2,1);-ms-animation-timing-function:cubic-bezier(0,0,.2,1);-o-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.zoomInBig,.zoomOutBig{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.zoomOutBig{-webkit-animation-name:zoomOutBig;-moz-animation-name:zoomOutBig;-ms-animation-name:zoomOutBig;-o-animation-name:zoomOutBig;animation-name:zoomOutBig;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.2s;-moz-animation-duration:.2s;-ms-animation-duration:.2s;-o-animation-duration:.2s;animation-duration:.2s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);-moz-animation-timing-function:cubic-bezier(0,0,.2,1);-ms-animation-timing-function:cubic-bezier(0,0,.2,1);-o-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.pulse{-webkit-animation-name:pulse;-moz-animation-name:pulse;-ms-animation-name:pulse;-o-animation-name:pulse;animation-name:pulse;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.expand-enter{overflow:hidden}.expand-enter-active{transition:all .3s ease-out}.expand-enter-active>*{-webkit-animation-name:expandInWithFade;-moz-animation-name:expandInWithFade;-ms-animation-name:expandInWithFade;-o-animation-name:expandInWithFade;animation-name:expandInWithFade;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.2s;-moz-animation-duration:.2s;-ms-animation-duration:.2s;-o-animation-duration:.2s;animation-duration:.2s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;-ms-animation-fill-mode:forwards;-o-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.expand-leave{overflow:hidden}.expand-leave-active{transition:all .2s ease-out}.expand-leave-active>*{-webkit-animation-name:expandOutWithFade;-moz-animation-name:expandOutWithFade;-ms-animation-name:expandOutWithFade;-o-animation-name:expandOutWithFade;animation-name:expandOutWithFade;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.2s;-moz-animation-duration:.2s;-ms-animation-duration:.2s;-o-animation-duration:.2s;animation-duration:.2s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;-ms-animation-fill-mode:forwards;-o-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.next-icon[dir=rtl]:before{transform:rotateY(180deg)}@font-face{font-family:NextIcon;src:url(../console-ui/public/fonts/font_1533967_slipq25tezj.eot);src:url(../console-ui/public/fonts/font_1533967_slipq25tezj.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/font_1533967_slipq25tezj.woff2) format("woff2"),url(../console-ui/public/fonts/font_1533967_slipq25tezj.woff) format("woff"),url(../console-ui/public/fonts/font_1533967_slipq25tezj.ttf) format("truetype"),url(../console-ui/public/fonts/font_1533967_slipq25tezj.svg#NextIcon) format("svg");font-display:swap}.next-icon{display:inline-block;font-family:NextIcon;font-style:normal;font-weight:400;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.next-icon:before{display:inline-block;vertical-align:middle;text-align:center}.next-icon-smile:before{content:""}.next-icon-cry:before{content:""}.next-icon-success:before{content:""}.next-icon-warning:before{content:""}.next-icon-prompt:before{content:""}.next-icon-error:before{content:""}.next-icon-help:before{content:""}.next-icon-clock:before{content:""}.next-icon-success-filling:before{content:""}.next-icon-delete-filling:before{content:""}.next-icon-favorites-filling:before{content:""}.next-icon-add:before{content:""}.next-icon-minus:before{content:""}.next-icon-arrow-up:before{content:""}.next-icon-arrow-down:before{content:""}.next-icon-arrow-left:before{content:""}.next-icon-arrow-right:before{content:""}.next-icon-arrow-double-left:before{content:""}.next-icon-arrow-double-right:before{content:""}.next-icon-switch:before{content:""}.next-icon-sorting:before{content:""}.next-icon-descending:before{content:""}.next-icon-ascending:before{content:""}.next-icon-select:before{content:""}.next-icon-semi-select:before{content:""}.next-icon-search:before{content:""}.next-icon-close:before{content:""}.next-icon-ellipsis:before{content:""}.next-icon-picture:before{content:""}.next-icon-calendar:before{content:""}.next-icon-ashbin:before{content:""}.next-icon-upload:before{content:""}.next-icon-download:before{content:""}.next-icon-set:before{content:""}.next-icon-edit:before{content:""}.next-icon-refresh:before{content:""}.next-icon-filter:before{content:""}.next-icon-attachment:before{content:""}.next-icon-account:before{content:""}.next-icon-email:before{content:""}.next-icon-atm:before{content:""}.next-icon-loading:before{content:"";animation:loadingCircle 1s linear infinite}.next-icon-eye:before{content:""}.next-icon-copy:before{content:""}.next-icon-toggle-left:before{content:""}.next-icon-toggle-right:before{content:""}.next-icon-eye-close:before{content:""}.next-icon-unlock:before{content:""}.next-icon-lock:before{content:""}.next-icon-exit:before{content:""}.next-icon-chart-bar:before{content:""}.next-icon-chart-pie:before{content:""}.next-icon-form:before{content:""}.next-icon-detail:before{content:""}.next-icon-list:before{content:""}.next-icon-dashboard:before{content:""}.next-icon.next-xxs .next-icon-remote,.next-icon.next-xxs:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-icon.next-xxs{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-icon.next-xxs:before{width:16px;font-size:16px}}.next-icon.next-xs .next-icon-remote,.next-icon.next-xs:before{width:12px;font-size:12px;line-height:inherit}.next-icon.next-small .next-icon-remote,.next-icon.next-small:before{width:16px;font-size:16px;line-height:inherit}.next-icon.next-medium .next-icon-remote,.next-icon.next-medium:before{width:20px;font-size:20px;line-height:inherit}.next-icon.next-large .next-icon-remote,.next-icon.next-large:before{width:24px;font-size:24px;line-height:inherit}.next-icon.next-xl .next-icon-remote,.next-icon.next-xl:before{width:32px;font-size:32px;line-height:inherit}.next-icon.next-xxl .next-icon-remote,.next-icon.next-xxl:before{width:48px;font-size:48px;line-height:inherit}.next-icon.next-xxxl .next-icon-remote,.next-icon.next-xxxl:before{width:64px;font-size:64px;line-height:inherit}.next-icon.next-inherit .next-icon-remote,.next-icon.next-inherit:before{width:inherit;font-size:inherit;line-height:inherit}.next-icon .next-icon-remote,.next-icon.next-inherit .next-icon-remote{width:1em;height:1em;vertical-align:middle;fill:currentColor}.next-overlay-wrapper .next-overlay-inner{z-index:1001}.next-overlay-wrapper .next-overlay-backdrop{position:fixed;z-index:1001;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.3);transition:opacity .3s cubic-bezier(.4,0,.2,1);opacity:0}.next-overlay-wrapper.opened .next-overlay-backdrop{opacity:1}.next-loading-fusion-reactor[dir=rtl]{-webkit-animation-name:nextVectorRouteRTL;-moz-animation-name:nextVectorRouteRTL;-ms-animation-name:nextVectorRouteRTL;-o-animation-name:nextVectorRouteRTL;animation-name:nextVectorRouteRTL}@-webkit-keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}@-moz-keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}@-ms-keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}@-o-keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}@keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}.next-loading{position:relative}.next-loading.next-open{pointer-events:none}.next-loading .next-loading-component{opacity:.7;-webkit-filter:blur(1px);filter:blur(1px);filter:"progid:DXImageTransform.Microsoft.Blur(PixelRadius=1, MakeShadow=false)";position:relative;pointer-events:none}.next-loading-masker{position:absolute;top:0;bottom:0;left:0;right:0;z-index:99;opacity:.2;background:#fff}.next-loading-inline{display:inline-block}.next-loading-tip{display:block;position:absolute;top:50%;left:50%;z-index:4;transform:translate(-50%,-50%);text-align:center}.next-loading-tip-fullscreen{top:inherit;left:inherit;transform:inherit}.next-loading-tip-placeholder{display:none}.next-loading-right-tip .next-loading-indicator{display:inline-block}.next-loading-right-tip .next-loading-tip-content{position:absolute;display:block;top:50%;right:0;transform:translateY(-50%)}.next-loading-right-tip .next-loading-tip-placeholder{display:inline-block;visibility:hidden;margin-left:1em}.next-loading-fusion-reactor{display:inline-block;width:40px;height:40px;position:relative;margin:0;-webkit-animation-duration:5.6s;-moz-animation-duration:5.6s;-ms-animation-duration:5.6s;-o-animation-duration:5.6s;animation-duration:5.6s;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-o-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;-moz-animation-timing-function:linear;-ms-animation-timing-function:linear;-o-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-name:nextVectorRoute;-moz-animation-name:nextVectorRoute;-ms-animation-name:nextVectorRoute;-o-animation-name:nextVectorRoute;animation-name:nextVectorRoute}.next-loading-fusion-reactor .next-loading-dot{position:absolute;margin:auto;width:12px;height:12px;border-radius:50%;background:#209bfa;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;-ms-animation-timing-function:ease-in-out;-o-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-o-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-duration:1.4s;-moz-animation-duration:1.4s;-ms-animation-duration:1.4s;-o-animation-duration:1.4s;animation-duration:1.4s}.next-loading-fusion-reactor .next-loading-dot:first-child{top:0;bottom:0;left:0;-webkit-animation-name:nextVectorDotsX;-moz-animation-name:nextVectorDotsX;-ms-animation-name:nextVectorDotsX;-o-animation-name:nextVectorDotsX;animation-name:nextVectorDotsX}.next-loading-fusion-reactor .next-loading-dot:nth-child(2){left:0;right:0;top:0;opacity:.8;-webkit-animation-name:nextVectorDotsY;-moz-animation-name:nextVectorDotsY;-ms-animation-name:nextVectorDotsY;-o-animation-name:nextVectorDotsY;animation-name:nextVectorDotsY}.next-loading-fusion-reactor .next-loading-dot:nth-child(3){top:0;bottom:0;right:0;opacity:.6;-webkit-animation-name:nextVectorDotsXR;-moz-animation-name:nextVectorDotsXR;-ms-animation-name:nextVectorDotsXR;-o-animation-name:nextVectorDotsXR;animation-name:nextVectorDotsXR}.next-loading-fusion-reactor .next-loading-dot:nth-child(4){left:0;right:0;bottom:0;opacity:.2;-webkit-animation-name:nextVectorDotsYR;-moz-animation-name:nextVectorDotsYR;-ms-animation-name:nextVectorDotsYR;-o-animation-name:nextVectorDotsYR;animation-name:nextVectorDotsYR}.next-loading-medium-fusion-reactor{width:24px;height:24px}.next-loading-medium-fusion-reactor .next-loading-dot{width:8px;height:8px}.next-loading-medium-fusion-reactor .next-loading-dot:first-child{-webkit-animation-name:nextVectorDotsX-medium;-moz-animation-name:nextVectorDotsX-medium;-ms-animation-name:nextVectorDotsX-medium;-o-animation-name:nextVectorDotsX-medium;animation-name:nextVectorDotsX-medium}.next-loading-medium-fusion-reactor .next-loading-dot:nth-child(2){-webkit-animation-name:nextVectorDotsY-medium;-moz-animation-name:nextVectorDotsY-medium;-ms-animation-name:nextVectorDotsY-medium;-o-animation-name:nextVectorDotsY-medium;animation-name:nextVectorDotsY-medium}.next-loading-medium-fusion-reactor .next-loading-dot:nth-child(3){-webkit-animation-name:nextVectorDotsXR-medium;-moz-animation-name:nextVectorDotsXR-medium;-ms-animation-name:nextVectorDotsXR-medium;-o-animation-name:nextVectorDotsXR-medium;animation-name:nextVectorDotsXR-medium}.next-loading-medium-fusion-reactor .next-loading-dot:nth-child(4){-webkit-animation-name:nextVectorDotsYR-medium;-moz-animation-name:nextVectorDotsYR-medium;-ms-animation-name:nextVectorDotsYR-medium;-o-animation-name:nextVectorDotsYR-medium;animation-name:nextVectorDotsYR-medium}@-webkit-keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@-moz-keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@-ms-keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@-o-keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@-moz-keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@-ms-keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@-o-keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@-webkit-keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@-moz-keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@-ms-keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@-o-keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@-webkit-keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@-moz-keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@-ms-keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@-o-keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@-webkit-keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@-moz-keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@-ms-keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@-o-keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@-webkit-keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@-moz-keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@-ms-keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@-o-keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@-webkit-keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@-moz-keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@-ms-keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@-o-keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@-webkit-keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@-moz-keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@-ms-keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@-o-keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@-webkit-keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}@-moz-keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}@-ms-keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}@-o-keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}@keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}.next-radio-button-large[dir=rtl]>label:first-child{margin-left:-1px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0}.next-radio-button-large[dir=rtl]>label:last-child{margin-left:0;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-large[dir=rtl] .next-radio-label{height:38px;line-height:38px;font-size:16px}.next-radio-button-medium[dir=rtl]>label:first-child{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-medium[dir=rtl]>label:last-child{margin-left:0;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-small[dir=rtl]>label:first-child{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-small[dir=rtl]>label:last-child{margin-left:0;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-wrapper[dir=rtl] .next-radio-label{margin-left:0;margin-right:4px}.next-radio-group[dir=rtl] .next-radio-label{margin-right:4px;margin-left:16px}.next-radio-button[dir=rtl]>label .next-radio-label{margin:0}.next-radio-wrapper{outline:0;display:inline-block}.next-radio-wrapper .next-radio{box-sizing:border-box;display:inline-block;vertical-align:middle;position:relative;line-height:1}.next-radio-wrapper .next-radio *,.next-radio-wrapper .next-radio :after,.next-radio-wrapper .next-radio :before{box-sizing:border-box}.next-radio-wrapper .next-radio input[type=radio]{opacity:0;position:absolute;vertical-align:middle;top:0;left:0;width:16px;height:16px;margin:0;cursor:pointer}.next-radio-wrapper .next-radio-inner{display:block;width:16px;height:16px;background:#fff;border-radius:50%;border:1px solid #ddd;transition:all .1s linear;box-shadow:none}.next-radio-wrapper .next-radio-inner:after{transform:scale(0);position:absolute;border-radius:50%;top:50%;margin-top:-2px;left:50%;margin-left:-2px;background:#fff;content:"";transition:all .1s linear}.next-radio-wrapper.checked .next-radio-inner{border-color:#209bfa;background:#209bfa}.next-radio-wrapper.checked .next-radio-inner:after{width:4px;height:4px;font-weight:700;background:#fff;transform:scale(1)}.next-radio-wrapper.checked.hovered .next-radio-inner,.next-radio-wrapper.checked:hover .next-radio-inner{border-color:transparent}.next-radio-wrapper.disabled input[type=radio]{cursor:not-allowed}.next-radio-wrapper.disabled .next-radio-inner{border-color:#eee;background:#fafafa}.next-radio-wrapper.disabled .next-radio-inner:after{background:#ccc}.next-radio-wrapper.disabled .next-radio-inner.hovered,.next-radio-wrapper.disabled .next-radio-inner:hover{border-color:#eee}.next-radio-wrapper.disabled.checked .next-radio-inner{border-color:#eee;background:#fafafa}.next-radio-wrapper.disabled.checked .next-radio-inner:after{background:#ccc}.next-radio-wrapper.disabled .next-radio-label{color:#ccc}.next-radio-wrapper:not(.disabled).hovered .next-radio-inner,.next-radio-wrapper:not(.disabled):hover .next-radio-inner{border-color:#209bfa;background-color:#add9ff}.next-radio-wrapper:not(.disabled).hovered .next-radio-label,.next-radio-wrapper:not(.disabled):hover .next-radio-label{cursor:pointer}.next-radio-wrapper.checked:not(.disabled).hovered .next-radio-inner,.next-radio-wrapper.checked:not(.disabled):hover .next-radio-inner{border-color:transparent;background:#1274e7}.next-radio-wrapper.checked:not(.disabled).hovered .next-radio-inner:after,.next-radio-wrapper.checked:not(.disabled):hover .next-radio-inner:after{background:#fff}.next-radio-button .next-radio,.next-radio-button input[type=radio]{width:0;height:0}.next-radio-button>label{display:inline-block;box-sizing:border-box;position:relative;z-index:1;margin:0 0 0 -1px;border:1px solid #ddd;background-color:#fff;transition:all .1s linear;vertical-align:middle}.next-radio-button>label .next-radio-label{display:block;color:#333;margin:0;transition:all .1s linear}.next-radio-button>label.hovered,.next-radio-button>label:hover{z-index:10;border-color:#ccc;background-color:#f9f9f9}.next-radio-button>label.hovered .next-radio-label,.next-radio-button>label:hover .next-radio-label{color:#333}.next-radio-button>label.checked{z-index:11;border-color:#209bfa;background-color:#fff}.next-radio-button>label.checked .next-radio-label{color:#209bfa}.next-radio-button>label.disabled{z-index:0;cursor:not-allowed;border-color:#eee;background-color:#fafafa}.next-radio-button>label.disabled .next-radio-label{color:#ccc}.next-radio-button>label.checked.disabled{z-index:0;border-color:#eee;background-color:#f9f9f9}.next-radio-button>label.checked.disabled .next-radio-label{color:#ccc}.next-radio-button-large>label{padding:0 8px;height:40px;line-height:40px}.next-radio-button-large>label:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-large>label:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-large .next-radio-label{height:38px;line-height:38px;font-size:16px}.next-radio-button-medium>label{padding:0 8px;height:32px;line-height:32px}.next-radio-button-medium>label:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-medium>label:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-medium .next-radio-label{height:30px;line-height:30px;font-size:14px}.next-radio-button-small>label{padding:0 8px;height:20px;line-height:20px}.next-radio-button-small>label:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-small>label:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-small .next-radio-label{height:18px;line-height:18px;font-size:12px}.next-radio-single-input input[type=radio]{opacity:0;position:absolute;top:0;left:0;margin:0}.next-radio-group{display:inline-block}.next-radio-group .next-radio-wrapper{margin-right:12px}.next-radio-group .next-radio-wrapper:last-child{margin-right:0}.next-radio-group .next-radio-label{color:#333}.next-radio-group.disabled .next-radio-label{color:#ccc}.next-radio-group.next-radio-button .next-radio-wrapper{margin-right:0}.next-radio-group-ver .next-radio-wrapper{display:block;margin-bottom:8px}.next-radio-label{margin:0 4px;font-size:14px;vertical-align:middle;line-height:1;color:#333}@-moz-document url-prefix(){.next-radio{margin-top:-1px}@supports(animation:calc(0s)){.next-radio{margin-top:-3px}}}.next-badge{position:relative;display:inline-block;vertical-align:middle;line-height:1}.next-badge,.next-badge *,.next-badge :after,.next-badge :before{box-sizing:border-box}.next-badge .next-badge-count{color:#fff;background:#d23c26;text-align:center;white-space:nowrap;border-radius:8px;position:absolute;width:auto;height:16px;min-width:16px;padding:0 4px;font-size:12px;line-height:16px;transform:translateX(-50%);top:-.5em;border:0 solid #fff}.next-badge .next-badge-count a,.next-badge .next-badge-count a:hover{color:#fff}.next-badge .next-badge-dot{color:#fff;background:#d23c26;text-align:center;white-space:nowrap;border-radius:8px;position:absolute;width:8px;height:8px;min-width:8px;padding:0;font-size:1px;line-height:1;transform:translateX(-50%);top:-.5em}.next-badge .next-badge-dot a,.next-badge .next-badge-dot a:hover{color:#fff}.next-badge .next-badge-custom{line-height:1.166667;white-space:nowrap;font-size:12px;padding-left:4px;padding-right:4px;border-radius:3px;transform:translateX(-50%)}.next-badge .next-badge-custom>*{line-height:1}.next-badge .next-badge-custom>.next-icon:before,.next-badge .next-badge-custom>i:before{font-size:inherit;width:auto;vertical-align:top}.next-badge .next-badge-scroll-number{position:absolute;top:-4px;z-index:10;overflow:hidden;transform-origin:left center}.next-badge-scroll-number-only{position:relative;display:inline-block;transition:transform .1s linear,-webkit-transform .1s linear;min-width:8px}.next-badge-scroll-number-only span{display:block;height:16px;line-height:16px;font-size:12px}.next-badge-not-a-wrapper .next-badge-count,.next-badge-not-a-wrapper .next-badge-custom,.next-badge-not-a-wrapper .next-badge-dot{position:relative;display:block;top:auto;transform:translateX(0)}.next-badge-list-wrapper{margin-left:0}.next-badge-list-wrapper li{margin-bottom:0;list-style:none}.next-badge[dir=rtl] .next-badge-custom{padding-right:4px;padding-left:4px}.next-badge[dir=rtl] .next-badge-scroll-number{left:0;transform-origin:right center}.next-balloon{position:absolute;top:0;max-width:300px;border-style:solid;border-radius:3px;font-size:14px;font-weight:400;word-wrap:break-all;word-wrap:break-word;z-index:0}.next-balloon,.next-balloon *,.next-balloon :after,.next-balloon :before{box-sizing:border-box}.next-balloon:focus,.next-balloon :focus{outline:0}.next-balloon-title{margin-bottom:8px;font-size:16px;font-weight:700}.next-balloon-title.next-balloon-closable{padding:0 40px 0 0}.next-balloon-title.next-balloon-closable .next-balloon-close{top:-1px;transform:translateY(16px);right:16px}.next-balloon-primary{color:#333;border-color:#209bfa;background-color:#add9ff;box-shadow:0 1px 3px 0 rgba(0,0,0,.12);border-width:1px}.next-balloon-primary .next-balloon-close{position:absolute;top:-1px;transform:translateY(15px);right:12px;font-size:16px;cursor:pointer;color:#999}.next-balloon-primary .next-balloon-close .next-icon{width:16px;height:16px;line-height:1em}.next-balloon-primary .next-balloon-close .next-icon:before{width:16px;height:16px;font-size:16px;line-height:1em}.next-balloon-primary .next-balloon-close :hover{color:#333}.next-balloon-primary:after{position:absolute;width:12px;height:12px;content:"";transform:rotate(45deg);box-sizing:content-box!important;border:1px solid #209bfa;background-color:#add9ff;z-index:-1}.next-balloon-primary.next-balloon-top:after{top:-7px;left:calc(50% - 7px);border-right:none;border-bottom:none}.next-balloon-primary.next-balloon-right:after{top:calc(50% - 7px);right:-7px;border-left:none;border-bottom:none}.next-balloon-primary.next-balloon-bottom:after{bottom:-7px;left:calc(50% - 7px);border-top:none;border-left:none}.next-balloon-primary.next-balloon-left:after{top:calc(50% - 7px);left:-7px;border-top:none;border-right:none}.next-balloon-primary.next-balloon-left-top:after{top:12px;left:-7px;border-top:none;border-right:none}.next-balloon-primary.next-balloon-left-bottom:after{bottom:12px;left:-7px;border-top:none;border-right:none}.next-balloon-primary.next-balloon-right-top:after{top:12px;right:-7px;border-bottom:none;border-left:none}.next-balloon-primary.next-balloon-right-bottom:after{right:-7px;bottom:12px;border-bottom:none;border-left:none}.next-balloon-primary.next-balloon-top-left:after{top:-7px;left:12px;border-right:none;border-bottom:none}.next-balloon-primary.next-balloon-top-right:after{top:-7px;right:12px;border-right:none;border-bottom:none}.next-balloon-primary.next-balloon-bottom-left:after{bottom:-7px;left:12px;border-top:none;border-left:none}.next-balloon-primary.next-balloon-bottom-right:after{right:12px;bottom:-7px;border-top:none;border-left:none}.next-balloon-normal{color:#333;border-color:#e6e6e6;background-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-width:1px}.next-balloon-normal .next-balloon-close{position:absolute;top:-1px;transform:translateY(15px);right:12px;font-size:16px;cursor:pointer;color:#999}.next-balloon-normal .next-balloon-close .next-icon{width:16px;height:16px;line-height:1em}.next-balloon-normal .next-balloon-close .next-icon:before{width:16px;height:16px;font-size:16px;line-height:1em}.next-balloon-normal .next-balloon-close :hover{color:#666}.next-balloon-normal:after{position:absolute;width:12px;height:12px;content:"";transform:rotate(45deg);box-sizing:content-box!important;border:1px solid #e6e6e6;background-color:#fff;z-index:-1}.next-balloon-normal.next-balloon-top:after{top:-7px;left:calc(50% - 7px);border-right:none;border-bottom:none}.next-balloon-normal.next-balloon-right:after{top:calc(50% - 7px);right:-7px;border-left:none;border-bottom:none}.next-balloon-normal.next-balloon-bottom:after{bottom:-7px;left:calc(50% - 7px);border-top:none;border-left:none}.next-balloon-normal.next-balloon-left:after{top:calc(50% - 7px);left:-7px;border-top:none;border-right:none}.next-balloon-normal.next-balloon-left-top:after{top:12px;left:-7px;border-top:none;border-right:none}.next-balloon-normal.next-balloon-left-bottom:after{bottom:12px;left:-7px;border-top:none;border-right:none}.next-balloon-normal.next-balloon-right-top:after{top:12px;right:-7px;border-bottom:none;border-left:none}.next-balloon-normal.next-balloon-right-bottom:after{right:-7px;bottom:12px;border-bottom:none;border-left:none}.next-balloon-normal.next-balloon-top-left:after{top:-7px;left:12px;border-right:none;border-bottom:none}.next-balloon-normal.next-balloon-top-right:after{top:-7px;right:12px;border-right:none;border-bottom:none}.next-balloon-normal.next-balloon-bottom-left:after{bottom:-7px;left:12px;border-top:none;border-left:none}.next-balloon-normal.next-balloon-bottom-right:after{right:12px;bottom:-7px;border-top:none;border-left:none}.next-balloon.visible{display:block}.next-balloon.hidden{display:none}.next-balloon-medium{padding:16px}.next-balloon-closable{padding:16px 40px 16px 16px}.next-balloon-tooltip{box-sizing:border-box;position:absolute;top:0;max-width:300px;border-radius:3px;font-size:14px;font-weight:400;z-index:0;word-wrap:break-all;word-wrap:break-word;color:#fafafa;background-color:#333;box-shadow:none;border:1px solid transparent}.next-balloon-tooltip *,.next-balloon-tooltip :after,.next-balloon-tooltip :before{box-sizing:border-box}.next-balloon-tooltip .next-balloon-arrow{position:absolute;display:block;width:24px;height:24px;overflow:hidden;background:0 0;pointer-events:none}.next-balloon-tooltip .next-balloon-arrow .next-balloon-arrow-content{content:"";position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:12px;height:12px;margin:auto;background-color:#333;border:1px solid transparent;pointer-events:auto}.next-balloon-tooltip-top .next-balloon-arrow{top:-24px;left:calc(50% - 12px)}.next-balloon-tooltip-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-tooltip-right .next-balloon-arrow{top:calc(50% - 12px);right:-24px}.next-balloon-tooltip-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip-bottom .next-balloon-arrow{left:calc(50% - 12px);bottom:-24px}.next-balloon-tooltip-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-tooltip-left .next-balloon-arrow{top:calc(50% - 12px);left:-24px}.next-balloon-tooltip-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip-left-top .next-balloon-arrow{top:6px;left:-24px}.next-balloon-tooltip-left-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip-left-bottom .next-balloon-arrow{bottom:6px;left:-24px}.next-balloon-tooltip-left-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip-right-top .next-balloon-arrow{top:6px;right:-24px}.next-balloon-tooltip-right-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip-right-bottom .next-balloon-arrow{bottom:6px;right:-24px}.next-balloon-tooltip-right-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip-top-left .next-balloon-arrow{left:6px;top:-24px}.next-balloon-tooltip-top-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-tooltip-top-right .next-balloon-arrow{right:6px;top:-24px}.next-balloon-tooltip-top-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-tooltip-bottom-left .next-balloon-arrow{left:6px;bottom:-24px}.next-balloon-tooltip-bottom-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-tooltip-bottom-right .next-balloon-arrow{right:6px;bottom:-24px}.next-balloon-tooltip-bottom-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-tooltip.visible{display:block}.next-balloon-tooltip.hidden{display:none}.next-balloon-tooltip-medium{padding:8px}.next-balloon[dir=rtl].next-balloon-primary .next-balloon-close{left:12px;right:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-right:after{left:-7px;right:auto;border-right:none;border-top:none;border-left:inherit;border-bottom:inherit}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-left-bottom:after,.next-balloon[dir=rtl].next-balloon-primary.next-balloon-left-top:after,.next-balloon[dir=rtl].next-balloon-primary.next-balloon-left:after{right:-7px;left:auto;border-left:none;border-bottom:none;border-right:inherit;border-top:inherit}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-right-bottom:after,.next-balloon[dir=rtl].next-balloon-primary.next-balloon-right-top:after{left:-7px;right:auto;border-right:none;border-top:none;border-bottom:inherit;border-left:inherit}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-top-left:after{right:12px;left:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-top-right:after{right:auto;left:12px}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-bottom-left:after{right:12px;left:auto}.next-balloon[dir=rtl].next-balloon-normal .next-balloon-close,.next-balloon[dir=rtl].next-balloon-primary.next-balloon-bottom-right:after{left:12px;right:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-right:after{left:-7px;right:auto;border-right:none;border-top:none;border-left:inherit;border-bottom:inherit}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-left-bottom:after,.next-balloon[dir=rtl].next-balloon-normal.next-balloon-left-top:after,.next-balloon[dir=rtl].next-balloon-normal.next-balloon-left:after{right:-7px;left:auto;border-left:none;border-bottom:none;border-right:inherit;border-top:inherit}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-right-bottom:after,.next-balloon[dir=rtl].next-balloon-normal.next-balloon-right-top:after{left:-7px;right:auto;border-right:none;border-top:none;border-bottom:inherit;border-left:inherit}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-top-left:after{right:12px;left:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-top-right:after{right:auto;left:12px}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-bottom-left:after{right:12px;left:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-bottom-right:after{left:12px;right:auto}.next-balloon[dir=rtl].next-balloon-closable{padding:16px 16px 16px 40px}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right .next-balloon-arrow{left:-24px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left .next-balloon-arrow{right:-24px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left-top .next-balloon-arrow{right:-24px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left-bottom .next-balloon-arrow{right:-24px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right-top .next-balloon-arrow{left:-24px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right-bottom .next-balloon-arrow{left:-24px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-top-left .next-balloon-arrow{right:10px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-top-right .next-balloon-arrow{left:10px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-bottom-left .next-balloon-arrow{right:10px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-bottom-right .next-balloon-arrow{left:10px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-medium{padding:8px}.next-menu[dir=rtl] .next-menu-item-helper{float:left}.next-menu[dir=rtl] .next-menu-item .next-checkbox,.next-menu[dir=rtl] .next-menu-item .next-radio{margin-left:4px;margin-right:0}.next-menu[dir=rtl] .next-menu-hoz-right{float:left}.next-menu[dir=rtl] .next-menu-hoz-icon-arrow.next-icon{left:6px;right:auto}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon{margin-left:0;margin-right:-18px}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon .next-icon-remote,.next-menu[dir=rtl] .next-menu-icon-selected.next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon.next-menu-icon-right{right:auto;left:4px}.next-menu[dir=rtl] .next-menu-icon-arrow.next-icon{left:10px;right:auto}.next-menu{position:relative;min-width:100px;margin:0;list-style:none;border:1px solid #e6e6e6;border-radius:3px;box-shadow:none;background:#fff;line-height:32px;font-size:14px;animation-duration:.3s;animation-timing-function:ease}.next-menu,.next-menu *,.next-menu :after,.next-menu :before{box-sizing:border-box}.next-menu:focus,.next-menu :focus{outline:0}.next-menu-spacing-lr{padding:0}.next-menu-spacing-lr.next-menu-outside>.next-menu{height:100%;overflow-y:auto}.next-menu-spacing-tb{padding:0}.next-menu.next-ver{padding:8px 0}.next-menu.next-ver .next-menu-item{padding:0 20px}.next-menu.next-hoz{padding:8px 0}.next-menu.next-hoz .next-menu-item{padding:0 20px}.next-menu-embeddable,.next-menu-embeddable .next-menu-item.next-disabled,.next-menu-embeddable .next-menu-item.next-disabled .next-menu-item-text>a{background:transparent;border:none}.next-menu-embeddable{box-shadow:none}.next-menu-embeddable .next-menu-item-inner{height:100%}.next-menu-content{position:relative}.next-menu-content,.next-menu-sub-menu{padding:0;margin:0;list-style:none}.next-menu-sub-menu.next-expand-enter{overflow:hidden}.next-menu-sub-menu.next-expand-enter-active{transition:height .3s ease}.next-menu-sub-menu.next-expand-leave{overflow:hidden}.next-menu-sub-menu.next-expand-leave-active{transition:height .3s ease}.next-menu-item{position:relative;transition:background .1s linear;color:#333;cursor:pointer}.next-menu-item-helper{float:right;color:#999;font-style:normal;font-size:14px}.next-menu-item .next-checkbox,.next-menu-item .next-radio{margin-right:4px}.next-menu-item.next-selected{color:#333;background-color:#fff;border-radius:0}.next-menu-item.next-selected .next-menu-icon-arrow{color:#666}.next-menu-item.next-selected .next-menu-icon-selected{color:#209bfa}.next-menu-item.next-disabled,.next-menu-item.next-disabled .next-menu-item-text>a{color:#ccc;background-color:#fff;border-radius:0;cursor:not-allowed}.next-menu-item.next-disabled .next-menu-icon-arrow,.next-menu-item.next-disabled .next-menu-icon-selected,.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#ccc}.next-menu-item:not(.next-disabled).next-focused,.next-menu-item:not(.next-disabled).next-selected.next-focused,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover,.next-menu-item:not(.next-disabled).next-selected:focus,.next-menu-item:not(.next-disabled).next-selected:focus:hover,.next-menu-item:not(.next-disabled).next-selected:hover,.next-menu-item:not(.next-disabled):hover{color:#333;background-color:#f9f9f9;border-radius:0}.next-menu-item:not(.next-disabled).next-focused .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected.next-focused .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected:focus .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected:focus:hover .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected:hover .next-menu-icon-arrow,.next-menu-item:not(.next-disabled):hover .next-menu-icon-arrow{color:#333}.next-menu-item:not(.next-disabled).next-focused .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected.next-focused .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:focus .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:focus:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled):hover .next-menu-icon-selected{color:#209bfa}.next-menu-item-inner{height:32px;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.next-menu-item .next-menu-item-text{vertical-align:middle}.next-menu-item .next-menu-item-text>a{display:inline-block;text-decoration:none;color:#333}.next-menu-item .next-menu-item-text>a:before{position:absolute;background-color:transparent;top:0;left:0;bottom:0;right:0;content:""}.next-menu.next-hoz{padding:0}.next-menu.next-hoz.next-menu-nowrap{overflow:hidden;white-space:nowrap}.next-menu.next-hoz.next-menu-nowrap .next-menu-more{text-align:center}.next-menu.next-hoz .next-menu-content>.next-menu-item,.next-menu.next-hoz>.next-menu-item,.next-menu.next-hoz>.next-menu-sub-menu-wrapper{display:inline-block;vertical-align:top}.next-menu.next-hoz .next-menu-content,.next-menu.next-hoz .next-menu-footer,.next-menu.next-hoz .next-menu-header{display:inline-block}.next-menu-hoz-right{float:right}.next-menu-group-label{padding:0 12px;color:#999}.next-menu-divider{margin:8px 12px;border-bottom:1px solid #eee}.next-menu .next-menu-icon-selected.next-icon{position:absolute;top:0;margin-left:-16px}.next-menu .next-menu-icon-selected.next-icon .next-icon-remote,.next-menu .next-menu-icon-selected.next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-menu .next-menu-icon-selected.next-icon.next-menu-icon-right{right:4px}.next-menu .next-menu-symbol-icon-selected.next-menu-icon-selected:before{content:""}.next-menu .next-menu-icon-arrow.next-icon{position:absolute;top:0;right:10px;color:#666;transition:all .1s linear}.next-menu .next-menu-icon-arrow.next-icon .next-icon-remote,.next-menu .next-menu-icon-arrow.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-menu .next-menu-icon-arrow-down:before{content:""}.next-menu .next-menu-icon-arrow-down.next-open{transform:rotate(180deg)}.next-menu .next-menu-icon-arrow-down.next-open .next-icon-remote,.next-menu .next-menu-icon-arrow-down.next-open:before{width:20px;font-size:20px;line-height:inherit}.next-menu .next-menu-symbol-popupfold:before{content:""}.next-menu .next-menu-icon-arrow-right.next-open{transform:rotate(-90deg)}.next-menu .next-menu-icon-arrow-right.next-open .next-icon-remote,.next-menu .next-menu-icon-arrow-right.next-open:before{width:20px;font-size:20px;line-height:inherit}.next-menu .next-menu-hoz-icon-arrow.next-icon{position:absolute;top:0;right:6px;color:#666;transition:all .1s linear}.next-menu .next-menu-hoz-icon-arrow.next-icon .next-icon-remote,.next-menu .next-menu-hoz-icon-arrow.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-menu .next-menu-hoz-icon-arrow.next-icon:before{content:""}.next-menu-unfold-icon:before{content:""}.next-menu .next-menu-hoz-icon-arrow.next-open{transform:rotate(180deg)}.next-menu .next-menu-hoz-icon-arrow.next-open .next-icon-remote,.next-menu .next-menu-hoz-icon-arrow.next-open:before{width:12px;font-size:12px;line-height:inherit}.next-menu.next-context{line-height:24px}.next-menu.next-context .next-menu-item-inner{height:24px}.next-breadcrumb{display:block;margin:0;padding:0;white-space:nowrap;height:16px;line-height:16px}.next-breadcrumb .next-breadcrumb-item{display:inline-block}.next-breadcrumb .next-breadcrumb-item .next-breadcrumb-text{display:inline-block;text-decoration:none;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:all .1s linear}.next-breadcrumb .next-breadcrumb-item .next-breadcrumb-text>b{font-weight:400}.next-breadcrumb .next-breadcrumb-item .next-breadcrumb-separator{display:inline-block;vertical-align:top}.next-breadcrumb .next-breadcrumb-text{height:16px;min-width:16px;font-size:12px;line-height:16px}.next-breadcrumb .next-breadcrumb-separator{height:16px;margin:0 8px;font-size:16px;line-height:16px}.next-breadcrumb .next-breadcrumb-separator .next-icon:before{display:block}.next-breadcrumb .next-breadcrumb-separator .next-icon .next-icon-remote,.next-breadcrumb .next-breadcrumb-separator .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-breadcrumb .next-breadcrumb-text-ellipsis{font-size:12px}.next-breadcrumb .next-breadcrumb-text{color:#666}.next-breadcrumb .next-breadcrumb-text>b{color:#209bfa}.next-breadcrumb .next-breadcrumb-text>a{color:#666;text-decoration:none;text-align:center}.next-breadcrumb .next-breadcrumb-text.activated,.next-breadcrumb .next-breadcrumb-text.activated>a{color:#333;font-weight:700}.next-breadcrumb .next-breadcrumb-text-ellipsis{color:#666;cursor:default}.next-breadcrumb .next-breadcrumb-text-ellipsis-clickable{color:#666;cursor:pointer}.next-breadcrumb .next-breadcrumb-separator{color:#999}.next-breadcrumb .next-breadcrumb-text:not(.next-breadcrumb-text-ellipsis):hover>a,.next-breadcrumb a.next-breadcrumb-text.activated:hover>a,.next-breadcrumb a.next-breadcrumb-text:not(.next-breadcrumb-text-ellipsis):hover,.next-breadcrumb a.next-breadcrumb-text:not(.next-breadcrumb-text-ellipsis):hover>b{color:#209bfa}.next-breadcrumb a.next-breadcrumb-text.activated:hover{color:#209bfa;font-weight:700}.next-breadcrumb-icon-sep:before{content:""}.next-breadcrumb-dropdown-wrapper{padding:4px 0}.next-btn,.next-btn *,.next-btn :after,.next-btn :before{box-sizing:border-box}.next-btn::-moz-focus-inner{border:0;padding:0}.next-btn,.next-btn:active,.next-btn:focus,.next-btn:hover{outline:0}@keyframes loadingCircle{0%{transform-origin:50% 50%;transform:rotate(0deg)}to{transform-origin:50% 50%;transform:rotate(1turn)}}.next-btn{position:relative;display:inline-block;box-shadow:none;text-decoration:none;text-align:center;text-transform:none;white-space:nowrap;vertical-align:middle;user-select:none;transition:all .1s linear;line-height:1;cursor:pointer}.next-btn:after{text-align:center;position:absolute;opacity:0;visibility:hidden;transition:opacity .1s linear}.next-btn:before{content:"";height:100%;width:0}.next-btn .next-icon,.next-btn:before{display:inline-block;vertical-align:middle}.next-btn .next-icon{font-size:0}.next-btn>.next-btn-helper,.next-btn>div,.next-btn>span{display:inline-block;vertical-align:middle}.next-btn>.next-btn-helper{text-decoration:inherit}.next-btn.hover,.next-btn:hover{box-shadow:none}.next-btn.next-small{border-radius:3px;padding:0 16px;height:24px;font-size:12px;border-width:1px}.next-btn.next-small>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn.next-small>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-small>.next-btn-icon.next-icon-first:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn.next-small>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-small>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn.next-small>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-small>.next-btn-icon.next-icon-alone:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small>.next-btn-icon-size{margin-right:4px}.next-btn.next-small.next-btn-loading:before{width:12px;height:12px;font-size:12px;line-height:12px;left:16px;top:50%;text-align:center;margin-right:4px}.next-btn.next-small.next-btn-loading>.next-icon{display:none}.next-btn.next-small>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn.next-small>.next-btn-custom-loading-icon.show{width:12px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn.next-medium{border-radius:3px;padding:0 20px;height:32px;font-size:14px;border-width:1px}.next-btn.next-medium>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn.next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn.next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn.next-medium>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-alone:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium>.next-btn-icon-size{margin-right:4px}.next-btn.next-medium.next-btn-loading:before{width:20px;height:20px;font-size:20px;line-height:20px;left:20px;top:50%;text-align:center;margin-right:4px}.next-btn.next-medium.next-btn-loading>.next-icon{display:none}.next-btn.next-medium>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn.next-medium>.next-btn-custom-loading-icon.show{width:20px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn.next-large{border-radius:3px;padding:0 24px;height:40px;font-size:16px;border-width:1px}.next-btn.next-large>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn.next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn.next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn.next-large>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-alone:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large>.next-btn-icon-size{margin-right:4px}.next-btn.next-large.next-btn-loading:before{width:20px;height:20px;font-size:20px;line-height:20px;left:24px;top:50%;text-align:center;margin-right:4px}.next-btn.next-large.next-btn-loading>.next-icon{display:none}.next-btn.next-large>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn.next-large>.next-btn-custom-loading-icon.show{width:20px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn.next-btn-normal{border-style:solid;background:#fff;border-color:#ddd}.next-btn.next-btn-normal,.next-btn.next-btn-normal.visited,.next-btn.next-btn-normal:link,.next-btn.next-btn-normal:visited{color:#333}.next-btn.next-btn-normal.active,.next-btn.next-btn-normal.hover,.next-btn.next-btn-normal:active,.next-btn.next-btn-normal:focus,.next-btn.next-btn-normal:hover{color:#333;background:#f9f9f9;border-color:#ccc;text-decoration:none}.next-btn.next-btn-primary{border-style:solid;background:#209bfa;border-color:transparent}.next-btn.next-btn-primary,.next-btn.next-btn-primary.visited,.next-btn.next-btn-primary:link,.next-btn.next-btn-primary:visited{color:#fff}.next-btn.next-btn-primary.active,.next-btn.next-btn-primary.hover,.next-btn.next-btn-primary:active,.next-btn.next-btn-primary:focus,.next-btn.next-btn-primary:hover{color:#fff;background:#1274e7;border-color:transparent;text-decoration:none}.next-btn.next-btn-secondary{border-style:solid;background:#fff;border-color:#209bfa}.next-btn.next-btn-secondary,.next-btn.next-btn-secondary.visited,.next-btn.next-btn-secondary:link,.next-btn.next-btn-secondary:visited{color:#209bfa}.next-btn.next-btn-secondary.active,.next-btn.next-btn-secondary.hover,.next-btn.next-btn-secondary:active,.next-btn.next-btn-secondary:focus,.next-btn.next-btn-secondary:hover{color:#fff;background:#1274e7;border-color:#1274e7;text-decoration:none}.next-btn.disabled,.next-btn[disabled]{cursor:not-allowed}.next-btn.disabled.next-btn-normal,.next-btn[disabled].next-btn-normal{background:#fafafa;border-color:#eee}.next-btn.disabled.next-btn-normal,.next-btn.disabled.next-btn-normal.visited,.next-btn.disabled.next-btn-normal:link,.next-btn.disabled.next-btn-normal:visited,.next-btn[disabled].next-btn-normal,.next-btn[disabled].next-btn-normal.visited,.next-btn[disabled].next-btn-normal:link,.next-btn[disabled].next-btn-normal:visited{color:#ccc}.next-btn.disabled.next-btn-normal.active,.next-btn.disabled.next-btn-normal.hover,.next-btn.disabled.next-btn-normal:active,.next-btn.disabled.next-btn-normal:focus,.next-btn.disabled.next-btn-normal:hover,.next-btn[disabled].next-btn-normal.active,.next-btn[disabled].next-btn-normal.hover,.next-btn[disabled].next-btn-normal:active,.next-btn[disabled].next-btn-normal:focus,.next-btn[disabled].next-btn-normal:hover{color:#ccc;background:#fafafa;border-color:#eee;text-decoration:none}.next-btn.disabled.next-btn-primary,.next-btn[disabled].next-btn-primary{background:#fafafa;border-color:#eee}.next-btn.disabled.next-btn-primary,.next-btn.disabled.next-btn-primary.visited,.next-btn.disabled.next-btn-primary:link,.next-btn.disabled.next-btn-primary:visited,.next-btn[disabled].next-btn-primary,.next-btn[disabled].next-btn-primary.visited,.next-btn[disabled].next-btn-primary:link,.next-btn[disabled].next-btn-primary:visited{color:#ccc}.next-btn.disabled.next-btn-primary.active,.next-btn.disabled.next-btn-primary.hover,.next-btn.disabled.next-btn-primary:active,.next-btn.disabled.next-btn-primary:focus,.next-btn.disabled.next-btn-primary:hover,.next-btn[disabled].next-btn-primary.active,.next-btn[disabled].next-btn-primary.hover,.next-btn[disabled].next-btn-primary:active,.next-btn[disabled].next-btn-primary:focus,.next-btn[disabled].next-btn-primary:hover{color:#ccc;background:#fafafa;border-color:#eee;text-decoration:none}.next-btn.disabled.next-btn-secondary,.next-btn[disabled].next-btn-secondary{background:#fafafa;border-color:#eee}.next-btn.disabled.next-btn-secondary,.next-btn.disabled.next-btn-secondary.visited,.next-btn.disabled.next-btn-secondary:link,.next-btn.disabled.next-btn-secondary:visited,.next-btn[disabled].next-btn-secondary,.next-btn[disabled].next-btn-secondary.visited,.next-btn[disabled].next-btn-secondary:link,.next-btn[disabled].next-btn-secondary:visited{color:#ccc}.next-btn.disabled.next-btn-secondary.active,.next-btn.disabled.next-btn-secondary.hover,.next-btn.disabled.next-btn-secondary:active,.next-btn.disabled.next-btn-secondary:focus,.next-btn.disabled.next-btn-secondary:hover,.next-btn[disabled].next-btn-secondary.active,.next-btn[disabled].next-btn-secondary.hover,.next-btn[disabled].next-btn-secondary:active,.next-btn[disabled].next-btn-secondary:focus,.next-btn[disabled].next-btn-secondary:hover{color:#ccc;background:#fafafa;border-color:#eee;text-decoration:none}.next-btn-warning{border-style:solid}.next-btn-warning.next-btn-primary{background:#d23c26;border-color:#d23c26}.next-btn-warning.next-btn-primary,.next-btn-warning.next-btn-primary.visited,.next-btn-warning.next-btn-primary:link,.next-btn-warning.next-btn-primary:visited{color:#fff}.next-btn-warning.next-btn-primary.active,.next-btn-warning.next-btn-primary.hover,.next-btn-warning.next-btn-primary:active,.next-btn-warning.next-btn-primary:focus,.next-btn-warning.next-btn-primary:hover{color:#fff;background:#b7321e;border-color:#b7321e;text-decoration:none}.next-btn-warning.next-btn-primary.disabled,.next-btn-warning.next-btn-primary[disabled]{background:#fafafa;border-color:#e6e6e6}.next-btn-warning.next-btn-primary.disabled,.next-btn-warning.next-btn-primary.disabled.visited,.next-btn-warning.next-btn-primary.disabled:link,.next-btn-warning.next-btn-primary.disabled:visited,.next-btn-warning.next-btn-primary[disabled],.next-btn-warning.next-btn-primary[disabled].visited,.next-btn-warning.next-btn-primary[disabled]:link,.next-btn-warning.next-btn-primary[disabled]:visited{color:#ccc}.next-btn-warning.next-btn-primary.disabled.active,.next-btn-warning.next-btn-primary.disabled.hover,.next-btn-warning.next-btn-primary.disabled:active,.next-btn-warning.next-btn-primary.disabled:focus,.next-btn-warning.next-btn-primary.disabled:hover,.next-btn-warning.next-btn-primary[disabled].active,.next-btn-warning.next-btn-primary[disabled].hover,.next-btn-warning.next-btn-primary[disabled]:active,.next-btn-warning.next-btn-primary[disabled]:focus,.next-btn-warning.next-btn-primary[disabled]:hover{color:#ccc;background:#fafafa;border-color:#e6e6e6;text-decoration:none}.next-btn-warning.next-btn-normal{background:#fff;border-color:#d23c26}.next-btn-warning.next-btn-normal,.next-btn-warning.next-btn-normal.visited,.next-btn-warning.next-btn-normal:link,.next-btn-warning.next-btn-normal:visited{color:#d23c26}.next-btn-warning.next-btn-normal.active,.next-btn-warning.next-btn-normal.hover,.next-btn-warning.next-btn-normal:active,.next-btn-warning.next-btn-normal:focus,.next-btn-warning.next-btn-normal:hover{color:#fff;background:#b7321e;border-color:#b7321e;text-decoration:none}.next-btn-warning.next-btn-normal.disabled,.next-btn-warning.next-btn-normal[disabled]{background:#fafafa;border-color:#eee}.next-btn-warning.next-btn-normal.disabled,.next-btn-warning.next-btn-normal.disabled.visited,.next-btn-warning.next-btn-normal.disabled:link,.next-btn-warning.next-btn-normal.disabled:visited,.next-btn-warning.next-btn-normal[disabled],.next-btn-warning.next-btn-normal[disabled].visited,.next-btn-warning.next-btn-normal[disabled]:link,.next-btn-warning.next-btn-normal[disabled]:visited{color:#ccc}.next-btn-warning.next-btn-normal.disabled.active,.next-btn-warning.next-btn-normal.disabled.hover,.next-btn-warning.next-btn-normal.disabled:active,.next-btn-warning.next-btn-normal.disabled:focus,.next-btn-warning.next-btn-normal.disabled:hover,.next-btn-warning.next-btn-normal[disabled].active,.next-btn-warning.next-btn-normal[disabled].hover,.next-btn-warning.next-btn-normal[disabled]:active,.next-btn-warning.next-btn-normal[disabled]:focus,.next-btn-warning.next-btn-normal[disabled]:hover{color:#ccc;background:#fafafa;border-color:#eee;text-decoration:none}.next-btn-text{border-radius:0;user-select:text}.next-btn-text,.next-btn-text.hover,.next-btn-text:hover{box-shadow:none}.next-btn-text.next-btn-primary{background:transparent;border-color:transparent}.next-btn-text.next-btn-primary,.next-btn-text.next-btn-primary.visited,.next-btn-text.next-btn-primary:link,.next-btn-text.next-btn-primary:visited{color:#298dff}.next-btn-text.next-btn-primary.active,.next-btn-text.next-btn-primary.hover,.next-btn-text.next-btn-primary:active,.next-btn-text.next-btn-primary:focus,.next-btn-text.next-btn-primary:hover{color:#1274e7;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-primary.disabled,.next-btn-text.next-btn-primary[disabled]{background:transparent;border-color:transparent}.next-btn-text.next-btn-primary.disabled,.next-btn-text.next-btn-primary.disabled.visited,.next-btn-text.next-btn-primary.disabled:link,.next-btn-text.next-btn-primary.disabled:visited,.next-btn-text.next-btn-primary[disabled],.next-btn-text.next-btn-primary[disabled].visited,.next-btn-text.next-btn-primary[disabled]:link,.next-btn-text.next-btn-primary[disabled]:visited{color:#ccc}.next-btn-text.next-btn-primary.disabled.active,.next-btn-text.next-btn-primary.disabled.hover,.next-btn-text.next-btn-primary.disabled:active,.next-btn-text.next-btn-primary.disabled:focus,.next-btn-text.next-btn-primary.disabled:hover,.next-btn-text.next-btn-primary[disabled].active,.next-btn-text.next-btn-primary[disabled].hover,.next-btn-text.next-btn-primary[disabled]:active,.next-btn-text.next-btn-primary[disabled]:focus,.next-btn-text.next-btn-primary[disabled]:hover{color:#ccc;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-secondary{background:transparent;border-color:transparent}.next-btn-text.next-btn-secondary,.next-btn-text.next-btn-secondary.visited,.next-btn-text.next-btn-secondary:link,.next-btn-text.next-btn-secondary:visited{color:#666}.next-btn-text.next-btn-secondary.active,.next-btn-text.next-btn-secondary.hover,.next-btn-text.next-btn-secondary:active,.next-btn-text.next-btn-secondary:focus,.next-btn-text.next-btn-secondary:hover{color:#209bfa;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-secondary.disabled,.next-btn-text.next-btn-secondary[disabled]{background:transparent;border-color:transparent}.next-btn-text.next-btn-secondary.disabled,.next-btn-text.next-btn-secondary.disabled.visited,.next-btn-text.next-btn-secondary.disabled:link,.next-btn-text.next-btn-secondary.disabled:visited,.next-btn-text.next-btn-secondary[disabled],.next-btn-text.next-btn-secondary[disabled].visited,.next-btn-text.next-btn-secondary[disabled]:link,.next-btn-text.next-btn-secondary[disabled]:visited{color:#ccc}.next-btn-text.next-btn-secondary.disabled.active,.next-btn-text.next-btn-secondary.disabled.hover,.next-btn-text.next-btn-secondary.disabled:active,.next-btn-text.next-btn-secondary.disabled:focus,.next-btn-text.next-btn-secondary.disabled:hover,.next-btn-text.next-btn-secondary[disabled].active,.next-btn-text.next-btn-secondary[disabled].hover,.next-btn-text.next-btn-secondary[disabled]:active,.next-btn-text.next-btn-secondary[disabled]:focus,.next-btn-text.next-btn-secondary[disabled]:hover{color:#ccc;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-normal{background:transparent;border-color:transparent}.next-btn-text.next-btn-normal,.next-btn-text.next-btn-normal.visited,.next-btn-text.next-btn-normal:link,.next-btn-text.next-btn-normal:visited{color:#333}.next-btn-text.next-btn-normal.active,.next-btn-text.next-btn-normal.hover,.next-btn-text.next-btn-normal:active,.next-btn-text.next-btn-normal:focus,.next-btn-text.next-btn-normal:hover{color:#209bfa;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-normal.disabled,.next-btn-text.next-btn-normal[disabled]{background:transparent;border-color:transparent}.next-btn-text.next-btn-normal.disabled,.next-btn-text.next-btn-normal.disabled.visited,.next-btn-text.next-btn-normal.disabled:link,.next-btn-text.next-btn-normal.disabled:visited,.next-btn-text.next-btn-normal[disabled],.next-btn-text.next-btn-normal[disabled].visited,.next-btn-text.next-btn-normal[disabled]:link,.next-btn-text.next-btn-normal[disabled]:visited{color:#ccc}.next-btn-text.next-btn-normal.disabled.active,.next-btn-text.next-btn-normal.disabled.hover,.next-btn-text.next-btn-normal.disabled:active,.next-btn-text.next-btn-normal.disabled:focus,.next-btn-text.next-btn-normal.disabled:hover,.next-btn-text.next-btn-normal[disabled].active,.next-btn-text.next-btn-normal[disabled].hover,.next-btn-text.next-btn-normal[disabled]:active,.next-btn-text.next-btn-normal[disabled]:focus,.next-btn-text.next-btn-normal[disabled]:hover{color:#ccc;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-large{border-radius:0;padding:0;height:24px;font-size:14px;border-width:0}.next-btn-text.next-large>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn-text.next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-large>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn-text.next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-large>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn-text.next-large>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-alone:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-large>.next-btn-icon-size{margin-right:4px}.next-btn-text.next-large.next-btn-loading:before{width:20px;height:20px;font-size:20px;line-height:20px;left:0;top:50%;text-align:center;margin-right:4px}.next-btn-text.next-large.next-btn-loading>.next-icon{display:none}.next-btn-text.next-large>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn-text.next-large>.next-btn-custom-loading-icon.show{width:20px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn-text.next-medium{border-radius:0;padding:0;height:20px;font-size:14px;border-width:0}.next-btn-text.next-medium>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn-text.next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-medium>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn-text.next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-medium>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn-text.next-medium>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-alone:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-medium>.next-btn-icon-size{margin-right:4px}.next-btn-text.next-medium.next-btn-loading:before{width:20px;height:20px;font-size:20px;line-height:20px;left:0;top:50%;text-align:center;margin-right:4px}.next-btn-text.next-medium.next-btn-loading>.next-icon{display:none}.next-btn-text.next-medium>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn-text.next-medium>.next-btn-custom-loading-icon.show{width:20px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn-text.next-small{border-radius:0;padding:0;height:16px;font-size:12px;border-width:0}.next-btn-text.next-small>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn-text.next-small>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-small>.next-btn-icon.next-icon-first:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text.next-small>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn-text.next-small>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-small>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text.next-small>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn-text.next-small>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-small>.next-btn-icon.next-icon-alone:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text.next-small>.next-btn-icon-size{margin-right:4px}.next-btn-text.next-small.next-btn-loading:before{width:12px;height:12px;font-size:12px;line-height:12px;left:0;top:50%;text-align:center;margin-right:4px}.next-btn-text.next-small.next-btn-loading>.next-icon{display:none}.next-btn-text.next-small>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn-text.next-small>.next-btn-custom-loading-icon.show{width:12px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn-text.next-btn-loading{background:transparent;border-color:transparent}.next-btn-text.next-btn-loading,.next-btn-text.next-btn-loading.visited,.next-btn-text.next-btn-loading:link,.next-btn-text.next-btn-loading:visited{color:#333}.next-btn-text.next-btn-loading.active,.next-btn-text.next-btn-loading.hover,.next-btn-text.next-btn-loading:active,.next-btn-text.next-btn-loading:focus,.next-btn-text.next-btn-loading:hover{color:#333;background:transparent;border-color:transparent;text-decoration:none}.next-btn-loading{pointer-events:none}.next-btn-loading:before{font-family:NextIcon;content:"";opacity:1;visibility:visible;animation:loadingCircle 2s linear infinite}.next-btn-loading:after{content:"";display:inline-block;position:static;height:100%;width:0;vertical-align:middle}.next-btn-custom-loading{pointer-events:none}.next-btn-ghost{box-shadow:none;border-style:solid}.next-btn-ghost.next-btn-dark{background:transparent;border-color:#fff}.next-btn-ghost.next-btn-dark,.next-btn-ghost.next-btn-dark.visited,.next-btn-ghost.next-btn-dark:link,.next-btn-ghost.next-btn-dark:visited{color:#fff}.next-btn-ghost.next-btn-dark.active,.next-btn-ghost.next-btn-dark.hover,.next-btn-ghost.next-btn-dark:active,.next-btn-ghost.next-btn-dark:focus,.next-btn-ghost.next-btn-dark:hover{color:#fff;background:hsla(0,0%,100%,.8);border-color:#fff;text-decoration:none}.next-btn-ghost.next-btn-dark.disabled,.next-btn-ghost.next-btn-dark[disabled]{background:transparent;border-color:hsla(0,0%,100%,.4)}.next-btn-ghost.next-btn-dark.disabled,.next-btn-ghost.next-btn-dark.disabled.visited,.next-btn-ghost.next-btn-dark.disabled:link,.next-btn-ghost.next-btn-dark.disabled:visited,.next-btn-ghost.next-btn-dark[disabled],.next-btn-ghost.next-btn-dark[disabled].visited,.next-btn-ghost.next-btn-dark[disabled]:link,.next-btn-ghost.next-btn-dark[disabled]:visited{color:hsla(0,0%,100%,.4)}.next-btn-ghost.next-btn-dark.disabled.active,.next-btn-ghost.next-btn-dark.disabled.hover,.next-btn-ghost.next-btn-dark.disabled:active,.next-btn-ghost.next-btn-dark.disabled:focus,.next-btn-ghost.next-btn-dark.disabled:hover,.next-btn-ghost.next-btn-dark[disabled].active,.next-btn-ghost.next-btn-dark[disabled].hover,.next-btn-ghost.next-btn-dark[disabled]:active,.next-btn-ghost.next-btn-dark[disabled]:focus,.next-btn-ghost.next-btn-dark[disabled]:hover{color:hsla(0,0%,100%,.4);background:transparent;border-color:hsla(0,0%,100%,.4);text-decoration:none}.next-btn-ghost.next-btn-light{background:transparent;border-color:#333}.next-btn-ghost.next-btn-light,.next-btn-ghost.next-btn-light.visited,.next-btn-ghost.next-btn-light:link,.next-btn-ghost.next-btn-light:visited{color:#333}.next-btn-ghost.next-btn-light.active,.next-btn-ghost.next-btn-light.hover,.next-btn-ghost.next-btn-light:active,.next-btn-ghost.next-btn-light:focus,.next-btn-ghost.next-btn-light:hover{color:#999;background:rgba(0,0,0,.92);border-color:#333;text-decoration:none}.next-btn-ghost.next-btn-light.disabled,.next-btn-ghost.next-btn-light[disabled]{background:transparent;border-color:rgba(0,0,0,.1)}.next-btn-ghost.next-btn-light.disabled,.next-btn-ghost.next-btn-light.disabled.visited,.next-btn-ghost.next-btn-light.disabled:link,.next-btn-ghost.next-btn-light.disabled:visited,.next-btn-ghost.next-btn-light[disabled],.next-btn-ghost.next-btn-light[disabled].visited,.next-btn-ghost.next-btn-light[disabled]:link,.next-btn-ghost.next-btn-light[disabled]:visited{color:rgba(0,0,0,.1)}.next-btn-ghost.next-btn-light.disabled.active,.next-btn-ghost.next-btn-light.disabled.hover,.next-btn-ghost.next-btn-light.disabled:active,.next-btn-ghost.next-btn-light.disabled:focus,.next-btn-ghost.next-btn-light.disabled:hover,.next-btn-ghost.next-btn-light[disabled].active,.next-btn-ghost.next-btn-light[disabled].hover,.next-btn-ghost.next-btn-light[disabled]:active,.next-btn-ghost.next-btn-light[disabled]:focus,.next-btn-ghost.next-btn-light[disabled]:hover{color:rgba(0,0,0,.1);background:transparent;border-color:rgba(0,0,0,.1);text-decoration:none}.next-btn-group{position:relative;display:inline-block;vertical-align:middle}.next-btn-group>.next-btn{position:relative;float:left;box-shadow:none}.next-btn-group>.next-btn.active,.next-btn-group>.next-btn:active,.next-btn-group>.next-btn:focus,.next-btn-group>.next-btn:hover{z-index:1}.next-btn-group>.next-btn.disabled,.next-btn-group>.next-btn[disabled]{z-index:0}.next-btn-group .next-btn.next-btn{margin:0 0 0 -1px}.next-btn-group .next-btn:not(:first-child):not(:last-child){border-radius:0}.next-btn-group>.next-btn:first-child{margin:0}.next-btn-group>.next-btn:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.next-btn-group>.next-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.next-btn-group>.next-btn-primary:not(:first-child){border-left-color:hsla(0,0%,100%,.2)}.next-btn-group>.next-btn-primary:not(:first-child):hover{border-left-color:transparent}.next-btn-group>.next-btn-primary:not(:first-child).disabled,.next-btn-group>.next-btn-primary:not(:first-child)[disabled]{border-left-color:#eee}.next-btn-group[dir=rtl]>.next-btn{float:right}.next-btn-group[dir=rtl] .next-btn.next-btn{margin:0 -1px 0 0}.next-btn-group[dir=rtl]>.next-btn:first-child:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.next-btn-group[dir=rtl]>.next-btn:last-child:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0}.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child){border-right-color:hsla(0,0%,100%,.2)}.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child):hover{border-right-color:transparent}.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child).disabled,.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child)[disabled]{border-right-color:#eee}.next-btn.next-small[dir=rtl]{border-radius:3px}.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-first:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small[dir=rtl].next-btn-loading{padding-left:16px;padding-right:32px}.next-btn.next-small[dir=rtl].next-btn-loading:after{right:16px;top:50%;margin-right:0;margin-left:4px}.next-btn.next-medium[dir=rtl]{border-radius:3px}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium[dir=rtl].next-btn-loading{padding-left:20px;padding-right:44px}.next-btn.next-medium[dir=rtl].next-btn-loading:after{right:20px;top:50%;margin-right:0;margin-left:4px}.next-btn.next-large[dir=rtl]{border-radius:3px}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large[dir=rtl].next-btn-loading{padding-left:24px;padding-right:48px}.next-btn.next-large[dir=rtl].next-btn-loading:after{right:24px;top:50%;margin-right:0;margin-left:4px}.next-btn-text[dir=rtl].next-large{border-radius:0}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text[dir=rtl].next-large.next-btn-loading{padding-left:0;padding-right:24px}.next-btn-text[dir=rtl].next-large.next-btn-loading:after{right:0;top:50%;margin-right:0;margin-left:4px}.next-btn-text[dir=rtl].next-medium{border-radius:0}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text[dir=rtl].next-medium.next-btn-loading{padding-left:0;padding-right:24px}.next-btn-text[dir=rtl].next-medium.next-btn-loading:after{right:0;top:50%;margin-right:0;margin-left:4px}.next-btn-text[dir=rtl].next-small{border-radius:0}.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-first:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text[dir=rtl].next-small.next-btn-loading{padding-left:0;padding-right:16px}.next-btn-text[dir=rtl].next-small.next-btn-loading:after{right:0;top:50%;margin-right:0;margin-left:4px}.next-input{vertical-align:middle;display:inline-table;border-collapse:separate;font-size:0;line-height:1;width:200px;border-spacing:0;transition:all .1s linear;border:1px solid #ddd;background-color:#fff}.next-input,.next-input *,.next-input :after,.next-input :before{box-sizing:border-box}.next-input input{height:100%}.next-input input[type=reset],.next-input input[type=submit]{-webkit-appearance:button;cursor:pointer}.next-input input::-moz-focus-inner{border:0;padding:0}.next-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset;border-radius:3px}.next-input input[type=password]::-ms-reveal{display:none}.next-input textarea{resize:none}.next-input input,.next-input textarea{width:100%;border:none;outline:none;padding:0;margin:0;font-weight:400;vertical-align:middle;background-color:transparent;color:#333}.next-input input::-ms-clear,.next-input textarea::-ms-clear{display:none}.next-input.next-small{height:24px;border-radius:3px}.next-input.next-small .next-input-label{padding-left:8px;font-size:12px}.next-input.next-small .next-input-inner{font-size:12px}.next-input.next-small .next-input-control,.next-input.next-small .next-input-inner-text{padding-right:4px}.next-input.next-small input{height:22px;line-height:22px \0 ;padding:0 4px;font-size:12px}.next-input.next-small input::placeholder{font-size:12px}.next-input.next-small .next-input-text-field{padding:0 4px;font-size:12px;height:22px;line-height:22px}.next-input.next-small .next-icon .next-icon-remote,.next-input.next-small .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-input.next-small .next-input-control{border-radius:0 3px 3px 0}.next-input.next-medium{height:32px;border-radius:3px}.next-input.next-medium .next-input-label{padding-left:8px;font-size:14px}.next-input.next-medium .next-input-inner{font-size:14px}.next-input.next-medium .next-input-control,.next-input.next-medium .next-input-inner-text{padding-right:8px}.next-input.next-medium input{height:30px;line-height:30px \0 ;padding:0 8px;font-size:14px}.next-input.next-medium input::placeholder{font-size:14px}.next-input.next-medium .next-input-text-field{padding:0 8px;font-size:14px;height:30px;line-height:30px}.next-input.next-medium .next-icon .next-icon-remote,.next-input.next-medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-input.next-medium .next-input-control{border-radius:0 3px 3px 0}.next-input.next-large{height:40px;border-radius:3px}.next-input.next-large .next-input-label{padding-left:12px;font-size:16px}.next-input.next-large .next-input-inner{font-size:16px}.next-input.next-large .next-input-control,.next-input.next-large .next-input-inner-text{padding-right:8px}.next-input.next-large input{height:38px;line-height:38px \0 ;padding:0 12px;font-size:16px}.next-input.next-large input::placeholder{font-size:16px}.next-input.next-large .next-input-text-field{padding:0 12px;font-size:16px;height:38px;line-height:38px}.next-input.next-large .next-icon .next-icon-remote,.next-input.next-large .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-input.next-large .next-input-control{border-radius:0 3px 3px 0}.next-input.next-input-textarea{height:auto;border-radius:3px;font-size:0}.next-input.next-input-textarea textarea{color:#333;padding:4px 8px;font-size:14px;border-radius:3px}.next-input.next-input-textarea.next-small textarea{font-size:14px}.next-input.next-input-textarea.next-large textarea{font-size:16px}.next-input.next-input-textarea .next-input-control{display:block;width:auto;border-radius:3px}.next-input.next-input-textarea .next-input-len{padding:0 8px 4px;display:block;text-align:right;width:auto}.next-input-hint-wrap{color:#999;position:relative}.next-input-hint-wrap .next-input-clear{opacity:0;z-index:1;position:absolute}.next-input-hint-wrap .next-input-hint{opacity:1}.next-input .next-icon-eye-close:hover,.next-input .next-icon-eye:hover,.next-input .next-input-clear-icon:hover{cursor:pointer;color:#666}.next-input .next-input-hover-show{opacity:0}.next-input.next-focus,.next-input:hover{border-color:#ccc;background-color:#fff}.next-input.next-focus .next-input-clear,.next-input:hover .next-input-clear{opacity:1}.next-input.next-focus .next-input-clear+.next-input-hint,.next-input:hover .next-input-clear+.next-input-hint{opacity:0}.next-input.next-focus .next-input-hover-show,.next-input .next-input-clear:focus,.next-input:hover .next-input-hover-show{opacity:1}.next-input .next-input-clear:focus+.next-input-hint{opacity:0}.next-input.next-focus{border-color:#209bfa;background-color:#fff;box-shadow:0 0 0 2px rgba(32,155,250,.2)}.next-input.next-warning{border-color:#f1c826;background-color:#fff}.next-input.next-warning.next-focus,.next-input.next-warning:hover{border-color:#f1c826}.next-input.next-warning.next-focus{box-shadow:0 0 0 2px rgba(241,200,38,.2)}.next-input.next-error{border-color:#d23c26;background-color:#fff}.next-input.next-error input,.next-input.next-error textarea{color:#333}.next-input.next-error.next-focus,.next-input.next-error:hover{border-color:#d23c26}.next-input.next-error.next-focus{box-shadow:0 0 0 2px rgba(210,60,38,.2)}.next-input.next-hidden{display:none}.next-input.next-noborder{border:none;box-shadow:none}.next-input-control .next-input-len{font-size:12px;line-height:12px;color:#999;display:table-cell;width:1px;vertical-align:bottom}.next-input-control .next-input-len.next-error{color:#d23c26}.next-input-control .next-input-len.next-warning{color:#f1c826}.next-input-control>*{display:table-cell;width:1%;top:0}.next-input-control>:not(:last-child){padding-right:4px}.next-input-control .next-icon{transition:all .1s linear;color:#999}.next-input-control .next-input-warning-icon{color:#f1c826}.next-input-control .next-input-warning-icon:before{content:""}.next-input-control .next-input-success-icon{color:#1ad78c}.next-input-control .next-input-success-icon:before{content:""}.next-input-control .next-input-loading-icon{color:#298dff}.next-input-control .next-input-loading-icon:before{content:"";animation:loadingCircle 1s linear infinite}.next-input-control .next-input-clear-icon:before{content:""}.next-input-inner-text,.next-input-label{color:#666}.next-input input::-moz-placeholder,.next-input textarea::-moz-placeholder{color:#ccc;opacity:1}.next-input input:-ms-input-placeholder,.next-input textarea:-ms-input-placeholder{color:#ccc}.next-input input::-webkit-input-placeholder,.next-input textarea::-webkit-input-placeholder{color:#ccc}.next-input.next-disabled{color:#ccc;cursor:not-allowed}.next-input.next-disabled,.next-input.next-disabled:hover{border-color:#eee;background-color:#fafafa}.next-input.next-disabled input,.next-input.next-disabled textarea{-webkit-text-fill-color:#ccc;color:#ccc}.next-input.next-disabled input::-moz-placeholder,.next-input.next-disabled textarea::-moz-placeholder{color:#ccc;opacity:1}.next-input.next-disabled input:-ms-input-placeholder,.next-input.next-disabled textarea:-ms-input-placeholder{color:#ccc}.next-input.next-disabled input::-webkit-input-placeholder,.next-input.next-disabled textarea::-webkit-input-placeholder{color:#ccc}.next-input.next-disabled .next-input-hint-wrap,.next-input.next-disabled .next-input-inner-text,.next-input.next-disabled .next-input-label,.next-input.next-disabled .next-input-len{color:#ccc}.next-input.next-disabled .next-input-hint-wrap .next-input-clear{opacity:0}.next-input.next-disabled .next-input-hint-wrap .next-input-hint{opacity:1}.next-input.next-disabled .next-input-hint-wrap .next-input-clear-icon:hover{cursor:not-allowed;color:#ccc}.next-input.next-disabled .next-icon{color:#ccc}.next-input-control,.next-input-inner,.next-input-label{display:table-cell;width:1px;vertical-align:middle;line-height:1;background-color:transparent;white-space:nowrap}.next-input-group{display:inline-table;border-collapse:separate;border-spacing:0;line-height:0;width:100%;overflow:hidden}.next-input-group,.next-input-group *,.next-input-group :after,.next-input-group :before{box-sizing:border-box}.next-input-group-auto-width{width:100%;border-radius:0!important}.next-input-group>.next-input{border-radius:0}.next-input-group>.next-input.next-focus,.next-input-group>.next-input:hover{position:relative;z-index:1}.next-input-group>.next-input:first-child.next-large,.next-input-group>.next-input:first-child.next-medium,.next-input-group>.next-input:first-child.next-small{border-top-left-radius:3px!important;border-bottom-left-radius:3px!important}.next-input-group>.next-input:last-child.next-large,.next-input-group>.next-input:last-child.next-medium,.next-input-group>.next-input:last-child.next-small{border-top-right-radius:3px!important;border-bottom-right-radius:3px!important}.next-input-group-addon{width:1px;display:table-cell;vertical-align:middle;white-space:nowrap}.next-input-group-addon:first-child,.next-input-group-addon:first-child>*{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.next-input-group-addon:first-child>*{margin-right:-1px}.next-input-group-addon:first-child>.next-focus{position:relative;z-index:1}.next-input-group-addon:first-child>*>.next-input{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.next-input-group-addon:first-child>*>.next-input.next-focus{position:relative;z-index:1}.next-input-group-addon:last-child,.next-input-group-addon:last-child>*{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.next-input-group-addon:last-child>*{margin-left:-1px}.next-input-group-addon:last-child>*>.next-input{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.next-input-group-text{color:#999;background-color:#f9f9f9;text-align:center;border:1px solid #ddd;padding:0 8px}.next-input-group-text:first-child{border-right-width:0}.next-input-group-text:last-child{border-left-width:0}.next-input-group-text.next-disabled{color:#ccc;cursor:not-allowed}.next-input-group-text.next-disabled,.next-input-group-text.next-disabled:hover{border-color:#eee;background-color:#fafafa}.next-input-group-text.next-small{font-size:12px;border-radius:3px}.next-input-group-text.next-medium{font-size:14px;border-radius:3px}.next-input-group-text.next-large{font-size:16px;border-radius:3px}.next-input[dir=rtl].next-small .next-input-label{padding-left:0;padding-right:8px}.next-input[dir=rtl].next-small .next-input-control{padding-right:0;padding-left:4px}.next-input[dir=rtl].next-medium .next-input-label{padding-left:0;padding-right:8px}.next-input[dir=rtl].next-medium .next-input-control{padding-right:0;padding-left:8px}.next-input[dir=rtl].next-large .next-input-label{padding-left:0;padding-right:12px}.next-input[dir=rtl].next-large .next-input-control{padding-right:0;padding-left:8px}.next-input[dir=rtl].next-input-textarea .next-input-len{text-align:left}.next-input[dir=rtl] .next-input-control>:not(:last-child){padding-left:4px;padding-right:0}.next-input-group[dir=rtl]>.next-input:first-child.next-large,.next-input-group[dir=rtl]>.next-input:first-child.next-medium,.next-input-group[dir=rtl]>.next-input:first-child.next-small{border-top-left-radius:0!important;border-bottom-left-radius:0!important;border-top-right-radius:3px!important;border-bottom-right-radius:3px!important}.next-input-group[dir=rtl]>.next-input:last-child.next-large,.next-input-group[dir=rtl]>.next-input:last-child.next-medium,.next-input-group[dir=rtl]>.next-input:last-child.next-small{border-top-left-radius:3px!important;border-bottom-left-radius:3px!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.next-input-group[dir=rtl] .next-input-group-addon:first-child,.next-input-group[dir=rtl] .next-input-group-addon:first-child>*>.next-input,.next-input-group[dir=rtl] .next-input-group-addon:first-child>.next-input{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.next-input-group[dir=rtl] .next-input-group-addon:first-child.next-large,.next-input-group[dir=rtl] .next-input-group-addon:first-child.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:first-child.next-small,.next-input-group[dir=rtl] .next-input-group-addon:first-child>*>.next-input.next-large,.next-input-group[dir=rtl] .next-input-group-addon:first-child>*>.next-input.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:first-child>*>.next-input.next-small,.next-input-group[dir=rtl] .next-input-group-addon:first-child>.next-input.next-large,.next-input-group[dir=rtl] .next-input-group-addon:first-child>.next-input.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:first-child>.next-input.next-small{border-bottom-right-radius:3px!important;border-top-right-radius:3px!important}.next-input-group[dir=rtl] .next-input-group-addon:first-child>*{margin-left:-1px;border-bottom-left-radius:0!important;border-top-left-radius:0!important}.next-input-group[dir=rtl] .next-input-group-addon:last-child,.next-input-group[dir=rtl] .next-input-group-addon:last-child>*>.next-input,.next-input-group[dir=rtl] .next-input-group-addon:last-child>.next-input{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.next-input-group[dir=rtl] .next-input-group-addon:last-child.next-large,.next-input-group[dir=rtl] .next-input-group-addon:last-child.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:last-child.next-small,.next-input-group[dir=rtl] .next-input-group-addon:last-child>*>.next-input.next-large,.next-input-group[dir=rtl] .next-input-group-addon:last-child>*>.next-input.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:last-child>*>.next-input.next-small,.next-input-group[dir=rtl] .next-input-group-addon:last-child>.next-input.next-large,.next-input-group[dir=rtl] .next-input-group-addon:last-child>.next-input.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:last-child>.next-input.next-small{border-bottom-left-radius:3px!important;border-top-left-radius:3px!important}.next-input-group[dir=rtl] .next-input-group-addon:last-child>*{margin-right:-1px;border-bottom-right-radius:0!important;border-top-right-radius:0!important}.next-input-group[dir=rtl] .next-input-group-text:first-child{border-right-width:1px;border-left:0}.next-input-group[dir=rtl] .next-input-group-text:last-child{border-left-width:1px;border-right:0}.next-calendar,.next-calendar *,.next-calendar :after,.next-calendar :before{box-sizing:border-box}.next-calendar table{border-collapse:collapse;border-spacing:0}.next-calendar td,.next-calendar th{padding:0}@keyframes cellZoomIn{0%{transform:scale(.5)}to{transform:scale(1)}}@keyframes cellHover{0%{opacity:0}to{opacity:1}}@keyframes enterToLeft{0%{transform:translate(-40%);opacity:0}50%{opacity:.6}to{opacity:1;transform:translate(0)}}@keyframes enterToRight{0%{transform:translate(40%);opacity:0}50%{opacity:.6}to{opacity:1;transform:translate(0)}}.next-calendar-card .next-calendar-header,.next-calendar-fullscreen .next-calendar-header{text-align:right}.next-calendar-card .next-calendar-header .next-select,.next-calendar-fullscreen .next-calendar-header .next-select{margin-right:4px;vertical-align:top}.next-calendar-card .next-calendar-header .next-menu,.next-calendar-fullscreen .next-calendar-header .next-menu{text-align:left}.next-calendar-card .next-calendar-header,.next-calendar-fullscreen .next-calendar-header{margin-bottom:8px}.next-calendar-panel-header{position:relative;background:#fff;margin-bottom:8px;border-bottom:1px solid transparent}.next-calendar-panel-header-full,.next-calendar-panel-header-left,.next-calendar-panel-header-right{height:32px;line-height:32px}.next-calendar-panel-header-full .next-calendar-btn,.next-calendar-panel-header-left .next-calendar-btn,.next-calendar-panel-header-right .next-calendar-btn{vertical-align:top;font-weight:700;margin:0 4px;background:transparent;border-color:transparent}.next-calendar-panel-header-full .next-calendar-btn,.next-calendar-panel-header-full .next-calendar-btn.visited,.next-calendar-panel-header-full .next-calendar-btn:link,.next-calendar-panel-header-full .next-calendar-btn:visited,.next-calendar-panel-header-left .next-calendar-btn,.next-calendar-panel-header-left .next-calendar-btn.visited,.next-calendar-panel-header-left .next-calendar-btn:link,.next-calendar-panel-header-left .next-calendar-btn:visited,.next-calendar-panel-header-right .next-calendar-btn,.next-calendar-panel-header-right .next-calendar-btn.visited,.next-calendar-panel-header-right .next-calendar-btn:link,.next-calendar-panel-header-right .next-calendar-btn:visited{color:#000}.next-calendar-panel-header-full .next-calendar-btn.active,.next-calendar-panel-header-full .next-calendar-btn.hover,.next-calendar-panel-header-full .next-calendar-btn:active,.next-calendar-panel-header-full .next-calendar-btn:focus,.next-calendar-panel-header-full .next-calendar-btn:hover,.next-calendar-panel-header-left .next-calendar-btn.active,.next-calendar-panel-header-left .next-calendar-btn.hover,.next-calendar-panel-header-left .next-calendar-btn:active,.next-calendar-panel-header-left .next-calendar-btn:focus,.next-calendar-panel-header-left .next-calendar-btn:hover,.next-calendar-panel-header-right .next-calendar-btn.active,.next-calendar-panel-header-right .next-calendar-btn.hover,.next-calendar-panel-header-right .next-calendar-btn:active,.next-calendar-panel-header-right .next-calendar-btn:focus,.next-calendar-panel-header-right .next-calendar-btn:hover{color:#fff;background:transparent;border-color:transparent;text-decoration:none}.next-calendar-panel-header-left,.next-calendar-panel-header-right{display:inline-block;width:50%;text-align:center}.next-calendar-panel-header-full{width:100%;text-align:center}.next-calendar-panel-menu{max-height:210px;overflow:auto;text-align:left}.next-calendar-btn{cursor:pointer;padding:0;margin:0;border:0;background:transparent;outline:none;height:100%}.next-calendar-btn>.next-icon.next-icon .next-icon-remote,.next-calendar-btn>.next-icon.next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-calendar-btn .next-icon{margin-left:4px}.next-calendar-btn-next-decade,.next-calendar-btn-next-month,.next-calendar-btn-next-year,.next-calendar-btn-prev-decade,.next-calendar-btn-prev-month,.next-calendar-btn-prev-year{position:absolute;top:0;background:transparent;border-color:transparent}.next-calendar-btn-next-decade,.next-calendar-btn-next-decade.visited,.next-calendar-btn-next-decade:link,.next-calendar-btn-next-decade:visited,.next-calendar-btn-next-month,.next-calendar-btn-next-month.visited,.next-calendar-btn-next-month:link,.next-calendar-btn-next-month:visited,.next-calendar-btn-next-year,.next-calendar-btn-next-year.visited,.next-calendar-btn-next-year:link,.next-calendar-btn-next-year:visited,.next-calendar-btn-prev-decade,.next-calendar-btn-prev-decade.visited,.next-calendar-btn-prev-decade:link,.next-calendar-btn-prev-decade:visited,.next-calendar-btn-prev-month,.next-calendar-btn-prev-month.visited,.next-calendar-btn-prev-month:link,.next-calendar-btn-prev-month:visited,.next-calendar-btn-prev-year,.next-calendar-btn-prev-year.visited,.next-calendar-btn-prev-year:link,.next-calendar-btn-prev-year:visited{color:#666}.next-calendar-btn-next-decade.active,.next-calendar-btn-next-decade.hover,.next-calendar-btn-next-decade:active,.next-calendar-btn-next-decade:focus,.next-calendar-btn-next-decade:hover,.next-calendar-btn-next-month.active,.next-calendar-btn-next-month.hover,.next-calendar-btn-next-month:active,.next-calendar-btn-next-month:focus,.next-calendar-btn-next-month:hover,.next-calendar-btn-next-year.active,.next-calendar-btn-next-year.hover,.next-calendar-btn-next-year:active,.next-calendar-btn-next-year:focus,.next-calendar-btn-next-year:hover,.next-calendar-btn-prev-decade.active,.next-calendar-btn-prev-decade.hover,.next-calendar-btn-prev-decade:active,.next-calendar-btn-prev-decade:focus,.next-calendar-btn-prev-decade:hover,.next-calendar-btn-prev-month.active,.next-calendar-btn-prev-month.hover,.next-calendar-btn-prev-month:active,.next-calendar-btn-prev-month:focus,.next-calendar-btn-prev-month:hover,.next-calendar-btn-prev-year.active,.next-calendar-btn-prev-year.hover,.next-calendar-btn-prev-year:active,.next-calendar-btn-prev-year:focus,.next-calendar-btn-prev-year:hover{color:#209bfa;background:transparent;border-color:transparent;text-decoration:none}.next-calendar-btn-prev-decade,.next-calendar-btn-prev-year{left:8px}.next-calendar-btn-prev-month{left:28px}.next-calendar-btn-next-month{right:28px}.next-calendar-btn-next-decade,.next-calendar-btn-next-year{right:8px}.next-calendar-fullscreen .next-calendar-th{text-align:right;color:#333;font-size:16px;font-weight:700;padding-right:12px;padding-bottom:4px}.next-calendar-fullscreen .next-calendar-cell{font-size:14px}.next-calendar-fullscreen .next-calendar-cell.next-selected .next-calendar-date,.next-calendar-fullscreen .next-calendar-cell.next-selected .next-calendar-month{font-weight:700;background:#add9ff;color:#209bfa;border-color:#209bfa}.next-calendar-fullscreen .next-calendar-cell.next-disabled .next-calendar-date,.next-calendar-fullscreen .next-calendar-cell.next-disabled .next-calendar-month{cursor:not-allowed;background:#fafafa;color:#ccc;border-color:#eee}.next-calendar-fullscreen .next-calendar-date,.next-calendar-fullscreen .next-calendar-month{text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 4px;padding:4px 8px;min-height:80px;transition:background .1s linear;background:#fff;color:#333;border-color:currentcolor #e6e6e6 #e6e6e6;border-top:2px solid #e6e6e6}.next-calendar-fullscreen .next-calendar-date:hover,.next-calendar-fullscreen .next-calendar-month:hover{background:#add9ff;color:#209bfa;border-color:#209bfa}.next-calendar-fullscreen .next-calendar-cell-next-month .next-calendar-date,.next-calendar-fullscreen .next-calendar-cell-prev-month .next-calendar-date{background:transparent;color:#ccc;border-color:transparent}.next-calendar-fullscreen .next-calendar-cell-current .next-calendar-date,.next-calendar-fullscreen .next-calendar-cell-current .next-calendar-month{font-weight:700;background:#fff;color:#209bfa;border-color:#209bfa}.next-calendar-card .next-calendar-th,.next-calendar-panel .next-calendar-th,.next-calendar-range .next-calendar-th{text-align:center;color:#999;font-size:12px;font-weight:400}.next-calendar-card .next-calendar-cell,.next-calendar-panel .next-calendar-cell,.next-calendar-range .next-calendar-cell{text-align:center;font-size:12px}.next-calendar-card .next-calendar-cell.next-selected .next-calendar-date,.next-calendar-card .next-calendar-cell.next-selected .next-calendar-month,.next-calendar-card .next-calendar-cell.next-selected .next-calendar-year,.next-calendar-panel .next-calendar-cell.next-selected .next-calendar-date,.next-calendar-panel .next-calendar-cell.next-selected .next-calendar-month,.next-calendar-panel .next-calendar-cell.next-selected .next-calendar-year,.next-calendar-range .next-calendar-cell.next-selected .next-calendar-date,.next-calendar-range .next-calendar-cell.next-selected .next-calendar-month,.next-calendar-range .next-calendar-cell.next-selected .next-calendar-year{animation:cellZoomIn .4s cubic-bezier(.23,1,.32,1);font-weight:700;background:#209bfa;color:#fff;border-color:#209bfa}.next-calendar-card .next-calendar-cell.next-disabled .next-calendar-date,.next-calendar-card .next-calendar-cell.next-disabled .next-calendar-month,.next-calendar-card .next-calendar-cell.next-disabled .next-calendar-year,.next-calendar-panel .next-calendar-cell.next-disabled .next-calendar-date,.next-calendar-panel .next-calendar-cell.next-disabled .next-calendar-month,.next-calendar-panel .next-calendar-cell.next-disabled .next-calendar-year,.next-calendar-range .next-calendar-cell.next-disabled .next-calendar-date,.next-calendar-range .next-calendar-cell.next-disabled .next-calendar-month,.next-calendar-range .next-calendar-cell.next-disabled .next-calendar-year{cursor:not-allowed;background:#fafafa;color:#ccc;border-color:#fafafa}.next-calendar-card .next-calendar-cell.next-inrange .next-calendar-date,.next-calendar-panel .next-calendar-cell.next-inrange .next-calendar-date,.next-calendar-range .next-calendar-cell.next-inrange .next-calendar-date{background:#e4f3fe;color:#209bfa;border-color:#e4f3fe}.next-calendar-card .next-calendar-date,.next-calendar-card .next-calendar-month,.next-calendar-card .next-calendar-year,.next-calendar-panel .next-calendar-date,.next-calendar-panel .next-calendar-month,.next-calendar-panel .next-calendar-year,.next-calendar-range .next-calendar-date,.next-calendar-range .next-calendar-month,.next-calendar-range .next-calendar-year{text-align:center;background:#fff;color:#666;border:1px solid #fff}.next-calendar-card .next-calendar-date:hover,.next-calendar-card .next-calendar-month:hover,.next-calendar-card .next-calendar-year:hover,.next-calendar-panel .next-calendar-date:hover,.next-calendar-panel .next-calendar-month:hover,.next-calendar-panel .next-calendar-year:hover,.next-calendar-range .next-calendar-date:hover,.next-calendar-range .next-calendar-month:hover,.next-calendar-range .next-calendar-year:hover{cursor:pointer;background:#e4f3fe;color:#209bfa;border-color:#e4f3fe}.next-calendar-card .next-calendar-date,.next-calendar-panel .next-calendar-date,.next-calendar-range .next-calendar-date{width:24px;height:24px;line-height:22px;margin:4px auto;border-radius:3px}.next-calendar-card .next-calendar-month,.next-calendar-panel .next-calendar-month,.next-calendar-range .next-calendar-month{width:60px;height:24px;line-height:22px;margin:8px auto;border-radius:3px}.next-calendar-card .next-calendar-year,.next-calendar-panel .next-calendar-year,.next-calendar-range .next-calendar-year{width:48px;height:24px;line-height:22px;margin:8px auto;border-radius:3px}.next-calendar-card .next-calendar-cell-next-month .next-calendar-date,.next-calendar-card .next-calendar-cell-prev-month .next-calendar-date,.next-calendar-panel .next-calendar-cell-next-month .next-calendar-date,.next-calendar-panel .next-calendar-cell-prev-month .next-calendar-date,.next-calendar-range .next-calendar-cell-next-month .next-calendar-date,.next-calendar-range .next-calendar-cell-prev-month .next-calendar-date{background:#fff;color:#ccc;border-color:#fff}.next-calendar-card .next-calendar-cell-current .next-calendar-date,.next-calendar-card .next-calendar-cell-current .next-calendar-month,.next-calendar-card .next-calendar-cell-current .next-calendar-year,.next-calendar-panel .next-calendar-cell-current .next-calendar-date,.next-calendar-panel .next-calendar-cell-current .next-calendar-month,.next-calendar-panel .next-calendar-cell-current .next-calendar-year,.next-calendar-range .next-calendar-cell-current .next-calendar-date,.next-calendar-range .next-calendar-cell-current .next-calendar-month,.next-calendar-range .next-calendar-cell-current .next-calendar-year{font-weight:700;background:#fff;color:#209bfa;border-color:transparent}.next-calendar-panel.next-calendar-week .next-calendar-tbody tr{cursor:pointer}.next-calendar-panel.next-calendar-week .next-calendar-tbody tr:hover .next-calendar-cell .next-calendar-date{background:#e4f3fe;color:#209bfa;border-color:#e4f3fe}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-cell.next-selected .next-calendar-date{font-weight:400;background:transparent;border-color:transparent}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-date{position:relative;color:#209bfa}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-date:before{content:"";position:absolute;left:-1px;top:-1px;bottom:-1px;right:-1px;background:#e4f3fe;border:1px solid #e4f3fe;border-radius:3px}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-date>span{position:relative}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-end,.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-start{color:#fff}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-end:before,.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-start:before{background:#209bfa;border-color:#209bfa}.next-calendar[dir=rtl] .next-calendar-header{text-align:left}.next-calendar[dir=rtl] .next-calendar-header .next-select{margin-right:0;margin-left:4px}.next-calendar[dir=rtl] .next-calendar-header .next-menu{text-align:right}.next-calendar[dir=rtl] .next-calendar-btn-prev-decade,.next-calendar[dir=rtl] .next-calendar-btn-prev-year{left:auto;right:8px}.next-calendar[dir=rtl] .next-calendar-btn-prev-month{left:auto;right:28px}.next-calendar[dir=rtl] .next-calendar-btn-next-month{right:auto;left:28px}.next-calendar[dir=rtl] .next-calendar-btn-next-decade,.next-calendar[dir=rtl] .next-calendar-btn-next-year{right:auto;left:8px}.next-calendar-fullscreen[dir=rtl] .next-calendar-th{text-align:left;padding-left:12px;padding-right:0}.next-calendar-fullscreen[dir=rtl] .next-calendar-date,.next-calendar-fullscreen[dir=rtl] .next-calendar-month{text-align:left}.next-calendar-range[dir=rtl] .next-calendar-body-left,.next-calendar-range[dir=rtl] .next-calendar-body-right{float:right}.next-calendar-range[dir=rtl] .next-calendar-body-left{padding-right:0;padding-left:8px}.next-calendar-range[dir=rtl] .next-calendar-body-right{padding-left:0;padding-right:8px}.next-calendar-table{width:100%;table-layout:fixed}.next-calendar-range .next-calendar-body-left,.next-calendar-range .next-calendar-body-right{float:left;width:50%}.next-calendar-range .next-calendar-body-left{padding-right:8px}.next-calendar-range .next-calendar-body-right{padding-left:8px}.next-calendar-range .next-calendar-body:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-calendar-symbol-prev:before{content:""}.next-calendar-symbol-next:before{content:""}.next-calendar-symbol-prev-super:before{content:""}.next-calendar-symbol-next-super:before{content:""}.next-card,.next-card:after,.next-card:before{box-sizing:border-box}.next-card[dir=rtl] .next-card-extra{left:0;right:auto}.next-card[dir=rtl] .next-card-title:before{right:0;left:auto}.next-card[dir=rtl] .next-card-subtitle{float:left;padding-right:8px;padding-left:0}.next-card[dir=rtl] .next-card-head-show-bullet .next-card-title{padding-left:0;padding-right:8px}.next-card,.next-card *,.next-card :after,.next-card :before{box-sizing:border-box}.next-card{min-width:100px;border:0 solid #e6e6e6;border-radius:3px;box-shadow:none;background:#fff;overflow:hidden}.next-card-noborder{border:0}.next-card-head{background:#fff;padding-left:24px;padding-right:24px}.next-card-head-show-bullet .next-card-title{padding-left:8px}.next-card-head-show-bullet .next-card-title:before{content:"";display:inline-block;height:16px;width:3px;background:#209bfa;position:absolute;left:0;top:calc(50% - 8px)}.next-card-head-main{position:relative;margin-top:0;margin-bottom:0;height:64px;line-height:64px}.next-card-title{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80%;height:100%;color:#333;font-size:16px;font-weight:400}.next-card-subtitle{font-size:12px;color:#666;padding-left:8px}.next-card-extra{position:absolute;right:0;top:0;height:100%;font-size:14px;color:#298dff}.next-card-body{padding-bottom:20px;padding-left:24px;padding-right:24px}.next-card-show-divider>.next-card-head>.next-card-head-main{border-bottom:1px solid #eee}.next-card-show-divider>.next-card-body{padding-top:20px}.next-card-hide-divider>.next-card-body{padding-top:0}.next-card-free{padding:0}.next-card-content{overflow:hidden;transition:all .3s ease;position:relative}.next-card-footer .next-icon{transition:all .1s linear}.next-card-footer .next-icon.next-icon-arrow-down.expand{transform-origin:50% 47%;transform:rotate(180deg)}.next-card-header{background:#fff;padding:0 24px;margin-bottom:20px;margin-top:20px}.next-card-media,.next-card-media>*{display:block;background-size:cover;background-repeat:no-repeat;background-position:50%;object-fit:cover;width:100%}.next-card-header-titles{overflow:hidden}.next-card-header-extra{float:right;text-align:right}.next-card-header-extra .next--btn{margin-left:12px;vertical-align:middle}.next-card-header-title{color:#333;font-size:16px;font-weight:400;line-height:1.5}.next-card-header-subtitle{font-size:12px;color:#666}.next-card-actions{display:block;padding:20px 24px}.next-card-actions .next-btn:not(:last-child){margin-right:12px;vertical-align:middle}.next-card-divider{border-style:none;width:100%;margin:0;position:relative;overflow:visible}.next-card-divider:before{content:"";display:block;border-bottom:1px solid #eee}.next-card-divider--inset{padding:0 24px}.next-card-content-container{margin-top:20px;padding-bottom:20px;padding-left:24px;padding-right:24px;font-size:14px;line-height:1.5;color:#666}.next-cascader{display:inline-block;overflow:auto;border:1px solid #e6e6e6;border-radius:3px}.next-cascader,.next-cascader *,.next-cascader :after,.next-cascader :before{box-sizing:border-box}.next-cascader-inner:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-cascader-menu-wrapper{float:left;overflow:auto;width:auto;min-width:100px;height:192px;overflow-x:hidden;overflow-y:auto}.next-cascader-menu-wrapper+.next-cascader-menu-wrapper{border-left:1px solid #e6e6e6}.next-cascader-menu{position:relative;padding:0;border:none;border-radius:0;box-shadow:none;min-width:auto;min-height:100%}.next-cascader-menu.next-has-right-border{border-right:1px solid #e6e6e6}.next-cascader-menu-item.next-expanded{color:#333;background-color:#f9f9f9}.next-cascader-menu-icon-right{position:absolute;top:0;right:10px;color:#666}.next-cascader-menu-icon-right:hover{color:#333}.next-cascader-menu-icon-expand.next-icon .next-icon-remote,.next-cascader-menu-icon-expand.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-cascader-menu-icon-loading.next-icon .next-icon-remote,.next-cascader-menu-icon-loading.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-cascader-menu-item.next-expanded .next-cascader-menu-icon-right{color:#333}.next-cascader-menu-item.next-expanded .next-cascader-menu-icon-loading{color:#209bfa}.next-cascader-filtered-list{height:192px;padding:0;border:none;border-radius:0;box-shadow:none;overflow:auto}.next-cascader-filtered-list .next-menu-item-inner{overflow:visible}.next-cascader-filtered-item em{color:#209bfa;font-style:normal}.next-cascader[dir=rtl] .next-cascader-menu-wrapper{float:right;border-left:none;border-right:1px solid #e6e6e6}.next-cascader[dir=rtl] .next-cascader-menu-wrapper:first-child{border-right:none}.next-cascader[dir=rtl] .next-cascader-menu.next-has-right-border{border-right:none;border-left:1px solid #e6e6e6}.next-cascader[dir=rtl] .next-cascader-menu-icon-right{right:auto;left:10px}.next-cascader-select,.next-cascader-select *,.next-cascader-select :after,.next-cascader-select :before{box-sizing:border-box}.next-cascader-select-dropdown{box-sizing:border-box;border:1px solid #e6e6e6;border-radius:3px;box-shadow:none}.next-cascader-select-dropdown *,.next-cascader-select-dropdown :after,.next-cascader-select-dropdown :before{box-sizing:border-box}.next-cascader-select-dropdown .next-cascader{display:block;border:none;box-shadow:none}.next-cascader-select-not-found{padding:0;border:none;box-shadow:none;overflow:auto;color:#999}.next-cascader-select-not-found .next-menu-item:hover{color:#999;background:#fff;cursor:default}.next-checkbox-wrapper[dir=rtl]{margin-right:8px;margin-left:0}.next-checkbox-wrapper[dir=rtl]:first-child{margin-right:0}.next-checkbox-wrapper[dir=rtl]>.next-checkbox-label{margin-right:4px;margin-left:0}.next-checkbox-wrapper{box-sizing:border-box;display:inline-block}.next-checkbox-wrapper *,.next-checkbox-wrapper :after,.next-checkbox-wrapper :before{box-sizing:border-box}.next-checkbox-wrapper .next-checkbox{display:inline-block;position:relative;line-height:1;vertical-align:middle}.next-checkbox-wrapper input[type=checkbox]{opacity:0;position:absolute;top:0;left:0;width:16px;height:16px;margin:0;cursor:pointer}.next-checkbox-wrapper .next-checkbox-inner{display:block;width:16px;height:16px;background:#fff;border-radius:3px;border:1px solid #ddd;transition:all .1s linear;text-align:left;box-shadow:none}.next-checkbox-wrapper .next-checkbox-inner>.next-icon{transform:scale(0);position:absolute;top:0;opacity:0;line-height:16px;transition:all .1s linear;color:#fff;left:2px;margin-left:0}.next-checkbox-wrapper .next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper .next-checkbox-inner>.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-checkbox-wrapper .next-checkbox-inner>.next-icon:before{vertical-align:top;margin-top:0}.next-checkbox-wrapper .next-checkbox-inner>.next-checkbox-select-icon:before{content:""}.next-checkbox-wrapper .next-checkbox-inner>.next-checkbox-semi-select-icon:before{content:""}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner{border-color:transparent;background-color:#209bfa}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner.hovered,.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner:hover,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner.hovered,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner:hover{border-color:transparent}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon{opacity:1;transform:scale(1);margin-left:0}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner{border-color:transparent;background-color:#209bfa}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner.hovered,.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner:hover,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner.hovered,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner:hover{border-color:transparent}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon{opacity:1;transform:scaleX(1);margin-left:0}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-checkbox-wrapper.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.hovered>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper:not(.disabled):hover>.next-checkbox>.next-checkbox-inner{border-color:#209bfa;background-color:#add9ff}.next-checkbox-wrapper.focused .next-checkbox-label,.next-checkbox-wrapper.hovered .next-checkbox-label,.next-checkbox-wrapper:not(.disabled):hover .next-checkbox-label{cursor:pointer}.next-checkbox-wrapper.checked:not(.disabled).hovered>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.checked:not(.disabled):hover>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.indeterminate:not(.disabled).hovered>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.indeterminate:not(.disabled):hover>.next-checkbox .next-checkbox-inner{border-color:transparent;background-color:#1274e7}.next-checkbox-wrapper.checked:not(.disabled).hovered>.next-checkbox .next-checkbox-inner>.next-icon,.next-checkbox-wrapper.checked:not(.disabled):hover>.next-checkbox .next-checkbox-inner>.next-icon,.next-checkbox-wrapper.indeterminate:not(.disabled).hovered>.next-checkbox .next-checkbox-inner>.next-icon,.next-checkbox-wrapper.indeterminate:not(.disabled):hover>.next-checkbox .next-checkbox-inner>.next-icon{color:#fff;opacity:1}.next-checkbox-wrapper.disabled input[type=checkbox]{cursor:not-allowed}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner,.next-checkbox-wrapper.disabled .next-checkbox-inner{border-color:#eee;background:#fafafa}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner.hovered,.next-checkbox-wrapper.disabled.checked .next-checkbox-inner:hover,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner.hovered,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner:hover{border-color:#eee}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner>.next-icon,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner>.next-icon{color:#ccc;opacity:1}.next-checkbox-wrapper.disabled.checked.focused .next-checkbox-inner{border-color:#eee;background:#fafafa}.next-checkbox-wrapper.disabled.checked.focused .next-checkbox-inner>.next-icon{color:#ccc;opacity:1}.next-checkbox-wrapper.disabled .next-checkbox-label{color:#ccc;cursor:not-allowed}.next-checkbox-group .next-checkbox-wrapper{display:inline-block;margin-right:12px}.next-checkbox-group .next-checkbox-wrapper:last-child{margin-right:0}.next-checkbox-group-ver .next-checkbox-wrapper{display:block;margin-left:0;margin-right:0;margin-bottom:8px}.next-checkbox-label{font-size:14px;color:#333;vertical-align:middle;margin:0 4px;line-height:1}.next-collapse[dir=rtl] .next-collapse-panel-title{padding:8px 36px 8px 0}.next-collapse[dir=rtl] .next-collapse-panel-icon{left:inherit;right:12px;transform:rotate(180deg);margin-left:0;margin-right:0}.next-collapse[dir=rtl] .next-collapse-panel-icon .next-icon-remote,.next-collapse[dir=rtl] .next-collapse-panel-icon:before{width:16px;font-size:16px;line-height:inherit}.next-collapse{border:1px solid #e6e6e6;border-radius:3px}.next-collapse,.next-collapse *,.next-collapse :after,.next-collapse :before{box-sizing:border-box}.next-collapse:focus,.next-collapse :focus{outline:0}.next-collapse-panel:not(:first-child){border-top:1px solid #e6e6e6}.next-collapse .next-collapse-panel-icon{position:absolute;color:#333;transition:transform .1s linear;left:12px;margin-top:-2px;margin-left:0;margin-right:0}.next-collapse .next-collapse-panel-icon .next-icon-remote,.next-collapse .next-collapse-panel-icon:before{width:16px;font-size:16px;line-height:inherit}.next-collapse-panel-title{position:relative;line-height:1.5;background:#f9f9f9;font-size:14px;font-weight:400;color:#333;cursor:pointer;padding:8px 0 8px 36px;transition:background .1s linear}.next-collapse-panel-title:hover{background:#f5f5f5;color:#333;font-weight:400}.next-collapse-panel-title:hover .next-collapse-panel-icon{color:#333}.next-collapse-panel-content{height:0;line-height:1.5;padding:0 16px;background:#fff;font-size:14px;color:#666;transition:all .3s ease;opacity:0}.next-collapse-panel-expanded>.next-collapse-panel-content{display:block;padding:12px 16px;height:auto;opacity:1}.next-collapse .next-collapse-unfold-icon:before{content:""}.next-collapse-panel-hidden>.next-collapse-panel-content{overflow:hidden}.next-collapse .next-collapse-panel-icon:before{content:""}.next-collapse .next-collapse-panel-icon.next-collapse-panel-icon-expanded{transform:rotate(90deg);margin-left:0;margin-right:0}.next-collapse .next-collapse-panel-icon.next-collapse-panel-icon-expanded .next-icon-remote,.next-collapse .next-collapse-panel-icon.next-collapse-panel-icon-expanded:before{width:16px;font-size:16px;line-height:inherit}.next-collapse-disabled,.next-collapse-panel-disabled:not(:first-child){border-color:#eee}.next-collapse-panel-disabled>.next-collapse-panel-title{cursor:not-allowed;color:#ccc;background:#f9f9f9}.next-collapse-panel-disabled .next-collapse-panel-icon{color:#ccc}.next-collapse-panel-disabled .next-collapse-panel-title:hover{font-weight:400}.next-collapse-panel-disabled .next-collapse-panel-title:hover .next-collapse-panel-icon{color:#ccc}.next-collapse-panel-disabled:hover{color:#ccc;background:#f9f9f9}.next-time-picker-menu{float:left;text-align:center}.next-time-picker-menu:not(:last-child){border-right:1px solid #ddd}.next-time-picker-menu-title{cursor:default;height:28px;line-height:28px;font-size:12px;font-weight:400;color:#999;background:#fff}.next-time-picker-menu ul{position:relative;overflow-y:auto;list-style:none;margin:0;padding:0;font-size:12px;height:196px}.next-time-picker-menu-item{cursor:pointer;height:28px;line-height:28px;transition:background .1s linear;color:#666;background:#fff;outline:none}.next-time-picker-menu-item:hover{color:#333;background:#f9f9f9}.next-time-picker-menu-item.next-selected{font-weight:700;color:#666;background:#f9f9f9}.next-time-picker-menu-item.next-disabled{cursor:not-allowed;color:#ccc;background:#fff}.next-time-picker-panel,.next-time-picker-panel *,.next-time-picker-panel :after,.next-time-picker-panel :before{box-sizing:border-box}.next-time-picker-panel:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-time-picker-panel-header{border-bottom:1px solid #e6e6e6}.next-time-picker-panel-input.next-input{width:100%;padding:6px;border-color:transparent;vertical-align:middle}.next-time-picker-panel-col-3 .next-time-picker-menu{width:33.3333333333%}.next-time-picker-panel-col-2 .next-time-picker-menu{width:50%}.next-time-picker-panel-col-1 .next-time-picker-menu{width:100%}.next-time-picker-body[dir=rtl] .next-time-picker-menu{float:right}.next-time-picker-body[dir=rtl] .next-time-picker-menu:not(:last-child){border-right:none;border-left:1px solid #ddd}.next-time-picker{display:inline-block;width:200px}.next-time-picker,.next-time-picker *,.next-time-picker :after,.next-time-picker :before{box-sizing:border-box}.next-time-picker-trigger .next-input{width:100%}.next-time-picker-body{overflow:hidden;width:200px;border:1px solid #e6e6e6;border-radius:3px;background:#fff;box-shadow:none}.next-time-picker-symbol-clock-icon:before{content:""}.next-range-picker-panel-input-separator,.next-range-picker-trigger-separator{cursor:default;display:inline-block;text-align:center;color:#ccc;width:16px;font-size:12px;vertical-align:middle}.next-date-picker,.next-month-picker,.next-week-picker,.next-year-picker{display:inline-block;width:200px}.next-date-picker-input,.next-month-picker-input,.next-week-picker-input,.next-year-picker-input{width:100%}.next-date-picker-body,.next-month-picker-body,.next-week-picker-body,.next-year-picker-body{width:288px}.next-date-picker-panel-input.next-input,.next-month-picker-panel-input.next-input,.next-week-picker-panel-input.next-input,.next-year-picker-panel-input.next-input{width:100%;background:transparent}.next-date-picker-body.next-date-picker-body-show-time .next-date-picker-panel-input.next-input{width:49%}.next-date-picker-body.next-date-picker-body-show-time .next-date-picker-panel-input.next-input:first-child{margin-right:2%}.next-range-picker{display:inline-block;width:336px}.next-range-picker-input{width:100%}.next-range-picker-trigger{border:1px solid #ddd;background-color:#fff}.next-range-picker-trigger:hover{border-color:#ccc;background-color:#fff}.next-range-picker-trigger.next-error{border-color:#d23c26}.next-range-picker-trigger-input.next-input{height:auto;width:calc(50% - 8px)}.next-range-picker.next-disabled .next-range-picker-trigger{color:#ccc;border-color:#eee;background-color:#fafafa;cursor:not-allowed}.next-range-picker.next-disabled .next-range-picker-trigger:hover{border-color:#eee;background-color:#fafafa}.next-range-picker.next-large .next-range-picker-panel-input,.next-range-picker.next-large .next-range-picker-trigger,.next-range-picker.next-medium .next-range-picker-panel-input,.next-range-picker.next-medium .next-range-picker-trigger,.next-range-picker.next-small .next-range-picker-panel-input,.next-range-picker.next-small .next-range-picker-trigger{border-radius:3px}.next-range-picker-body{width:600px}.next-range-picker-panel-input-end-date.next-input,.next-range-picker-panel-input-start-date.next-input{width:calc(50% - 8px)}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-end-date,.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-end-time,.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-start-date,.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-start-time{width:calc(25% - 8px)}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-start-date{margin-right:8px}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-end-time{margin-left:8px}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time-end,.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time-start{width:50%;float:left}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time-start{border-right:1px solid #e6e6e6}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time-end{border-left:1px solid #e6e6e6}.next-date-picker-body[dir=rtl] .next-date-picker-panel-footer{text-align:left}.next-date-picker-body[dir=rtl] .next-date-picker-panel-footer>.next-btn:not(:last-child){margin-right:0;margin-left:16px}.next-date-picker-body[dir=rtl].next-date-picker-body-show-time .next-date-picker-panel-input.next-input:first-child{margin-left:2%;margin-right:0}.next-date-picker-body[dir=rtl].next-date-picker-body-show-time .next-time-picker-menu{float:right}.next-date-picker-body[dir=rtl].next-date-picker-body-show-time .next-time-picker-menu:not(:last-child){border-right:none;border-left:1px solid #ddd}.next-range-picker-body[dir=rtl] .next-range-picker-panel-input{text-align:right}.next-range-picker-body[dir=rtl] .next-date-picker-panel-footer{text-align:left}.next-range-picker-body[dir=rtl] .next-date-picker-panel-footer>.next-btn:not(:last-child){margin-right:0;margin-left:16px}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-input-start-date{margin-right:0;margin-left:8px}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-input-end-time{margin-left:0;margin-right:8px}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-time-end,.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-time-start{float:right}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-time-start{border-right:none;border-left:1px solid #e6e6e6}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-time-end{border-left:none;border-right:1px solid #e6e6e6}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-time-picker-menu{float:right}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-time-picker-menu:not(:last-child){border-right:none;border-left:1px solid #ddd}.next-date-picker,.next-date-picker *,.next-date-picker :after,.next-date-picker :before,.next-month-picker,.next-month-picker *,.next-month-picker :after,.next-month-picker :before,.next-range-picker,.next-range-picker *,.next-range-picker :after,.next-range-picker :before,.next-week-picker,.next-week-picker *,.next-week-picker :after,.next-week-picker :before,.next-year-picker,.next-year-picker *,.next-year-picker :after,.next-year-picker :before{box-sizing:border-box}.next-date-picker-body,.next-month-picker-body,.next-range-picker-body,.next-week-picker-body,.next-year-picker-body{border:1px solid #e6e6e6;border-radius:3px;box-shadow:none;background:#fff}.next-date-picker-panel-header,.next-month-picker-panel-header,.next-range-picker-panel-header,.next-week-picker-panel-header,.next-year-picker-panel-header{padding:6px;text-align:center}.next-date-picker-panel-time,.next-month-picker-panel-time,.next-range-picker-panel-time,.next-week-picker-panel-time,.next-year-picker-panel-time{border-top:1px solid #e6e6e6}.next-date-picker-panel-footer,.next-month-picker-panel-footer,.next-range-picker-panel-footer,.next-week-picker-panel-footer,.next-year-picker-panel-footer{text-align:right;padding:8px 20px;border-top:1px solid #e6e6e6}.next-date-picker-panel-footer>.next-btn:not(:last-child),.next-date-picker-panel-tools>.next-btn:not(:last-child),.next-month-picker-panel-footer>.next-btn:not(:last-child),.next-month-picker-panel-tools>.next-btn:not(:last-child),.next-range-picker-panel-footer>.next-btn:not(:last-child),.next-range-picker-panel-tools>.next-btn:not(:last-child),.next-week-picker-panel-footer>.next-btn:not(:last-child),.next-week-picker-panel-tools>.next-btn:not(:last-child),.next-year-picker-panel-footer>.next-btn:not(:last-child),.next-year-picker-panel-tools>.next-btn:not(:last-child){margin-right:16px}.next-date-picker-panel-tools,.next-month-picker-panel-tools,.next-range-picker-panel-tools,.next-week-picker-panel-tools,.next-year-picker-panel-tools{float:left}.next-date-picker .next-calendar-panel-header,.next-month-picker .next-calendar-panel-header,.next-range-picker .next-calendar-panel-header,.next-week-picker .next-calendar-panel-header,.next-year-picker .next-calendar-panel-header{margin-left:-1px;margin-right:-1px}.next-date-picker .next-input input,.next-month-picker .next-input input,.next-range-picker .next-input input,.next-week-picker .next-input input,.next-year-picker .next-input input{vertical-align:baseline}.next-date-picker-symbol-calendar-icon:before,.next-month-picker-symbol-calendar-icon:before,.next-range-picker-symbol-calendar-icon:before,.next-week-picker-symbol-calendar-icon:before,.next-year-picker-symbol-calendar-icon:before{content:""}.next-range-picker-panel-body .next-calendar{display:inline-block;width:50%}.next-message{position:relative;display:block;vertical-align:baseline;animation-duration:.3s;animation-timing-function:ease-in-out}.next-message,.next-message *,.next-message :after,.next-message :before{box-sizing:border-box}.next-message:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-message .next-message-close{color:#999;font-size:0;position:absolute;cursor:pointer}.next-message .next-message-close .next-icon-close{width:12px;height:12px;line-height:1em}.next-message .next-message-close .next-icon-close:before{width:12px;height:12px;font-size:12px;line-height:1em}.next-message .next-message-close:hover{color:#666}.next-message.next-message-success.next-inline{background-color:#e5fff5;border-color:#e5fff5;box-shadow:none;border-style:solid}.next-message.next-message-success.next-inline .next-message-title{color:#333}.next-message.next-message-success.next-inline .next-message-content{color:#666}.next-message.next-message-success.next-inline .next-message-symbol{color:#1ad78c}.next-message.next-message-success.next-inline .next-message-symbol-icon:before{content:""}.next-message.next-message-success.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-success.next-addon .next-message-title{color:#333}.next-message.next-message-success.next-addon .next-message-content{color:#666}.next-message.next-message-success.next-addon .next-message-symbol{color:#1ad78c}.next-message.next-message-success.next-addon .next-message-symbol-icon:before{content:""}.next-message.next-message-success.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-success.next-toast .next-message-title{color:#333}.next-message.next-message-success.next-toast .next-message-content{color:#666}.next-message.next-message-success.next-toast .next-message-symbol{color:#1ad78c}.next-message.next-message-success.next-toast .next-message-symbol-icon:before{content:""}.next-message.next-message-warning.next-inline{background-color:#fff9e0;border-color:#fff9e0;box-shadow:none;border-style:solid}.next-message.next-message-warning.next-inline .next-message-title{color:#333}.next-message.next-message-warning.next-inline .next-message-content{color:#666}.next-message.next-message-warning.next-inline .next-message-symbol{color:#f1c826}.next-message.next-message-warning.next-inline .next-message-symbol-icon:before{content:""}.next-message.next-message-warning.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-warning.next-addon .next-message-title{color:#333}.next-message.next-message-warning.next-addon .next-message-content{color:#666}.next-message.next-message-warning.next-addon .next-message-symbol{color:#f1c826}.next-message.next-message-warning.next-addon .next-message-symbol-icon:before{content:""}.next-message.next-message-warning.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-warning.next-toast .next-message-title{color:#333}.next-message.next-message-warning.next-toast .next-message-content{color:#666}.next-message.next-message-warning.next-toast .next-message-symbol{color:#f1c826}.next-message.next-message-warning.next-toast .next-message-symbol-icon:before{content:""}.next-message.next-message-error.next-inline{background-color:#ffece4;border-color:#ffece4;box-shadow:none;border-style:solid}.next-message.next-message-error.next-inline .next-message-title{color:#333}.next-message.next-message-error.next-inline .next-message-content{color:#666}.next-message.next-message-error.next-inline .next-message-symbol{color:#d23c26}.next-message.next-message-error.next-inline .next-message-symbol-icon:before{content:""}.next-message.next-message-error.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-error.next-addon .next-message-title{color:#333}.next-message.next-message-error.next-addon .next-message-content{color:#666}.next-message.next-message-error.next-addon .next-message-symbol{color:#d23c26}.next-message.next-message-error.next-addon .next-message-symbol-icon:before{content:""}.next-message.next-message-error.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-error.next-toast .next-message-title{color:#333}.next-message.next-message-error.next-toast .next-message-content{color:#666}.next-message.next-message-error.next-toast .next-message-symbol{color:#d23c26}.next-message.next-message-error.next-toast .next-message-symbol-icon:before{content:""}.next-message.next-message-notice.next-inline{background-color:#e4f3fe;border-color:#e4f3fe;box-shadow:none;border-style:solid}.next-message.next-message-notice.next-inline .next-message-title{color:#333}.next-message.next-message-notice.next-inline .next-message-content{color:#666}.next-message.next-message-notice.next-inline .next-message-symbol{color:#298dff}.next-message.next-message-notice.next-inline .next-message-symbol-icon:before{content:""}.next-message.next-message-notice.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-notice.next-addon .next-message-title{color:#333}.next-message.next-message-notice.next-addon .next-message-content{color:#666}.next-message.next-message-notice.next-addon .next-message-symbol{color:#298dff}.next-message.next-message-notice.next-addon .next-message-symbol-icon:before{content:""}.next-message.next-message-notice.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-notice.next-toast .next-message-title{color:#333}.next-message.next-message-notice.next-toast .next-message-content{color:#666}.next-message.next-message-notice.next-toast .next-message-symbol{color:#298dff}.next-message.next-message-notice.next-toast .next-message-symbol-icon:before{content:""}.next-message.next-message-help.next-inline{background-color:#fff9e0;border-color:#fff9e0;box-shadow:none;border-style:solid}.next-message.next-message-help.next-inline .next-message-title{color:#333}.next-message.next-message-help.next-inline .next-message-content{color:#666}.next-message.next-message-help.next-inline .next-message-symbol{color:#f1c826}.next-message.next-message-help.next-inline .next-message-symbol-icon:before{content:""}.next-message.next-message-help.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-help.next-addon .next-message-title{color:#333}.next-message.next-message-help.next-addon .next-message-content{color:#666}.next-message.next-message-help.next-addon .next-message-symbol{color:#f1c826}.next-message.next-message-help.next-addon .next-message-symbol-icon:before{content:""}.next-message.next-message-help.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-help.next-toast .next-message-title{color:#333}.next-message.next-message-help.next-toast .next-message-content{color:#666}.next-message.next-message-help.next-toast .next-message-symbol{color:#f1c826}.next-message.next-message-help.next-toast .next-message-symbol-icon:before{content:""}.next-message.next-message-loading.next-inline{background-color:#fff;border-color:#fff;box-shadow:none;border-style:solid}.next-message.next-message-loading.next-inline .next-message-title{color:#333}.next-message.next-message-loading.next-inline .next-message-content{color:#666}.next-message.next-message-loading.next-inline .next-message-symbol{color:#209bfa}.next-message.next-message-loading.next-inline .next-message-symbol-icon:before{content:"";animation:loadingCircle 1s linear infinite}.next-message.next-message-loading.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-loading.next-addon .next-message-title{color:#333}.next-message.next-message-loading.next-addon .next-message-content{color:#666}.next-message.next-message-loading.next-addon .next-message-symbol{color:#209bfa}.next-message.next-message-loading.next-addon .next-message-symbol-icon:before{content:"";animation:loadingCircle 1s linear infinite}.next-message.next-message-loading.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-loading.next-toast .next-message-title{color:#333}.next-message.next-message-loading.next-toast .next-message-content{color:#666}.next-message.next-message-loading.next-toast .next-message-symbol{color:#209bfa}.next-message.next-message-loading.next-toast .next-message-symbol-icon:before{content:"";animation:loadingCircle 1s linear infinite}.next-message.next-medium{border-width:1px;padding:12px}.next-message.next-medium .next-message-symbol{float:left;line-height:16px}.next-message.next-medium .next-message-symbol .next-icon-remote,.next-message.next-medium .next-message-symbol:before{width:16px;font-size:16px;line-height:inherit}.next-message.next-medium .next-message-title{padding:0 20px 0 24px;font-size:16px;line-height:16px}.next-message.next-medium .next-message-content{margin-top:8px;padding:0 20px 0 24px;font-size:14px;line-height:1.5}.next-message.next-medium .next-message-symbol+.next-message-content{margin-top:0}.next-message.next-medium.next-only-content .next-message-content,.next-message.next-medium.next-title-content .next-message-title{line-height:16px}.next-message.next-medium .next-message-close{top:12px;right:12px}.next-message.next-medium.next-inline,.next-message.next-medium.next-toast{border-radius:3px}.next-message.next-large{border-width:2px;padding:16px}.next-message.next-large .next-message-symbol{float:left;line-height:24px}.next-message.next-large .next-message-symbol .next-icon-remote,.next-message.next-large .next-message-symbol:before{width:24px;font-size:24px;line-height:inherit}.next-message.next-large .next-message-title{padding:0 20px 0 36px;font-size:20px;line-height:20px}.next-message.next-large .next-message-content{margin-top:8px;padding:0 20px 0 36px;font-size:14px;line-height:1.5}.next-message.next-large .next-message-symbol+.next-message-content{margin-top:0}.next-message.next-large.next-only-content .next-message-content,.next-message.next-large.next-title-content .next-message-title{line-height:24px}.next-message.next-large .next-message-close{top:16px;right:16px}.next-message.next-large.next-inline,.next-message.next-large.next-toast{border-radius:3px}.next-message[dir=rtl] .next-message-symbol{float:right}.next-message[dir=rtl].next-medium .next-message-title{padding:0 24px 0 20px}.next-message[dir=rtl].next-medium .next-message-close{left:12px;right:auto}.next-message[dir=rtl].next-large .next-message-title{padding:0 36px 0 20px}.next-message[dir=rtl].next-large .next-message-close{left:16px;right:auto}.next-message-wrapper-v2{margin:0;padding:0;position:fixed;left:0;z-index:1001;width:100%;pointer-events:none}.next-message-list{padding:8px;text-align:center}.next-message-list .next-message{display:inline-block;pointer-events:all}.next-message-fade-leave{animation-duration:.3s;animation-play-state:paused;animation-fill-mode:both;animation-timing-function:ease}.next-message-fade-leave.next-message-fade-leave-active{animation-name:MessageFadeOut;animation-play-state:running}@keyframes MessageFadeOut{0%{max-height:150px;margin-bottom:16px;opacity:1}to{max-height:0;margin-bottom:0;padding-top:0;padding-bottom:0;opacity:0}}.next-dialog[dir=rtl],.next-dialog[dir=rtl] .next-dialog-footer.next-align-left{text-align:right}.next-dialog[dir=rtl] .next-dialog-footer.next-align-center{text-align:center}.next-dialog[dir=rtl] .next-dialog-footer.next-align-right{text-align:left}.next-dialog[dir=rtl] .next-dialog-btn+.next-dialog-btn{margin-right:4px;margin-left:0}.next-dialog[dir=rtl] .next-dialog-close{left:12px;right:auto}.next-dialog{position:fixed;z-index:1001;background:#fff;border:1px solid #e6e6e6;border-radius:6px;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);text-align:left;overflow:hidden;max-width:90%}.next-dialog,.next-dialog *,.next-dialog :after,.next-dialog :before{box-sizing:border-box}.next-dialog-header{padding:12px 20px;border-bottom:0 solid transparent;font-size:16px;font-weight:400;background:transparent;color:#333}.next-dialog-body{padding:20px;font-size:14px;line-height:1.5;color:#666}.next-dialog-body-no-footer{margin-bottom:0}.next-dialog-body-no-padding{padding:0}.next-dialog-footer{padding:12px 20px;border-top:0 solid transparent;background:transparent}.next-dialog-footer.next-align-left{text-align:left}.next-dialog-footer.next-align-center{text-align:center}.next-dialog-footer.next-align-right{text-align:right}.next-dialog-footer-fixed-height{position:absolute;width:100%;bottom:0}.next-dialog-btn+.next-dialog-btn{margin-left:4px}.next-dialog-close{position:absolute;top:12px;right:12px;width:16px;cursor:pointer}.next-dialog-close,.next-dialog-close:link,.next-dialog-close:visited{height:16px;color:#999}.next-dialog-close:hover{background:transparent;color:#333}.next-dialog-close .next-dialog-close-icon.next-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px;width:16px;height:16px;line-height:1em}.next-dialog-close .next-dialog-close-icon.next-icon:before{width:16px;height:16px;font-size:16px;line-height:1em}.next-dialog-container{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1001;padding:40px;overflow:auto;text-align:center;box-sizing:border-box}.next-dialog-container:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.next-dialog-container .next-dialog{display:inline-block;position:relative;vertical-align:middle}.next-dialog-quick .next-dialog-body{padding:20px}.next-dialog .next-dialog-message.next-message{min-width:300px;padding:0}.next-dialog-wrapper{position:fixed;top:0;left:0;bottom:0;right:0;overflow:auto}.next-dialog-inner-wrapper{display:flex;position:relative;top:100px;pointer-events:none;padding-bottom:24px}.next-dialog-v2{pointer-events:auto;margin:0 auto}.next-dialog-v2 .next-dialog-header{word-break:break-word;padding-right:40px}.next-dialog-v2 .next-dialog-body{padding-right:40px}.next-dialog-v2 .next-dialog-header+.next-dialog-body{padding:20px}.next-dialog-v2 .next-dialog-header+.next-dialog-body-no-footer{margin-bottom:0}.next-dialog-v2 .next-dialog-body.next-dialog-body-no-padding{padding:0}.next-dialog.next-dialog-v2{position:relative}.next-dialog-centered{text-align:center}.next-dialog-centered:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:""}.next-dialog-centered .next-dialog-v2{margin:40px 0;display:inline-block;text-align:left;vertical-align:middle}.next-drawer{position:fixed;z-index:1001;background:#fff;border:1px solid #e6e6e6;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);overflow:auto;animation-duration:.3s;animation-timing-function:ease-in-out}.next-drawer,.next-drawer *,.next-drawer :after,.next-drawer :before{box-sizing:border-box}.next-drawer-left,.next-drawer-right{height:100%;max-width:80%;width:240px}.next-drawer-bottom,.next-drawer-top{width:100%}.next-drawer-header{padding:12px 20px;border-bottom:1px solid #e6e6e6;font-size:16px;background:#fff;color:#333}.next-drawer-no-title{padding:0;border-bottom:0}.next-drawer-body{padding:20px;font-size:14px;line-height:1.5;color:#666}.next-drawer-close{position:absolute;top:12px;right:12px;width:16px;cursor:pointer}.next-drawer-close,.next-drawer-close:link,.next-drawer-close:visited{height:16px;color:#999}.next-drawer-close:hover{background:transparent;color:#333}.next-drawer-close .next-drawer-close-icon.next-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px;width:16px;height:16px;line-height:1em}.next-drawer-close .next-drawer-close-icon.next-icon:before{width:16px;height:16px;font-size:16px;line-height:1em}.next-drawer-wrapper{position:fixed}.next-drawer-wrapper .next-drawer-v2{position:static;width:100%;height:100%}.next-drawer-wrapper .next-drawer-content{display:flex;flex-flow:column nowrap;width:100%;height:100%}.next-drawer-wrapper .next-drawer-header{display:flex;align-items:center;justify-content:space-between}.next-drawer-wrapper .next-drawer-body{flex-grow:1;overflow:auto;word-wrap:break-word;font-size:14px}.next-drawer-wrapper.next-drawer-right{width:400px;right:0;top:0;height:100%}.next-drawer-wrapper.next-drawer-right .next-drawer-v2{height:100%}.next-drawer-wrapper.next-drawer-left{width:400px;left:0;top:0;height:100%}.next-drawer-wrapper.next-drawer-left .next-drawer-v2{height:100%}.next-drawer-wrapper.next-drawer-top{height:400px;left:0;top:0;width:100%}.next-drawer-wrapper.next-drawer-top .next-drawer-v2{width:100%}.next-drawer-wrapper.next-drawer-bottom{height:400px;left:0;bottom:0;width:100%}.next-drawer-wrapper.next-drawer-bottom .next-drawer-v2{width:100%}.next-row{display:flex}.next-row,.next-row *,.next-row :after,.next-row :before{box-sizing:border-box}.next-row.next-row-wrap{flex-wrap:wrap}@media(min-width:320px){.next-row.next-row-fixed{width:320px}}@media(min-width:480px){.next-row.next-row-fixed{width:480px}}@media(min-width:720px){.next-row.next-row-fixed{width:720px}}@media(min-width:990px){.next-row.next-row-fixed{width:990px}}@media(min-width:1200px){.next-row.next-row-fixed{width:1200px}}@media(min-width:1500px){.next-row.next-row-fixed{width:1500px}}.next-row.next-row-fixed-xxs{width:320px}.next-row.next-row-fixed-xs{width:480px}.next-row.next-row-fixed-s{width:720px}.next-row.next-row-fixed-m{width:990px}.next-row.next-row-fixed-l{width:1200px}.next-row.next-row-fixed-xl{width:1500px}.next-row.next-row-justify-start{justify-content:flex-start}.next-row.next-row-justify-end{justify-content:flex-end}.next-row.next-row-justify-center{justify-content:center}.next-row.next-row-justify-space-between{justify-content:space-between}.next-row.next-row-justify-space-around{justify-content:space-around}.next-row.next-row-align-top{align-items:flex-start}.next-row.next-row-align-bottom{align-items:flex-end}.next-row.next-row-align-center{align-items:center}.next-row.next-row-align-baseline{align-items:baseline}.next-row.next-row-align-stretch{align-items:stretch}.next-col{flex:1}.next-col.next-col-top{align-self:flex-start}.next-col.next-col-bottom{align-self:flex-end}.next-col.next-col-center{align-self:center}@media (min-width:0\0)and (min-resolution:0.001dpcm){.next-row{display:table;width:100%}.next-col{display:table-cell;vertical-align:top}}.next-col-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-24{flex:0 0 100%;width:100%;max-width:100%}@media(min-width:320px){.next-col-xxs-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-xxs-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-xxs-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-xxs-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-xxs-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-xxs-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-xxs-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-xxs-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-xxs-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-xxs-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-xxs-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-xxs-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-xxs-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-xxs-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-xxs-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-xxs-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-xxs-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-xxs-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-xxs-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-xxs-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-xxs-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-xxs-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-xxs-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-xxs-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:480px){.next-col-xs-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-xs-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-xs-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-xs-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-xs-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-xs-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-xs-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-xs-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-xs-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-xs-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-xs-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-xs-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-xs-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-xs-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-xs-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-xs-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-xs-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-xs-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-xs-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-xs-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-xs-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-xs-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-xs-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-xs-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:720px){.next-col-s-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-s-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-s-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-s-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-s-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-s-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-s-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-s-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-s-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-s-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-s-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-s-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-s-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-s-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-s-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-s-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-s-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-s-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-s-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-s-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-s-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-s-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-s-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-s-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:990px){.next-col-m-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-m-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-m-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-m-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-m-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-m-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-m-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-m-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-m-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-m-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-m-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-m-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-m-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-m-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-m-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-m-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-m-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-m-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-m-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-m-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-m-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-m-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-m-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-m-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:1200px){.next-col-l-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-l-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-l-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-l-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-l-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-l-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-l-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-l-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-l-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-l-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-l-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-l-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-l-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-l-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-l-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-l-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-l-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-l-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-l-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-l-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-l-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-l-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-l-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-l-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:1500px){.next-col-xl-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-xl-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-xl-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-xl-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-xl-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-xl-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-xl-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-xl-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-xl-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-xl-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-xl-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-xl-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-xl-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-xl-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-xl-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-xl-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-xl-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-xl-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-xl-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-xl-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-xl-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-xl-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-xl-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-xl-24{flex:0 0 100%;width:100%;max-width:100%}}.next-col-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-5p5{flex:0 0 100%;width:100%;max-width:100%}@media(min-width:320px){.next-col-xxs-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-xxs-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-xxs-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-xxs-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-xxs-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:480px){.next-col-xs-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-xs-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-xs-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-xs-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-xs-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:720px){.next-col-s-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-s-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-s-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-s-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-s-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:990px){.next-col-m-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-m-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-m-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-m-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-m-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:1200px){.next-col-l-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-l-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-l-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-l-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-l-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:1500px){.next-col-xl-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-xl-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-xl-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-xl-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-xl-5p5{flex:0 0 100%;width:100%;max-width:100%}}.next-col-fixed-1{flex:0 0 20px;width:20px;max-width:20px}.next-col-fixed-2{flex:0 0 40px;width:40px;max-width:40px}.next-col-fixed-3{flex:0 0 60px;width:60px;max-width:60px}.next-col-fixed-4{flex:0 0 80px;width:80px;max-width:80px}.next-col-fixed-5{flex:0 0 100px;width:100px;max-width:100px}.next-col-fixed-6{flex:0 0 120px;width:120px;max-width:120px}.next-col-fixed-7{flex:0 0 140px;width:140px;max-width:140px}.next-col-fixed-8{flex:0 0 160px;width:160px;max-width:160px}.next-col-fixed-9{flex:0 0 180px;width:180px;max-width:180px}.next-col-fixed-10{flex:0 0 200px;width:200px;max-width:200px}.next-col-fixed-11{flex:0 0 220px;width:220px;max-width:220px}.next-col-fixed-12{flex:0 0 240px;width:240px;max-width:240px}.next-col-fixed-13{flex:0 0 260px;width:260px;max-width:260px}.next-col-fixed-14{flex:0 0 280px;width:280px;max-width:280px}.next-col-fixed-15{flex:0 0 300px;width:300px;max-width:300px}.next-col-fixed-16{flex:0 0 320px;width:320px;max-width:320px}.next-col-fixed-17{flex:0 0 340px;width:340px;max-width:340px}.next-col-fixed-18{flex:0 0 360px;width:360px;max-width:360px}.next-col-fixed-19{flex:0 0 380px;width:380px;max-width:380px}.next-col-fixed-20{flex:0 0 400px;width:400px;max-width:400px}.next-col-fixed-21{flex:0 0 420px;width:420px;max-width:420px}.next-col-fixed-22{flex:0 0 440px;width:440px;max-width:440px}.next-col-fixed-23{flex:0 0 460px;width:460px;max-width:460px}.next-col-fixed-24{flex:0 0 480px;width:480px;max-width:480px}.next-col-fixed-25{flex:0 0 500px;width:500px;max-width:500px}.next-col-fixed-26{flex:0 0 520px;width:520px;max-width:520px}.next-col-fixed-27{flex:0 0 540px;width:540px;max-width:540px}.next-col-fixed-28{flex:0 0 560px;width:560px;max-width:560px}.next-col-fixed-29{flex:0 0 580px;width:580px;max-width:580px}.next-col-fixed-30{flex:0 0 600px;width:600px;max-width:600px}.next-col-offset-1{margin-left:4.1666666667%}.next-col-offset-2{margin-left:8.3333333333%}.next-col-offset-3{margin-left:12.5%}.next-col-offset-4{margin-left:16.6666666667%}.next-col-offset-5{margin-left:20.8333333333%}.next-col-offset-6{margin-left:25%}.next-col-offset-7{margin-left:29.1666666667%}.next-col-offset-8{margin-left:33.3333333333%}.next-col-offset-9{margin-left:37.5%}.next-col-offset-10{margin-left:41.6666666667%}.next-col-offset-11{margin-left:45.8333333333%}.next-col-offset-12{margin-left:50%}.next-col-offset-13{margin-left:54.1666666667%}.next-col-offset-14{margin-left:58.3333333333%}.next-col-offset-15{margin-left:62.5%}.next-col-offset-16{margin-left:66.6666666667%}.next-col-offset-17{margin-left:70.8333333333%}.next-col-offset-18{margin-left:75%}.next-col-offset-19{margin-left:79.1666666667%}.next-col-offset-20{margin-left:83.3333333333%}.next-col-offset-21{margin-left:87.5%}.next-col-offset-22{margin-left:91.6666666667%}.next-col-offset-23{margin-left:95.8333333333%}.next-col-offset-24{margin-left:100%}@media(min-width:320px){.next-col-xxs-offset-1{margin-left:4.1666666667%}.next-col-xxs-offset-2{margin-left:8.3333333333%}.next-col-xxs-offset-3{margin-left:12.5%}.next-col-xxs-offset-4{margin-left:16.6666666667%}.next-col-xxs-offset-5{margin-left:20.8333333333%}.next-col-xxs-offset-6{margin-left:25%}.next-col-xxs-offset-7{margin-left:29.1666666667%}.next-col-xxs-offset-8{margin-left:33.3333333333%}.next-col-xxs-offset-9{margin-left:37.5%}.next-col-xxs-offset-10{margin-left:41.6666666667%}.next-col-xxs-offset-11{margin-left:45.8333333333%}.next-col-xxs-offset-12{margin-left:50%}.next-col-xxs-offset-13{margin-left:54.1666666667%}.next-col-xxs-offset-14{margin-left:58.3333333333%}.next-col-xxs-offset-15{margin-left:62.5%}.next-col-xxs-offset-16{margin-left:66.6666666667%}.next-col-xxs-offset-17{margin-left:70.8333333333%}.next-col-xxs-offset-18{margin-left:75%}.next-col-xxs-offset-19{margin-left:79.1666666667%}.next-col-xxs-offset-20{margin-left:83.3333333333%}.next-col-xxs-offset-21{margin-left:87.5%}.next-col-xxs-offset-22{margin-left:91.6666666667%}.next-col-xxs-offset-23{margin-left:95.8333333333%}.next-col-xxs-offset-24{margin-left:100%}}@media(min-width:480px){.next-col-xs-offset-1{margin-left:4.1666666667%}.next-col-xs-offset-2{margin-left:8.3333333333%}.next-col-xs-offset-3{margin-left:12.5%}.next-col-xs-offset-4{margin-left:16.6666666667%}.next-col-xs-offset-5{margin-left:20.8333333333%}.next-col-xs-offset-6{margin-left:25%}.next-col-xs-offset-7{margin-left:29.1666666667%}.next-col-xs-offset-8{margin-left:33.3333333333%}.next-col-xs-offset-9{margin-left:37.5%}.next-col-xs-offset-10{margin-left:41.6666666667%}.next-col-xs-offset-11{margin-left:45.8333333333%}.next-col-xs-offset-12{margin-left:50%}.next-col-xs-offset-13{margin-left:54.1666666667%}.next-col-xs-offset-14{margin-left:58.3333333333%}.next-col-xs-offset-15{margin-left:62.5%}.next-col-xs-offset-16{margin-left:66.6666666667%}.next-col-xs-offset-17{margin-left:70.8333333333%}.next-col-xs-offset-18{margin-left:75%}.next-col-xs-offset-19{margin-left:79.1666666667%}.next-col-xs-offset-20{margin-left:83.3333333333%}.next-col-xs-offset-21{margin-left:87.5%}.next-col-xs-offset-22{margin-left:91.6666666667%}.next-col-xs-offset-23{margin-left:95.8333333333%}.next-col-xs-offset-24{margin-left:100%}}@media(min-width:720px){.next-col-s-offset-1{margin-left:4.1666666667%}.next-col-s-offset-2{margin-left:8.3333333333%}.next-col-s-offset-3{margin-left:12.5%}.next-col-s-offset-4{margin-left:16.6666666667%}.next-col-s-offset-5{margin-left:20.8333333333%}.next-col-s-offset-6{margin-left:25%}.next-col-s-offset-7{margin-left:29.1666666667%}.next-col-s-offset-8{margin-left:33.3333333333%}.next-col-s-offset-9{margin-left:37.5%}.next-col-s-offset-10{margin-left:41.6666666667%}.next-col-s-offset-11{margin-left:45.8333333333%}.next-col-s-offset-12{margin-left:50%}.next-col-s-offset-13{margin-left:54.1666666667%}.next-col-s-offset-14{margin-left:58.3333333333%}.next-col-s-offset-15{margin-left:62.5%}.next-col-s-offset-16{margin-left:66.6666666667%}.next-col-s-offset-17{margin-left:70.8333333333%}.next-col-s-offset-18{margin-left:75%}.next-col-s-offset-19{margin-left:79.1666666667%}.next-col-s-offset-20{margin-left:83.3333333333%}.next-col-s-offset-21{margin-left:87.5%}.next-col-s-offset-22{margin-left:91.6666666667%}.next-col-s-offset-23{margin-left:95.8333333333%}.next-col-s-offset-24{margin-left:100%}}@media(min-width:990px){.next-col-m-offset-1{margin-left:4.1666666667%}.next-col-m-offset-2{margin-left:8.3333333333%}.next-col-m-offset-3{margin-left:12.5%}.next-col-m-offset-4{margin-left:16.6666666667%}.next-col-m-offset-5{margin-left:20.8333333333%}.next-col-m-offset-6{margin-left:25%}.next-col-m-offset-7{margin-left:29.1666666667%}.next-col-m-offset-8{margin-left:33.3333333333%}.next-col-m-offset-9{margin-left:37.5%}.next-col-m-offset-10{margin-left:41.6666666667%}.next-col-m-offset-11{margin-left:45.8333333333%}.next-col-m-offset-12{margin-left:50%}.next-col-m-offset-13{margin-left:54.1666666667%}.next-col-m-offset-14{margin-left:58.3333333333%}.next-col-m-offset-15{margin-left:62.5%}.next-col-m-offset-16{margin-left:66.6666666667%}.next-col-m-offset-17{margin-left:70.8333333333%}.next-col-m-offset-18{margin-left:75%}.next-col-m-offset-19{margin-left:79.1666666667%}.next-col-m-offset-20{margin-left:83.3333333333%}.next-col-m-offset-21{margin-left:87.5%}.next-col-m-offset-22{margin-left:91.6666666667%}.next-col-m-offset-23{margin-left:95.8333333333%}.next-col-m-offset-24{margin-left:100%}}@media(min-width:1200px){.next-col-l-offset-1{margin-left:4.1666666667%}.next-col-l-offset-2{margin-left:8.3333333333%}.next-col-l-offset-3{margin-left:12.5%}.next-col-l-offset-4{margin-left:16.6666666667%}.next-col-l-offset-5{margin-left:20.8333333333%}.next-col-l-offset-6{margin-left:25%}.next-col-l-offset-7{margin-left:29.1666666667%}.next-col-l-offset-8{margin-left:33.3333333333%}.next-col-l-offset-9{margin-left:37.5%}.next-col-l-offset-10{margin-left:41.6666666667%}.next-col-l-offset-11{margin-left:45.8333333333%}.next-col-l-offset-12{margin-left:50%}.next-col-l-offset-13{margin-left:54.1666666667%}.next-col-l-offset-14{margin-left:58.3333333333%}.next-col-l-offset-15{margin-left:62.5%}.next-col-l-offset-16{margin-left:66.6666666667%}.next-col-l-offset-17{margin-left:70.8333333333%}.next-col-l-offset-18{margin-left:75%}.next-col-l-offset-19{margin-left:79.1666666667%}.next-col-l-offset-20{margin-left:83.3333333333%}.next-col-l-offset-21{margin-left:87.5%}.next-col-l-offset-22{margin-left:91.6666666667%}.next-col-l-offset-23{margin-left:95.8333333333%}.next-col-l-offset-24{margin-left:100%}}@media(min-width:1500px){.next-col-xl-offset-1{margin-left:4.1666666667%}.next-col-xl-offset-2{margin-left:8.3333333333%}.next-col-xl-offset-3{margin-left:12.5%}.next-col-xl-offset-4{margin-left:16.6666666667%}.next-col-xl-offset-5{margin-left:20.8333333333%}.next-col-xl-offset-6{margin-left:25%}.next-col-xl-offset-7{margin-left:29.1666666667%}.next-col-xl-offset-8{margin-left:33.3333333333%}.next-col-xl-offset-9{margin-left:37.5%}.next-col-xl-offset-10{margin-left:41.6666666667%}.next-col-xl-offset-11{margin-left:45.8333333333%}.next-col-xl-offset-12{margin-left:50%}.next-col-xl-offset-13{margin-left:54.1666666667%}.next-col-xl-offset-14{margin-left:58.3333333333%}.next-col-xl-offset-15{margin-left:62.5%}.next-col-xl-offset-16{margin-left:66.6666666667%}.next-col-xl-offset-17{margin-left:70.8333333333%}.next-col-xl-offset-18{margin-left:75%}.next-col-xl-offset-19{margin-left:79.1666666667%}.next-col-xl-offset-20{margin-left:83.3333333333%}.next-col-xl-offset-21{margin-left:87.5%}.next-col-xl-offset-22{margin-left:91.6666666667%}.next-col-xl-offset-23{margin-left:95.8333333333%}.next-col-xl-offset-24{margin-left:100%}}.next-col-offset-fixed-1{margin-left:20px}.next-col-offset-fixed-2{margin-left:40px}.next-col-offset-fixed-3{margin-left:60px}.next-col-offset-fixed-4{margin-left:80px}.next-col-offset-fixed-5{margin-left:100px}.next-col-offset-fixed-6{margin-left:120px}.next-col-offset-fixed-7{margin-left:140px}.next-col-offset-fixed-8{margin-left:160px}.next-col-offset-fixed-9{margin-left:180px}.next-col-offset-fixed-10{margin-left:200px}.next-col-offset-fixed-11{margin-left:220px}.next-col-offset-fixed-12{margin-left:240px}.next-col-offset-fixed-13{margin-left:260px}.next-col-offset-fixed-14{margin-left:280px}.next-col-offset-fixed-15{margin-left:300px}.next-col-offset-fixed-16{margin-left:320px}.next-col-offset-fixed-17{margin-left:340px}.next-col-offset-fixed-18{margin-left:360px}.next-col-offset-fixed-19{margin-left:380px}.next-col-offset-fixed-20{margin-left:400px}.next-col-offset-fixed-21{margin-left:420px}.next-col-offset-fixed-22{margin-left:440px}.next-col-offset-fixed-23{margin-left:460px}.next-col-offset-fixed-24{margin-left:480px}.next-col-offset-fixed-25{margin-left:500px}.next-col-offset-fixed-26{margin-left:520px}.next-col-offset-fixed-27{margin-left:540px}.next-col-offset-fixed-28{margin-left:560px}.next-col-offset-fixed-29{margin-left:580px}.next-col-offset-fixed-30{margin-left:600px}.next-col-offset-fixed-xxs-1{margin-left:20px}.next-col-offset-fixed-xxs-2{margin-left:40px}.next-col-offset-fixed-xxs-3{margin-left:60px}.next-col-offset-fixed-xxs-4{margin-left:80px}.next-col-offset-fixed-xxs-5{margin-left:100px}.next-col-offset-fixed-xxs-6{margin-left:120px}.next-col-offset-fixed-xxs-7{margin-left:140px}.next-col-offset-fixed-xxs-8{margin-left:160px}.next-col-offset-fixed-xxs-9{margin-left:180px}.next-col-offset-fixed-xxs-10{margin-left:200px}.next-col-offset-fixed-xxs-11{margin-left:220px}.next-col-offset-fixed-xxs-12{margin-left:240px}.next-col-offset-fixed-xxs-13{margin-left:260px}.next-col-offset-fixed-xxs-14{margin-left:280px}.next-col-offset-fixed-xxs-15{margin-left:300px}.next-col-offset-fixed-xxs-16{margin-left:320px}.next-col-offset-fixed-xxs-17{margin-left:340px}.next-col-offset-fixed-xxs-18{margin-left:360px}.next-col-offset-fixed-xxs-19{margin-left:380px}.next-col-offset-fixed-xxs-20{margin-left:400px}.next-col-offset-fixed-xxs-21{margin-left:420px}.next-col-offset-fixed-xxs-22{margin-left:440px}.next-col-offset-fixed-xxs-23{margin-left:460px}.next-col-offset-fixed-xxs-24{margin-left:480px}.next-col-offset-fixed-xxs-25{margin-left:500px}.next-col-offset-fixed-xxs-26{margin-left:520px}.next-col-offset-fixed-xxs-27{margin-left:540px}.next-col-offset-fixed-xxs-28{margin-left:560px}.next-col-offset-fixed-xxs-29{margin-left:580px}.next-col-offset-fixed-xxs-30{margin-left:600px}.next-col-offset-fixed-xs-1{margin-left:20px}.next-col-offset-fixed-xs-2{margin-left:40px}.next-col-offset-fixed-xs-3{margin-left:60px}.next-col-offset-fixed-xs-4{margin-left:80px}.next-col-offset-fixed-xs-5{margin-left:100px}.next-col-offset-fixed-xs-6{margin-left:120px}.next-col-offset-fixed-xs-7{margin-left:140px}.next-col-offset-fixed-xs-8{margin-left:160px}.next-col-offset-fixed-xs-9{margin-left:180px}.next-col-offset-fixed-xs-10{margin-left:200px}.next-col-offset-fixed-xs-11{margin-left:220px}.next-col-offset-fixed-xs-12{margin-left:240px}.next-col-offset-fixed-xs-13{margin-left:260px}.next-col-offset-fixed-xs-14{margin-left:280px}.next-col-offset-fixed-xs-15{margin-left:300px}.next-col-offset-fixed-xs-16{margin-left:320px}.next-col-offset-fixed-xs-17{margin-left:340px}.next-col-offset-fixed-xs-18{margin-left:360px}.next-col-offset-fixed-xs-19{margin-left:380px}.next-col-offset-fixed-xs-20{margin-left:400px}.next-col-offset-fixed-xs-21{margin-left:420px}.next-col-offset-fixed-xs-22{margin-left:440px}.next-col-offset-fixed-xs-23{margin-left:460px}.next-col-offset-fixed-xs-24{margin-left:480px}.next-col-offset-fixed-xs-25{margin-left:500px}.next-col-offset-fixed-xs-26{margin-left:520px}.next-col-offset-fixed-xs-27{margin-left:540px}.next-col-offset-fixed-xs-28{margin-left:560px}.next-col-offset-fixed-xs-29{margin-left:580px}.next-col-offset-fixed-xs-30{margin-left:600px}.next-col-offset-fixed-s-1{margin-left:20px}.next-col-offset-fixed-s-2{margin-left:40px}.next-col-offset-fixed-s-3{margin-left:60px}.next-col-offset-fixed-s-4{margin-left:80px}.next-col-offset-fixed-s-5{margin-left:100px}.next-col-offset-fixed-s-6{margin-left:120px}.next-col-offset-fixed-s-7{margin-left:140px}.next-col-offset-fixed-s-8{margin-left:160px}.next-col-offset-fixed-s-9{margin-left:180px}.next-col-offset-fixed-s-10{margin-left:200px}.next-col-offset-fixed-s-11{margin-left:220px}.next-col-offset-fixed-s-12{margin-left:240px}.next-col-offset-fixed-s-13{margin-left:260px}.next-col-offset-fixed-s-14{margin-left:280px}.next-col-offset-fixed-s-15{margin-left:300px}.next-col-offset-fixed-s-16{margin-left:320px}.next-col-offset-fixed-s-17{margin-left:340px}.next-col-offset-fixed-s-18{margin-left:360px}.next-col-offset-fixed-s-19{margin-left:380px}.next-col-offset-fixed-s-20{margin-left:400px}.next-col-offset-fixed-s-21{margin-left:420px}.next-col-offset-fixed-s-22{margin-left:440px}.next-col-offset-fixed-s-23{margin-left:460px}.next-col-offset-fixed-s-24{margin-left:480px}.next-col-offset-fixed-s-25{margin-left:500px}.next-col-offset-fixed-s-26{margin-left:520px}.next-col-offset-fixed-s-27{margin-left:540px}.next-col-offset-fixed-s-28{margin-left:560px}.next-col-offset-fixed-s-29{margin-left:580px}.next-col-offset-fixed-s-30{margin-left:600px}.next-col-offset-fixed-m-1{margin-left:20px}.next-col-offset-fixed-m-2{margin-left:40px}.next-col-offset-fixed-m-3{margin-left:60px}.next-col-offset-fixed-m-4{margin-left:80px}.next-col-offset-fixed-m-5{margin-left:100px}.next-col-offset-fixed-m-6{margin-left:120px}.next-col-offset-fixed-m-7{margin-left:140px}.next-col-offset-fixed-m-8{margin-left:160px}.next-col-offset-fixed-m-9{margin-left:180px}.next-col-offset-fixed-m-10{margin-left:200px}.next-col-offset-fixed-m-11{margin-left:220px}.next-col-offset-fixed-m-12{margin-left:240px}.next-col-offset-fixed-m-13{margin-left:260px}.next-col-offset-fixed-m-14{margin-left:280px}.next-col-offset-fixed-m-15{margin-left:300px}.next-col-offset-fixed-m-16{margin-left:320px}.next-col-offset-fixed-m-17{margin-left:340px}.next-col-offset-fixed-m-18{margin-left:360px}.next-col-offset-fixed-m-19{margin-left:380px}.next-col-offset-fixed-m-20{margin-left:400px}.next-col-offset-fixed-m-21{margin-left:420px}.next-col-offset-fixed-m-22{margin-left:440px}.next-col-offset-fixed-m-23{margin-left:460px}.next-col-offset-fixed-m-24{margin-left:480px}.next-col-offset-fixed-m-25{margin-left:500px}.next-col-offset-fixed-m-26{margin-left:520px}.next-col-offset-fixed-m-27{margin-left:540px}.next-col-offset-fixed-m-28{margin-left:560px}.next-col-offset-fixed-m-29{margin-left:580px}.next-col-offset-fixed-m-30{margin-left:600px}.next-col-offset-fixed-l-1{margin-left:20px}.next-col-offset-fixed-l-2{margin-left:40px}.next-col-offset-fixed-l-3{margin-left:60px}.next-col-offset-fixed-l-4{margin-left:80px}.next-col-offset-fixed-l-5{margin-left:100px}.next-col-offset-fixed-l-6{margin-left:120px}.next-col-offset-fixed-l-7{margin-left:140px}.next-col-offset-fixed-l-8{margin-left:160px}.next-col-offset-fixed-l-9{margin-left:180px}.next-col-offset-fixed-l-10{margin-left:200px}.next-col-offset-fixed-l-11{margin-left:220px}.next-col-offset-fixed-l-12{margin-left:240px}.next-col-offset-fixed-l-13{margin-left:260px}.next-col-offset-fixed-l-14{margin-left:280px}.next-col-offset-fixed-l-15{margin-left:300px}.next-col-offset-fixed-l-16{margin-left:320px}.next-col-offset-fixed-l-17{margin-left:340px}.next-col-offset-fixed-l-18{margin-left:360px}.next-col-offset-fixed-l-19{margin-left:380px}.next-col-offset-fixed-l-20{margin-left:400px}.next-col-offset-fixed-l-21{margin-left:420px}.next-col-offset-fixed-l-22{margin-left:440px}.next-col-offset-fixed-l-23{margin-left:460px}.next-col-offset-fixed-l-24{margin-left:480px}.next-col-offset-fixed-l-25{margin-left:500px}.next-col-offset-fixed-l-26{margin-left:520px}.next-col-offset-fixed-l-27{margin-left:540px}.next-col-offset-fixed-l-28{margin-left:560px}.next-col-offset-fixed-l-29{margin-left:580px}.next-col-offset-fixed-l-30{margin-left:600px}.next-col-offset-fixed-xl-1{margin-left:20px}.next-col-offset-fixed-xl-2{margin-left:40px}.next-col-offset-fixed-xl-3{margin-left:60px}.next-col-offset-fixed-xl-4{margin-left:80px}.next-col-offset-fixed-xl-5{margin-left:100px}.next-col-offset-fixed-xl-6{margin-left:120px}.next-col-offset-fixed-xl-7{margin-left:140px}.next-col-offset-fixed-xl-8{margin-left:160px}.next-col-offset-fixed-xl-9{margin-left:180px}.next-col-offset-fixed-xl-10{margin-left:200px}.next-col-offset-fixed-xl-11{margin-left:220px}.next-col-offset-fixed-xl-12{margin-left:240px}.next-col-offset-fixed-xl-13{margin-left:260px}.next-col-offset-fixed-xl-14{margin-left:280px}.next-col-offset-fixed-xl-15{margin-left:300px}.next-col-offset-fixed-xl-16{margin-left:320px}.next-col-offset-fixed-xl-17{margin-left:340px}.next-col-offset-fixed-xl-18{margin-left:360px}.next-col-offset-fixed-xl-19{margin-left:380px}.next-col-offset-fixed-xl-20{margin-left:400px}.next-col-offset-fixed-xl-21{margin-left:420px}.next-col-offset-fixed-xl-22{margin-left:440px}.next-col-offset-fixed-xl-23{margin-left:460px}.next-col-offset-fixed-xl-24{margin-left:480px}.next-col-offset-fixed-xl-25{margin-left:500px}.next-col-offset-fixed-xl-26{margin-left:520px}.next-col-offset-fixed-xl-27{margin-left:540px}.next-col-offset-fixed-xl-28{margin-left:560px}.next-col-offset-fixed-xl-29{margin-left:580px}.next-col-offset-fixed-xl-30{margin-left:600px}.next-col.next-col-hidden{display:none}@media(min-width:320px)and (max-width:479px){.next-col.next-col-xxs-hidden{display:none}}@media(min-width:480px)and (max-width:719px){.next-col.next-col-xs-hidden{display:none}}@media(min-width:720px)and (max-width:989px){.next-col.next-col-s-hidden{display:none}}@media(min-width:990px)and (max-width:1199px){.next-col.next-col-m-hidden{display:none}}@media(min-width:1200px)and (max-width:1499px){.next-col.next-col-l-hidden{display:none}}@media(min-width:1500px){.next-col.next-col-xl-hidden{display:none}}.next-row.next-row-hidden{display:none}@media(min-width:320px)and (max-width:479px){.next-row.next-row-xxs-hidden{display:none}}@media(min-width:480px)and (max-width:719px){.next-row.next-row-xs-hidden{display:none}}@media(min-width:720px)and (max-width:989px){.next-row.next-row-s-hidden{display:none}}@media(min-width:990px)and (max-width:1199px){.next-row.next-row-m-hidden{display:none}}@media(min-width:1200px)and (max-width:1499px){.next-row.next-row-l-hidden{display:none}}@media(min-width:1500px){.next-row.next-row-xl-hidden{display:none}}.next-col-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}@media(min-width:320px){.next-col-xxs-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-xxs-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-xxs-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-xxs-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-xxs-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-xxs-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-xxs-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-xxs-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-xxs-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-xxs-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-xxs-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-xxs-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-xxs-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-xxs-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-xxs-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-xxs-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-xxs-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-xxs-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-xxs-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-xxs-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-xxs-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-xxs-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-xxs-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-xxs-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:480px){.next-col-xs-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-xs-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-xs-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-xs-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-xs-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-xs-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-xs-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-xs-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-xs-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-xs-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-xs-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-xs-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-xs-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-xs-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-xs-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-xs-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-xs-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-xs-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-xs-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-xs-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-xs-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-xs-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-xs-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-xs-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:720px){.next-col-s-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-s-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-s-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-s-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-s-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-s-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-s-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-s-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-s-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-s-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-s-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-s-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-s-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-s-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-s-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-s-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-s-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-s-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-s-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-s-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-s-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-s-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-s-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-s-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:990px){.next-col-m-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-m-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-m-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-m-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-m-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-m-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-m-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-m-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-m-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-m-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-m-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-m-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-m-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-m-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-m-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-m-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-m-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-m-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-m-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-m-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-m-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-m-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-m-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-m-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:1200px){.next-col-l-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-l-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-l-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-l-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-l-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-l-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-l-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-l-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-l-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-l-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-l-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-l-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-l-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-l-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-l-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-l-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-l-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-l-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-l-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-l-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-l-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-l-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-l-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-l-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:1500px){.next-col-xl-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-xl-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-xl-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-xl-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-xl-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-xl-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-xl-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-xl-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-xl-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-xl-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-xl-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-xl-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-xl-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-xl-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-xl-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-xl-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-xl-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-xl-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-xl-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-xl-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-xl-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-xl-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-xl-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-xl-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}.next-col-offset-fixed-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-xxs-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-xxs-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-xxs-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-xxs-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-xxs-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-xxs-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-xxs-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-xxs-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-xxs-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-xxs-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-xxs-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-xxs-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-xxs-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-xxs-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-xxs-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-xxs-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-xxs-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-xxs-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-xxs-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-xxs-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-xxs-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-xxs-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-xxs-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-xxs-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-xxs-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-xxs-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-xxs-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-xxs-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-xxs-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-xxs-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-xs-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-xs-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-xs-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-xs-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-xs-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-xs-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-xs-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-xs-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-xs-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-xs-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-xs-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-xs-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-xs-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-xs-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-xs-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-xs-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-xs-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-xs-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-xs-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-xs-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-xs-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-xs-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-xs-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-xs-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-xs-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-xs-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-xs-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-xs-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-xs-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-xs-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-s-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-s-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-s-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-s-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-s-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-s-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-s-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-s-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-s-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-s-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-s-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-s-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-s-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-s-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-s-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-s-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-s-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-s-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-s-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-s-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-s-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-s-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-s-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-s-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-s-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-s-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-s-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-s-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-s-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-s-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-m-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-m-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-m-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-m-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-m-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-m-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-m-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-m-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-m-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-m-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-m-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-m-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-m-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-m-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-m-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-m-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-m-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-m-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-m-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-m-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-m-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-m-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-m-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-m-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-m-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-m-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-m-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-m-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-m-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-m-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-l-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-l-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-l-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-l-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-l-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-l-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-l-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-l-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-l-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-l-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-l-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-l-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-l-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-l-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-l-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-l-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-l-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-l-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-l-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-l-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-l-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-l-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-l-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-l-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-l-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-l-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-l-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-l-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-l-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-l-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-xl-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-xl-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-xl-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-xl-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-xl-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-xl-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-xl-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-xl-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-xl-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-xl-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-xl-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-xl-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-xl-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-xl-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-xl-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-xl-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-xl-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-xl-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-xl-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-xl-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-xl-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-xl-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-xl-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-xl-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-xl-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-xl-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-xl-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-xl-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-xl-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-xl-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-responsive-grid{box-sizing:border-box;display:grid}.next-responsive-grid *,.next-responsive-grid :after,.next-responsive-grid :before{box-sizing:border-box}.next-responsive-grid-ie{display:block}.next-form,.next-form *,.next-form :after,.next-form :before{box-sizing:border-box}.next-form-preview.next-form-item .next-form-item-label{color:#666}.next-form-preview.next-form-item .next-form-preview{color:#333}.next-form-preview.next-form-item.next-medium .next-form-item-label{font-size:14px;line-height:28px}.next-form-preview.next-form-item.next-small .next-form-item-label{font-size:12px;line-height:20px}.next-form-preview.next-form-item.next-large .next-form-item-label{font-size:16px;line-height:40px}.next-form-responsive-grid .next-form-item-control{flex:1}.next-form-responsive-grid .next-form-item{margin-bottom:0}.next-form-responsive-grid .next-form-item.next-left{display:flex}.next-form-responsive-grid.next-small .next-responsive-grid{gap:16px}.next-form-responsive-grid.next-small .next-form-item.next-left .next-form-item-label{line-height:1.4;margin-top:6px;margin-bottom:6px}.next-form-responsive-grid.next-medium .next-responsive-grid{gap:20px}.next-form-responsive-grid.next-medium .next-form-item.next-left .next-form-item-label{line-height:1.4;margin-top:9px;margin-bottom:9px}.next-form-responsive-grid.next-large .next-responsive-grid{gap:24px}.next-form-responsive-grid.next-large .next-form-item.next-left .next-form-item-label{line-height:1.4;margin-top:12px;margin-bottom:12px}.next-form-item{margin-bottom:16px}.next-form-item.has-error>.next-form-item-control>.next-form-item-help{color:#d23c26}.next-form-item.has-warning>.next-form-item-control>.next-form-item-help{color:#f1c826}.next-form-item .next-form-item-label,.next-form-item .next-form-text-align,.next-form-item p{line-height:32px}.next-form-item .next-form-text-align,.next-form-item p{margin:0}.next-form-item .next-checkbox-group,.next-form-item .next-checkbox-wrapper,.next-form-item .next-radio-group,.next-form-item .next-radio-wrapper,.next-form-item .next-rating{line-height:28px}.next-form-item .next-form-preview{font-size:14px;line-height:28px}.next-form-item .next-form-preview.next-input-textarea>p{font-size:14px;text-align:justify;min-height:19.6px;line-height:1.4;margin-top:4.2px}.next-form-item .next-form-item-label{font-size:14px}.next-form-item .next-form-item-label>label{display:inline-block;line-height:1.5}.next-form-item.next-large{margin-bottom:20px}.next-form-item.next-large .next-form-item-label,.next-form-item.next-large .next-form-text-align,.next-form-item.next-large p{line-height:40px}.next-form-item.next-large .next-checkbox-group,.next-form-item.next-large .next-checkbox-wrapper,.next-form-item.next-large .next-radio-group,.next-form-item.next-large .next-radio-wrapper,.next-form-item.next-large .next-rating{line-height:39px}.next-form-item.next-large .next-form-preview{font-size:16px;line-height:40px}.next-form-item.next-large .next-form-preview.next-input-textarea>p{font-size:16px;text-align:justify;min-height:22.4px;line-height:1.4;margin-top:8.8px}.next-form-item.next-large .next-switch{margin-top:7px}.next-form-item.next-large .next-form-item-label{font-size:16px}.next-form-item.next-small{margin-bottom:12px}.next-form-item.next-small .next-checkbox-group,.next-form-item.next-small .next-checkbox-wrapper,.next-form-item.next-small .next-form-item-label,.next-form-item.next-small .next-form-text-align,.next-form-item.next-small .next-radio-group,.next-form-item.next-small .next-radio-wrapper,.next-form-item.next-small .next-rating,.next-form-item.next-small p{line-height:24px}.next-form-item.next-small .next-form-preview{font-size:12px;line-height:20px}.next-form-item.next-small .next-form-preview.next-input-textarea>p{font-size:12px;text-align:justify;min-height:16.8px;line-height:1.4;margin-top:1.6px}.next-form-item.next-small .next-form-item-label{font-size:12px}.next-form-item.next-top>.next-form-item-label{margin-bottom:2px}.next-form-item.next-inset .next-form-item-label{padding-right:0;padding-left:0;line-height:inherit}.next-form-item-control .next-form-text-align{margin:0}.next-form-item-control>.next-input,.next-form-item-control>.next-input-group,.next-form-item-fullwidth .next-form-item-control>.next-date-picker,.next-form-item-fullwidth .next-form-item-control>.next-input,.next-form-item-fullwidth .next-form-item-control>.next-input-group,.next-form-item-fullwidth .next-form-item-control>.next-month-picker,.next-form-item-fullwidth .next-form-item-control>.next-range-picker,.next-form-item-fullwidth .next-form-item-control>.next-select,.next-form-item-fullwidth .next-form-item-control>.next-time-picker,.next-form-item-fullwidth .next-form-item-control>.next-year-picker{width:100%}.next-form-item-fullwidth .next-form-item-control>.next-date-picker2 .next-date-picker2-input input{width:inherit}.next-form-item-label{display:inline-block;vertical-align:top;color:#666;text-align:right;padding-right:12px}.next-form-item-label label[required]:before{margin-right:4px;content:"*";color:#d23c26}.next-form-item-label.has-colon label:after{content:":";position:relative;top:-.5px;margin:0 0 0 2px}.next-form-item-label.next-left{text-align:left}.next-form-item-label.next-left>label[required]:before{display:none}.next-form-item-label.next-left>label[required]:after{margin-left:4px;content:"*";color:#d23c26}.next-form-item-help{margin-top:4px;font-size:12px;line-height:1.5;color:#999}.next-form.next-inline .next-form-item{display:inline-block;vertical-align:top}.next-form.next-inline .next-form-item.next-left .next-form-item-control{display:inline-block;vertical-align:top;line-height:0}.next-form.next-inline .next-form-item:not(:last-child){margin-right:20px}.next-form.next-inline .next-form-item.next-large:not(:last-child){margin-right:24px}.next-form.next-inline .next-form-item.next-small:not(:last-child){margin-right:16px}@media screen and (min-width:0\0)and (min-resolution:0.001dpcm){.next-form-item.next-left>.next-form-item-label,.next-form.next-inline .next-form-item.next-left .next-form-item-control{display:table-cell}}.next-form[dir=rtl] .next-form-item-label{text-align:left;padding-left:12px;padding-right:0}.next-form[dir=rtl].next-inline .next-form-item:not(:last-child){margin-left:20px;margin-right:0}.next-form[dir=rtl].next-inline .next-form-item.next-large:not(:last-child){margin-left:24px;margin-right:0}.next-form[dir=rtl].next-inline .next-form-item.next-small:not(:last-child){margin-left:16px;margin-right:0}.next-avatar{position:relative;display:inline-block;overflow:hidden;color:#fff;white-space:nowrap;text-align:center;vertical-align:middle;background:#f2f2f2;border:0 solid #fff;box-shadow:none;width:40px;height:40px;line-height:40px;border-radius:50%}.next-avatar-image{background:transparent}.next-avatar-string{position:absolute;left:50%;transform-origin:0 center}.next-avatar-large{width:52px;height:52px;line-height:52px;border-radius:50%}.next-avatar-large-string{position:absolute;left:50%;transform-origin:0 center}.next-avatar-small{width:28px;height:28px;line-height:28px;border-radius:50%}.next-avatar-small-string{position:absolute;left:50%;transform-origin:0 center}.next-avatar-square{border-radius:3px}.next-avatar>img{display:block;width:100%;height:100%;object-fit:cover}.next-select{display:inline-block;position:relative;font-size:0;vertical-align:middle}.next-select,.next-select *,.next-select :after,.next-select :before{box-sizing:border-box}.next-select-trigger{min-width:100px;outline:0;transition:all .1s linear}.next-select-trigger .next-input-label{flex:0 0 auto;width:auto}.next-select-trigger .next-select-values{display:block;width:100%;flex:1 1 0;overflow:hidden}.next-select-trigger .next-select-values>em{font-style:inherit}.next-select-trigger .next-select-values input{padding-left:0;padding-right:0}.next-select-trigger .next-input-control{flex:0 0 auto;width:auto}.next-select-trigger .next-input-control>*{display:inline-block;width:auto}.next-select-trigger .next-input-control>.next-select-arrow{padding-right:0}.next-select-trigger .next-input.next-disabled em{color:#ccc}.next-select-trigger .next-input.next-disabled .next-select-arrow{cursor:not-allowed}.next-select-trigger .next-select-clear{display:none}.next-select-trigger.next-has-clear:hover .next-select-clear{display:inline-block}.next-select-trigger.next-has-clear:hover .next-select-arrow{display:none}.next-select .next-select-inner{display:inline-flex;align-items:center;width:100%;min-width:100px;outline:0;color:#333}.next-select .next-select-inner .next-tag{line-height:1;margin-right:4px;margin-bottom:3px;padding-left:0;padding-right:0}.next-select .next-select-inner .next-input-inner{width:auto}.next-select-trigger-search{position:relative;display:inline-block;vertical-align:top;overflow:hidden;width:100%;max-width:100%}.next-select-trigger-search>input,.next-select-trigger-search>span{display:block;font-size:inherit;font-family:inherit;letter-spacing:inherit;white-space:nowrap;overflow:hidden}.next-select-trigger-search input{position:absolute;background-color:transparent;width:100%;height:100%!important;z-index:1;left:0;border:0;outline:0;margin:0;padding:0;cursor:inherit}.next-select-trigger-search>span{position:relative;visibility:hidden;white-space:pre;max-width:100%;z-index:-1}.next-select-single.next-no-search{cursor:pointer}.next-select-single.next-has-search.next-active .next-select-values>em{display:none}.next-select-single.next-inactive .next-select-values>em+.next-select-trigger-search,.next-select-single.next-no-search .next-select-values>em+.next-select-trigger-search{width:1px;opacity:0;filter:alpha(opacity=0)}.next-select-single .next-select-values{display:inline-flex;align-items:center}.next-select-single .next-select-values>em{vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.next-select-multiple .next-select-compact{position:relative;white-space:nowrap}.next-select-multiple .next-select-compact .next-select-trigger-search{width:auto}.next-select-multiple .next-select-compact .next-select-tag-compact{position:absolute;top:0;right:0;z-index:1;padding:0 4px 0 16px;color:#333;background:linear-gradient(90deg,transparent,#fff 10px)}.next-select-multiple .next-disabled .next-select-tag-compact{background:linear-gradient(90deg,transparent,#fafafa 10px)}.next-select-multiple .next-select-values,.next-select-tag .next-select-values{margin-bottom:-3px;height:auto!important}.next-select-multiple .next-select-trigger-search,.next-select-tag .next-select-trigger-search{margin-bottom:3px}.next-select-multiple .next-tag+.next-select-trigger-search,.next-select-tag .next-tag+.next-select-trigger-search{width:auto;min-width:1px}.next-select-multiple .next-input,.next-select-tag .next-input{height:auto;align-items:start}.next-select-multiple.next-small .next-select-values,.next-select-tag.next-small .next-select-values{min-height:22px;padding-top:4px;padding-bottom:4px;line-height:14px}.next-select-multiple.next-small .next-select-values-compact,.next-select-tag.next-small .next-select-values-compact{height:24px!important}.next-select-multiple.next-small .next-tag,.next-select-tag.next-small .next-tag{border:0;padding-top:0;padding-bottom:0;height:14px}.next-select-multiple.next-small .next-tag-body,.next-select-multiple.next-small .next-tag .next-tag-body,.next-select-multiple.next-small .next-tag .next-tag-close-btn,.next-select-tag.next-small .next-tag-body,.next-select-tag.next-small .next-tag .next-tag-body,.next-select-tag.next-small .next-tag .next-tag-close-btn{line-height:14px}.next-select-multiple.next-small .next-input-control,.next-select-multiple.next-small .next-input-inner,.next-select-multiple.next-small .next-input-label,.next-select-multiple.next-small .next-select-tag-compact,.next-select-tag.next-small .next-input-control,.next-select-tag.next-small .next-input-inner,.next-select-tag.next-small .next-input-label,.next-select-tag.next-small .next-select-tag-compact{line-height:22px}.next-select-multiple.next-medium .next-select-values,.next-select-tag.next-medium .next-select-values{min-height:30px;padding-top:5px;padding-bottom:5px;line-height:20px}.next-select-multiple.next-medium .next-select-values-compact,.next-select-tag.next-medium .next-select-values-compact{height:32px!important}.next-select-multiple.next-medium .next-tag,.next-select-tag.next-medium .next-tag{padding-top:1px;padding-bottom:1px;height:20px}.next-select-multiple.next-medium .next-tag .next-tag-body,.next-select-multiple.next-medium .next-tag .next-tag-close-btn,.next-select-tag.next-medium .next-tag .next-tag-body,.next-select-tag.next-medium .next-tag .next-tag-close-btn{line-height:18px}.next-select-multiple.next-medium .next-input-control,.next-select-multiple.next-medium .next-input-inner,.next-select-multiple.next-medium .next-input-label,.next-select-multiple.next-medium .next-select-tag-compact,.next-select-tag.next-medium .next-input-control,.next-select-tag.next-medium .next-input-inner,.next-select-tag.next-medium .next-input-label,.next-select-tag.next-medium .next-select-tag-compact{line-height:30px}.next-select-multiple.next-large .next-select-values,.next-select-tag.next-large .next-select-values{min-height:38px;padding-top:7px;padding-bottom:7px;line-height:24px}.next-select-multiple.next-large .next-select-values-compact,.next-select-tag.next-large .next-select-values-compact{height:40px!important}.next-select-multiple.next-large .next-tag,.next-select-tag.next-large .next-tag{padding-top:3px;padding-bottom:3px;height:24px}.next-select-multiple.next-large .next-tag .next-tag-body,.next-select-multiple.next-large .next-tag .next-tag-close-btn,.next-select-tag.next-large .next-tag .next-tag-body,.next-select-tag.next-large .next-tag .next-tag-close-btn{line-height:18px}.next-select-multiple.next-large .next-input-control,.next-select-multiple.next-large .next-input-inner,.next-select-multiple.next-large .next-input-label,.next-select-multiple.next-large .next-select-tag-compact,.next-select-tag.next-large .next-input-control,.next-select-tag.next-large .next-input-inner,.next-select-tag.next-large .next-input-label,.next-select-tag.next-large .next-select-tag-compact{line-height:38px}.next-select-auto-complete{width:160px}.next-select-auto-complete .next-input{width:100%}.next-select-auto-complete .next-input .next-input-hint-wrap{padding-right:1px}.next-select-auto-complete .next-input .next-select-arrow{padding-left:0}.next-select.next-active .next-select-arrow .next-icon-arrow-down{transform:rotate(180deg)}.next-select .next-select-unfold-icon:before{content:""}.next-select-symbol-fold:before{content:""}.next-select-arrow{cursor:pointer;width:auto!important;text-align:center;transition:all .1s linear}.next-select-popup-wrap{animation-duration:.3s;animation-timing-function:ease;padding:0}.next-select-spacing-tb{padding:0}.next-select-menu-wrapper{max-height:260px;overflow:auto;border:1px solid #e6e6e6;border-radius:3px;box-shadow:none}.next-select-menu-wrapper .next-select-menu{max-height:none;border:none}.next-select-menu{max-height:260px;overflow:auto}.next-select-menu .next-select-menu-empty-content{padding-left:8px;padding-right:8px;color:#999}.next-select-menu.next-select-auto-complete-menu.next-select-menu-empty{display:none}.next-select-menu .next-menu-item-text .next-icon{vertical-align:middle}.next-select-all{display:block;cursor:pointer;padding:0 8px;margin:0 12px 8px;border-bottom:1px solid #e6e6e6}.next-select-all:hover{color:#2580e7}.next-select-all .next-menu-icon-selected.next-icon{display:inline-block!important;top:auto;color:#209bfa}.next-select-highlight{color:#209bfa;font-size:14px}.next-select-in-ie.next-select-trigger .next-select-values{overflow:visible}.next-select-in-ie.next-select-trigger .next-input-control,.next-select-in-ie.next-select-trigger .next-input-label{width:1px}.next-select-in-ie.next-select-trigger .next-input-control>*{display:table-cell;width:1%}.next-select-in-ie.next-select-trigger .next-select-arrow{display:table-cell}.next-select-in-ie.next-select-trigger .next-select-clear{display:none}.next-select-in-ie.next-select-trigger.next-select-multiple .next-select-inner,.next-select-in-ie.next-select-trigger.next-select-tag .next-select-inner{vertical-align:top}.next-select-in-ie.next-select-trigger .next-select-inner,.next-select-in-ie.next-select-trigger.next-select-single .next-select-values{display:inline-table}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-small .next-select-values{line-height:24px}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-medium .next-select-values{line-height:32px}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-large .next-select-values{line-height:40px}.next-select-in-ie.next-select-trigger .next-select-trigger-search>span{max-width:100px}.next-select-in-ie.next-select-trigger.next-select-single.next-select-in-ie-fixwidth .next-select-values{position:relative}.next-select-in-ie.next-select-trigger.next-select-single.next-select-in-ie-fixwidth .next-select-values>em{position:absolute;display:inline-block;height:100%;line-height:1;vertical-align:middle;overflow:hidden;left:4px;right:0;top:30%}.next-select-in-ie.next-select-trigger.next-select-single.next-inactive .next-select-values>em+.next-select-trigger-search,.next-select-in-ie.next-select-trigger.next-select-single.next-no-search .next-select-values>em+.next-select-trigger-search{filter:alpha(opacity=0);font-size:0}.next-select-in-ie.next-select-trigger.next-no-search .next-select-trigger-search input{color:inherit}@media screen and (-webkit-min-device-pixel-ratio:0){.next-select-multiple .next-select-compact .next-select-tag-compact{background:linear-gradient(90deg,hsla(0,0%,100%,0),#fff 10px)}.next-select-multiple .next-disabled .next-select-tag-compact{background:linear-gradient(90deg,hsla(0,0%,100%,0),#fafafa 10px)}}.next-select.next-select-multiple[dir=rtl] .next-select-compact .next-select-tag-compact{left:0;right:auto;padding:0 16px 0 4px;background:linear-gradient(270deg,hsla(0,0%,100%,0),#fff 10px)}.next-list-header{border-bottom:1px solid #e6e6e6;color:#333}.next-list-footer{border-top:1px solid #e6e6e6;color:#666}.next-list-loading.next-loading{display:block}.next-list-empty{font-size:14px;color:#ccc;padding:32px 0;text-align:center}.next-list-items{margin:0;padding:0;list-style:none}.next-list-item{display:table;display:flex;width:100%;color:#666}.next-list-item-extra,.next-list-item-media{display:table-cell;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;min-width:1px;flex-shrink:0;vertical-align:top}.next-list-item-extra{color:#999}.next-list-item-content{display:table-cell;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;flex:1;width:100%;vertical-align:middle}.next-list-item-title{color:#333}.next-list-medium .next-list-header{padding:16px 0;font-size:20px;font-weight:700}.next-list-medium .next-list-footer{padding:16px 0}.next-list-medium .next-list-item-media{padding-right:8px}.next-list-medium .next-list-item-extra{padding-left:8px}.next-list-medium .next-list-item{font-size:14px;line-height:1.5;padding:16px 0}.next-list-medium .next-list-item-title{font-weight:400;font-size:16px;line-height:1.5}.next-list-small .next-list-header{padding:8px 0;font-size:16px;font-weight:700}.next-list-small .next-list-footer{padding:8px 0}.next-list-small .next-list-item-media{padding-right:8px}.next-list-small .next-list-item-extra{padding-left:8px}.next-list-small .next-list-item{font-size:14px;font-weight:400;line-height:1.3;padding:8px 0}.next-list-small .next-list-item-title{font-size:14px;line-height:1.5}.next-list-divider .next-list-item{border-bottom:1px solid #e6e6e6}.next-list-divider .next-list-item:last-child{border-bottom:none}.next-list[dir=rtl] .next-list-item-media{padding-left:8px;padding-right:0}.next-list[dir=rtl] .next-list-item-extra{padding-right:8px;padding-left:0}.next-list[dir=rtl] .next-list-small .next-list-item-media{padding-left:8px;padding-right:0}.next-list[dir=rtl] .next-list-small .next-list-item-extra{padding-right:8px;padding-left:0}.next-menu-btn{display:inline-block;box-shadow:none}.next-menu-btn-spacing-tb{padding:0}.next-menu-btn .next-icon{transition:transform .1s linear}.next-menu-btn .next-menu-btn-arrow:before{content:""}.next-menu-btn.next-expand .next-menu-btn-arrow{transform:rotate(180deg)}.next-menu-btn-symbol-unfold:before{content:""}.next-menu-btn.next-btn-normal .next-menu-btn-arrow{color:#999}.next-menu-btn.next-btn-normal:hover .next-menu-btn-arrow{color:#333}.next-menu-btn.next-btn-secondary .next-menu-btn-arrow{color:#209bfa}.next-menu-btn.next-btn-secondary:hover .next-menu-btn-arrow{color:#fff}.next-menu-btn.next-btn-secondary.next-btn-text:hover .next-menu-btn-arrow{color:#209bfa}.next-menu-btn.next-btn-primary .next-menu-btn-arrow,.next-menu-btn.next-btn-primary:hover .next-menu-btn-arrow{color:#fff}.next-menu-btn.next-btn-text.next-btn-normal .next-menu-btn-arrow{color:#333}.next-menu-btn.next-btn-text.next-btn-normal:hover .next-menu-btn-arrow{color:#209bfa}.next-menu-btn.next-btn-text.next-btn-primary .next-menu-btn-arrow{color:#298dff}.next-menu-btn.next-btn-text.next-btn-primary:hover .next-menu-btn-arrow{color:#1274e7}.next-menu-btn.next-btn-ghost.next-btn-light .next-menu-btn-arrow{color:#333}.next-menu-btn.next-btn-ghost.next-btn-light:hover .next-menu-btn-arrow{color:#999}.next-menu-btn.next-btn-ghost.next-btn-dark .next-menu-btn-arrow,.next-menu-btn.next-btn-ghost.next-btn-dark:hover .next-menu-btn-arrow{color:#fff}.next-menu-btn.disabled .next-menu-btn-arrow,.next-menu-btn.next-btn-text.disabled .next-menu-btn-arrow,.next-menu-btn.next-btn-text[disabled] .next-menu-btn-arrow,.next-menu-btn[disabled] .next-menu-btn-arrow{color:#ccc}.next-menu-btn[disabled].next-btn-ghost.next-btn-dark .next-menu-btn-arrow{color:hsla(0,0%,100%,.4)}.next-menu-btn[disabled].next-btn-ghost.next-btn-light .next-menu-btn-arrow{color:rgba(0,0,0,.1)}.next-nav{min-width:auto;border-radius:0}.next-nav,.next-nav *,.next-nav :after,.next-nav :before{box-sizing:border-box}.next-nav-icon.next-icon{margin-right:12px;font-weight:inherit}.next-nav-icon.next-icon .next-icon-remote,.next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav-group-label{height:40px;line-height:40px;font-size:14px}.next-nav-item .next-menu-item-text>span,.next-nav-item .next-nav-group-label>span{opacity:1;transition:opacity .1s linear}.next-nav-item .next-menu-item-text>a{text-decoration:none;color:inherit}.next-nav-item.next-focused .next-menu-hoz-icon-arrow.next-icon,.next-nav-item.next-focused .next-menu-icon-arrow.next-icon,.next-nav-item .next-menu-hoz-icon-arrow.next-icon,.next-nav-item .next-menu-icon-arrow.next-icon,.next-nav-item.next-opened .next-menu-hoz-icon-arrow.next-icon,.next-nav-item.next-opened .next-menu-icon-arrow.next-icon,.next-nav-item.next-selected .next-menu-hoz-icon-arrow.next-icon,.next-nav-item.next-selected .next-menu-icon-arrow.next-icon,.next-nav-item:hover .next-menu-hoz-icon-arrow.next-icon,.next-nav-item:hover .next-menu-icon-arrow.next-icon{color:inherit;top:0;transform-origin:center 50%}.next-nav.next-active .next-nav-item:before{position:absolute;transition:all .3s ease;content:""}.next-nav.next-hoz{padding:0;height:44px;line-height:42px;font-size:14px}.next-nav.next-hoz .next-menu-item.next-nav-item{margin-left:0;margin-right:0;padding:0 20px;border-radius:0}.next-nav.next-hoz .next-menu-item,.next-nav.next-hoz .next-menu-sub-menu-wrapper>.next-menu-item{margin-top:0;margin-bottom:0}.next-nav.next-hoz .next-menu-item-inner{height:42px;font-size:14px}.next-nav.next-hoz .next-menu-item.next-nav-item.next-nav-with-title{line-height:1;padding:12px 8px}.next-nav.next-hoz .next-menu-item.next-nav-item.next-nav-with-title .next-menu-item-inner{height:auto;min-height:42px}.next-nav.next-hoz .next-menu-item.next-nav-item.next-nav-with-title .next-nav-text{display:block;line-height:1;margin-top:8px;overflow:hidden;text-overflow:ellipsis}.next-nav.next-hoz .next-nav-group-label .next-menu-item-inner{height:40px;line-height:40px;font-size:14px}.next-nav.next-hoz .next-menu-header{float:left;height:42px}.next-nav.next-hoz .next-menu-footer{float:right;height:42px}.next-nav.next-hoz .next-nav-item:before{width:0;left:50%;height:2px}.next-nav.next-hoz .next-nav-item:hover:before{height:0}.next-nav.next-hoz.next-top .next-nav-item:before{top:-1px}.next-nav.next-hoz.next-bottom .next-nav-item:before{bottom:-1px}.next-nav.next-hoz .next-selected.next-nav-item:before{width:100%;left:0;height:2px}.next-nav.next-ver{padding:0;transition:width .3s ease;line-height:52px;font-size:14px}.next-nav.next-ver .next-menu-item.next-nav-item{margin-left:0;margin-right:0;padding:0 16px;border-radius:0}.next-nav.next-ver .next-menu-item:not(:first-child),.next-nav.next-ver .next-menu-sub-menu-wrapper:not(:first-child)>.next-menu-item{margin-top:0}.next-nav.next-ver .next-menu-item:not(:last-child),.next-nav.next-ver .next-menu-sub-menu-wrapper:not(:last-child)>.next-menu-item{margin-bottom:0}.next-nav.next-ver .next-menu-item-inner{height:52px;font-size:14px}.next-nav.next-ver .next-menu-item.next-nav-item.next-nav-with-title{line-height:1;padding:12px 8px}.next-nav.next-ver .next-menu-item.next-nav-item.next-nav-with-title .next-menu-item-inner{height:auto;min-height:52px}.next-nav.next-ver .next-menu-item.next-nav-item.next-nav-with-title .next-nav-text{display:block;line-height:1;margin-top:8px;overflow:hidden;text-overflow:ellipsis}.next-nav.next-ver .next-nav-group-label .next-menu-item-inner{height:40px;line-height:40px;font-size:14px}.next-nav.next-ver>.next-menu-item:first-child,.next-nav.next-ver>.next-menu-sub-menu-wrapper:first-child>.next-menu-item{margin-top:0}.next-nav.next-ver>.next-menu-item:last-child,.next-nav.next-ver>.next-menu-sub-menu-wrapper:last-child>.next-menu-item{margin-bottom:0}.next-nav.next-ver .next-menu-sub-menu{line-height:52px}.next-nav.next-ver .next-menu-sub-menu .next-menu-item-inner{height:52px;font-size:14px}.next-nav.next-ver .next-nav-item:before{height:0;top:50%;width:2px}.next-nav.next-ver .next-nav-item:hover:before{width:0}.next-nav.next-ver.next-left .next-nav-item:before,.next-nav.next-ver.next-top .next-nav-item:before{left:-1px}.next-nav.next-ver.next-bottom .next-nav-item:before,.next-nav.next-ver.next-right .next-nav-item:before{right:-1px}.next-nav.next-ver .next-selected.next-nav-item:before{height:100%;top:0;width:2px}.next-nav.next-primary{border-width:0;background:#222;border-color:#222;color:#ddd;font-weight:400;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12)}.next-nav.next-primary.next-hoz{line-height:44px}.next-nav.next-primary.next-hoz .next-menu-footer,.next-nav.next-primary.next-hoz .next-menu-header,.next-nav.next-primary.next-hoz .next-menu-item-inner{line-height:44px;height:44px}.next-nav.next-primary.next-hoz.next-top .next-nav-item:before{top:0}.next-nav.next-primary.next-hoz.next-bottom .next-nav-item:before{bottom:0}.next-nav.next-primary.next-ver.next-left .next-nav-item:before{left:0}.next-nav.next-primary.next-ver.next-right .next-nav-item:before{right:0}.next-nav.next-primary .next-nav-item.next-menu-item{background:#222;color:#ddd}.next-nav.next-primary .next-nav-item.next-menu-item.next-focused,.next-nav.next-primary .next-nav-item.next-menu-item:hover{background:#333;color:#fff;font-weight:400}.next-nav.next-primary .next-nav-item.next-menu-item.next-selected{background:#333;color:#fff;font-weight:700}.next-nav.next-primary .next-nav-item.next-menu-item.next-selected.next-nav-item{background:#333;color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item.next-opened{background:#222;color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item.next-child-selected{font-weight:700;background:transparent;color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item.next-child-selected.next-nav-popup,.next-nav.next-primary .next-nav-item.next-menu-item.next-opened.next-nav-popup{color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item:before,.next-nav.next-primary .next-nav-item.next-menu-item:hover:before{background:#209bfa}.next-nav.next-primary .next-menu-sub-menu .next-menu-item.next-opened{background:#222;color:#fff}.next-nav.next-primary .next-nav-group-label{color:#999;font-weight:400}.next-nav.next-primary .next-menu-sub-menu .next-menu-item{background:#151515;color:#ddd;font-weight:400}.next-nav.next-primary .next-menu-sub-menu .next-menu-item.next-focused,.next-nav.next-primary .next-menu-sub-menu .next-menu-item:hover{background:#333;color:#ddd}.next-nav.next-primary .next-menu-sub-menu .next-menu-item.next-selected,.next-nav.next-primary .next-menu-sub-menu .next-menu-item.next-selected.next-nav-item{background:#333;color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled,.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a{color:#ccc;cursor:not-allowed}.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-icon-arrow,.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-icon-selected,.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#ccc}.next-nav.next-secondary{border-width:0;background:#209bfa;border-color:#209bfa;color:#fff;font-weight:400;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12)}.next-nav.next-secondary.next-hoz{line-height:44px}.next-nav.next-secondary.next-hoz .next-menu-footer,.next-nav.next-secondary.next-hoz .next-menu-header,.next-nav.next-secondary.next-hoz .next-menu-item-inner{line-height:44px;height:44px}.next-nav.next-secondary.next-hoz.next-top .next-nav-item:before{top:0}.next-nav.next-secondary.next-hoz.next-bottom .next-nav-item:before{bottom:0}.next-nav.next-secondary.next-ver.next-left .next-nav-item:before{left:0}.next-nav.next-secondary.next-ver.next-right .next-nav-item:before{right:0}.next-nav.next-secondary .next-nav-item.next-menu-item{background:#209bfa;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-focused,.next-nav.next-secondary .next-nav-item.next-menu-item:hover{background:#1274e7;color:#fff;font-weight:400}.next-nav.next-secondary .next-nav-item.next-menu-item.next-selected{background:#1274e7;color:#fff;font-weight:700}.next-nav.next-secondary .next-nav-item.next-menu-item.next-selected.next-nav-item{background:#1274e7;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-opened{background:transparent;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-child-selected{font-weight:700;background:transparent;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-child-selected.next-nav-popup,.next-nav.next-secondary .next-nav-item.next-menu-item.next-opened.next-nav-popup{color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item:before,.next-nav.next-secondary .next-nav-item.next-menu-item:hover:before{background:#1274e7}.next-nav.next-secondary .next-menu-sub-menu .next-menu-item.next-opened{background:transparent;color:#fff}.next-nav.next-secondary .next-nav-group-label{color:#fff;font-weight:400}.next-nav.next-secondary .next-menu-sub-menu .next-menu-item{background:#209bfa;color:#fff;font-weight:400}.next-nav.next-secondary .next-menu-sub-menu .next-menu-item.next-focused,.next-nav.next-secondary .next-menu-sub-menu .next-menu-item.next-selected,.next-nav.next-secondary .next-menu-sub-menu .next-menu-item.next-selected.next-nav-item,.next-nav.next-secondary .next-menu-sub-menu .next-menu-item:hover{background:#1274e7;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled,.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a{color:#add9ff;cursor:not-allowed}.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-icon-arrow,.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-icon-selected,.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#add9ff}.next-nav.next-normal{border-color:#eee;font-weight:400;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12)}.next-nav.next-normal,.next-nav.next-normal .next-nav-item.next-menu-item{background:#fff;color:#666}.next-nav.next-normal .next-nav-item.next-menu-item.next-focused,.next-nav.next-normal .next-nav-item.next-menu-item:hover{background:#fff;color:#333;font-weight:500}.next-nav.next-normal .next-nav-item.next-menu-item.next-selected{background:#e4f3fe;color:#209bfa;font-weight:700}.next-nav.next-normal .next-nav-item.next-menu-item.next-selected.next-nav-item{background:#e4f3fe;color:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item.next-opened{background:transparent;color:#333}.next-nav.next-normal .next-nav-item.next-menu-item.next-child-selected{font-weight:400;background:transparent;color:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item.next-opened.next-nav-popup{color:#333}.next-nav.next-normal .next-nav-item.next-menu-item.next-child-selected.next-nav-popup{color:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item:before{background:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item:hover:before{background:#1b84e0}.next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-opened{background:transparent;color:#333}.next-nav.next-normal .next-nav-group-label{color:#999;font-weight:400}.next-nav.next-normal .next-menu-sub-menu .next-menu-item{background:#fafafa;color:#666;font-weight:400}.next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-focused,.next-nav.next-normal .next-menu-sub-menu .next-menu-item:hover{background:#f9f9f9;color:#298dff}.next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-selected,.next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-selected.next-nav-item{background:#e4f3fe;color:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled,.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a{color:#999;cursor:not-allowed}.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-icon-arrow,.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-icon-selected,.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#999}.next-nav.next-line{background:transparent;border-color:#e6e6e6;color:#333;font-weight:400;box-shadow:none}.next-nav.next-line.next-hoz{border-right-color:transparent}.next-nav.next-line.next-hoz,.next-nav.next-line.next-ver{border-top-color:transparent;border-left-color:transparent}.next-nav.next-line.next-ver{border-bottom-color:transparent}.next-nav.next-line .next-nav-item.next-menu-item{background:transparent;color:#333}.next-nav.next-line .next-nav-item.next-menu-item.next-focused,.next-nav.next-line .next-nav-item.next-menu-item:hover{background:transparent;color:#209bfa;font-weight:400}.next-nav.next-line .next-nav-item.next-menu-item.next-selected{background:transparent;color:#209bfa;font-weight:700}.next-nav.next-line .next-nav-item.next-menu-item.next-opened,.next-nav.next-line .next-nav-item.next-menu-item.next-selected.next-nav-item{background:transparent;color:#209bfa}.next-nav.next-line .next-nav-item.next-menu-item.next-child-selected{font-weight:400;background:transparent;color:#209bfa}.next-nav.next-line .next-nav-item.next-menu-item.next-child-selected.next-nav-popup,.next-nav.next-line .next-nav-item.next-menu-item.next-opened.next-nav-popup{color:#209bfa}.next-nav.next-line .next-nav-item.next-menu-item:before,.next-nav.next-line .next-nav-item.next-menu-item:hover:before{background:#209bfa}.next-nav.next-line .next-menu-sub-menu .next-menu-item.next-opened{background:transparent;color:#209bfa}.next-nav.next-line .next-nav-group-label{color:#999;font-weight:400}.next-nav.next-line .next-menu-sub-menu .next-menu-item{background:transparent;color:#333;font-weight:400}.next-nav.next-line .next-menu-sub-menu .next-menu-item.next-focused,.next-nav.next-line .next-menu-sub-menu .next-menu-item.next-selected,.next-nav.next-line .next-menu-sub-menu .next-menu-item.next-selected.next-nav-item,.next-nav.next-line .next-menu-sub-menu .next-menu-item:hover{background:transparent;color:#209bfa}.next-nav.next-line .next-nav-item.next-menu-item.next-disabled,.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a{color:#999;cursor:not-allowed}.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-icon-arrow,.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-icon-selected,.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#999}.next-nav.next-icon-only.next-icon-only-text{padding-top:4px;padding-bottom:4px}.next-nav.next-icon-only.next-custom-icon-only-width{text-align:center}.next-nav.next-icon-only .next-menu-item-inner{text-overflow:clip}.next-nav.next-icon-only.next-normal .next-nav-icon.next-icon{margin-left:2px;margin-right:2px}.next-nav.next-icon-only.next-normal .next-nav-icon.next-icon .next-icon-remote,.next-nav.next-icon-only.next-normal .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only.next-primary .next-nav-icon.next-icon{margin-left:3px;margin-right:3px}.next-nav.next-icon-only.next-primary .next-nav-icon.next-icon .next-icon-remote,.next-nav.next-icon-only.next-primary .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only.next-secondary .next-nav-icon.next-icon{margin-left:3px;margin-right:3px}.next-nav.next-icon-only.next-secondary .next-nav-icon.next-icon .next-icon-remote,.next-nav.next-icon-only.next-secondary .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only .next-nav-icon-only-arrow.next-icon{margin-left:3px;margin-right:3px;transition:all .1s linear;transform-origin:center 50%}.next-nav.next-icon-only .next-nav-icon-only-arrow.next-icon .next-icon-remote,.next-nav.next-icon-only .next-nav-icon-only-arrow.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down{transform:rotate(180deg);margin-left:3px;margin-right:3px}.next-nav.next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down .next-icon-remote,.next-nav.next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only .next-menu-hoz-icon-arrow,.next-nav.next-icon-only .next-menu-icon-arrow{display:none}.next-nav-embeddable.next-normal,.next-nav-embeddable.next-primary,.next-nav-embeddable.next-secondary{height:100%;background:transparent;box-shadow:none;border:none}.next-nav-embeddable.next-normal .next-menu-sub-menu .next-menu-item,.next-nav-embeddable.next-normal .next-nav-item.next-menu-item,.next-nav-embeddable.next-primary .next-menu-sub-menu .next-menu-item,.next-nav-embeddable.next-primary .next-nav-item.next-menu-item,.next-nav-embeddable.next-secondary .next-menu-sub-menu .next-menu-item,.next-nav-embeddable.next-secondary .next-nav-item.next-menu-item{background:transparent}.next-nav-embeddable.next-normal.next-icon-only .next-nav-icon.next-icon,.next-nav-embeddable.next-primary.next-icon-only .next-nav-icon.next-icon,.next-nav-embeddable.next-secondary.next-icon-only .next-nav-icon.next-icon{margin-left:3px;margin-right:3px}.next-nav-embeddable.next-normal.next-icon-only .next-nav-icon.next-icon .next-icon-remote,.next-nav-embeddable.next-normal.next-icon-only .next-nav-icon.next-icon:before,.next-nav-embeddable.next-primary.next-icon-only .next-nav-icon.next-icon .next-icon-remote,.next-nav-embeddable.next-primary.next-icon-only .next-nav-icon.next-icon:before,.next-nav-embeddable.next-secondary.next-icon-only .next-nav-icon.next-icon .next-icon-remote,.next-nav-embeddable.next-secondary.next-icon-only .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav-embeddable.next-nav.next-hoz .next-menu-item-inner,.next-nav-embeddable.next-nav.next-hoz .next-menu-sub-menu .next-menu-item,.next-nav-embeddable.next-nav.next-hoz .next-nav-item.next-menu-item{height:100%}.next-nav-embeddable,.next-nav-embeddable .next-nav-item.next-disabled,.next-nav-embeddable .next-nav-item.next-disabled .next-menu-item-text>a{background:transparent;border:none}.next-nav[dir=rtl] .next-nav-icon.next-icon{margin-left:12px;margin-right:0}.next-nav[dir=rtl] .next-nav-icon.next-icon .next-icon-remote,.next-nav[dir=rtl] .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav[dir=rtl].next-hoz .next-menu-header{float:right}.next-nav[dir=rtl].next-hoz .next-menu-footer{float:left}.next-nav[dir=rtl].next-hoz .next-nav-item:before{width:0;left:50%}.next-nav[dir=rtl].next-hoz .next-selected.next-nav-item:before{width:100%;left:auto;right:0}.next-nav[dir=rtl].next-ver.next-left .next-nav-item:before{right:0;right:-1px;left:auto}.next-nav[dir=rtl].next-ver.next-right .next-nav-item:before{left:0;left:-1px;right:auto}.next-nav[dir=rtl].next-primary.next-ver.next-left .next-nav-item:before{right:0;left:auto}.next-nav[dir=rtl].next-primary.next-ver.next-right .next-nav-item:before{left:0;right:auto}.next-nav[dir=rtl].next-secondary.next-ver.next-left .next-nav-item:before{right:0;left:auto}.next-nav[dir=rtl].next-secondary.next-ver.next-right .next-nav-item:before{left:0;right:auto}.next-nav[dir=rtl] .next-nav.next-line.next-ver{border-color:transparent}.next-nav[dir=rtl].next-icon-only .next-nav-icon-only-arrow.next-icon,.next-nav[dir=rtl].next-icon-only .next-nav-icon.next-icon,.next-nav[dir=rtl].next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down{margin-left:0;margin-right:-1px}.next-nav[dir=rtl].next-icon-only .next-nav-icon-only-arrow.next-icon .next-icon-remote,.next-nav[dir=rtl].next-icon-only .next-nav-icon-only-arrow.next-icon:before,.next-nav[dir=rtl].next-icon-only .next-nav-icon.next-icon .next-icon-remote,.next-nav[dir=rtl].next-icon-only .next-nav-icon.next-icon:before,.next-nav[dir=rtl].next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down .next-icon-remote,.next-nav[dir=rtl].next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down:before{width:20px;font-size:20px;line-height:inherit}.next-number-picker{display:inline-block}.next-number-picker,.next-number-picker *,.next-number-picker :after,.next-number-picker :before{box-sizing:border-box}.next-number-picker .next-btn{padding:0!important;line-height:0!important;box-shadow:none!important}.next-number-picker-normal .next-input{width:100%}.next-number-picker-normal .next-input .next-input-control{padding-right:0;height:100%}.next-number-picker-normal:not(.next-number-picker-no-trigger) .next-input input{padding-right:2px}.next-number-picker-normal .next-btn{display:block}.next-number-picker-normal .next-btn:hover{z-index:1}.next-number-picker-normal .next-btn:first-child{border-right:none;border-top:none;height:50%;border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.next-number-picker-normal .next-btn:last-child{border-right:none;border-bottom:none;margin-top:-1px;height:calc(50% + 1px);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:0}.next-number-picker-normal .next-number-picker-handler{transition:opacity .1s linear;height:100%;display:block}.next-number-picker-normal:not(.next-number-picker-show-trigger) .next-number-picker-handler{opacity:0}.next-number-picker-normal.hover .next-number-picker-handler,.next-number-picker-normal:hover .next-number-picker-handler{opacity:1}.next-number-picker-normal .next-input.next-disabled .next-number-picker-handler{opacity:0}.next-number-picker-normal .next-number-picker-up-icon:before{content:""}.next-number-picker-normal .next-number-picker-down-icon:before{content:""}.next-number-picker-normal.next-small{width:68px}.next-number-picker-normal.next-small .next-btn{width:20px}.next-number-picker-normal.next-small .next-btn:first-child{border-top-right-radius:3px}.next-number-picker-normal.next-small .next-btn:last-child{border-bottom-right-radius:3px}.next-number-picker-normal.next-small .next-icon .next-icon-remote,.next-number-picker-normal.next-small .next-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-number-picker-normal.next-small .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-number-picker-normal.next-small .next-icon:before{width:16px;font-size:16px}}.next-number-picker-normal.next-medium{width:80px}.next-number-picker-normal.next-medium .next-btn{width:20px}.next-number-picker-normal.next-medium .next-btn:first-child{border-top-right-radius:3px}.next-number-picker-normal.next-medium .next-btn:last-child{border-bottom-right-radius:3px}.next-number-picker-normal.next-medium .next-icon .next-icon-remote,.next-number-picker-normal.next-medium .next-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-number-picker-normal.next-medium .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-number-picker-normal.next-medium .next-icon:before{width:16px;font-size:16px}}.next-number-picker-normal.next-large{width:80px}.next-number-picker-normal.next-large .next-btn{width:20px}.next-number-picker-normal.next-large .next-btn:first-child{border-top-right-radius:3px}.next-number-picker-normal.next-large .next-btn:last-child{border-bottom-right-radius:3px}.next-number-picker-normal.next-large .next-icon .next-icon-remote,.next-number-picker-normal.next-large .next-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-number-picker-normal.next-large .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-number-picker-normal.next-large .next-icon:before{width:16px;font-size:16px}}.next-number-picker-inline input{text-align:center}.next-number-picker-inline .next-input input{padding:0}.next-number-picker-inline .next-number-picker-add-icon:before{content:""}.next-number-picker-inline .next-number-picker-minus-icon:before{content:""}.next-number-picker-inline.next-small{width:68px;min-width:72px}.next-number-picker-inline.next-small .next-icon .next-icon-remote,.next-number-picker-inline.next-small .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-number-picker-inline.next-small .next-btn{height:24px}.next-number-picker-inline.next-small .next-before .next-btn{margin-right:2px;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-number-picker-inline.next-small .next-after .next-btn{margin-left:2px;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-number-picker-inline.next-medium{width:100px;min-width:96px}.next-number-picker-inline.next-medium .next-icon .next-icon-remote,.next-number-picker-inline.next-medium .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-number-picker-inline.next-medium .next-btn{height:32px}.next-number-picker-inline.next-medium .next-before .next-btn{margin-right:2px;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-number-picker-inline.next-medium .next-after .next-btn{margin-left:2px;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-number-picker-inline.next-large{width:128px;min-width:120px}.next-number-picker-inline.next-large .next-icon .next-icon-remote,.next-number-picker-inline.next-large .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-number-picker-inline.next-large .next-btn{height:40px}.next-number-picker-inline.next-large .next-before .next-btn{margin-right:2px;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-number-picker-inline.next-large .next-after .next-btn{margin-left:2px;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-number-picker-inline .next-btn.next-small{width:24px}.next-number-picker-inline .next-btn.next-medium{width:32px}.next-number-picker-inline .next-btn.next-large{width:40px}@-moz-document url-prefix(){.next-number-picker-normal.next-small .next-number-picker-handler{height:22px}.next-number-picker-normal.next-medium .next-number-picker-handler{height:30px}.next-number-picker-normal.next-large .next-number-picker-handler{height:38px}}.next-number-picker-normal[dir=rtl] .next-btn:first-child{border-right:1px solid #ddd;border-left:0;border-top-right-radius:0}.next-number-picker-normal[dir=rtl] .next-btn:first-child.next-large,.next-number-picker-normal[dir=rtl] .next-btn:first-child.next-medium,.next-number-picker-normal[dir=rtl] .next-btn:first-child.next-small{border-top-left-radius:3px}.next-number-picker-normal[dir=rtl] .next-btn:last-child{border-right:1px solid #ddd;border-left:0;border-bottom-right-radius:0}.next-number-picker-normal[dir=rtl] .next-btn:last-child.next-large,.next-number-picker-normal[dir=rtl] .next-btn:last-child.next-medium,.next-number-picker-normal[dir=rtl] .next-btn:last-child.next-small{border-bottom-left-radius:3px}.next-number-picker-normal[dir=rtl] .next-input .next-input-control{padding-left:0}.next-number-picker-inline[dir=rtl] .next-before .next-btn{margin-right:0}.next-number-picker-inline[dir=rtl] .next-before .next-btn.next-large,.next-number-picker-inline[dir=rtl] .next-before .next-btn.next-medium,.next-number-picker-inline[dir=rtl] .next-before .next-btn.next-small{margin-left:2px;border-top-right-radius:3px!important;border-bottom-right-radius:3px!important}.next-number-picker-inline[dir=rtl] .next-after .next-btn{margin-left:0}.next-number-picker-inline[dir=rtl] .next-after .next-btn.next-large,.next-number-picker-inline[dir=rtl] .next-after .next-btn.next-medium,.next-number-picker-inline[dir=rtl] .next-after .next-btn.next-small{margin-right:2px;border-top-left-radius:3px!important;border-bottom-left-radius:3px!important}.next-pagination[dir=rtl] .next-pagination-total{margin-right:0;margin-left:16px}.next-pagination[dir=rtl] .next-pagination-jump-go{margin-left:0;margin-right:4px}.next-pagination[dir=rtl] .next-pagination-size-selector-title{margin-right:0;margin-left:4px}.next-pagination[dir=rtl] .next-pagination-size-selector-btn.next-btn-text+.next-pagination-size-selector-btn{border-left:none;border-right:1px solid #e6e6e6}.next-pagination[dir=rtl] .next-pagination-pages+.next-pagination-size-selector,.next-pagination[dir=rtl] .next-pagination-size-selector+.next-pagination-pages{margin-left:0;margin-right:40px}.next-pagination[dir=rtl].next-start .next-pagination-pages{float:left}.next-pagination[dir=rtl].next-end .next-pagination-pages,.next-pagination[dir=rtl].next-start .next-pagination-size-selector{float:right}.next-pagination[dir=rtl].next-end .next-pagination-size-selector{float:left}.next-pagination[dir=rtl].next-small .next-pagination-list{margin:0 4px}.next-pagination[dir=rtl].next-small .next-pagination-total{line-height:24px;vertical-align:middle}.next-pagination[dir=rtl].next-small .next-pagination-item{padding:0 6px;border-width:1px;border-radius:3px}.next-pagination[dir=rtl].next-small .next-pagination-item+.next-pagination-item{margin:0 4px 0 0}.next-pagination[dir=rtl].next-small .next-pagination-ellipsis{height:24px;line-height:24px;margin-left:8px;margin-right:8px}.next-pagination[dir=rtl].next-small .next-pagination-ellipsis .next-icon-remote,.next-pagination[dir=rtl].next-small .next-pagination-ellipsis:before{width:12px;font-size:12px;line-height:inherit}.next-pagination[dir=rtl].next-small .next-pagination-display,.next-pagination[dir=rtl].next-small .next-pagination-display em,.next-pagination[dir=rtl].next-small .next-pagination-jump-text{font-size:12px}.next-pagination[dir=rtl].next-small .next-pagination-jump-input{width:28px}.next-pagination[dir=rtl].next-small .next-pagination-size-selector-title{height:24px;line-height:24px;font-size:12px;vertical-align:middle}.next-pagination[dir=rtl].next-small .next-pagination-size-selector-btn{padding:0 8px}.next-pagination[dir=rtl].next-small .next-pagination-item.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-small .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination[dir=rtl].next-small .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-small .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination[dir=rtl].next-medium .next-pagination-list{margin:0 4px}.next-pagination[dir=rtl].next-medium .next-pagination-total{line-height:32px;vertical-align:middle}.next-pagination[dir=rtl].next-medium .next-pagination-item{padding:0 10px;border-width:1px;border-radius:3px}.next-pagination[dir=rtl].next-medium .next-pagination-item+.next-pagination-item{margin:0 4px 0 0}.next-pagination[dir=rtl].next-medium .next-pagination-ellipsis{height:32px;line-height:32px;margin-left:8px;margin-right:8px}.next-pagination[dir=rtl].next-medium .next-pagination-ellipsis .next-icon-remote,.next-pagination[dir=rtl].next-medium .next-pagination-ellipsis:before{width:12px;font-size:12px;line-height:inherit}.next-pagination[dir=rtl].next-medium .next-pagination-display,.next-pagination[dir=rtl].next-medium .next-pagination-display em,.next-pagination[dir=rtl].next-medium .next-pagination-jump-text{font-size:14px}.next-pagination[dir=rtl].next-medium .next-pagination-jump-input{width:36px}.next-pagination[dir=rtl].next-medium .next-pagination-size-selector-title{height:32px;line-height:32px;font-size:14px;vertical-align:middle}.next-pagination[dir=rtl].next-medium .next-pagination-size-selector-btn{padding:0 12px}.next-pagination[dir=rtl].next-medium .next-pagination-item.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-medium .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination[dir=rtl].next-medium .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-medium .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination[dir=rtl].next-large .next-pagination-list{margin:0 8px}.next-pagination[dir=rtl].next-large .next-pagination-total{line-height:40px;vertical-align:middle}.next-pagination[dir=rtl].next-large .next-pagination-item{padding:0 15px;border-width:1px;border-radius:3px}.next-pagination[dir=rtl].next-large .next-pagination-item+.next-pagination-item{margin:0 8px 0 0}.next-pagination[dir=rtl].next-large .next-pagination-ellipsis{height:40px;line-height:40px;margin-left:8px;margin-right:8px}.next-pagination[dir=rtl].next-large .next-pagination-ellipsis .next-icon-remote,.next-pagination[dir=rtl].next-large .next-pagination-ellipsis:before{width:16px;font-size:16px;line-height:inherit}.next-pagination[dir=rtl].next-large .next-pagination-display,.next-pagination[dir=rtl].next-large .next-pagination-display em,.next-pagination[dir=rtl].next-large .next-pagination-jump-text{font-size:16px}.next-pagination[dir=rtl].next-large .next-pagination-jump-input{width:48px}.next-pagination[dir=rtl].next-large .next-pagination-size-selector-title{height:40px;line-height:40px;font-size:16px;vertical-align:middle}.next-pagination[dir=rtl].next-large .next-pagination-size-selector-btn{padding:0 16px}.next-pagination[dir=rtl].next-large .next-pagination-item.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-large .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination[dir=rtl].next-large .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-large .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination{font-size:0}.next-pagination,.next-pagination *,.next-pagination :after,.next-pagination :before{box-sizing:border-box}.next-pagination:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-pagination-total{display:inline-block;font-size:14px;margin-right:16px}.next-pagination-pages{display:inline-block}.next-pagination-list{display:inline-block;vertical-align:top}.next-pagination .next-pagination-item:not([disabled]){display:inline-block;border-style:solid;border-color:#ddd;background:#fff;color:#333;box-shadow:none}.next-pagination .next-pagination-item{transition:none}.next-pagination .next-pagination-item.next-current{border-color:#209bfa;background:#209bfa;color:#fff;box-shadow:none}.next-pagination .next-pagination-item.next-current:focus,.next-pagination .next-pagination-item.next-current:hover{border-color:#209bfa;background:#fff;color:#209bfa;box-shadow:none}.next-pagination-ellipsis{display:inline-block;color:#999;vertical-align:top}.next-pagination-display{display:inline-block;margin:0 16px;color:#333;vertical-align:middle}.next-pagination-display em{font-style:normal;color:#209bfa}.next-pagination-jump-text{display:inline-block;vertical-align:middle;color:#999}.next-pagination-jump-input{margin:0 4px;vertical-align:top}.next-pagination-jump-go{margin-left:4px;vertical-align:top}.next-pagination-size-selector{display:inline-block;position:relative}.next-pagination-size-selector-title{margin-right:4px;color:#999}.next-pagination-size-selector-filter{display:inline-block;vertical-align:middle}.next-pagination-size-selector-dropdown{vertical-align:top;min-width:64px}.next-pagination-size-selector-dropdown .next-select-inner,.next-pagination-size-selector-popup{min-width:64px}.next-pagination-size-selector-btn.next-btn-text{height:auto;line-height:normal;color:#666;border-radius:0}.next-pagination-size-selector-btn.next-btn-text.next-current{color:#209bfa}.next-pagination-size-selector-btn.next-btn-text+.next-pagination-size-selector-btn{border-left:1px solid #e6e6e6}.next-pagination-pages+.next-pagination-size-selector,.next-pagination-size-selector+.next-pagination-pages{margin-left:40px}.next-pagination.next-hide{display:none}.next-pagination.next-start .next-pagination-pages{float:right}.next-pagination.next-end .next-pagination-pages,.next-pagination.next-start .next-pagination-size-selector{float:left}.next-pagination.next-end .next-pagination-size-selector{float:right}.next-pagination.next-small .next-pagination-list{margin:0 4px}.next-pagination.next-small .next-pagination-total{line-height:24px;vertical-align:middle}.next-pagination.next-small .next-pagination-item{padding:0 6px;border-width:1px;border-radius:3px}.next-pagination.next-small .next-pagination-item+.next-pagination-item{margin:0 0 0 4px}.next-pagination.next-small .next-pagination-ellipsis{height:24px;line-height:24px;margin-left:8px;margin-right:8px}.next-pagination.next-small .next-pagination-ellipsis .next-icon-remote,.next-pagination.next-small .next-pagination-ellipsis:before{width:12px;font-size:12px;line-height:inherit}.next-pagination.next-small .next-pagination-display,.next-pagination.next-small .next-pagination-display em,.next-pagination.next-small .next-pagination-jump-text{font-size:12px}.next-pagination.next-small .next-pagination-jump-input{width:28px}.next-pagination.next-small .next-pagination-size-selector-title{height:24px;line-height:24px;font-size:12px;vertical-align:middle}.next-pagination.next-small .next-pagination-size-selector-btn{padding:0 8px}.next-pagination.next-small .next-pagination-item.next-next:not([disabled]) i,.next-pagination.next-small .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination.next-small .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination.next-small .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination.next-small.next-arrow-only .next-pagination-item.next-next,.next-pagination.next-small.next-arrow-only .next-pagination-item.next-prev{width:20px;padding:0}.next-pagination.next-small.next-arrow-only .next-pagination-item.next-next .next-icon,.next-pagination.next-small.next-arrow-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-small.next-arrow-prev-only .next-pagination-item.next-prev{width:20px;padding:0}.next-pagination.next-small.next-arrow-prev-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-small.next-no-border .next-pagination-item.next-next,.next-pagination.next-small.next-no-border .next-pagination-item.next-prev{padding:0;border:none;background-color:transparent;box-shadow:none}.next-pagination.next-small.next-no-border .next-pagination-item.next-next .next-icon,.next-pagination.next-small.next-no-border .next-pagination-item.next-prev .next-icon{margin:0}.next-pagination.next-small.next-no-border .next-pagination-item.next-next:not([disabled]):hover i,.next-pagination.next-small.next-no-border .next-pagination-item.next-prev:not([disabled]):hover i{color:#209bfa}.next-pagination.next-small.next-no-border .next-pagination-display{margin:0 8px}.next-pagination.next-small.next-mini .next-pagination-item.next-prev{margin-right:4px}.next-pagination.next-small.next-mini .next-pagination-item.next-next{margin-left:4px}.next-pagination.next-medium .next-pagination-list{margin:0 4px}.next-pagination.next-medium .next-pagination-total{line-height:32px;vertical-align:middle}.next-pagination.next-medium .next-pagination-item{padding:0 10px;border-width:1px;border-radius:3px}.next-pagination.next-medium .next-pagination-item+.next-pagination-item{margin:0 0 0 4px}.next-pagination.next-medium .next-pagination-ellipsis{height:32px;line-height:32px;margin-left:8px;margin-right:8px}.next-pagination.next-medium .next-pagination-ellipsis .next-icon-remote,.next-pagination.next-medium .next-pagination-ellipsis:before{width:12px;font-size:12px;line-height:inherit}.next-pagination.next-medium .next-pagination-display,.next-pagination.next-medium .next-pagination-display em,.next-pagination.next-medium .next-pagination-jump-text{font-size:14px}.next-pagination.next-medium .next-pagination-jump-input{width:36px}.next-pagination.next-medium .next-pagination-size-selector-title{height:32px;line-height:32px;font-size:14px;vertical-align:middle}.next-pagination.next-medium .next-pagination-size-selector-btn{padding:0 12px}.next-pagination.next-medium .next-pagination-item.next-next:not([disabled]) i,.next-pagination.next-medium .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination.next-medium .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination.next-medium .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination.next-medium.next-arrow-only .next-pagination-item.next-next,.next-pagination.next-medium.next-arrow-only .next-pagination-item.next-prev{width:28px;padding:0}.next-pagination.next-medium.next-arrow-only .next-pagination-item.next-next .next-icon,.next-pagination.next-medium.next-arrow-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-medium.next-arrow-prev-only .next-pagination-item.next-prev{width:28px;padding:0}.next-pagination.next-medium.next-arrow-prev-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-medium.next-no-border .next-pagination-item.next-next,.next-pagination.next-medium.next-no-border .next-pagination-item.next-prev{padding:0;border:none;background-color:transparent;box-shadow:none}.next-pagination.next-medium.next-no-border .next-pagination-item.next-next .next-icon,.next-pagination.next-medium.next-no-border .next-pagination-item.next-prev .next-icon{margin:0}.next-pagination.next-medium.next-no-border .next-pagination-item.next-next:not([disabled]):hover i,.next-pagination.next-medium.next-no-border .next-pagination-item.next-prev:not([disabled]):hover i{color:#209bfa}.next-pagination.next-medium.next-no-border .next-pagination-display{margin:0 12px}.next-pagination.next-medium.next-mini .next-pagination-item.next-prev{margin-right:4px}.next-pagination.next-medium.next-mini .next-pagination-item.next-next{margin-left:4px}.next-pagination.next-large .next-pagination-list{margin:0 8px}.next-pagination.next-large .next-pagination-total{line-height:40px;vertical-align:middle}.next-pagination.next-large .next-pagination-item{padding:0 15px;border-width:1px;border-radius:3px}.next-pagination.next-large .next-pagination-item+.next-pagination-item{margin:0 0 0 8px}.next-pagination.next-large .next-pagination-ellipsis{height:40px;line-height:40px;margin-left:8px;margin-right:8px}.next-pagination.next-large .next-pagination-ellipsis .next-icon-remote,.next-pagination.next-large .next-pagination-ellipsis:before{width:16px;font-size:16px;line-height:inherit}.next-pagination.next-large .next-pagination-display,.next-pagination.next-large .next-pagination-display em,.next-pagination.next-large .next-pagination-jump-text{font-size:16px}.next-pagination.next-large .next-pagination-jump-input{width:48px}.next-pagination.next-large .next-pagination-size-selector-title{height:40px;line-height:40px;font-size:16px;vertical-align:middle}.next-pagination.next-large .next-pagination-size-selector-btn{padding:0 16px}.next-pagination.next-large .next-pagination-item.next-next:not([disabled]) i,.next-pagination.next-large .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination.next-large .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination.next-large .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination.next-large.next-arrow-only .next-pagination-item.next-next,.next-pagination.next-large.next-arrow-only .next-pagination-item.next-prev{width:40px;padding:0}.next-pagination.next-large.next-arrow-only .next-pagination-item.next-next .next-icon,.next-pagination.next-large.next-arrow-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-large.next-arrow-prev-only .next-pagination-item.next-prev{width:40px;padding:0}.next-pagination.next-large.next-arrow-prev-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-large.next-no-border .next-pagination-item.next-next,.next-pagination.next-large.next-no-border .next-pagination-item.next-prev{padding:0;border:none;background-color:transparent;box-shadow:none}.next-pagination.next-large.next-no-border .next-pagination-item.next-next .next-icon,.next-pagination.next-large.next-no-border .next-pagination-item.next-prev .next-icon{margin:0}.next-pagination.next-large.next-no-border .next-pagination-item.next-next:not([disabled]):hover i,.next-pagination.next-large.next-no-border .next-pagination-item.next-prev:not([disabled]):hover i{color:#209bfa}.next-pagination.next-large.next-no-border .next-pagination-display{margin:0 16px}.next-pagination.next-large.next-mini .next-pagination-item.next-prev{margin-right:8px}.next-pagination.next-large.next-mini .next-pagination-item.next-next{margin-left:8px}.next-pagination-icon-prev:before{content:""}.next-pagination-icon-next:before{content:""}.next-pagination-icon-ellipsis:before{content:""}.next-paragraph{color:#333}.next-paragraph-short{line-height:1.5}.next-paragraph-long{line-height:1.7}.next-paragraph-medium,.next-paragraph-small{font-size:14px}.next-progress-circle[dir=rtl] .next-progress-circle-container{transform:scaleX(-1)}.next-progress-line[dir=rtl] .next-progress-line-overlay{left:auto;right:0}.next-progress-line,.next-progress-line *,.next-progress-line :after,.next-progress-line :before{box-sizing:border-box}.next-progress-line{width:100%;display:inline-block;position:relative}.next-progress-line-container{display:inline-block;width:100%;vertical-align:middle}.next-progress-line-underlay{position:relative;overflow:hidden;width:100%;background:#f5f5f5}.next-progress-line-overlay{position:absolute;left:0;top:0;transition:all .3s ease}.next-progress-line-overlay-normal{background:#209bfa}.next-progress-line-overlay-success{background:#1ad78c}.next-progress-line-overlay-error,.next-progress-line-overlay-started{background:#d23c26}.next-progress-line-overlay-middle{background:#f1c826}.next-progress-line-overlay-finishing{background:#1ad78c}.next-progress-line.next-small .next-progress-line-underlay{border-radius:12px;height:4px}.next-progress-line.next-small .next-progress-line-overlay{height:4px;border-radius:12px;top:50%;margin-top:-2px}.next-progress-line.next-small .next-progress-line-text{font-size:12px;line-height:4px}.next-progress-line.next-medium .next-progress-line-underlay{border-radius:12px;height:8px}.next-progress-line.next-medium .next-progress-line-overlay{height:8px;border-radius:12px;top:50%;margin-top:-4px}.next-progress-line.next-medium .next-progress-line-text{font-size:12px;line-height:8px}.next-progress-line.next-large .next-progress-line-underlay{border-radius:12px;height:12px}.next-progress-line.next-large .next-progress-line-overlay{height:12px;border-radius:12px;top:50%;margin-top:-6px}.next-progress-line.next-large .next-progress-line-text{font-size:14px;line-height:12px}.next-progress-line-show-info .next-progress-line-container{padding-right:60px;margin-right:-60px}.next-progress-line-show-info .next-progress-line-text{width:50px;text-align:left;margin-left:10px;vertical-align:middle;display:inline-block;color:#333}.next-progress-line-show-border .next-progress-line-underlay{border:1px solid #e6e6e6}.next-progress-line-show-border.next-small .next-progress-line-underlay{border-radius:12px;height:6px}.next-progress-line-show-border.next-small .next-progress-line-overlay{height:4px;border-radius:12px;top:50%;margin-top:-2px}.next-progress-line-show-border.next-small .next-progress-line-text{font-size:12px;line-height:6px}.next-progress-line-show-border.next-medium .next-progress-line-underlay{border-radius:12px;height:10px}.next-progress-line-show-border.next-medium .next-progress-line-overlay{height:8px;border-radius:12px;top:50%;margin-top:-4px}.next-progress-line-show-border.next-medium .next-progress-line-text{font-size:12px;line-height:10px}.next-progress-line-show-border.next-large .next-progress-line-underlay{border-radius:12px;height:14px}.next-progress-line-show-border.next-large .next-progress-line-overlay{height:12px;border-radius:12px;top:50%;margin-top:-6px}.next-progress-line-show-border.next-large .next-progress-line-text{font-size:14px;line-height:14px}.next-progress-circle,.next-progress-circle *,.next-progress-circle :after,.next-progress-circle :before{box-sizing:border-box}.next-progress-circle{position:relative;display:inline-block}.next-progress-circle-underlay{stroke-width:8px;stroke:#f5f5f5}.next-progress-circle-overlay{transition:all .3s ease;stroke-linecap:round;stroke-width:8px}.next-progress-circle-overlay-normal{stroke:#209bfa}.next-progress-circle-overlay-success{stroke:#1ad78c}.next-progress-circle-overlay-error,.next-progress-circle-overlay-started{stroke:#d23c26}.next-progress-circle-overlay-middle{stroke:#f1c826}.next-progress-circle-overlay-finishing{stroke:#1ad78c}.next-progress-circle.next-small{width:100px;height:100px;font-size:20px}.next-progress-circle.next-medium{width:116px;height:116px;font-size:24px}.next-progress-circle.next-large{width:132px;height:132px;font-size:36px}.next-progress-circle-text{display:block;position:absolute;width:100%;top:50%;left:0;text-align:center;line-height:1;-webkit-transform:translateY(-50%);transform:translateY(-50%);transition:transform .3s ease;color:#333}.next-range{width:100%;font-family:inherit;font-weight:400;font-size:inherit;line-height:inherit;vertical-align:baseline;display:flex;flex-direction:column;cursor:pointer}.next-range,.next-range *,.next-range :after,.next-range :before{box-sizing:border-box}.next-range .next-range-inner{position:relative}.next-range .next-range-inner:only-child{margin-top:auto;margin-bottom:auto}.next-range .next-range-track{position:absolute;width:100%;top:50%;border-radius:0}.next-range .next-range-selected{position:absolute;width:0;top:50%;left:0;border-radius:0}.next-range .next-range-scale{position:relative;width:100%;height:12px}.next-range .next-range-scale .next-range-scale-item{position:absolute;left:0;width:2px;border:1px solid;border-radius:0}.next-range .next-range-scale .next-range-scale-item:last-child{margin-left:-2px}.next-range .next-range-slider{position:absolute;top:50%;left:0;border-radius:50%}.next-range .next-range-slider-inner{position:absolute;top:50%;left:50%;border:1px solid #ddd;border-radius:50%;transition:transform .1s linear,border-color .1s linear}.next-range .next-range-frag.next-range-active .next-range-slider .next-range-slider-inner,.next-range .next-range-slider.next-range-slider-moving .next-range-slider-inner{border:2px solid #209bfa;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12);transform:scale(1.2)}.next-range .next-range-mark{position:relative;cursor:auto}.next-range .next-range-mark .next-range-mark-text{position:absolute;left:0;transform:translateX(-50%);padding-left:2px;text-align:center}.next-range .next-range-frag{position:absolute;top:0}.next-range .next-range-frag .next-range-slider{left:0}.next-range .next-range-frag .next-range-slider:nth-child(2){left:100%}.next-range .next-range-frag .next-range-selected{width:100%}.next-range.disabled{cursor:not-allowed}.next-range.disabled .next-range-mark{cursor:auto}.next-range .next-range-track,.next-range .next-range-track:hover{background:#ddd}.next-range .next-range-selected,.next-range .next-range-selected:hover{background:#209bfa}.next-range .next-range-scale .next-range-scale-item{border-color:#ddd;background:#ddd}.next-range .next-range-scale .next-range-scale-item:hover{border-color:#ddd}.next-range .next-range-scale .next-range-scale-item.activated{border-color:#209bfa;background:#209bfa}.next-range .next-range-scale .next-range-scale-item.activated:hover{border-color:#209bfa}.next-range .next-range-slider-inner{background:#fff;border-color:#ddd}.next-range .next-range-slider-inner:hover{background:#fff;box-shadow:20px 20px 30px 0 rgba(0,0,0,.15);transform:scale(1.2)}.next-range .next-range-mark .next-range-mark-text,.next-range .next-range-mark .next-range-mark-text:hover{color:#999}.next-range .next-range-mark .next-range-mark-text.activated,.next-range .next-range-mark .next-range-mark-text.activated:hover{color:#333}.next-range.disabled .next-range-track{background:#ddd}.next-range.disabled .next-range-selected{background:#ccc}.next-range.disabled .next-range-scale-item{border-color:#ddd}.next-range.disabled .next-range-scale-item.activated{border-color:#ccc}.next-range.disabled .next-range-slider-inner{background:#eee;border-color:#eee;transform:none;box-shadow:none}.next-range.disabled .next-range-mark-text{color:#ccc}.next-range.disabled .next-range-mark-text.activated{color:#999}.next-range .next-range-selected,.next-range .next-range-track{height:4px;margin-top:-2px}.next-range .next-range-frag{margin-top:4px;height:4px}.next-range .next-range-slider{box-shadow:1px 1px 3px 0 rgba(0,0,0,.12)}.next-range .next-range-slider,.next-range .next-range-slider-inner{height:16px;width:16px;margin-top:-8px;margin-left:-8px}.next-range .next-range-mark{display:block}.next-range .next-range-mark .next-range-mark-text{font-size:14px;font-weight:400;line-height:20px;height:20px}.next-range .next-range-mark.next-range-mark-below{height:30px}.next-range .next-range-mark.next-range-mark-below .next-range-mark-text{bottom:0}.next-range .next-range-mark.next-range-mark-above{height:30px}.next-range .next-range-scale .next-range-scale-item{height:12px}.next-range.simulation-hover>.next-range-slider-inner{background:#fff;box-shadow:20px 20px 30px 0 rgba(0,0,0,.15);transform:scale(1.2)}.next-range.simulation-hover .next-range-selected{background:#209bfa}.next-range.simulation-hover .next-range-track{background:#ddd}.next-range.simulation-hover .next-range-scale-item{border-color:#ddd}.next-range.simulation-hover .next-range-scale-item.activated{border-color:#209bfa}.next-range.simulation-click>.next-range-slider-inner{border:2px solid #209bfa;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12);transform:scale(1.2)}.next-range[dir=rtl] .next-range-mark{position:relative;cursor:auto}.next-range[dir=rtl] .next-range-mark .next-range-mark-text{position:absolute;right:0;transform:translateX(50%);padding-right:2px;text-align:center}.next-rating[dir=rtl] .next-rating-overlay{right:0;left:auto}.next-rating[dir=rtl] .next-rating-overlay .next-rating-icon,.next-rating[dir=rtl] .next-rating-underlay .next-rating-icon{margin-right:4px;margin-left:0}.next-rating[dir=rtl] .next-rating-overlay .next-rating-icon:last-child,.next-rating[dir=rtl] .next-rating-underlay .next-rating-icon:last-child{margin-left:4px}.next-rating{vertical-align:top;display:inline-block;position:relative}.next-rating:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-rating-base,.next-rating-text{float:left}.next-rating-base-disabled,.next-rating-base-disabled .next-rating-overlay .next-rating-icon,.next-rating-base-disabled .next-rating-underlay .next-rating-icon{cursor:not-allowed}.next-rating-symbol-icon:before{content:""}.next-rating-underlay{white-space:nowrap;overflow:hidden}.next-rating-underlay .next-icon{color:#f2f2f2}.next-rating-stroke-mode .next-rating-underlay .next-icon{color:transparent;-webkit-text-stroke:1px #209bfa}.next-rating-overlay{white-space:nowrap;overflow:hidden;position:absolute;width:0;top:0;left:0}.next-rating-overlay .next-icon{color:#209bfa}.next-rating-overlay .next-rating-icon,.next-rating-underlay .next-rating-icon{cursor:pointer;margin-left:4px}.next-rating-overlay .next-rating-icon:last-child,.next-rating-underlay .next-rating-icon:last-child{margin-right:4px}.next-rating-overlay .next-icon,.next-rating-underlay .next-icon{transition:all .1s linear}.next-rating-overlay .next-icon.hover,.next-rating-underlay .next-icon.hover{transform:scale3d(1.1,1.1,1.1)}.next-rating-overlay .next-icon.clicked,.next-rating-underlay .next-icon.clicked{transform:scale3d(.9,.9,.9)}.next-rating-info{position:absolute;top:calc(100% + 4px);left:0;border:1px solid #f2f2f2;background:#fff;padding:4px 8px 3px;font-size:12px;white-space:nowrap}.next-rating-info:after{position:absolute;content:"";width:4px;height:4px;transform:rotate(45deg);background:#fff;border-color:#f2f2f2 transparent transparent #f2f2f2;border-style:solid;border-width:1px;top:-3px;left:4px}.next-rating.hover,.next-rating:focus .next-rating-base:not(.next-rating-base-disabled){outline:none}.next-rating.hover .next-rating-overlay .next-icon,.next-rating:focus .next-rating-base:not(.next-rating-base-disabled) .next-rating-overlay .next-icon{color:#209bfa}.next-rating-grade-low.hover .next-rating-overlay .next-icon,.next-rating-grade-low .next-rating-overlay .next-icon{color:#666}.next-rating-grade-high.hover .next-rating-overlay .next-icon,.next-rating-grade-high .next-rating-overlay .next-icon{color:#209bfa}.next-rating-small{font-size:12px}.next-rating-small .next-icon .next-icon-remote,.next-rating-small .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-rating-small .next-rating-text{margin-left:8px}.next-rating-medium{font-size:14px}.next-rating-medium .next-icon .next-icon-remote,.next-rating-medium .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-rating-medium .next-rating-text{margin-left:12px}.next-rating-large{font-size:16px}.next-rating-large .next-icon .next-icon-remote,.next-rating-large .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-rating-large .next-rating-text{margin-left:16px}.next-search-simple[dir=rtl].next-large .next-search-icon{margin-left:12px;margin-right:0}.next-search-simple[dir=rtl].next-medium .next-search-icon{margin-left:8px;margin-right:0}.next-search-simple[dir=rtl].next-normal .next-search-left .next-search-left-addon{border-left:1px solid #ddd;border-right:none}.next-search-simple[dir=rtl].next-dark .next-search-left{border-color:#666}.next-search-simple[dir=rtl].next-dark .next-search-left .next-search-left-addon{border-right:1px solid #ddd}.next-search-simple[dir=rtl].next-dark:hover .next-search-left{border-color:#999}.next-search-simple[dir=rtl].next-dark .next-search-icon{color:#666}.next-search-simple[dir=rtl].next-dark .next-search-icon:hover{color:#999}.next-search-normal[dir=rtl] .next-search-left{border-left:none;border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0}.next-search-normal[dir=rtl] .next-search-btn.next-btn{border-radius:3px 0 0 3px!important}.next-search-normal[dir=rtl] .next-input{border-radius:0 3px 3px 0}.next-search-normal[dir=rtl].next-primary .next-input{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px}.next-search-normal[dir=rtl].next-primary .next-search-left .next-search-left-addon{border-left:1px solid #eee;border-right:none}.next-search-normal[dir=rtl].next-secondary .next-input{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px}.next-search-normal[dir=rtl].next-secondary .next-search-left .next-search-left-addon{border-left:1px solid #eee;border-right:none}.next-search-normal[dir=rtl].next-normal .next-input{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px}.next-search-normal[dir=rtl].next-normal .next-search-left .next-search-left-addon{border-left:1px solid #eee;border-right:none}.next-search-normal[dir=rtl].next-dark .next-search-left .next-search-left-addon{border-left:1px solid #209bfa;border-right:none}.next-search{width:100%;display:inline-block}.next-search,.next-search *,.next-search :after,.next-search :before{box-sizing:border-box}.next-search.next-search-focus{box-shadow:none}.next-search.next-search-focus .next-input{background-color:#fff}.next-search.next-search-focus.next-search-normal.next-primary .next-search-left,.next-search.next-search-focus.next-search-normal.next-secondary .next-search-left{border-color:#209bfa}.next-search.next-search-focus.next-search-normal.next-normal .next-search-left{border-color:#ccc}.next-search.next-search-focus.next-search-normal.next-dark .next-search-left{border-color:#209bfa}.next-search.next-search-focus.next-search-simple.next-dark .next-search-left{border-color:#ddd}.next-search.next-search-focus.next-search-simple.next-normal .next-search-left{border-color:#ccc}.next-search .next-input,.next-search .next-select{border:none;box-shadow:none}.next-search .next-select .next-input,.next-search .next-select .next-input .next-input-text-field{height:auto}.next-search .next-search-left{border-style:solid;transition:all .1s linear}.next-search .next-search-left-addon .next-input,.next-search .next-search-left-addon .next-select-trigger-search{min-height:100%;border-bottom-right-radius:0;border-top-right-radius:0}.next-search .next-search-left-addon .next-select-values{line-height:1}.next-search .next-search-left-addon.next-input-group-addon .next-select{margin:0}.next-search .next-search-left-addon+.next-search-input .next-input{border-bottom-left-radius:0;border-top-left-radius:0}.next-search .next-search-input{width:100%}.next-search .next-search-btn{box-shadow:none}.next-search .next-search-symbol-icon:before{content:""}.next-search-normal{width:600px}.next-search-normal .next-search-left{border-top-left-radius:3px;border-bottom-left-radius:3px}.next-search-normal .next-input{border-radius:3px 0 0 3px}.next-search-normal .next-btn{border-radius:0 3px 3px 0}.next-search-normal.next-primary .next-search-left{border-color:#209bfa}.next-search-normal.next-primary .next-search-left .next-search-left-addon{border-right:1px solid #eee}.next-search-normal.next-primary:hover .next-btn,.next-search-normal.next-primary:hover .next-search-left{border-color:#209bfa}.next-search-normal.next-primary .next-search-btn{background:#209bfa;border-color:#209bfa;color:#fff}.next-search-normal.next-primary .next-search-btn:hover{background:#1274e7;border-color:#209bfa;color:#fff}.next-search-normal.next-primary .next-search-btn .next-icon,.next-search-normal.next-primary .next-search-btn .next-icon:hover{color:#fff}.next-search-normal.next-primary.next-large{box-shadow:none}.next-search-normal.next-primary.next-large .next-search-btn,.next-search-normal.next-primary.next-large .next-search-left{border-width:1px;height:40px}.next-search-normal.next-primary.next-large .next-search-input{height:38px;overflow-y:hidden}.next-search-normal.next-primary.next-large .next-search-input input{height:38px;line-height:38px \0 }.next-search-normal.next-primary.next-large .next-select{height:38px}.next-search-normal.next-primary.next-large .next-search-btn{font-size:16px}.next-search-normal.next-primary.next-large .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-primary.next-large .next-search-btn .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-search-normal.next-primary.next-large .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-primary.next-medium{box-shadow:none}.next-search-normal.next-primary.next-medium .next-search-btn,.next-search-normal.next-primary.next-medium .next-search-left{border-width:1px;height:32px}.next-search-normal.next-primary.next-medium .next-search-input{height:30px;overflow-y:hidden}.next-search-normal.next-primary.next-medium .next-search-input input{height:30px;line-height:30px \0 }.next-search-normal.next-primary.next-medium .next-select{height:30px}.next-search-normal.next-primary.next-medium .next-search-btn{font-size:16px}.next-search-normal.next-primary.next-medium .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-primary.next-medium .next-search-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-normal.next-primary.next-medium .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-primary .next-input{border-top-left-radius:2px;border-bottom-left-radius:2px}.next-search-normal.next-secondary .next-search-left{border-color:#ddd}.next-search-normal.next-secondary .next-search-left .next-search-left-addon{border-right:1px solid #eee}.next-search-normal.next-secondary:hover .next-btn,.next-search-normal.next-secondary:hover .next-search-left{border-color:#209bfa}.next-search-normal.next-secondary .next-search-btn{background:#209bfa;border-color:#209bfa;color:#fff}.next-search-normal.next-secondary .next-search-btn:hover{background:#1274e7;border-color:#209bfa;color:#fff}.next-search-normal.next-secondary .next-search-btn .next-icon,.next-search-normal.next-secondary .next-search-btn .next-icon:hover{color:#fff}.next-search-normal.next-secondary.next-large{box-shadow:none}.next-search-normal.next-secondary.next-large .next-search-btn,.next-search-normal.next-secondary.next-large .next-search-left{border-width:1px;height:40px}.next-search-normal.next-secondary.next-large .next-search-input{height:38px;overflow-y:hidden}.next-search-normal.next-secondary.next-large .next-search-input input{height:38px;line-height:38px \0 }.next-search-normal.next-secondary.next-large .next-select{height:38px}.next-search-normal.next-secondary.next-large .next-search-btn{font-size:16px}.next-search-normal.next-secondary.next-large .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-secondary.next-large .next-search-btn .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-search-normal.next-secondary.next-large .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-secondary.next-medium{box-shadow:none}.next-search-normal.next-secondary.next-medium .next-search-btn,.next-search-normal.next-secondary.next-medium .next-search-left{border-width:1px;height:32px}.next-search-normal.next-secondary.next-medium .next-search-input{height:30px;overflow-y:hidden}.next-search-normal.next-secondary.next-medium .next-search-input input{height:30px;line-height:30px \0 }.next-search-normal.next-secondary.next-medium .next-select{height:30px}.next-search-normal.next-secondary.next-medium .next-search-btn{font-size:16px}.next-search-normal.next-secondary.next-medium .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-secondary.next-medium .next-search-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-normal.next-secondary.next-medium .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-secondary .next-input{border-top-left-radius:2px;border-bottom-left-radius:2px}.next-search-normal.next-normal .next-search-left{border-color:#ddd}.next-search-normal.next-normal .next-search-left .next-search-left-addon{border-right:1px solid #eee}.next-search-normal.next-normal:hover .next-btn,.next-search-normal.next-normal:hover .next-search-left{border-color:#ccc}.next-search-normal.next-normal .next-search-btn{background:#fafafa;border-color:#ddd;color:#666}.next-search-normal.next-normal .next-search-btn:hover{background:#f5f5f5;border-color:#ccc;color:#333}.next-search-normal.next-normal .next-search-btn .next-icon{color:#666}.next-search-normal.next-normal .next-search-btn .next-icon:hover{color:#333}.next-search-normal.next-normal.next-large{box-shadow:none}.next-search-normal.next-normal.next-large .next-search-btn,.next-search-normal.next-normal.next-large .next-search-left{border-width:1px;height:40px}.next-search-normal.next-normal.next-large .next-search-input{height:38px;overflow-y:hidden}.next-search-normal.next-normal.next-large .next-search-input input{height:38px;line-height:38px \0 }.next-search-normal.next-normal.next-large .next-select{height:38px}.next-search-normal.next-normal.next-large .next-search-btn{font-size:16px}.next-search-normal.next-normal.next-large .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-normal.next-large .next-search-btn .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-search-normal.next-normal.next-large .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-normal.next-medium{box-shadow:none}.next-search-normal.next-normal.next-medium .next-search-btn,.next-search-normal.next-normal.next-medium .next-search-left{border-width:1px;height:32px}.next-search-normal.next-normal.next-medium .next-search-input{height:30px;overflow-y:hidden}.next-search-normal.next-normal.next-medium .next-search-input input{height:30px;line-height:30px \0 }.next-search-normal.next-normal.next-medium .next-select{height:30px}.next-search-normal.next-normal.next-medium .next-search-btn{font-size:16px}.next-search-normal.next-normal.next-medium .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-normal.next-medium .next-search-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-normal.next-normal.next-medium .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-normal .next-input{border-top-left-radius:2px;border-bottom-left-radius:2px}.next-search-normal.next-dark .next-search-left{border-color:#209bfa}.next-search-normal.next-dark .next-search-left .next-search-left-addon{border-right:1px solid #209bfa}.next-search-normal.next-dark:hover .next-btn,.next-search-normal.next-dark:hover .next-search-left{border-color:#209bfa}.next-search-normal.next-dark .next-search-btn{background:#209bfa;border-color:#209bfa;color:#fff}.next-search-normal.next-dark .next-search-btn:hover{background:#1274e7;border-color:#209bfa;color:#fff}.next-search-normal.next-dark .next-search-btn .next-icon,.next-search-normal.next-dark .next-search-btn .next-icon:hover,.next-search-normal.next-dark .next-select-inner,.next-search-normal.next-dark input{color:#fff}.next-search-normal.next-dark .next-input,.next-search-normal.next-dark .next-select{background:hsla(0,0%,100%,0)}.next-search-normal.next-dark.next-large{box-shadow:none}.next-search-normal.next-dark.next-large .next-search-btn,.next-search-normal.next-dark.next-large .next-search-left{border-width:1px;height:40px}.next-search-normal.next-dark.next-large .next-search-input{height:38px;overflow-y:hidden}.next-search-normal.next-dark.next-large .next-search-input input{height:38px;line-height:38px \0 }.next-search-normal.next-dark.next-large .next-select{height:38px}.next-search-normal.next-dark.next-large .next-search-btn{font-size:16px}.next-search-normal.next-dark.next-large .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-dark.next-large .next-search-btn .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-search-normal.next-dark.next-large .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-dark.next-medium{box-shadow:none}.next-search-normal.next-dark.next-medium .next-search-btn,.next-search-normal.next-dark.next-medium .next-search-left{border-width:1px;height:32px}.next-search-normal.next-dark.next-medium .next-search-input{height:30px;overflow-y:hidden}.next-search-normal.next-dark.next-medium .next-search-input input{height:30px;line-height:30px \0 }.next-search-normal.next-dark.next-medium .next-select{height:30px}.next-search-normal.next-dark.next-medium .next-search-btn{font-size:16px}.next-search-normal.next-dark.next-medium .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-dark.next-medium .next-search-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-normal.next-dark.next-medium .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal:not([dir=rtl]) .next-search-left{border-right:none}.next-search-simple{width:300px;box-shadow:none;border-radius:3px}.next-search-simple .next-search-icon{cursor:pointer;transition:all .1s linear}.next-search-simple .next-input,.next-search-simple .next-search-left{border-radius:3px}.next-search-simple.next-large .next-search-icon{margin-right:12px}.next-search-simple.next-medium .next-search-icon{margin-right:8px}.next-search-simple.next-normal .next-search-left{border-color:#ddd}.next-search-simple.next-normal .next-search-left .next-search-left-addon{border-right:1px solid #ddd}.next-search-simple.next-normal:hover .next-search-left{border-color:#ccc}.next-search-simple.next-normal .next-search-icon{color:#999}.next-search-simple.next-normal .next-search-icon:hover{color:#666}.next-search-simple.next-normal .next-search-left{border-width:1px}.next-search-simple.next-normal.next-large .next-search-icon .next-icon-remote,.next-search-simple.next-normal.next-large .next-search-icon:before{width:20px;font-size:20px;line-height:inherit}.next-search-simple.next-normal.next-medium .next-search-icon .next-icon-remote,.next-search-simple.next-normal.next-medium .next-search-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-simple.next-dark .next-search-left{border-color:#666}.next-search-simple.next-dark .next-search-left .next-search-left-addon{border-right:1px solid #ddd}.next-search-simple.next-dark:hover .next-search-left{border-color:#999}.next-search-simple.next-dark .next-search-icon{color:#666}.next-search-simple.next-dark .next-search-icon:hover{color:#999}.next-search-simple.next-dark .next-select-inner,.next-search-simple.next-dark input{color:#fff}.next-search-simple.next-dark .next-input,.next-search-simple.next-dark .next-select{background:hsla(0,0%,100%,0)}.next-search-simple.next-dark .next-search-left{border-width:1px}.next-search-simple.next-dark.next-large .next-search-icon .next-icon-remote,.next-search-simple.next-dark.next-large .next-search-icon:before,.next-search-simple.next-dark.next-medium .next-search-icon .next-icon-remote,.next-search-simple.next-dark.next-medium .next-search-icon:before{width:20px;font-size:20px;line-height:inherit}.next-search-simple .next-select.next-large{height:38px}.next-search-simple .next-select.next-medium{height:30px}.next-slick{position:relative;display:block;-webkit-touch-callout:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:rgba(0,0,0,0)}.next-slick,.next-slick *,.next-slick :after,.next-slick :before{box-sizing:border-box}.next-slick-initialized .next-slick-slide{display:block}.next-slick-list{position:relative;overflow:hidden;display:block;margin:0;padding:0;transform:translateZ(0)}.next-slick-list:focus{outline:none}.next-slick-list.dragging{cursor:pointer;cursor:hand}.next-slick-track{position:relative;top:0;left:0;display:block;transform:translateZ(0)}.next-slick-slide{float:left;height:100%;min-height:1px;outline:0;transition:all .1s linear}.next-slick[dir=rtl] .next-slick-slide{float:right}.next-slick-slide img{display:block}.next-slick-arrow{display:block;position:absolute;cursor:pointer;text-align:center;transition:all .1s linear}.next-slick-arrow.inner{color:#fff;background:#000;opacity:.2;padding:0;border:none}.next-slick-arrow.inner:focus,.next-slick-arrow.inner:hover{color:#fff;background:#000;opacity:.4}.next-slick-arrow.inner.disabled{color:#ccc;background:#fafafa;opacity:.5}.next-slick-arrow.outer{color:#666;background:transparent;opacity:.32;padding:0;border:none;border-radius:0}.next-slick-arrow.outer:focus,.next-slick-arrow.outer:hover{color:#333;background:transparent;opacity:.32}.next-slick-arrow.outer.disabled{color:#ccc;background:transparent;opacity:.32}.next-slick-arrow.disabled{cursor:not-allowed}.next-slick-dots{display:block;position:absolute;margin:0;padding:0}.next-slick-dots-item{position:relative;display:inline-block;cursor:pointer}.next-slick-dots-item button{cursor:pointer;border:0 solid #fff;outline:none;padding:0;height:8px;width:8px;border-radius:50%;background:rgba(0,0,0,.32)}.next-slick-dots-item button:focus,.next-slick-dots-item button:hover{background-color:hsla(0,0%,100%,.5);border-color:#fff}.next-slick-dots-item.active button{background:#209bfa;border-color:#fff;animation:zoom .3s cubic-bezier(.86,0,.07,1)}.next-slick-dots.hoz{width:100%;bottom:12px;left:0;text-align:center}.next-slick-dots.hoz .next-slick-dots-item{margin:0 4px}.next-slick-dots.ver{width:16px;top:0;right:20px;bottom:0;display:flex;justify-content:center;flex-direction:column}.next-slick-dots.ver .next-slick-dots-item{margin:0}.next-slick.next-slick-hoz.next-slick-outer{padding:0 24px}.next-slick.next-slick-hoz .next-slick-arrow.medium{width:28px;height:56px;line-height:56px}.next-slick.next-slick-hoz .next-slick-arrow.medium .next-icon .next-icon-remote,.next-slick.next-slick-hoz .next-slick-arrow.medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-slick.next-slick-hoz .next-slick-arrow.medium.inner{top:calc(50% - 28px)}.next-slick.next-slick-hoz .next-slick-arrow.medium.inner.next-slick-prev{left:0}.next-slick.next-slick-hoz .next-slick-arrow.medium.inner.next-slick-next{right:0}.next-slick.next-slick-hoz .next-slick-arrow.medium.outer{top:calc(50% - 28px)}.next-slick.next-slick-hoz .next-slick-arrow.medium.outer.next-slick-prev{left:-4px}.next-slick.next-slick-hoz .next-slick-arrow.medium.outer.next-slick-next{right:-4px}.next-slick.next-slick-hoz .next-slick-arrow.large{width:48px;height:96px;line-height:96px}.next-slick.next-slick-hoz .next-slick-arrow.large .next-icon .next-icon-remote,.next-slick.next-slick-hoz .next-slick-arrow.large .next-icon:before{width:32px;font-size:32px;line-height:inherit}.next-slick.next-slick-hoz .next-slick-arrow.large.inner{top:calc(50% - 48px)}.next-slick.next-slick-hoz .next-slick-arrow.large.inner.next-slick-prev{left:0}.next-slick.next-slick-hoz .next-slick-arrow.large.inner.next-slick-next{right:0}.next-slick.next-slick-hoz .next-slick-arrow.large.outer{top:calc(50% - 48px)}.next-slick.next-slick-hoz .next-slick-arrow.large.outer.next-slick-prev{left:-8px}.next-slick.next-slick-hoz .next-slick-arrow.large.outer.next-slick-next{right:-8px}.next-slick.next-slick-ver.next-slick-outer{padding:24px 0}.next-slick.next-slick-ver .next-slick-slide{display:block;height:auto}.next-slick.next-slick-ver .next-slick-arrow.medium{width:56px;height:28px;line-height:28px}.next-slick.next-slick-ver .next-slick-arrow.medium .next-icon .next-icon-remote,.next-slick.next-slick-ver .next-slick-arrow.medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-slick.next-slick-ver .next-slick-arrow.medium.inner{left:calc(50% - 28px)}.next-slick.next-slick-ver .next-slick-arrow.medium.inner.next-slick-prev{top:0}.next-slick.next-slick-ver .next-slick-arrow.medium.inner.next-slick-next{bottom:0}.next-slick.next-slick-ver .next-slick-arrow.medium.outer{left:calc(50% - 28px)}.next-slick.next-slick-ver .next-slick-arrow.medium.outer.next-slick-prev{top:-4px}.next-slick.next-slick-ver .next-slick-arrow.medium.outer.next-slick-next{bottom:-4px}.next-slick.next-slick-ver .next-slick-arrow.large{width:96px;height:48px;line-height:48px}.next-slick.next-slick-ver .next-slick-arrow.large .next-icon .next-icon-remote,.next-slick.next-slick-ver .next-slick-arrow.large .next-icon:before{width:32px;font-size:32px;line-height:inherit}.next-slick.next-slick-ver .next-slick-arrow.large.inner{left:calc(50% - 48px)}.next-slick.next-slick-ver .next-slick-arrow.large.inner.next-slick-prev{top:0}.next-slick.next-slick-ver .next-slick-arrow.large.inner.next-slick-next{bottom:0}.next-slick.next-slick-ver .next-slick-arrow.large.outer{left:calc(50% - 48px)}.next-slick.next-slick-ver .next-slick-arrow.large.outer.next-slick-prev{top:-16px}.next-slick.next-slick-ver .next-slick-arrow.large.outer.next-slick-next{bottom:-16px}.next-split-btn{display:inline-block;position:relative}.next-split-btn-spacing-tb{padding:0}.next-split-btn-trigger .next-icon{transition:transform .1s linear}.next-split-btn-trigger.next-expand .next-split-btn-symbol-fold{transform:rotate(180deg)}.next-split-btn-trigger.next-btn-normal:not(:disabled):not(.disabled) .next-icon{color:#999}.next-split-btn-trigger.next-small{padding-left:4px;padding-right:4px}.next-split-btn-trigger.next-medium{padding-left:8px;padding-right:8px}.next-split-btn-symbol-fold:before{content:""}.next-split-btn-symbol-unfold:before{content:""}.next-step,.next-step *,.next-step:after,.next-step :after,.next-step:before,.next-step :before{box-sizing:border-box}.next-step{width:100%;position:relative;border:none}.next-step-item{position:relative;vertical-align:middle;outline:0;height:100%}.next-step-item-body{outline:0}.next-step-item-node{transition:all .1s linear}.next-step-item-node.clicked{transform:scale3d(.8,.8,.8)}.next-step-horizontal{overflow:hidden}.next-step-horizontal>.next-step-item{display:inline-block;text-align:left}.next-step-vertical>.next-step-item{display:block;text-align:center}.next-step-arrow{display:flex}.next-step-arrow .next-step-item{flex:1;height:32px;line-height:32px;margin-left:16px;margin-right:4px}.next-step-arrow .next-step-item:before{content:"";position:absolute;left:-16px;top:0;z-index:1;border:16px solid transparent}.next-step-arrow .next-step-item:after{content:"";position:absolute;right:-16px;top:0;z-index:1;border-top:16px solid transparent;border-bottom:16px solid transparent;border-left:16px solid transparent}.next-step-arrow .next-step-item .next-step-item-container{min-width:100px;height:32px;cursor:pointer}.next-step-arrow .next-step-item .next-step-item-container .next-step-item-title{height:32px;line-height:32px;font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.next-step-arrow>.next-step-item-wait{background:#f5f5f5}.next-step-arrow>.next-step-item-wait .next-step-item-tail-overlay{background:#000}.next-step-arrow>.next-step-item-wait .next-step-item-tail-underlay{background:#ccc}.next-step-arrow>.next-step-item-wait>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-arrow>.next-step-item-wait>.next-step-item-container .next-step-item-node{color:#000}.next-step-arrow>.next-step-item-wait>.next-step-item-container .next-step-item-node-circle,.next-step-arrow>.next-step-item-wait>.next-step-item-container .next-step-item-node-dot{background:#f5f5f5;border-color:#000}.next-step-arrow>.next-step-item-wait .next-step-item-title{color:#999;word-break:break-word}.next-step-arrow>.next-step-item-wait .next-step-item-content{color:#999;font-size:12px;line-height:1.5;word-break:break-word}.next-step-arrow>.next-step-item-wait .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-arrow>.next-step-item-wait .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-arrow>.next-step-item-wait .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-arrow>.next-step-item-wait .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-arrow>.next-step-item-wait .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-arrow>.next-step-item-wait .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-arrow>.next-step-item-wait:before{border:16px solid #f5f5f5;border-left-color:transparent}.next-step-arrow>.next-step-item-wait:after{border-left-color:#f5f5f5}.next-step-arrow>.next-step-item-process{background:#209bfa}.next-step-arrow>.next-step-item-process .next-step-item-tail-overlay{background:#000}.next-step-arrow>.next-step-item-process .next-step-item-tail-underlay{background:#ccc}.next-step-arrow>.next-step-item-process>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-arrow>.next-step-item-process>.next-step-item-container .next-step-item-node{color:#000}.next-step-arrow>.next-step-item-process>.next-step-item-container .next-step-item-node-circle,.next-step-arrow>.next-step-item-process>.next-step-item-container .next-step-item-node-dot{background:#209bfa;border-color:#000}.next-step-arrow>.next-step-item-process .next-step-item-title{color:#fff;word-break:break-word}.next-step-arrow>.next-step-item-process .next-step-item-content{color:#fff;font-size:12px;line-height:1.5;word-break:break-word}.next-step-arrow>.next-step-item-process .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-arrow>.next-step-item-process .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-arrow>.next-step-item-process .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-arrow>.next-step-item-process .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-arrow>.next-step-item-process .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-arrow>.next-step-item-process .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-arrow>.next-step-item-process:before{border:16px solid #209bfa;border-left-color:transparent}.next-step-arrow>.next-step-item-process:after{border-left-color:#209bfa}.next-step-arrow>.next-step-item-finish{background:#add9ff}.next-step-arrow>.next-step-item-finish .next-step-item-tail-overlay{background:#000}.next-step-arrow>.next-step-item-finish .next-step-item-tail-underlay{background:#ccc}.next-step-arrow>.next-step-item-finish>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-arrow>.next-step-item-finish>.next-step-item-container .next-step-item-node{color:#000}.next-step-arrow>.next-step-item-finish>.next-step-item-container .next-step-item-node-circle,.next-step-arrow>.next-step-item-finish>.next-step-item-container .next-step-item-node-dot{background:#add9ff;border-color:#000}.next-step-arrow>.next-step-item-finish .next-step-item-title{color:#209bfa;word-break:break-word}.next-step-arrow>.next-step-item-finish .next-step-item-content{color:#209bfa;font-size:12px;line-height:1.5;word-break:break-word}.next-step-arrow>.next-step-item-finish .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-arrow>.next-step-item-finish .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-arrow>.next-step-item-finish .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-arrow>.next-step-item-finish .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-arrow>.next-step-item-finish .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-arrow>.next-step-item-finish .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-arrow>.next-step-item-finish:before{border:16px solid #add9ff;border-left-color:transparent}.next-step-arrow>.next-step-item-finish:after{border-left-color:#add9ff}.next-step-arrow .next-step-item-disabled{cursor:not-allowed;background:#fafafa}.next-step-arrow .next-step-item-disabled .next-step-item-tail-overlay{background:#000}.next-step-arrow .next-step-item-disabled .next-step-item-tail-underlay{background:#ccc}.next-step-arrow .next-step-item-disabled>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-arrow .next-step-item-disabled>.next-step-item-container .next-step-item-node{color:#000}.next-step-arrow .next-step-item-disabled>.next-step-item-container .next-step-item-node-circle,.next-step-arrow .next-step-item-disabled>.next-step-item-container .next-step-item-node-dot{background:#fafafa;border-color:#000}.next-step-arrow .next-step-item-disabled .next-step-item-title{color:#ccc;word-break:break-word}.next-step-arrow .next-step-item-disabled .next-step-item-content{color:#ccc;font-size:12px;line-height:1.5;word-break:break-word}.next-step-arrow .next-step-item-disabled .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-arrow .next-step-item-disabled .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-arrow .next-step-item-disabled .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-arrow .next-step-item-disabled .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-arrow .next-step-item-disabled .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-arrow .next-step-item-disabled .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-arrow .next-step-item-disabled:before{border:16px solid #fafafa;border-left-color:transparent}.next-step-arrow .next-step-item-disabled:after{border-left-color:#fafafa}.next-step-arrow .next-step-item-disabled .next-step-item-container{cursor:not-allowed}.next-step-arrow .next-step-item-read-only,.next-step-arrow .next-step-item-read-only .next-step-item-container{cursor:default}.next-step-arrow .next-step-item-first{margin-left:0}.next-step-arrow .next-step-item-first:before{border:16px solid transparent}.next-step-arrow .next-step-item-last{margin-right:0}.next-step-arrow .next-step-item-last:after{border:16px solid transparent}.next-step-circle .next-step-item-container{display:inline-block;vertical-align:middle;position:relative;padding:0 8px}.next-step-circle .next-step-item-container .next-step-item-progress .next-progress-circle-text{color:#209bfa;font-size:14px}.next-step-circle .next-step-item-container .next-step-item-progress .next-progress-circle-underlay{stroke:#ccc;stroke-width:3px}.next-step-circle .next-step-item-container .next-step-item-progress .next-progress-circle-overlay-normal{stroke:#209bfa;stroke-width:3px}.next-step-circle .next-step-item-container .next-step-item-node-placeholder{display:inline-block}.next-step-circle>.next-step-item-wait .next-step-item-tail-overlay{background:#ddd}.next-step-circle>.next-step-item-wait .next-step-item-tail-underlay{background:#eee}.next-step-circle>.next-step-item-wait>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-circle>.next-step-item-wait>.next-step-item-container .next-step-item-node{color:#666}.next-step-circle>.next-step-item-wait>.next-step-item-container .next-step-item-node-circle,.next-step-circle>.next-step-item-wait>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#ccc}.next-step-circle>.next-step-item-wait .next-step-item-title{color:#666;word-break:break-word}.next-step-circle>.next-step-item-wait .next-step-item-content{color:#666;font-size:12px;line-height:1.5;word-break:break-word}.next-step-circle>.next-step-item-wait .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-circle>.next-step-item-wait .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-circle>.next-step-item-wait .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-circle>.next-step-item-wait .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-circle>.next-step-item-wait .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-circle>.next-step-item-wait .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-circle>.next-step-item-process .next-step-item-tail-overlay{background:#ddd}.next-step-circle>.next-step-item-process .next-step-item-tail-underlay{background:#eee}.next-step-circle>.next-step-item-process>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-circle>.next-step-item-process>.next-step-item-container .next-step-item-node{color:#fff}.next-step-circle>.next-step-item-process>.next-step-item-container .next-step-item-node-circle,.next-step-circle>.next-step-item-process>.next-step-item-container .next-step-item-node-dot{background:#209bfa;border-color:#209bfa}.next-step-circle>.next-step-item-process .next-step-item-title{color:#333;word-break:break-word}.next-step-circle>.next-step-item-process .next-step-item-content{color:#333;font-size:12px;line-height:1.5;word-break:break-word}.next-step-circle>.next-step-item-process .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-circle>.next-step-item-process .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-circle>.next-step-item-process .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-circle>.next-step-item-process .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-circle>.next-step-item-process .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-circle>.next-step-item-process .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-circle>.next-step-item-finish .next-step-item-tail-overlay{background:#209bfa}.next-step-circle>.next-step-item-finish .next-step-item-tail-underlay{background:#eee}.next-step-circle>.next-step-item-finish>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-circle>.next-step-item-finish>.next-step-item-container .next-step-item-node{color:#209bfa}.next-step-circle>.next-step-item-finish>.next-step-item-container .next-step-item-node-circle,.next-step-circle>.next-step-item-finish>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#209bfa}.next-step-circle>.next-step-item-finish .next-step-item-title{color:#666;word-break:break-word}.next-step-circle>.next-step-item-finish .next-step-item-content{color:#666;font-size:12px;line-height:1.5;word-break:break-word}.next-step-circle>.next-step-item-finish .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-circle>.next-step-item-finish .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-circle>.next-step-item-finish .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-circle>.next-step-item-finish .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-circle>.next-step-item-finish .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-circle>.next-step-item-finish .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-circle .next-step-item-disabled .next-step-item-tail-overlay,.next-step-circle .next-step-item-disabled .next-step-item-tail-underlay{background:#eee}.next-step-circle .next-step-item-disabled>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-circle .next-step-item-disabled>.next-step-item-container .next-step-item-node{color:#ccc}.next-step-circle .next-step-item-disabled>.next-step-item-container .next-step-item-node-circle,.next-step-circle .next-step-item-disabled>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#eee}.next-step-circle .next-step-item-disabled .next-step-item-title{color:#ccc;word-break:break-word}.next-step-circle .next-step-item-disabled .next-step-item-content{color:#ccc;font-size:12px;line-height:1.5;word-break:break-word}.next-step-circle .next-step-item-disabled .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-circle .next-step-item-disabled .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-circle .next-step-item-disabled .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-circle .next-step-item-disabled .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-circle .next-step-item-disabled .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-circle .next-step-item-disabled .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-circle .next-step-item-disabled .next-step-item-node,.next-step-circle .next-step-item-disabled .next-step-item-node-placeholder{cursor:not-allowed}.next-step-circle .next-step-item-read-only .next-step-item-node,.next-step-circle .next-step-item-read-only .next-step-item-node-placeholder{cursor:default}.next-step-circle .next-step-item-last .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal{text-align:center;white-space:nowrap}.next-step-circle.next-step-horizontal>.next-step-item .next-step-item-content,.next-step-circle.next-step-horizontal>.next-step-item .next-step-item-title{white-space:normal}.next-step-circle.next-step-horizontal>.next-step-item-wait .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 48px);vertical-align:middle}.next-step-circle.next-step-horizontal>.next-step-item-wait .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-circle.next-step-horizontal>.next-step-item-wait .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-circle.next-step-horizontal>.next-step-item-wait>.next-step-item-body{width:100px;left:-26px;text-align:center;position:absolute}.next-step-circle.next-step-horizontal>.next-step-item-wait>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-circle.next-step-horizontal>.next-step-item-wait>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-circle.next-step-horizontal>.next-step-item-process .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 48px);vertical-align:middle}.next-step-circle.next-step-horizontal>.next-step-item-process .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-circle.next-step-horizontal>.next-step-item-process .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-circle.next-step-horizontal>.next-step-item-process>.next-step-item-body{width:100px;left:-26px;text-align:center;position:absolute}.next-step-circle.next-step-horizontal>.next-step-item-process>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-circle.next-step-horizontal>.next-step-item-process>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-circle.next-step-horizontal>.next-step-item-finish .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 48px);vertical-align:middle}.next-step-circle.next-step-horizontal>.next-step-item-finish .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-circle.next-step-horizontal>.next-step-item-finish .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-circle.next-step-horizontal>.next-step-item-finish>.next-step-item-body{width:100px;left:-26px;text-align:center;position:absolute}.next-step-circle.next-step-horizontal>.next-step-item-finish>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-circle.next-step-horizontal>.next-step-item-finish>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-circle.next-step-horizontal>.next-step-item-disabled .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 48px);vertical-align:middle}.next-step-circle.next-step-horizontal>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-circle.next-step-horizontal>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-circle.next-step-horizontal>.next-step-item-disabled>.next-step-item-body{width:100px;left:-26px;text-align:center;position:absolute}.next-step-circle.next-step-horizontal>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-circle.next-step-horizontal>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item{vertical-align:unset}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item:last-child .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-body{position:relative;display:inline-block;top:0;left:0;max-width:100px;overflow:hidden;vertical-align:top;text-align:left}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-body .next-step-item-title{display:inline-block;padding-right:8px;margin-top:9px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-tail{width:calc(100% - 148px);position:absolute;right:0;margin-top:-1px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item:last-child .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-body{position:relative;display:inline-block;top:0;left:0;max-width:100px;overflow:hidden;vertical-align:top;text-align:left}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-body .next-step-item-title{display:inline-block;padding-right:8px;margin-top:9px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-tail{width:calc(100% - 148px);position:absolute;right:0;margin-top:-1px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item:last-child .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-body{position:relative;display:inline-block;top:0;left:0;max-width:100px;overflow:hidden;vertical-align:top;text-align:left}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-body .next-step-item-title{display:inline-block;padding-right:8px;margin-top:9px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-tail{width:calc(100% - 148px);position:absolute;right:0;margin-top:-1px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item:last-child .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-body{position:relative;display:inline-block;top:0;left:0;max-width:100px;overflow:hidden;vertical-align:top;text-align:left}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-body .next-step-item-title{display:inline-block;padding-right:8px;margin-top:9px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-tail{width:calc(100% - 148px);position:absolute;right:0;margin-top:-1px}.next-step-circle.next-step-vertical{font-size:0;display:table-cell;vertical-align:middle;position:relative}.next-step-circle.next-step-vertical .next-step-item-container{padding:0}.next-step-circle.next-step-vertical>.next-step-item:last-child .next-step-item-tail{display:block;visibility:hidden}.next-step-circle.next-step-vertical>.next-step-item-wait .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-circle.next-step-vertical>.next-step-item-wait .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-circle.next-step-vertical>.next-step-item-wait .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-circle.next-step-vertical>.next-step-item-wait>.next-step-item-body{position:absolute;top:0;left:16px;margin-left:8px}.next-step-circle.next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-title{margin-top:8px;text-align:left;font-weight:700;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle.next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-content{margin-top:4px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-circle.next-step-vertical>.next-step-item-process .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-circle.next-step-vertical>.next-step-item-process .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-circle.next-step-vertical>.next-step-item-process .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-circle.next-step-vertical>.next-step-item-process>.next-step-item-body{position:absolute;top:0;left:16px;margin-left:8px}.next-step-circle.next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-title{margin-top:8px;text-align:left;font-weight:700;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle.next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-content{margin-top:4px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-circle.next-step-vertical>.next-step-item-finish .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-circle.next-step-vertical>.next-step-item-finish .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-circle.next-step-vertical>.next-step-item-finish .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-circle.next-step-vertical>.next-step-item-finish>.next-step-item-body{position:absolute;top:0;left:16px;margin-left:8px}.next-step-circle.next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-title{margin-top:8px;text-align:left;font-weight:700;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle.next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-content{margin-top:4px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-circle.next-step-vertical>.next-step-item-disabled .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-circle.next-step-vertical>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-circle.next-step-vertical>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-circle.next-step-vertical>.next-step-item-disabled>.next-step-item-body{position:absolute;top:0;left:16px;margin-left:8px}.next-step-circle.next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{margin-top:8px;text-align:left;font-weight:700;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle.next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{margin-top:4px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-dot .next-step-item-container{display:inline-block;vertical-align:middle;position:relative;padding:0 8px;margin-top:-1px;margin-bottom:-1px}.next-step-dot .next-step-item-container .next-step-item-node-placeholder{display:inline-block}.next-step-dot .next-step-item-container .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot .next-step-item-container .next-step-item-node .next-icon .next-icon-remote,.next-step-dot .next-step-item-container .next-step-item-node .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot>.next-step-item-wait .next-step-item-tail-overlay{background:#ddd}.next-step-dot>.next-step-item-wait .next-step-item-tail-underlay{background:#eee}.next-step-dot>.next-step-item-wait>.next-step-item-container .next-step-item-progress{width:12px;height:12px}.next-step-dot>.next-step-item-wait>.next-step-item-container .next-step-item-node{color:#999}.next-step-dot>.next-step-item-wait>.next-step-item-container .next-step-item-node-circle,.next-step-dot>.next-step-item-wait>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#ccc}.next-step-dot>.next-step-item-wait .next-step-item-title{color:#666;word-break:break-word}.next-step-dot>.next-step-item-wait .next-step-item-content{color:#666;line-height:1.5;word-break:break-word}.next-step-dot>.next-step-item-wait .next-step-item-node-placeholder{width:12px;height:12px;position:relative}.next-step-dot>.next-step-item-wait .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot>.next-step-item-wait .next-step-item-node-circle{display:block;width:12px;height:12px;font-size:12px;font-weight:400;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-dot>.next-step-item-wait .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-dot>.next-step-item-wait .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-dot>.next-step-item-wait .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot>.next-step-item-wait .next-step-item-content{font-size:12px}.next-step-dot>.next-step-item-wait .next-step-item-node-dot{display:block;width:12px;height:12px;font-size:12px;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .3s ease,border-color .3s ease}.next-step-dot>.next-step-item-process .next-step-item-tail-overlay{background:#ddd}.next-step-dot>.next-step-item-process .next-step-item-tail-underlay{background:#eee}.next-step-dot>.next-step-item-process>.next-step-item-container .next-step-item-progress{width:12px;height:12px}.next-step-dot>.next-step-item-process>.next-step-item-container .next-step-item-node{color:#209bfa}.next-step-dot>.next-step-item-process>.next-step-item-container .next-step-item-node-circle,.next-step-dot>.next-step-item-process>.next-step-item-container .next-step-item-node-dot{background:#209bfa;border-color:#209bfa}.next-step-dot>.next-step-item-process .next-step-item-title{color:#333;word-break:break-word}.next-step-dot>.next-step-item-process .next-step-item-content{color:#333;line-height:1.5;word-break:break-word}.next-step-dot>.next-step-item-process .next-step-item-node-placeholder{width:12px;height:12px;position:relative}.next-step-dot>.next-step-item-process .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot>.next-step-item-process .next-step-item-node-circle{display:block;width:12px;height:12px;font-size:12px;font-weight:400;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-dot>.next-step-item-process .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-dot>.next-step-item-process .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-dot>.next-step-item-process .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot>.next-step-item-process .next-step-item-content{font-size:12px}.next-step-dot>.next-step-item-process .next-step-item-node-dot{display:block;width:12px;height:12px;font-size:12px;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .3s ease,border-color .3s ease}.next-step-dot>.next-step-item-finish .next-step-item-tail-overlay{background:#209bfa}.next-step-dot>.next-step-item-finish .next-step-item-tail-underlay{background:#eee}.next-step-dot>.next-step-item-finish>.next-step-item-container .next-step-item-progress{width:12px;height:12px}.next-step-dot>.next-step-item-finish>.next-step-item-container .next-step-item-node{color:#209bfa}.next-step-dot>.next-step-item-finish>.next-step-item-container .next-step-item-node-circle,.next-step-dot>.next-step-item-finish>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#209bfa}.next-step-dot>.next-step-item-finish .next-step-item-title{color:#666;word-break:break-word}.next-step-dot>.next-step-item-finish .next-step-item-content{color:#666;line-height:1.5;word-break:break-word}.next-step-dot>.next-step-item-finish .next-step-item-node-placeholder{width:12px;height:12px;position:relative}.next-step-dot>.next-step-item-finish .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot>.next-step-item-finish .next-step-item-node-circle{display:block;width:12px;height:12px;font-size:12px;font-weight:400;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-dot>.next-step-item-finish .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-dot>.next-step-item-finish .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-dot>.next-step-item-finish .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot>.next-step-item-finish .next-step-item-content{font-size:12px}.next-step-dot>.next-step-item-finish .next-step-item-node-dot{display:block;width:12px;height:12px;font-size:12px;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .3s ease,border-color .3s ease}.next-step-dot .next-step-item-disabled .next-step-item-tail-overlay,.next-step-dot .next-step-item-disabled .next-step-item-tail-underlay{background:#eee}.next-step-dot .next-step-item-disabled>.next-step-item-container .next-step-item-progress{width:12px;height:12px}.next-step-dot .next-step-item-disabled>.next-step-item-container .next-step-item-node{color:#eee}.next-step-dot .next-step-item-disabled>.next-step-item-container .next-step-item-node-circle,.next-step-dot .next-step-item-disabled>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#e6e6e6}.next-step-dot .next-step-item-disabled .next-step-item-title{color:#ccc;word-break:break-word}.next-step-dot .next-step-item-disabled .next-step-item-content{color:#ccc;line-height:1.5;word-break:break-word}.next-step-dot .next-step-item-disabled .next-step-item-node-placeholder{width:12px;height:12px;position:relative}.next-step-dot .next-step-item-disabled .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot .next-step-item-disabled .next-step-item-node-circle{display:block;width:12px;height:12px;font-size:12px;font-weight:400;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-dot .next-step-item-disabled .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-dot .next-step-item-disabled .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-dot .next-step-item-disabled .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot .next-step-item-disabled .next-step-item-content{font-size:12px}.next-step-dot .next-step-item-disabled .next-step-item-node-dot{display:block;width:12px;height:12px;font-size:12px;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .3s ease,border-color .3s ease}.next-step-dot .next-step-item-disabled .next-step-item-node,.next-step-dot .next-step-item-disabled .next-step-item-node-placeholder{cursor:not-allowed}.next-step-dot .next-step-item-read-only .next-step-item-node,.next-step-dot .next-step-item-read-only .next-step-item-node-placeholder{cursor:default}.next-step-dot .next-step-item-last .next-step-item-tail{display:none}.next-step-dot.next-step-horizontal{text-align:center;white-space:nowrap}.next-step-dot.next-step-horizontal>.next-step-item .next-step-item-content,.next-step-dot.next-step-horizontal>.next-step-item .next-step-item-title{white-space:normal}.next-step-dot.next-step-horizontal .next-step-item-node .next-icon{vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-wait .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 28px);vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-wait .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-dot.next-step-horizontal>.next-step-item-wait .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-dot.next-step-horizontal>.next-step-item-wait>.next-step-item-body{width:100px;left:-36px;text-align:center;position:absolute}.next-step-dot.next-step-horizontal>.next-step-item-wait>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-dot.next-step-horizontal>.next-step-item-wait>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-dot.next-step-horizontal>.next-step-item-process .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 28px);vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-process .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-dot.next-step-horizontal>.next-step-item-process .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-dot.next-step-horizontal>.next-step-item-process>.next-step-item-body{width:100px;left:-36px;text-align:center;position:absolute}.next-step-dot.next-step-horizontal>.next-step-item-process>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-dot.next-step-horizontal>.next-step-item-process>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-dot.next-step-horizontal>.next-step-item-finish .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 28px);vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-finish .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-dot.next-step-horizontal>.next-step-item-finish .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-dot.next-step-horizontal>.next-step-item-finish>.next-step-item-body{width:100px;left:-36px;text-align:center;position:absolute}.next-step-dot.next-step-horizontal>.next-step-item-finish>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-dot.next-step-horizontal>.next-step-item-finish>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-dot.next-step-horizontal>.next-step-item-disabled .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 28px);vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-dot.next-step-horizontal>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-dot.next-step-horizontal>.next-step-item-disabled>.next-step-item-body{width:100px;left:-36px;text-align:center;position:absolute}.next-step-dot.next-step-horizontal>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-dot.next-step-horizontal>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-dot.next-step-vertical{padding:0 0 0 4px;font-size:0;display:table-cell;position:relative}.next-step-dot.next-step-vertical .next-step-item-container{padding:0}.next-step-dot.next-step-vertical>.next-step-item:last-child .next-step-item-tail{display:block;visibility:hidden}.next-step-dot.next-step-vertical>.next-step-item-wait .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-dot.next-step-vertical>.next-step-item-wait .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-dot.next-step-vertical>.next-step-item-wait .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-dot.next-step-vertical>.next-step-item-wait>.next-step-item-body{position:absolute;top:0;left:6px;margin-left:8px}.next-step-dot.next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-title{margin-top:0;font-weight:700;text-align:left;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot.next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-content{margin-top:8px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-dot.next-step-vertical>.next-step-item-process .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-dot.next-step-vertical>.next-step-item-process .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-dot.next-step-vertical>.next-step-item-process .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-dot.next-step-vertical>.next-step-item-process>.next-step-item-body{position:absolute;top:0;left:6px;margin-left:8px}.next-step-dot.next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-title{margin-top:0;font-weight:700;text-align:left;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot.next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-content{margin-top:8px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-dot.next-step-vertical>.next-step-item-finish .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-dot.next-step-vertical>.next-step-item-finish .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-dot.next-step-vertical>.next-step-item-finish .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-dot.next-step-vertical>.next-step-item-finish>.next-step-item-body{position:absolute;top:0;left:6px;margin-left:8px}.next-step-dot.next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-title{margin-top:0;font-weight:700;text-align:left;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot.next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-content{margin-top:8px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-dot.next-step-vertical>.next-step-item-disabled .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-dot.next-step-vertical>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-dot.next-step-vertical>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-dot.next-step-vertical>.next-step-item-disabled>.next-step-item-body{position:absolute;top:0;left:6px;margin-left:8px}.next-step-dot.next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{margin-top:0;font-weight:700;text-align:left;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot.next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{margin-top:8px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-horizontal[dir=rtl]>.next-step-item{text-align:right}.next-step-arrow[dir=rtl] .next-step-item{height:32px;line-height:32px;margin-left:4px;margin-right:16px}.next-step-arrow[dir=rtl] .next-step-item:before{right:-16px;left:auto;border:16px solid transparent}.next-step-arrow[dir=rtl] .next-step-item:after{left:-32px;right:auto;border-top:16px solid transparent;border-bottom:16px solid transparent;border-right:16px solid transparent}.next-step-arrow[dir=rtl]>.next-step-item-wait{background:#f5f5f5}.next-step-arrow[dir=rtl]>.next-step-item-wait .next-step-item-node-dot{right:50%;left:auto}.next-step-arrow[dir=rtl]>.next-step-item-wait:before{border:16px solid #f5f5f5;border-right-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-wait:after{border-right-color:#f5f5f5;border-left-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-process{background:#209bfa}.next-step-arrow[dir=rtl]>.next-step-item-process .next-step-item-node-dot{right:50%;left:auto}.next-step-arrow[dir=rtl]>.next-step-item-process:before{border:16px solid #209bfa;border-right-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-process:after{border-right-color:#209bfa;border-left-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-finish{background:#add9ff}.next-step-arrow[dir=rtl]>.next-step-item-finish .next-step-item-node-dot{right:50%;left:auto}.next-step-arrow[dir=rtl]>.next-step-item-finish:before{border:16px solid #add9ff;border-right-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-finish:after{border-right-color:#add9ff;border-left-color:transparent}.next-step-arrow[dir=rtl] .next-step-item-disabled{background:#fafafa}.next-step-arrow[dir=rtl] .next-step-item-disabled .next-step-item-node-dot{right:50%;left:auto}.next-step-arrow[dir=rtl] .next-step-item-disabled:before{border:16px solid #fafafa;border-right-color:transparent}.next-step-arrow[dir=rtl] .next-step-item-disabled:after{border-right-color:#fafafa;border-left-color:transparent}.next-step-arrow[dir=rtl] .next-step-item-first{margin-right:0}.next-step-arrow[dir=rtl] .next-step-item-last{margin-left:0}.next-step-circle[dir=rtl] .next-step-item-disabled .next-step-item-node-dot,.next-step-circle[dir=rtl]>.next-step-item-finish .next-step-item-node-dot,.next-step-circle[dir=rtl]>.next-step-item-process .next-step-item-node-dot,.next-step-circle[dir=rtl]>.next-step-item-wait .next-step-item-node-dot{right:50%;left:auto}.next-step-circle[dir=rtl].next-step-horizontal>.next-step-item-disabled>.next-step-item-body,.next-step-circle[dir=rtl].next-step-horizontal>.next-step-item-finish>.next-step-item-body,.next-step-circle[dir=rtl].next-step-horizontal>.next-step-item-process>.next-step-item-body,.next-step-circle[dir=rtl].next-step-horizontal>.next-step-item-wait>.next-step-item-body{right:-26px;left:auto}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-body{left:auto;right:0;text-align:right}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-body .next-step-item-title{padding-left:8px;padding-right:0}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-tail{left:0;right:auto}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-body{left:auto;right:0;text-align:right}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-body .next-step-item-title{padding-left:8px;padding-right:0}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-tail{left:0;right:auto}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-body{left:auto;right:0;text-align:right}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-body .next-step-item-title{padding-left:8px;padding-right:0}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-tail{left:0;right:auto}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-body{left:auto;right:0;text-align:right}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-body .next-step-item-title{padding-left:8px;padding-right:0}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-tail{left:0;right:auto}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body{right:16px;left:auto;margin-right:8px;margin-left:0}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body{right:16px;left:auto;margin-right:8px;margin-left:0}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body{right:16px;left:auto;margin-right:8px;margin-left:0}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body{right:16px;left:auto;margin-right:8px;margin-left:0}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-dot[dir=rtl] .next-step-item-disabled .next-step-item-node-dot,.next-step-dot[dir=rtl]>.next-step-item-finish .next-step-item-node-dot,.next-step-dot[dir=rtl]>.next-step-item-process .next-step-item-node-dot,.next-step-dot[dir=rtl]>.next-step-item-wait .next-step-item-node-dot{right:50%;left:auto}.next-step-dot[dir=rtl].next-step-horizontal>.next-step-item-disabled>.next-step-item-body,.next-step-dot[dir=rtl].next-step-horizontal>.next-step-item-finish>.next-step-item-body,.next-step-dot[dir=rtl].next-step-horizontal>.next-step-item-process>.next-step-item-body,.next-step-dot[dir=rtl].next-step-horizontal>.next-step-item-wait>.next-step-item-body{right:-36px;left:auto}.next-step-dot[dir=rtl].next-step-vertical{padding:0 4px 0 0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body{right:6px;left:auto;margin-right:8px;margin-left:0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body{right:6px;left:auto;margin-right:8px;margin-left:0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body{right:6px;left:auto;margin-right:8px;margin-left:0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body{right:6px;left:auto;margin-right:8px;margin-left:0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{text-align:right}.next-switch:after[dir=rtl]{content:" ";transition:all .1s linear;transform-origin:right center}.next-switch-medium[dir=rtl]:after,.next-switch-small[dir=rtl]:after{right:100%;transform:translateX(100%)}.next-switch-on[dir=rtl]>.next-switch-children{color:#fff}.next-switch-on[disabled][dir=rtl]:after{left:0;right:100%;box-shadow:1px 1px 3px 0 rgba(0,0,0,.12)}.next-switch-off[dir=rtl]:after{right:0;transform:translateX(0);box-shadow:-1px 0 3px 0 rgba(0,0,0,.12)}.next-switch-off.next-switch-small[dir=rtl]>.next-switch-children,.next-switch-off[dir=rtl]>.next-switch-children{right:auto}.next-switch{outline:none;text-align:left;cursor:pointer;vertical-align:middle;user-select:none;overflow:hidden;transition:background .1s cubic-bezier(.4,0,.2,1),border-color .1s cubic-bezier(.4,0,.2,1)}.next-switch,.next-switch *,.next-switch :after,.next-switch :before{box-sizing:border-box}.next-switch-btn{transition:all .15s cubic-bezier(.4,0,.2,1);transform-origin:left center}.next-switch:after{content:""}.next-switch-loading{pointer-events:none}.next-switch-loading .next-icon-loading{color:#209bfa;text-align:center;transform:translate(-1px,-1px)}.next-switch-loading .next-icon-loading.next-switch-inner-icon:before{vertical-align:top}.next-switch-medium{position:relative;display:inline-block;border:2px solid transparent;width:48px;height:28px;border-radius:12px}.next-switch-medium:not([disabled]):active .next-switch-btn{width:31.2px}.next-switch-medium.next-switch-on:not([disabled]):active .next-switch-btn{left:calc(100% - 31.2px)}.next-switch-medium.next-switch-auto-width{min-width:48px;width:auto;overflow:initial}.next-switch-medium:after{content:""}.next-switch-medium>.next-switch-btn{border:1px solid transparent;position:absolute;left:calc(100% - 24px);width:24px;height:24px;border-radius:12px;box-sizing:border-box}.next-switch-medium>.next-switch-children{height:24px;line-height:24px;font-size:14px}.next-switch-medium.next-switch.next-switch-on>.next-switch-children{margin:0 32px 0 8px}.next-switch-medium.next-switch.next-switch-off>.next-switch-children{margin:0 8px 0 32px}.next-switch-medium.next-switch-loading .next-icon-loading{line-height:24px;height:24px;width:24px}.next-switch-medium.next-switch-loading .next-icon-loading .next-icon-remote,.next-switch-medium.next-switch-loading .next-icon-loading:before{width:16px;font-size:16px;line-height:inherit}.next-switch-small{position:relative;display:inline-block;border:2px solid transparent;width:44px;height:24px;border-radius:12px}.next-switch-small:not([disabled]):active .next-switch-btn{width:26px}.next-switch-small.next-switch-on:not([disabled]):active .next-switch-btn{left:calc(100% - 26px)}.next-switch-small.next-switch-auto-width{min-width:44px;width:auto;overflow:initial}.next-switch-small:after{content:""}.next-switch-small>.next-switch-btn{border:1px solid transparent;position:absolute;left:calc(100% - 20px);width:20px;height:20px;border-radius:12px;box-sizing:border-box}.next-switch-small>.next-switch-children{height:20px;line-height:20px;font-size:12px}.next-switch-small.next-switch.next-switch-on>.next-switch-children{margin:0 28px 0 8px}.next-switch-small.next-switch.next-switch-off>.next-switch-children{margin:0 8px 0 28px}.next-switch-small.next-switch-loading .next-icon-loading{line-height:20px;height:20px;width:20px}.next-switch-small.next-switch-loading .next-icon-loading .next-icon-remote,.next-switch-small.next-switch-loading .next-icon-loading:before{width:12px;font-size:12px;line-height:inherit}.next-switch-on{background-color:#209bfa}.next-switch-on .next-switch-btn{box-shadow:1px 1px 3px 0 rgba(0,0,0,.12);background-color:#fff;border-color:transparent}.next-switch-on>.next-switch-children{color:#fff}.next-switch-on.hover,.next-switch-on:focus,.next-switch-on:hover{background-color:#1274e7}.next-switch-on.hover .next-switch-btn,.next-switch-on:focus .next-switch-btn,.next-switch-on:hover .next-switch-btn{background-color:#fff}.next-switch-on[disabled]{background-color:#f5f5f5;cursor:not-allowed}.next-switch-on[disabled] .next-switch-btn{right:0;box-shadow:1px 1px 3px 0 rgba(0,0,0,.12);background-color:#fafafa;border-color:transparent}.next-switch-on[disabled]>.next-switch-children{color:#ccc}.next-switch-off,.next-switch-off.hover,.next-switch-off:focus,.next-switch-off:hover{background-color:#f5f5f5;border-color:#f5f5f5}.next-switch-off .next-switch-btn{left:0;box-shadow:1px 1px 3px 0 rgba(0,0,0,.12);background-color:#fff;border-color:transparent}.next-switch-off.hover .next-switch-btn,.next-switch-off:focus .next-switch-btn,.next-switch-off:hover .next-switch-btn{background-color:#fff}.next-switch-off>.next-switch-children{color:#999}.next-switch-off[disabled]{background-color:#f5f5f5;cursor:not-allowed}.next-switch-off[disabled] .next-switch-btn{box-shadow:1px 1px 3px 0 rgba(0,0,0,.12);background-color:#fafafa;border-color:transparent}.next-switch-off[disabled]>.next-switch-children{color:#ddd}.next-tabs{width:100%}.next-tabs,.next-tabs *,.next-tabs :after,.next-tabs :before{box-sizing:border-box}.next-tabs-bar{outline:none}.next-tabs-bar-popup{overflow-y:auto;max-height:480px}.next-tabs-nav-container{position:relative}.next-tabs-nav-container:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-tabs-nav-wrap{overflow:hidden}.next-tabs-nav-scroll{overflow:hidden;white-space:nowrap}.next-tabs-scrollable .next-tabs-nav-scroll{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.next-tabs-scrollable .next-tabs-nav-scroll::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;-webkit-appearance:none;opacity:0!important}.next-tabs-nav{display:inline-block;position:relative;transition:all .3s ease;list-style:none;padding:0;margin:0}.next-tabs-nav-appear,.next-tabs-nav-enter{animation:fadeInLeft .4s cubic-bezier(.78,.14,.15,.86);animation-fill-mode:both}.next-tabs-nav-leave{animation:fadeOutLeft .2s cubic-bezier(.78,.14,.15,.86);animation-fill-mode:both}.next-tabs-nav.next-disable-animation .next-tabs-tab:before{transition:none}.next-tabs-tab{display:inline-block;position:relative;transition:all .1s linear}.next-tabs-tab-inner{position:relative;cursor:pointer;text-decoration:none}.next-tabs-tab:before{content:"";position:absolute;transition:all .3s ease}.next-tabs-tab.active{font-weight:400}.next-tabs-tab .next-tabs-tab-close{color:#666}.next-tabs-tab .next-tabs-tab-close:hover{color:#333}.next-tabs-tab .next-tabs-tab-close:focus{outline:none}.next-tabs-tab.active .next-tabs-tab-close{color:#209bfa}.next-tabs-tab.disabled .next-tabs-tab-close{color:#e6e6e6}.next-tabs-tab:focus{outline:none}.next-tabs-tabpane{visibility:hidden;opacity:0}.next-tabs-tabpane.active{visibility:visible;opacity:1;height:auto}.next-tabs-tabpane.hidden{overflow:hidden;height:0!important;margin:0!important;padding:0!important;border:0!important}.next-tabs-btn-down,.next-tabs-btn-next,.next-tabs-btn-prev{position:absolute;top:0;cursor:pointer;padding:0;border:0;outline:none;height:100%;background:transparent;border-color:transparent}.next-tabs-btn-down,.next-tabs-btn-down.visited,.next-tabs-btn-down:link,.next-tabs-btn-down:visited,.next-tabs-btn-next,.next-tabs-btn-next.visited,.next-tabs-btn-next:link,.next-tabs-btn-next:visited,.next-tabs-btn-prev,.next-tabs-btn-prev.visited,.next-tabs-btn-prev:link,.next-tabs-btn-prev:visited{color:#666}.next-tabs-btn-down.active,.next-tabs-btn-down.hover,.next-tabs-btn-down:active,.next-tabs-btn-down:focus,.next-tabs-btn-down:hover,.next-tabs-btn-next.active,.next-tabs-btn-next.hover,.next-tabs-btn-next:active,.next-tabs-btn-next:focus,.next-tabs-btn-next:hover,.next-tabs-btn-prev.active,.next-tabs-btn-prev.hover,.next-tabs-btn-prev:active,.next-tabs-btn-prev:focus,.next-tabs-btn-prev:hover{color:#333;background:transparent;border-color:transparent;text-decoration:none}.next-tabs-btn-down.disabled,.next-tabs-btn-next.disabled,.next-tabs-btn-prev.disabled{cursor:not-allowed;color:#e6e6e6}.next-tabs-btn-next{right:8px}.next-tabs-btn-prev{right:32px}.next-tabs-btn-down{right:8px}.next-tabs .next-tab-icon-dropdown:before{content:""}.next-tabs .next-tab-icon-prev:before{content:""}.next-tabs .next-tab-icon-next:before{content:""}.next-tabs-content{overflow:hidden}.next-tabs-vertical>.next-tabs-bar .next-tabs-nav{width:100%}.next-tabs-vertical>.next-tabs-bar .next-tabs-tab{display:block}.next-tabs.next-medium .next-tabs-nav-container-scrolling{padding-right:60px}.next-tabs.next-medium .next-tabs-tab-inner{font-size:14px;padding:20px 16px}.next-tabs.next-medium .next-tabs-tab-inner .next-icon{line-height:1}.next-tabs.next-medium .next-tabs-tab-inner .next-icon .next-icon-remote,.next-tabs.next-medium .next-tabs-tab-inner .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-tabs.next-medium .next-tabs-tab-inner .next-tabs-tab-close .next-icon-remote,.next-tabs.next-medium .next-tabs-tab-inner .next-tabs-tab-close:before{width:12px;font-size:12px;line-height:inherit}.next-tabs.next-medium .next-tabs-tab-inner .next-tabs-tab-close.next-icon{margin-left:8px}.next-tabs.next-medium .next-tabs-tab-inner .next-icon-add .next-icon-remote,.next-tabs.next-medium .next-tabs-tab-inner .next-icon-add:before{width:12px;font-size:12px;line-height:inherit}.next-tabs.next-medium .next-tabs-btn-down .next-icon .next-icon-remote,.next-tabs.next-medium .next-tabs-btn-down .next-icon:before,.next-tabs.next-medium .next-tabs-btn-next .next-icon .next-icon-remote,.next-tabs.next-medium .next-tabs-btn-next .next-icon:before,.next-tabs.next-medium .next-tabs-btn-prev .next-icon .next-icon-remote,.next-tabs.next-medium .next-tabs-btn-prev .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-tabs.next-small .next-tabs-nav-container-scrolling{padding-right:56px}.next-tabs.next-small .next-tabs-tab-inner{font-size:12px;padding:8px 12px}.next-tabs.next-small .next-tabs-tab-inner .next-icon{line-height:1}.next-tabs.next-small .next-tabs-tab-inner .next-icon .next-icon-remote,.next-tabs.next-small .next-tabs-tab-inner .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close .next-icon-remote,.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close:before{width:16px;font-size:16px}}.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close.next-icon{margin-left:8px}.next-tabs.next-small .next-tabs-tab-inner .next-icon-add .next-icon-remote,.next-tabs.next-small .next-tabs-tab-inner .next-icon-add:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tabs.next-small .next-tabs-tab-inner .next-icon-add{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-tabs.next-small .next-tabs-tab-inner .next-icon-add:before{width:16px;font-size:16px}}.next-tabs.next-small .next-tabs-btn-down .next-icon .next-icon-remote,.next-tabs.next-small .next-tabs-btn-down .next-icon:before,.next-tabs.next-small .next-tabs-btn-next .next-icon .next-icon-remote,.next-tabs.next-small .next-tabs-btn-next .next-icon:before,.next-tabs.next-small .next-tabs-btn-prev .next-icon .next-icon-remote,.next-tabs.next-small .next-tabs-btn-prev .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-tabs-show-add{position:relative;display:flex;flex:none;align-items:center;padding-right:0!important}.next-tabs-show-add .next-tabs-nav-wrap{position:relative;display:flex;flex:auto;align-self:stretch;overflow:hidden;white-space:nowrap}.next-tabs-show-add .next-tabs-nav-wrap:after{position:absolute;height:100%;width:1px;right:0;content:"";pointer-events:none;box-shadow:-2px 0 3px 0 rgba(0,0,0,.12);z-index:1}.next-tabs-show-add .next-tabs-nav-operations{display:flex;align-self:stretch}.next-tabs-show-add .next-tabs-nav-operations .next-tabs-btn-prev{position:static;right:auto}.next-tabs-show-add .next-tabs-nav-operations .next-tabs-btn-down,.next-tabs-show-add .next-tabs-nav-operations .next-tabs-btn-next{position:static;margin-left:8px;right:auto}.next-tabs.next-small .next-tabs-nav-operations .next-tabs-btn-prev{margin-left:8px}.next-tabs.next-small .next-tabs-nav-operations .next-tabs-btn-next{margin-right:8px}.next-tabs.next-medium .next-tabs-nav-operations .next-tabs-btn-prev{margin-left:12px}.next-tabs.next-medium .next-tabs-nav-operations .next-tabs-btn-next{margin-right:12px}.next-tabs-pure>.next-tabs-bar{border-bottom:1px solid #e6e6e6;background-color:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container{margin-bottom:-1px;box-shadow:none}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab{color:#666;background-color:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab:hover{cursor:pointer;color:#333;background-color:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab.active{z-index:1;color:#209bfa;background-color:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab.disabled{pointer-events:none;cursor:default;color:#e6e6e6;background:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab:before{border-radius:0;width:0;border-bottom:2px solid #209bfa;left:50%;bottom:0}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab.active:before{width:100%;left:0}.next-tabs-wrapped>.next-tabs-bar{background:transparent}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab{color:#666;background-color:#f9f9f9}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab:hover{cursor:pointer;color:#333;background-color:#f5f5f5}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab.active{z-index:1;color:#209bfa;background-color:#fff}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab.disabled{pointer-events:none;cursor:default;color:#ccc;background:#fafafa}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab .next-tabs-tab-close{color:#666}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab .next-tabs-tab-close:hover{color:#333}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab .next-tabs-tab-close:focus{outline:none}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab.active .next-tabs-tab-close{color:#209bfa}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab.disabled .next-tabs-tab-close{color:#e6e6e6}.next-tabs-wrapped:after,.next-tabs-wrapped:before{content:"";display:table}.next-tabs-wrapped:after{clear:both}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar,.next-tabs-wrapped>.next-tabs-content{position:relative}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab{border-radius:3px 3px 0 0;border:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab+.next-tabs-tab{margin-left:4px}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab:hover{border-color:#ddd}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab.active{border-color:#e6e6e6 #e6e6e6 #fff}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab:before{border-radius:3px;width:0;border-top:2px solid #209bfa;left:50%;top:-1px}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab.active:before{width:calc(100% - 6px);left:3px}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab.active{border-width:1px}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar:before{content:"";position:absolute;top:100%;width:100%;height:0;border-bottom:1px solid #e6e6e6;transform:translateY(-1px);display:block}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar{position:relative}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab{margin-right:4px;border:1px solid #e6e6e6;border-radius:0 0 3px 3px}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab:hover{border-color:#ddd}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab.active{border-color:#fff #e6e6e6 #e6e6e6}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab:before{border-radius:3px;width:0;border-bottom:2px solid #209bfa;left:50%;bottom:-1px}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab.active:before{width:calc(100% - 6px);left:3px}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-content{top:1px;border-bottom:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar{float:left}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab{float:none;margin-bottom:4px;border-radius:3px 0 0 3px;border:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab:hover{border-color:#ddd}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab.active{border-color:#e6e6e6 #fff #e6e6e6 #e6e6e6}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab:before{border-radius:3px;height:0;border-left:2px solid #209bfa;top:50%;left:-1px}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab.active:before{height:calc(100% - 6px);top:3px}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab.active{border-width:1px}.next-tabs-wrapped.next-tabs-left>.next-tabs-content{right:1px;border-left:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar{float:right}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab{float:none;margin-bottom:4px;border-radius:0 3px 3px 0;border:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab:hover{border-color:#ddd}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab.active{border-color:#e6e6e6 #e6e6e6 #e6e6e6 #fff}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab:before{border-radius:3px;height:0;border-right:2px solid #209bfa;top:50%;right:-1px}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab.active:before{height:calc(100% - 6px);top:3px}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab.active{border-width:1px}.next-tabs-wrapped.next-tabs-right>.next-tabs-content{right:-1px;border-right:1px solid #e6e6e6}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab{transition:background-color .1s linear;border:1px solid #ddd;border-right-color:transparent;margin-right:-1px;color:#333;background-color:#f9f9f9}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab:first-child{border-radius:3px 0 0 3px}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab:last-child{border-radius:0 3px 3px 0;border-right:1px solid #ddd;margin-right:0}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab.active{border-right:1px solid;border-color:#209bfa}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab.disabled{border-color:#eee}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab:hover{z-index:2;border-right:1px solid;border-color:#ddd;cursor:pointer;color:#333;background-color:#f5f5f5}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab.active{z-index:1;color:#fff;background-color:#209bfa}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab.disabled{pointer-events:none;cursor:default;color:#ccc;background:#fafafa}.next-tabs-text>.next-tabs-bar .next-tabs-tab{color:#666;background-color:transparent}.next-tabs-text>.next-tabs-bar .next-tabs-tab:hover{cursor:pointer;color:#333;background-color:transparent}.next-tabs-text>.next-tabs-bar .next-tabs-tab.active{z-index:1;color:#209bfa;background-color:transparent}.next-tabs-text>.next-tabs-bar .next-tabs-tab.disabled{pointer-events:none;cursor:default;color:#ccc;background:transparent}.next-tabs-text>.next-tabs-bar .next-tabs-tab:not(:last-child):after{content:"";position:absolute;right:0;top:calc(50% - 4px);width:1px;height:8px;background-color:#e6e6e6}.next-tabs-pure>.next-tabs-bar{position:relative}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs-capsule>.next-tabs-bar{position:relative}.next-tabs-capsule>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs-text>.next-tabs-bar{position:relative}.next-tabs-text>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs[dir=rtl].next-medium .next-tabs-nav-container-scrolling{padding-left:60px;padding-right:0}.next-tabs[dir=rtl].next-medium .next-tabs-tab-close{padding-right:8px;padding-left:0}.next-tabs[dir=rtl].next-small .next-tabs-nav-container-scrolling{padding-left:56px;padding-right:0}.next-tabs[dir=rtl].next-small .next-tabs-tab-close{padding-right:8px;padding-left:0}.next-tabs[dir=rtl].next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-nav-extra,.next-tabs[dir=rtl].next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-nav-extra,.next-tabs[dir=rtl]>.next-tabs-bar .next-tabs-nav-extra{right:auto;left:0}.next-tabs[dir=rtl].next-tabs-capsule>.next-tabs-bar .next-tabs-tab{border:1px solid #ddd;border-left:0}.next-tabs[dir=rtl].next-tabs-capsule>.next-tabs-bar .next-tabs-tab:first-child{border-left:0;border-radius:0 3px 3px 0}.next-tabs[dir=rtl].next-tabs-capsule>.next-tabs-bar .next-tabs-tab:last-child{border-radius:3px 0 0 3px;border-left:1px solid #ddd}.next-tabs[dir=rtl].next-tabs-capsule>.next-tabs-bar .next-tabs-tab.active{margin-left:-1px;margin-right:auto;border-left:1px solid;border-color:#209bfa}.next-tabs[dir=rtl] .next-tabs-btn-next{left:8px;right:auto}.next-tabs[dir=rtl] .next-tabs-btn-prev{left:32px;right:auto}.next-tabs[dir=rtl] .next-tabs-btn-down{left:8px;right:auto}.next-tabs-text[dir=rtl]>.next-tabs-bar .next-tabs-tab:not(:last-child):after{content:"";position:absolute;left:0;right:auto}@keyframes fadeInRightForTag{0%{opacity:0;transform:rotate(45deg) translateX(20px)}to{opacity:1;transform:rotate(45deg) translateX(0)}}.next-tag>.next-tag-body{overflow:hidden;text-overflow:ellipsis}.next-tag-checkable.next-tag-level-secondary{color:#333;border-color:transparent;background-color:transparent}.next-tag-checkable.next-tag-level-secondary:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-secondary:not(.disabled):not([disabled]):hover{color:#209bfa}.next-tag-default.next-tag-level-primary{color:#666;border-color:#f5f5f5;background-color:#f5f5f5}.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]):hover{color:#333;border-color:#f2f2f2;background-color:#f2f2f2}.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-default.next-tag-level-primary,[disabled].next-tag-default.next-tag-level-primary{color:#ccc;border-color:#fafafa;background-color:#fafafa}.disabled.next-tag-default.next-tag-level-primary>.next-tag-close-btn,[disabled].next-tag-default.next-tag-level-primary>.next-tag-close-btn{color:#ccc}.next-tag-default.next-tag-level-primary>.next-tag-close-btn{color:#666}.next-tag-closable.next-tag-level-primary{color:#666;border-color:#f5f5f5;background-color:#f5f5f5}.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]):hover{color:#333;border-color:#f2f2f2;background-color:#f2f2f2}.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-closable.next-tag-level-primary,[disabled].next-tag-closable.next-tag-level-primary{color:#ccc;border-color:#fafafa;background-color:#fafafa}.disabled.next-tag-closable.next-tag-level-primary>.next-tag-close-btn,[disabled].next-tag-closable.next-tag-level-primary>.next-tag-close-btn{color:#ccc}.next-tag-closable.next-tag-level-primary>.next-tag-close-btn{color:#666}.next-tag-checkable.next-tag-level-primary{color:#666;border-color:#f5f5f5;background-color:#f5f5f5}.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]):hover{color:#333;border-color:#f2f2f2;background-color:#f2f2f2}.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-checkable.next-tag-level-primary,[disabled].next-tag-checkable.next-tag-level-primary{color:#ccc;border-color:#fafafa;background-color:#fafafa}.disabled.next-tag-checkable.next-tag-level-primary>.next-tag-close-btn,[disabled].next-tag-checkable.next-tag-level-primary>.next-tag-close-btn{color:#ccc}.next-tag-checkable.next-tag-level-primary>.next-tag-close-btn{color:#666}.next-tag-checkable.next-tag-level-primary.checked{color:#fff;border-color:#209bfa;background-color:#209bfa}.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]):hover{color:#fff;border-color:#1274e7;background-color:#1274e7}.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#fff}.disabled.next-tag-checkable.next-tag-level-primary.checked,[disabled].next-tag-checkable.next-tag-level-primary.checked{color:#ccc;border-color:#fafafa;background-color:#fafafa}.disabled.next-tag-checkable.next-tag-level-primary.checked>.next-tag-close-btn,.next-tag-checkable.next-tag-level-primary.checked>.next-tag-close-btn,[disabled].next-tag-checkable.next-tag-level-primary.checked>.next-tag-close-btn{color:#fff}.next-tag-default.next-tag-level-normal{color:#666;border-color:#ddd;background-color:transparent}.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]):hover{color:#333;border-color:#ccc;background-color:transparent}.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-default.next-tag-level-normal,[disabled].next-tag-default.next-tag-level-normal{color:#ccc;border-color:#eee;background-color:#fafafa}.disabled.next-tag-default.next-tag-level-normal>.next-tag-close-btn,[disabled].next-tag-default.next-tag-level-normal>.next-tag-close-btn{color:#ccc}.next-tag-default.next-tag-level-normal>.next-tag-close-btn{color:#666}.next-tag-closable.next-tag-level-normal{color:#666;border-color:#ddd;background-color:transparent}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover{color:#333;border-color:#ccc;background-color:transparent}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-closable.next-tag-level-normal,[disabled].next-tag-closable.next-tag-level-normal{color:#ccc;border-color:#eee;background-color:transparent}.disabled.next-tag-closable.next-tag-level-normal>.next-tag-close-btn,[disabled].next-tag-closable.next-tag-level-normal>.next-tag-close-btn{color:#ccc}.next-tag-closable.next-tag-level-normal>.next-tag-close-btn{color:#666}.next-tag-checkable.next-tag-level-normal.checked{color:#209bfa;border-color:#209bfa;background-color:transparent}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover{color:#1274e7;border-color:#1274e7;background-color:transparent}.next-tag-checkable.next-tag-level-secondary.checked{color:#209bfa;border-color:#209bfa;background-color:transparent}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover{color:#1274e7;border-color:#1274e7;background-color:transparent}.next-tag-checkable.next-tag-level-secondary.checked:before{position:absolute;content:"";-webkit-font-smoothing:antialiased;background-color:#209bfa;transform:rotate(45deg)}.next-tag-checkable.next-tag-level-secondary.checked:after{position:absolute;font-family:NextIcon;-webkit-font-smoothing:antialiased;content:"";transform:scale(.6);color:#fff}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover:before,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover:before{background-color:#1274e7}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover:after,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover:after{color:#fff}.next-tag-checkable.next-tag-level-secondary.checked:disabled:before,[disabled].next-tag-checkable.next-tag-level-secondary.checked:before{background-color:#eee}.next-tag-checkable.next-tag-level-secondary.checked:disabled:after,[disabled].next-tag-checkable.next-tag-level-secondary.checked:after{color:#fff}.next-tag-checkable.next-tag-level-normal{color:#666;border-color:#ddd;background-color:transparent}.next-tag-checkable.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-normal:not(.disabled):not([disabled]):hover{color:#333;border-color:#ddd;background-color:transparent}.disabled.next-tag-checkable.next-tag-level-normal,[disabled].next-tag-checkable.next-tag-level-normal{color:#ccc;border-color:#eee;background-color:#fafafa}.next-tag-checkable.next-tag-level-normal.checked:before{position:absolute;content:"";-webkit-font-smoothing:antialiased;background-color:#209bfa;transform:rotate(45deg)}.next-tag-checkable.next-tag-level-normal.checked:after{position:absolute;font-family:NextIcon;-webkit-font-smoothing:antialiased;content:"";transform:scale(.6);color:#fff}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover:before,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover:before{background-color:#1274e7}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover:after,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover:after{color:#fff}.next-tag-checkable.next-tag-level-normal.checked:disabled:before,[disabled].next-tag-checkable.next-tag-level-normal.checked:before{background-color:#eee}.next-tag-checkable.next-tag-level-normal.checked:disabled:after,[disabled].next-tag-checkable.next-tag-level-normal.checked:after{color:#fff}.next-tag-closable.next-tag-level-normal:before{position:absolute;content:"";-webkit-font-smoothing:antialiased;background-color:#ddd;transform:rotate(45deg)}.next-tag-closable.next-tag-level-normal:after{position:absolute;font-family:NextIcon;-webkit-font-smoothing:antialiased;content:"";transform:scale(.6);color:#fff}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover:before,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover:before{background-color:#ccc}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover:after,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover:after{color:#fff}.next-tag-closable.next-tag-level-normal:disabled:before,[disabled].next-tag-closable.next-tag-level-normal:before{background-color:#eee}.next-tag-closable.next-tag-level-normal:disabled:after,[disabled].next-tag-closable.next-tag-level-normal:after{color:#fff}.next-tag-group .next-tag-large,.next-tag-group .next-tag-medium{margin-right:8px;margin-bottom:8px}.next-tag-group .next-tag-small{margin-right:4px;margin-bottom:4px}.next-tag{display:inline-block;max-width:100%;vertical-align:middle;border-width:1px;border-radius:3px;box-shadow:none;border-style:solid;overflow:hidden;white-space:nowrap;transition:all .1s linear;font-size:0;outline:0}.next-tag,.next-tag *,.next-tag :after,.next-tag :before{box-sizing:border-box}.next-tag>.next-tag-body{position:relative;display:inline-block;height:100%;text-align:center;vertical-align:middle;max-width:100%;cursor:default}.next-tag>.next-tag-body>a{text-decoration:none;color:inherit}.next-tag>.next-tag-body>a:before{content:" ";position:absolute;display:block;top:0;left:0;right:0;bottom:0}.next-tag>.next-tag-body .next-icon{line-height:1;vertical-align:baseline}.next-tag>.next-tag-body .next-icon:before{font-size:inherit}.next-tag.next-tag-body-pointer{cursor:pointer}.next-tag.disabled,.next-tag[disabled]{cursor:not-allowed;pointer-events:none}.next-tag-blue{background-color:#4494f9;border-color:#4494f9;color:#fff}.next-tag-blue-inverse{background-color:rgba(68,148,249,.25);border-color:#4494f9;color:#4494f9}.next-tag-green{background-color:#46bc15;border-color:#46bc15;color:#fff}.next-tag-green-inverse{background-color:rgba(70,188,21,.25);border-color:#46bc15;color:#46bc15}.next-tag-orange{background-color:#ff9300;border-color:#ff9300;color:#fff}.next-tag-orange-inverse{background-color:rgba(255,147,0,.25);border-color:#ff9300;color:#ff9300}.next-tag-red{background-color:#ff3000;border-color:#ff3000;color:#fff}.next-tag-red-inverse{background-color:rgba(255,48,0,.25);border-color:#ff3000;color:#ff3000}.next-tag-turquoise{background-color:#01c1b2;border-color:#01c1b2;color:#fff}.next-tag-turquoise-inverse{background-color:rgba(1,193,178,.25);border-color:#01c1b2;color:#01c1b2}.next-tag-yellow{background-color:#fccc12;border-color:#fccc12;color:#fff}.next-tag-yellow-inverse{background-color:rgba(252,204,18,.25);border-color:#fccc12;color:#fccc12}.next-tag-large{height:40px;padding:0;line-height:38px;font-size:0}.next-tag-large>.next-tag-body{font-size:16px;padding:0 16px;min-width:48px}.next-tag-large.next-tag-closable>.next-tag-body{padding:0 0 0 16px;max-width:calc(100% - 48px)}.next-tag-large[dir=rtl].next-tag-closable>.next-tag-body{padding:0 16px 0 0}.next-tag-large.next-tag-closable>.next-tag-close-btn{margin-left:16px;padding-right:16px}.next-tag-large.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-large.next-tag-closable>.next-tag-close-btn .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-tag-large[dir=rtl]>.next-tag-close-btn{margin-right:16px;margin-left:0;padding-right:0;padding-left:16px}.next-tag-medium{height:32px;padding:0;line-height:30px;font-size:0}.next-tag-medium>.next-tag-body{font-size:14px;padding:0 12px;min-width:40px}.next-tag-medium.next-tag-closable>.next-tag-body{padding:0 0 0 12px;max-width:calc(100% - 36px)}.next-tag-medium[dir=rtl].next-tag-closable>.next-tag-body{padding:0 12px 0 0}.next-tag-medium.next-tag-closable>.next-tag-close-btn{margin-left:12px;padding-right:12px}.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-tag-medium[dir=rtl]>.next-tag-close-btn{margin-right:12px;margin-left:0;padding-right:0;padding-left:12px}.next-tag-small{height:24px;padding:0;line-height:22px;font-size:0}.next-tag-small>.next-tag-body{font-size:12px;padding:0 8px;min-width:28px}.next-tag-small.next-tag-closable>.next-tag-body{padding:0 0 0 8px;max-width:calc(100% - 24px)}.next-tag-small[dir=rtl].next-tag-closable>.next-tag-body{padding:0 8px 0 0}.next-tag-small.next-tag-closable>.next-tag-close-btn{margin-left:8px;padding-right:8px}.next-tag-small.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-small.next-tag-closable>.next-tag-close-btn .next-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tag-small.next-tag-closable>.next-tag-close-btn .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-tag-small.next-tag-closable>.next-tag-close-btn .next-icon:before{width:16px;font-size:16px}}.next-tag-small[dir=rtl]>.next-tag-close-btn{margin-right:8px;margin-left:0;padding-right:0;padding-left:8px}.next-tag-default{cursor:default}.next-tag-closable{position:relative}.next-tag-closable>.next-tag-close-btn{display:inline-block;vertical-align:middle;height:100%;text-align:center;cursor:pointer}.next-tag-checkable{cursor:pointer;position:relative;border-radius:3px}.next-tag-checkable.checked:before{animation:fadeInRightForTag .4s cubic-bezier(.78,.14,.15,.86)}.next-tag-checkable.checked:after{animation:zoomIn .4s cubic-bezier(.78,.14,.15,.86)}.next-tag-checkable.next-tag-small:not(.next-tag-level-primary):before{right:-10px;bottom:-10px;width:20px;height:20px}.next-tag-checkable.next-tag-small:not(.next-tag-level-primary):after{font-size:8px;line-height:8px;right:0;bottom:0}.next-tag-checkable.next-tag-medium:not(.next-tag-level-primary):before{right:-14px;bottom:-14px;width:28px;height:28px}.next-tag-checkable.next-tag-medium:not(.next-tag-level-primary):after{font-size:12px;line-height:12px;right:0;bottom:0}.next-tag-checkable.next-tag-large:not(.next-tag-level-primary):before{right:-18px;bottom:-18px;width:36px;height:36px}.next-tag-checkable.next-tag-large:not(.next-tag-level-primary):after{font-size:16px;line-height:16px;right:0;bottom:0}.next-tag-checkable.next-tag-level-secondary.disabled,.next-tag-checkable.next-tag-level-secondary[disabled]{color:#ccc;border-color:#eee;background-color:#fafafa}.next-tag-zoom-appear,.next-tag-zoom-enter{animation:fadeInLeft .4s cubic-bezier(.78,.14,.15,.86);animation-fill-mode:both}.next-tag-zoom-leave{animation:zoomOut .3s ease-in;animation-fill-mode:both}.next-timeline,.next-timeline *,.next-timeline:after,.next-timeline :after,.next-timeline:before,.next-timeline :before{box-sizing:border-box}.next-timeline ul{margin:0;padding:0;list-style:none}.next-timeline p{margin:0}.next-timeline-hide{display:none}.next-timeline[dir=rtl] .next-timeline-item-folder{padding-left:0;padding-right:28px}.next-timeline[dir=rtl] .next-timeline-item-dot-tail{left:auto;right:8px;border-left:none;border-right:1px dotted #e6e6e6}.next-timeline[dir=rtl] .next-timeline-item-has-left-content.next-timeline-item-folder{margin-left:0;margin-right:80px}.next-timeline[dir=rtl] .next-timeline-item-done{position:relative}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline{position:absolute;left:auto;right:0;top:0;height:100%}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:right}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-right:-12px;margin-left:0;line-height:1}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:auto;right:8px}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-content{display:inline-block;margin-right:28px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:left;padding-left:12px;padding-right:0}.next-timeline[dir=rtl] .next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline[dir=rtl] .next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-right:80px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-content{margin-right:108px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-dot{background:#ddd}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-icon{background:#ddd;color:#fff}.next-timeline[dir=rtl] .next-timeline-item-process{position:relative}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline{position:absolute;left:auto;right:0;top:0;height:100%}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:right}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-right:-12px;margin-left:0;line-height:1}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:auto;right:8px}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-content{display:inline-block;margin-right:28px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:left;padding-left:12px;padding-right:0}.next-timeline[dir=rtl] .next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline[dir=rtl] .next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-right:80px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-content{margin-right:108px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-dot{background:#209bfa}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-icon{background:#209bfa;color:#fff}.next-timeline[dir=rtl] .next-timeline-item-success{position:relative}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline{position:absolute;left:auto;right:0;top:0;height:100%}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:right}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-right:-12px;margin-left:0;line-height:1}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:auto;right:8px}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-content{display:inline-block;margin-right:28px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:left;padding-left:12px;padding-right:0}.next-timeline[dir=rtl] .next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline[dir=rtl] .next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-right:80px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-content{margin-right:108px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-dot{background:#1ad78c}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-icon{background:#1ad78c;color:#fff}.next-timeline[dir=rtl] .next-timeline-item-error{position:relative}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline{position:absolute;left:auto;right:0;top:0;height:100%}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:right}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-right:-12px;margin-left:0;line-height:1}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:auto;right:8px}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-content{display:inline-block;margin-right:28px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:left;padding-left:12px;padding-right:0}.next-timeline[dir=rtl] .next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline[dir=rtl] .next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-right:80px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-content{margin-right:108px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-dot{background:#d23c26}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-icon{background:#d23c26;color:#fff}.next-timeline{margin:0;padding:0;list-style:none}.next-timeline>li{outline:0}.next-timeline-item-folder{padding-left:28px;padding-top:4px;padding-bottom:4px;font-size:12px;line-height:1.5;position:relative}.next-timeline-item-dot-tail{position:absolute;top:0;left:8px;height:100%;border:0;border-left:1px dotted #e6e6e6}.next-timeline-item-dot-tail-solid{border-style:solid}.next-timeline-item-has-left-content.next-timeline-item-folder{margin-left:80px}.next-timeline-item-done{position:relative}.next-timeline-item-done .next-timeline-item-timeline{position:absolute;left:0;top:0;height:100%}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:left}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-left:-12px;line-height:1}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:8px}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline-item-done .next-timeline-item-content{display:inline-block;margin-left:28px}.next-timeline-item-done .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline-item-done .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline-item-done .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:right;padding-right:12px}.next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-left:80px}.next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-content{margin-left:108px}.next-timeline-item-done .next-timeline-item-dot{background:#ddd}.next-timeline-item-done .next-timeline-item-icon{background:#ddd;color:#fff}.next-timeline-item-process{position:relative}.next-timeline-item-process .next-timeline-item-timeline{position:absolute;left:0;top:0;height:100%}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:left}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-left:-12px;line-height:1}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:8px}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline-item-process .next-timeline-item-content{display:inline-block;margin-left:28px}.next-timeline-item-process .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline-item-process .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline-item-process .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:right;padding-right:12px}.next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-left:80px}.next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-content{margin-left:108px}.next-timeline-item-process .next-timeline-item-dot{background:#209bfa}.next-timeline-item-process .next-timeline-item-icon{background:#209bfa;color:#fff}.next-timeline-item-success{position:relative}.next-timeline-item-success .next-timeline-item-timeline{position:absolute;left:0;top:0;height:100%}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:left}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-left:-12px;line-height:1}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:8px}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline-item-success .next-timeline-item-content{display:inline-block;margin-left:28px}.next-timeline-item-success .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline-item-success .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline-item-success .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:right;padding-right:12px}.next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-left:80px}.next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-content{margin-left:108px}.next-timeline-item-success .next-timeline-item-dot{background:#1ad78c}.next-timeline-item-success .next-timeline-item-icon{background:#1ad78c;color:#fff}.next-timeline-item-error{position:relative}.next-timeline-item-error .next-timeline-item-timeline{position:absolute;left:0;top:0;height:100%}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:left}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-left:-12px;line-height:1}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:8px}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline-item-error .next-timeline-item-content{display:inline-block;margin-left:28px}.next-timeline-item-error .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline-item-error .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline-item-error .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:right;padding-right:12px}.next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-left:80px}.next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-content{margin-left:108px}.next-timeline-item-error .next-timeline-item-dot{background:#d23c26}.next-timeline-item-error .next-timeline-item-icon{background:#d23c26;color:#fff}.next-timeline.next-alternate .next-timeline-item-left .next-timeline-item-left-content,.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-left-content{width:50%;padding-right:12px}.next-timeline.next-alternate .next-timeline-item-left .next-timeline-item-timeline,.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-timeline{margin-left:50%}.next-timeline.next-alternate .next-timeline-item-left .next-timeline-item-content,.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-content{margin-left:calc(50% + 28px)}.next-timeline.next-alternate .next-timeline-item-folder{margin-left:50%}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-title{margin:4px 0 0;font-size:14px;font-weight:700;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-left-content{display:inline-block;position:relative}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-left-content .next-timeline-item-title{margin-top:0}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-content{margin-left:28px;position:absolute}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-content .next-timeline-item-body{margin-top:4px;color:#999}.next-timeline[dir=rtl].next-alternate .next-timeline-item-left .next-timeline-item-left-content,.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-left-content{width:50%;padding-left:12px}.next-timeline[dir=rtl].next-alternate .next-timeline-item-left .next-timeline-item-timeline,.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-timeline{margin-right:50%}.next-timeline[dir=rtl].next-alternate .next-timeline-item-left .next-timeline-item-content,.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-content{width:50%;margin-right:calc(50% + 28px)}.next-timeline[dir=rtl].next-alternate .next-timeline-item-folder{margin-right:50%}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-title{margin:0;font-size:14px;font-weight:700;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-body{margin:0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-left-content{display:inline-block;position:relative}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-content{margin-right:28px;position:absolute}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-content .next-timeline-item-body{text-align:right}.next-timeline-item-last .next-timeline-item-tail{display:none}.next-timeline-item-has-left-content{min-height:48px}.next-timeline-item-folder.next-timeline-item-has-left-content{min-height:auto}.next-transfer{display:inline-block}.next-transfer,.next-transfer *,.next-transfer :after,.next-transfer :before{box-sizing:border-box}.next-transfer-panel{display:inline-block;border:1px solid #e6e6e6;border-radius:3px;background-color:#fff;vertical-align:middle}.next-transfer-panel-header{padding:8px 20px;border-bottom:1px solid #e6e6e6;background-color:#fafafa;color:#333;font-size:14px}.next-transfer-panel-search{padding:0 4px;margin-top:8px;margin-bottom:0;width:180px}.next-transfer .next-transfer-panel-list{width:180px;height:160px;padding:0;border:none;box-shadow:none;border-radius:0;overflow-y:auto}.next-transfer-panel-not-found-container{display:table;width:100%;height:100%}.next-transfer-panel-not-found{display:table-cell;vertical-align:middle;text-align:center;color:#999;font-size:14px}.next-transfer-panel-item.next-focused{transition:background-color .1s linear}.next-transfer-panel-item:not(.next-disabled).next-simple:hover{color:#209bfa}.next-transfer-panel-item.next-insert-before:before{position:absolute;top:0;left:0;content:"";width:100%;border-top:1px solid #209bfa}.next-transfer-panel-item.next-insert-after:after{position:absolute;left:0;bottom:0;content:"";width:100%;border-bottom:1px solid #209bfa}.next-transfer-panel-footer{position:relative;padding:8px 20px;border-top:1px solid #e6e6e6;background-color:#fff;font-size:0;box-shadow:none}.next-transfer-panel-count{margin-left:4px;font-size:14px;vertical-align:middle;color:#333}.next-transfer-panel-move-all{font-size:14px;color:#209bfa;cursor:pointer}.next-transfer-panel-move-all.next-disabled{color:#ccc;cursor:not-allowed}.next-transfer-operations{display:inline-block;vertical-align:middle;margin:0 20px}.next-transfer-move.next-icon{color:#ddd}.next-transfer-move.next-icon:before{content:""}.next-transfer-operation.next-btn{display:block}.next-transfer-operation.next-btn+.next-transfer-operation.next-btn{margin-top:8px}.next-transfer-operation.next-btn .next-icon .next-icon-remote,.next-transfer-operation.next-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-tree,.next-tree *,.next-tree :after,.next-tree :before{box-sizing:border-box}.next-tree,.next-tree-child-tree{margin:0;padding:0;list-style:none}.next-tree-node{white-space:nowrap}.next-tree-node-inner{font-size:0;outline:none}.next-tree-node-label-wrapper{font-size:0;outline:none;display:inline-block;margin:0 4px;vertical-align:middle}.next-tree-node-label{height:20px;line-height:20px;padding:0 4px;border-radius:3px;font-size:14px}.next-tree-node-label .next-icon{font-size:16px}.next-tree-node-label .next-icon:before{font-size:14px;width:14px;margin-right:.5em}.next-tree-node-input.next-input{margin:0 4px}.next-tree-node-indent-unit{display:inline-block;width:24px;vertical-align:middle;position:relative}.next-tree-node-indent-unit.next-line:before{content:"";position:absolute;display:inline-block;border-left:1px solid #ddd;height:28px;left:7.5px}.next-tree-switcher{position:relative;display:inline-block;vertical-align:middle;margin-right:8px}.next-tree .next-tree-unfold-icon:before{content:""}.next-tree-switcher.next-noline{width:20px;height:20px;line-height:20px;cursor:pointer}.next-tree-switcher.next-noline .next-tree-switcher-icon{transition:transform .1s linear;color:#999}.next-tree-switcher.next-noline .next-tree-switcher-icon .next-icon-remote,.next-tree-switcher.next-noline .next-tree-switcher-icon:before{width:20px;font-size:20px;line-height:inherit}.next-tree-switcher.next-noline .next-tree-fold-icon:before{content:""}.next-tree-switcher.next-noline.next-close .next-tree-switcher-icon{transform:rotate(-90deg)}.next-tree-switcher.next-noline.next-close .next-tree-switcher-icon .next-icon-remote,.next-tree-switcher.next-noline.next-close .next-tree-switcher-icon:before{width:20px;font-size:20px;line-height:inherit}.next-tree-switcher.next-noline:not(.next-disabled):hover .next-tree-switcher-icon{color:#333}.next-tree-switcher.next-noline.next-disabled{cursor:not-allowed}.next-tree-switcher.next-noline.next-disabled .next-tree-switcher-icon{color:#ccc}.next-tree-switcher.next-noop-noline{width:20px;height:20px}.next-tree-switcher.next-line{width:16px;height:16px;line-height:14px;border:1px solid #ddd;border-radius:3px;background-color:#fff;cursor:pointer}.next-tree-switcher.next-line .next-tree-switcher-icon{margin-left:3px;color:#666}.next-tree-switcher.next-line .next-tree-switcher-icon .next-icon-remote,.next-tree-switcher.next-line .next-tree-switcher-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tree-switcher.next-line .next-tree-switcher-icon{transform:scale(.5);margin-left:-1px;margin-right:-4px}.next-tree-switcher.next-line .next-tree-switcher-icon:before{width:16px;font-size:16px}}.next-tree-switcher.next-line .next-tree-switcher-fold-icon:before{content:""}.next-tree-switcher.next-line .next-tree-switcher-unfold-icon:before{content:""}.next-tree-switcher.next-line:not(.next-disabled):hover{border-color:#ccc;background-color:#f9f9f9}.next-tree-switcher.next-line:not(.next-disabled):hover .next-tree-switcher-icon{color:#333}.next-tree-switcher.next-line.next-disabled{border-color:#eee;background-color:#fff;cursor:not-allowed}.next-tree-switcher.next-line.next-disabled .next-tree-switcher-icon{color:#ccc}.next-tree-switcher.next-noop-line{width:16px;height:16px}.next-tree-switcher.next-noop-line-noroot{height:0;border-left:1px solid #ddd;border-bottom:1px solid #ddd}.next-tree-switcher.next-noop-line-noroot .next-tree-right-angle{bottom:-1px}.next-tree-switcher.next-loading.next-loading-noline{width:20px;height:20px;line-height:20px}.next-tree-switcher.next-loading.next-loading-line{width:16px;height:16px;line-height:14px;border:1px solid transparent}.next-tree-switcher.next-loading .next-tree-switcher-icon{color:#209bfa}.next-tree-switcher.next-loading .next-tree-switcher-icon .next-icon-remote,.next-tree-switcher.next-loading .next-tree-switcher-icon:before{width:20px;font-size:20px;line-height:inherit}.next-tree-right-angle{position:absolute;bottom:6.5px;left:-17.5px;display:block;width:16.5px;height:22px;border-left:1px solid #ddd;border-bottom:1px solid #ddd}.next-tree.next-label-block .next-tree-node-inner{display:flex;align-items:center}.next-tree.next-label-block .next-tree-node-label-wrapper{flex:1 1 auto;outline:none}.next-tree.next-node-indent .next-tree-node .next-tree-node{margin-left:24px}.next-tree.next-node-indent .next-tree-node-inner{padding-top:2px;padding-bottom:2px}.next-tree.next-node-indent .next-tree-node-label-wrapper{border-top:2px solid transparent;border-bottom:2px solid transparent}.next-tree.next-node-indent .next-tree-node-label-wrapper:focus .next-tree-node-label{color:#333;background-color:#f9f9f9}.next-tree.next-node-indent .next-tree-node-label{transition:color .1s linear,background-color .1s linear;cursor:default;color:#333;background-color:#fff}.next-tree.next-node-indent .next-tree-node-label-selectable{cursor:pointer}.next-tree.next-node-indent .next-tree-node-label:hover{color:#333;background-color:#f9f9f9}.next-tree.next-node-indent .next-tree-node-inner.next-selected .next-tree-node-label{color:#333;background-color:#add9ff}.next-tree.next-node-indent .next-tree-node-inner.next-disabled .next-tree-node-label,.next-tree.next-node-indent .next-tree-node-inner.next-disabled .next-tree-node-label:hover{color:#ccc;background-color:#fff;cursor:not-allowed}.next-tree.next-node-indent .next-tree-node-inner.next-drag-over .next-tree-node-label{background-color:#209bfa;color:#fff;opacity:.8}.next-tree.next-node-indent .next-tree-node-inner.next-drag-over-gap-top .next-tree-node-label-wrapper{border-top-color:#209bfa}.next-tree.next-node-indent .next-tree-node-inner.next-drag-over-gap-bottom .next-tree-node-label-wrapper{border-bottom-color:#209bfa}.next-tree.next-node-block .next-tree-node-inner{padding-top:4px;padding-bottom:4px;transition:color .1s linear,background-color .1s linear;display:flex;align-items:center}.next-tree.next-node-block .next-tree-node-inner .next-tree-node-label-wrapper{cursor:pointer;flex-grow:1;color:#333;background-color:#fff}.next-tree.next-node-block .next-tree-node-inner .next-tree-node-label-wrapper:focus,.next-tree.next-node-block .next-tree-node-inner .next-tree-node-label-wrapper:hover{color:#333;background-color:#f9f9f9}.next-tree.next-node-block .next-tree-node-inner.next-selected .next-tree-node-label{color:#333;background-color:#add9ff}.next-tree.next-node-block .next-tree-node-inner.next-disabled .next-tree-node-label,.next-tree.next-node-block .next-tree-node-inner.next-disabled:hover .next-tree-node-label{color:#ccc;background-color:#fff;cursor:not-allowed}.next-tree.next-show-line .next-tree-node .next-tree-node:not(:last-child){margin-left:7.5px;border-left:1px solid #ddd;padding-left:15.5px}.next-tree-node.next-filtered>.next-tree-node-inner .next-tree-node-label,.next-tree-node.next-filtered>.next-tree-node-inner .next-tree-node-label:hover{color:#209bfa}.next-tree[dir=rtl] .next-tree-switcher{margin-left:8px;margin-right:0}.next-tree[dir=rtl] .next-tree-right-angle,.next-tree[dir=rtl] .next-tree-switcher.next-noop-line-noroot{border-left:none;border-right:1px solid #ddd}.next-tree[dir=rtl] .next-tree-right-angle{left:auto;right:-17.5px}.next-tree[dir=rtl].next-show-line .next-tree-node .next-tree-node:not(:last-child){margin-left:0;margin-right:7.5px;border-left:none;border-right:1px solid #ddd;padding-left:0;padding-right:15.5px}.next-tree[dir=rtl].next-node-indent .next-tree-node .next-tree-node{margin-left:0;margin-right:24px}.next-tree-select,.next-tree-select *,.next-tree-select :after,.next-tree-select :before{box-sizing:border-box}.next-tree-select-dropdown{background:#fff;border:1px solid #e6e6e6;border-radius:3px;box-shadow:none;max-height:260px;overflow:auto}.next-tree-select-dropdown>.next-tree,.next-tree-select-dropdown>.next-tree-select-not-found,.next-tree-select-dropdown>.next-virtual-tree-container{padding:8px 20px}.next-tree-select-not-found{font-size:14px;color:#999}.next-upload-list[dir=rtl].next-upload-list-text .next-upload-list-item{padding:4px 8px 4px 40px}.next-upload-list[dir=rtl].next-upload-list-text .next-icon{left:12px;right:auto}.next-upload-list[dir=rtl].next-upload-list-image .next-icon-close{float:left;margin-left:4px;margin-right:0}.next-upload-list[dir=rtl].next-upload-list-image .next-upload-list-item-thumbnail{float:right;margin-left:8px;margin-right:0}.next-upload-list[dir=rtl].next-upload-list-image .next-upload-list-item-progress{margin-right:56px;margin-left:24px}.next-upload,.next-upload *,.next-upload :after,.next-upload :before{box-sizing:border-box}.next-upload-inner{outline:0;display:inline-block}.next-upload-inner.next-hidden{display:none}.next-upload-list{overflow:hidden}.next-upload-list,.next-upload-list *,.next-upload-list :after,.next-upload-list :before{box-sizing:border-box}.next-upload-list-item{position:relative}.next-upload-list-item.next-hidden{display:none}.next-upload-list-item-name{text-decoration:none}.next-upload.next-disabled{border-color:#eee!important;color:#ccc!important}.next-upload.next-disabled .next-icon-close{cursor:not-allowed!important}.next-upload.next-disabled .next-upload-inner *{color:#ccc!important;border-color:#eee!important;cursor:not-allowed!important}.next-upload-list-text .next-upload-list-item{background-color:#f9f9f9;padding:4px 40px 4px 8px;height:40px;line-height:32px;font-size:14px;overflow:hidden;transition:all .1s linear;border-radius:0}.next-upload-list-text .next-upload-list-item:not(:last-child){margin-bottom:4px}.next-upload-list-text .next-upload-list-item-op{position:absolute;top:0;right:12px}.next-upload-list-text .next-upload-list-item .next-icon-close{color:#999;cursor:pointer;text-align:center;transition:all .1s linear;line-height:40px}.next-upload-list-text .next-upload-list-item .next-icon-close .next-icon-remote,.next-upload-list-text .next-upload-list-item .next-icon-close:before{width:16px;font-size:16px;line-height:inherit}.next-upload-list-text .next-upload-list-item:hover{background-color:#f9f9f9}.next-upload-list-text .next-upload-list-item:hover .next-icon{color:#666}.next-upload-list-text .next-upload-list-item-name-wrap{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-right:4px}.next-upload-list-text .next-upload-list-item-name{color:#333;transition:all .1s linear}.next-upload-list-text .next-upload-list-item-size{color:#999;margin-left:8px}.next-upload-list-text .next-upload-list-item-uploading{line-height:16px}.next-upload-list-text .next-upload-list-item-uploading .next-upload-list-item-progress{line-height:0;padding-top:4px;padding-bottom:4px}.next-upload-list-text .next-upload-list-item-uploading .next-upload-list-item-progress .next-progress-line-underlay{height:8px}.next-upload-list-text .next-upload-list-item-uploading .next-upload-list-item-progress .next-progress-line-overlay{height:8px;margin-top:-4px}.next-upload-list-text .next-upload-list-item-done{line-height:32px}.next-upload-list-text .next-upload-list-item-done:hover .next-upload-list-item-name,.next-upload-list-text .next-upload-list-item-done:hover .next-upload-list-item-size{color:#209bfa}.next-upload-list-text .next-upload-list-item-error{background-color:#ffece4!important}.next-upload-list-text .next-upload-list-item-error.next-upload-list-item-error-with-msg{line-height:16px}.next-upload-list-text .next-upload-list-item-error-msg{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:#d23c26}.next-upload-list-image .next-upload-list-item{box-sizing:content-box;border:1px solid #e6e6e6;background-color:#fff;padding:8px;height:48px;line-height:48px;font-size:14px;transition:all .1s linear;overflow:hidden;border-radius:0}.next-upload-list-image .next-upload-list-item:not(:last-child){margin-bottom:4px}.next-upload-list-image .next-upload-list-item:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-upload-list-image .next-upload-list-item-op{float:right;margin-right:4px}.next-upload-list-image .next-upload-list-item .next-icon-close{cursor:pointer;color:#999;text-align:center}.next-upload-list-image .next-upload-list-item .next-icon-close .next-icon-remote,.next-upload-list-image .next-upload-list-item .next-icon-close:before{width:16px;font-size:16px;line-height:inherit}.next-upload-list-image .next-upload-list-item:hover{border-color:#209bfa}.next-upload-list-image .next-upload-list-item:hover .next-icon-close{color:#666}.next-upload-list-image .next-upload-list-item-name{display:block;color:#333;margin-left:56px;margin-right:24px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;transition:all .1s linear}.next-upload-list-image .next-upload-list-item-size{color:#999;margin-left:8px}.next-upload-list-image .next-upload-list-item-done:hover .next-upload-list-item-name,.next-upload-list-image .next-upload-list-item-done:hover .next-upload-list-item-size{color:#209bfa}.next-upload-list-image .next-upload-list-item-thumbnail{float:left;width:48px;height:48px;color:#ccc;border:1px solid #e6e6e6;border-radius:0;background-color:#f9f9f9;margin-right:8px;vertical-align:middle;text-align:center;overflow:hidden;box-sizing:border-box}.next-upload-list-image .next-upload-list-item-thumbnail img{width:100%;height:100%}.next-upload-list-image .next-upload-list-item-thumbnail .next-icon{display:block;margin:0;line-height:48px}.next-upload-list-image .next-upload-list-item-thumbnail .next-icon .next-icon-remote,.next-upload-list-image .next-upload-list-item-thumbnail .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-upload-list-image .next-upload-list-item-error{border-color:#d23c26!important;background-color:#fff}.next-upload-list-image .next-upload-list-item-uploading{background-color:#fff}.next-upload-list-image .next-upload-list-item-uploading .next-upload-list-item-name{height:24px;line-height:24px}.next-upload-list-image .next-upload-list-item-uploading .next-upload-list-item-progress{margin-left:56px;margin-right:24px;line-height:0;padding-top:8px;padding-bottom:8px}.next-upload-list-image .next-upload-list-item-uploading .next-upload-list-item-progress .next-progress-line-underlay{height:8px}.next-upload-list-image .next-upload-list-item-uploading .next-upload-list-item-progress .next-progress-line-overlay{height:8px;margin-top:-4px}.next-upload-list-image .next-upload-list-item-error-with-msg .next-upload-list-item-error-msg,.next-upload-list-image .next-upload-list-item-error-with-msg .next-upload-list-item-name{height:24px;line-height:24px}.next-upload-list-image .next-upload-list-item-error-with-msg .next-upload-list-item-error-msg{margin-left:56px;margin-right:24px;color:#d23c26;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.next-upload-list-card{display:inline-block}.next-upload-list-card .next-upload-list-item{vertical-align:middle;float:left}.next-upload-list-card .next-upload-list-item:not(:last-child){margin-right:12px}.next-upload-list-card .next-upload-list-item-wrapper{position:relative;border:1px solid #ddd;width:100px;height:100px;padding:0;background-color:transparent;border-radius:0;overflow:hidden}.next-upload-list-card .next-upload-list-item-thumbnail{text-align:center;width:100%;height:100%;color:#ccc;font-size:12px}.next-upload-list-card .next-upload-list-item-thumbnail img{max-width:100%;max-height:100%;position:absolute;top:0;right:0;bottom:0;left:0;margin:auto}.next-upload-list-card .next-upload-list-item-thumbnail img:focus{outline:0}.next-upload-list-card .next-upload-list-item-thumbnail .next-icon{width:100%}.next-upload-list-card .next-upload-list-item-thumbnail .next-icon .next-icon-remote,.next-upload-list-card .next-upload-list-item-thumbnail .next-icon:before{width:48px;font-size:48px;line-height:inherit}.next-upload-list-card .next-upload-list-item-handler{margin-top:13px}.next-upload-list-card .next-upload-list-item-handler .next-icon-cry{margin-top:10px}.next-upload-list-card .next-upload-list-item-name{display:block;width:100px;text-align:center;margin-top:4px;font-size:12px;color:#666;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.next-upload-list-card .next-upload-list-item-progress{position:absolute;font-size:0;bottom:0;left:0;width:100%}.next-upload-list-card .next-upload-list-item-progress .next-progress-line-underlay{border-radius:0;height:8px}.next-upload-list-card .next-upload-list-item-progress .next-progress-line-overlay{border-radius:0;height:8px;margin-top:-4px}.next-upload-list-card .next-upload-list-item-uploading .next-upload-list-item-wrapper{background-color:#fafafa}.next-upload-list-card .next-upload-list-item:hover .next-upload-tool{opacity:.8}.next-upload-list-card .next-upload-list-item .next-upload-tool{position:absolute;z-index:1;background-color:rgba(0,0,0,.7);transition:all .1s linear;opacity:0;width:100%;height:28px;left:0;bottom:0;display:flex}.next-upload-list-card .next-upload-list-item .next-upload-tool .next-icon{line-height:28px;color:#fff;cursor:pointer}.next-upload-list-card .next-upload-list-item .next-upload-tool .next-icon .next-icon-remote,.next-upload-list-card .next-upload-list-item .next-upload-tool .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-upload-list-card .next-upload-list-item .next-upload-tool-item{width:100%;text-align:center}.next-upload-list-card .next-upload-list-item .next-upload-tool-item:not(:last-child){border-right:1px solid #fff}.next-upload-list-card .next-upload-list-item .next-upload-tool-reupload{display:inline-block}.next-upload-list-card .next-upload-list-item .next-upload-card{display:flex;flex-direction:column;justify-content:center}.next-upload-list-card .next-upload-list-item-error .next-upload-list-item-wrapper{border-color:#d23c26}.next-upload-list-card.next-upload-ie9 .next-upload-tool{display:table}.next-upload-list-card.next-upload-ie9 .next-upload-tool-item{display:table-cell;width:1%}.next-upload-card,.next-upload-list-card.next-upload-ie9 .next-upload-card{display:table-cell}.next-upload-card{border:1px dashed #ddd;width:100px;height:100px;background-color:#fff;text-align:center;cursor:pointer;transition:border-color .1s linear;vertical-align:middle;border-radius:0}.next-upload-card .next-icon{color:#ddd}.next-upload-card .next-icon .next-icon-remote,.next-upload-card .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-upload-card .next-upload-add-icon:before{content:""}.next-upload-card .next-upload-text{font-size:14px;margin-top:12px;color:#666;outline:none}.next-upload-card:hover{border-color:#209bfa}.next-upload-card:hover .next-icon,.next-upload-card:hover .next-upload-text{color:#209bfa}.next-upload-dragable .next-upload-inner{display:block}.next-upload-dragable .next-upload-drag{border:1px dashed #ddd;transition:border-color .1s linear;cursor:pointer;border-radius:3px;background-color:transparent;text-align:center;margin-bottom:4px}.next-upload-dragable .next-upload-drag-icon{margin:20px 0 0;color:#666}.next-upload-dragable .next-upload-drag-icon .next-upload-drag-upload-icon:before{content:"";font-size:24px}.next-upload-dragable .next-upload-drag-text{margin:12px 0 0;font-size:14px;color:#666}.next-upload-dragable .next-upload-drag-hint{margin:4px 0 20px;font-size:12px;color:#999}.next-upload-dragable .next-upload-drag-over{border-color:#209bfa}.next-shell{position:relative;display:flex;flex-direction:column;transition:all .2s ease}.next-shell,.next-shell *,.next-shell :after,.next-shell :before{box-sizing:border-box}.next-shell-content-wrapper{overflow:auto}.next-shell-header{display:flex;width:100%;justify-content:space-between;align-items:center;z-index:9}.next-shell-header .dock-trigger,.next-shell-header .nav-trigger{outline:0;display:flex;justify-content:center;align-items:center;cursor:pointer;width:32px;height:32px}.next-shell-header .nav-trigger{margin-right:10px}.next-shell-header .dock-trigger{margin-left:10px}.next-shell-header.next-shell-fixed-header{position:sticky;top:0}.next-shell-header .next-shell-navigation{flex:1 1;display:flex;align-items:center;flex-direction:row}.next-shell-header .next-shell-action,.next-shell-header .next-shell-branding{display:flex;align-items:center}.next-shell-sub-main{flex:1 1;flex-direction:column;outline:0}.next-shell-main,.next-shell-sub-main{display:flex;height:100%;overflow:auto}.next-shell-main{flex:1 1 auto;flex-direction:row;position:relative;box-sizing:content-box;transition:all .2s ease}.next-shell-main .next-shell-content{flex:1 1 auto}.next-shell-main .next-shell-content-inner{margin:0 auto}.next-shell-main .next-shell-footer{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.next-shell .next-aside-navigation,.next-shell .next-aside-tooldock{display:flex}.next-shell .next-aside-navigation.fixed,.next-shell .next-aside-tooldock.fixed{position:fixed;top:0;bottom:0;z-index:1}.next-shell .next-aside-navigation.fixed{left:0}.next-shell .next-aside-tooldock.fixed{right:0}.next-shell-aside{transition:all .2s ease}.next-shell-aside .aside-trigger{cursor:pointer;outline:0;position:absolute;right:0;top:50%;width:20px;height:48px;display:flex;border:1px solid #ddd;align-items:center;justify-content:center}.next-shell-aside .local-nav-trigger{outline:0;border-left:none;transform:translate(100%,-50%);right:0}.next-shell-aside .ancillary-trigger{outline:0;transform:translate(-100%,-50%);border-right:0;left:1px}.next-shell-aside.next-aside-ancillary,.next-shell-aside.next-aside-localnavigation{position:relative}.next-shell-aside.next-shell-navigation{display:flex;flex-direction:column;justify-self:flex-start;transition:all .2s ease}.next-shell-aside.next-shell-tooldock{display:flex;flex-direction:column;align-items:center}.next-shell-aside .next-shell-tooldockitem{width:100%;text-align:center}.next-shell-aside .next-shell-localnavigation{position:relative}.next-shell-aside .next-shell-ancillary,.next-shell-aside .next-shell-localnavigation{height:100%;display:flex;flex-direction:column;justify-self:flex-start;transition:all .2s ease}.next-shell-light .next-shell-header .dock-trigger,.next-shell-light .next-shell-header .nav-trigger{background:#fff}.next-shell-light .next-shell-aside .local-nav-trigger{background:#f2f2f2}.next-shell-light .next-shell-aside .ancillary-trigger{background:#fff}.next-shell-light .next-shell-header{color:#000;height:52px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0 16px}.next-shell-light .next-shell-header .next-shell-navigation{justify-content:flex-end;height:52px;line-height:52px;margin:0 48px}.next-shell-light .next-shell-task-header{width:100%;min-height:40px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0;overflow:auto}.next-shell-light .next-shell-main{background:#f5f5f5}.next-shell-light .next-shell-main .next-shell-appbar{min-height:48px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0 24px}.next-shell-light .next-shell-main .next-shell-content{padding:20px}.next-shell-light .next-shell-main .next-shell-footer{background:transparent;min-height:56px;color:#ccc;font-size:14px}.next-shell-light .next-shell-aside.next-shell-navigation{width:200px;background:#fff;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-light .next-shell-aside.next-shell-navigation.next-shell-collapse.next-shell-mini{width:60px}.next-shell-light .next-shell-aside.next-shell-navigation.next-shell-collapse{width:0}.next-shell-light .next-shell-aside.next-shell-tooldock{width:52px;background:#f2f2f2;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-light .next-shell-aside .next-shell-tooldockitem{padding:8px 0;color:#666;background:transparent}.next-shell-light .next-shell-aside .next-shell-tooldockitem:hover{color:#333;background:#f5f5f5}.next-shell-light .next-shell-aside .next-shell-localnavigation{width:168px;background:#f2f2f2;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-light .next-shell-aside .next-shell-localnavigation.next-shell-collapse{width:0}.next-shell-light .next-shell-aside .next-shell-ancillary{width:168px;background:#fff;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-light .next-shell-aside .next-shell-ancillary.next-shell-collapse{width:0}.next-shell-dark .next-shell-header .dock-trigger,.next-shell-dark .next-shell-header .nav-trigger{background:#222}.next-shell-dark .next-shell-aside .local-nav-trigger{background:#f2f2f2}.next-shell-dark .next-shell-aside .ancillary-trigger{background:#fff}.next-shell-dark .next-shell-header{color:#fff;height:52px;background:#222;border-bottom:1px solid #1f1f1f;box-shadow:0 1px 3px 0 rgba(0,0,0,.12);padding:0 16px}.next-shell-dark .next-shell-header .next-shell-navigation{justify-content:flex-end;height:52px;line-height:52px;margin:0 48px}.next-shell-dark .next-shell-task-header{width:100%;min-height:40px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0;overflow:auto}.next-shell-dark .next-shell-main{background:#f5f5f5}.next-shell-dark .next-shell-main .next-shell-appbar{min-height:48px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0 24px}.next-shell-dark .next-shell-main .next-shell-content{padding:20px}.next-shell-dark .next-shell-main .next-shell-footer{background:transparent;min-height:56px;color:#ccc;font-size:14px}.next-shell-dark .next-shell-aside.next-shell-navigation{width:200px;background:#222;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-dark .next-shell-aside.next-shell-navigation.next-shell-collapse.next-shell-mini{width:60px}.next-shell-dark .next-shell-aside.next-shell-navigation.next-shell-collapse{width:0}.next-shell-dark .next-shell-aside.next-shell-tooldock{width:52px;background:#f2f2f2;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-dark .next-shell-aside .next-shell-tooldockitem{padding:8px 0;color:#666;background:transparent}.next-shell-dark .next-shell-aside .next-shell-tooldockitem:hover{color:#333;background:#f5f5f5}.next-shell-dark .next-shell-aside .next-shell-localnavigation{width:168px;background:#f2f2f2;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-dark .next-shell-aside .next-shell-localnavigation.next-shell-collapse{width:0}.next-shell-dark .next-shell-aside .next-shell-ancillary{width:168px;background:#fff;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-dark .next-shell-aside .next-shell-ancillary.next-shell-collapse{width:0}.next-shell-brand .next-shell-header .dock-trigger,.next-shell-brand .next-shell-header .nav-trigger{background:#18263c}.next-shell-brand .next-shell-aside .local-nav-trigger{background:#f2f2f2}.next-shell-brand .next-shell-aside .ancillary-trigger{background:#fff}.next-shell-brand .next-shell-header{color:#fff;height:52px;background:#18263c;border-bottom:1px solid #eee;box-shadow:0 1px 3px 0 rgba(0,0,0,.12);padding:0 16px}.next-shell-brand .next-shell-header .next-shell-navigation{justify-content:flex-end;height:52px;line-height:52px;margin:0 48px}.next-shell-brand .next-shell-task-header{width:100%;min-height:40px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0;overflow:auto}.next-shell-brand .next-shell-main{background:#f5f5f5}.next-shell-brand .next-shell-main .next-shell-appbar{min-height:48px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0 24px}.next-shell-brand .next-shell-main .next-shell-content{padding:20px}.next-shell-brand .next-shell-main .next-shell-footer{background:transparent;min-height:56px;color:#ccc;font-size:14px}.next-shell-brand .next-shell-aside.next-shell-navigation{width:200px;background:#fff;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-brand .next-shell-aside.next-shell-navigation.next-shell-collapse.next-shell-mini{width:60px}.next-shell-brand .next-shell-aside.next-shell-navigation.next-shell-collapse{width:0}.next-shell-brand .next-shell-aside.next-shell-tooldock{width:52px;background:#f2f2f2;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-brand .next-shell-aside .next-shell-tooldockitem{padding:8px 0;color:#666;background:transparent}.next-shell-brand .next-shell-aside .next-shell-tooldockitem:hover{color:#333;background:#f5f5f5}.next-shell-brand .next-shell-aside .next-shell-localnavigation{width:168px;background:#f2f2f2;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-brand .next-shell-aside .next-shell-localnavigation.next-shell-collapse{width:0}.next-shell-brand .next-shell-aside .next-shell-ancillary{width:168px;background:#fff;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-brand .next-shell-aside .next-shell-ancillary.next-shell-collapse{width:0}.next-shell-header .next-shell-navigation.next-shell-nav-left{justify-content:flex-start}.next-shell-header .next-shell-navigation.next-shell-nav-right{justify-content:flex-end}.next-shell-header .next-shell-navigation.next-shell-nav-center{justify-content:center}.next-shell.next-shell-phone .next-aside-navigation{width:100%}.next-shell.next-shell-phone .next-aside-navigation.next-shell-collapse{width:0}.next-shell.next-shell-phone .next-shell-header .next-shell-navigation{display:none}.next-shell.next-shell-phone .next-shell-navigation{width:100%;height:100%;transition:height .2s ease}.next-shell.next-shell-phone .next-shell-navigation.next-shell-collapse{padding:0;height:0;transition:height .2s ease}.next-shell.next-shell-phone .next-shell-tooldock{height:52px;left:0;right:0;position:absolute;width:100%;flex-direction:row;justify-content:center}.next-shell.next-shell-phone .next-shell-tooldock.next-shell-collapse{display:none;height:0;padding:0;transition:all .2s ease}.next-shell.next-shell-phone .next-shell-aside.next-aside-ancillary,.next-shell.next-shell-tablet .next-shell-aside.next-aside-ancillary{width:0}.next-shell.next-shell-phone .next-shell-ancillary,.next-shell.next-shell-tablet .next-shell-ancillary{transform:translateX(-100%)}.next-shell.next-shell-phone .next-shell-aside.next-aside-localnavigation,.next-shell.next-shell-tablet .next-shell-aside.next-aside-localnavigation{width:0}.next-notification{width:384px;position:fixed;z-index:1010;padding:0;margin:0}.next-notification .next-message{margin-bottom:16px;overflow:hidden}.next-notification-fade-leave{animation-duration:.3s;animation-play-state:paused;animation-fill-mode:both;animation-timing-function:ease}.next-notification-fade-leave.next-notification-fade-leave-active{animation-name:NotificationFadeOut;animation-play-state:running}@keyframes NotificationFadeOut{0%{max-height:150px;margin-bottom:16px;opacity:1}to{max-height:0;margin-bottom:0;padding-top:0;padding-bottom:0;opacity:0}}.next-typography{color:#333}.next-typography-title{font-weight:600;margin-bottom:.5em}.next-typography+.next-typography-title{margin-top:1.2em}.next-typography-paragraph{color:#333;margin-bottom:1em;font-size:14px;line-height:1.5}.next-typography mark{padding:0;background:#ffe98f;color:#333}.next-typography strong{font-weight:600}.next-typography code{background-color:#f9f9f9;color:#333;border:1px solid #eee;margin:0 .2em;padding:.2em .4em .1em;font-size:85%;border-radius:3px}.next-typography ol,.next-typography ul{margin:0 0 1em;padding:0}.next-typography li{list-style-type:circle;margin:0 0 0 20px;padding:0 0 0 4px}.next-typography a{text-decoration:none}.next-typography a:link{color:#298dff}.next-typography a:visited{color:#4a83c5}.next-typography a:hover{color:#2580e7}.next-typography a:active{text-decoration:underline;color:#2580e7}h1.next-typography-title{font-size:24px}h2.next-typography-title{font-size:20px}h3.next-typography-title,h4.next-typography-title{font-size:16px}.next-divider,h5.next-typography-title,h6.next-typography-title{font-size:14px}.next-divider{margin:0;padding:0;line-height:1.5;list-style:none;font-variant:tabular-nums;font-feature-settings:"tnum";background:#e6e6e6;border-collapse:separate}.next-divider,.next-divider *,.next-divider :after,.next-divider :before{box-sizing:border-box}.next-divider-hoz{display:block;clear:both;width:100%;min-width:100%;height:1px;margin:16px 0}.next-divider-ver{position:relative;top:-.06em;display:inline-block;width:1px;background:#e6e6e6;height:.9em;margin:0 8px;vertical-align:middle}.next-divider-hoz.next-divider-with-text-center,.next-divider-hoz.next-divider-with-text-left,.next-divider-hoz.next-divider-with-text-right{display:table;margin:16px 0;color:#333;font-weight:400;font-size:16px;white-space:nowrap;text-align:center;background:transparent}.next-divider-hoz.next-divider-with-text-center:after,.next-divider-hoz.next-divider-with-text-center:before,.next-divider-hoz.next-divider-with-text-left:after,.next-divider-hoz.next-divider-with-text-left:before,.next-divider-hoz.next-divider-with-text-right:after,.next-divider-hoz.next-divider-with-text-right:before{top:50%;display:table-cell;width:50%;border-top:1px solid #e6e6e6;transform:translateY(50%);content:""}.next-divider-hoz.next-divider-with-text-center.next-divider-dashed,.next-divider-hoz.next-divider-with-text-left.next-divider-dashed,.next-divider-hoz.next-divider-with-text-right.next-divider-dashed{border-top:0}.next-divider-hoz.next-divider-with-text-center.next-divider-dashed:after,.next-divider-hoz.next-divider-with-text-center.next-divider-dashed:before,.next-divider-hoz.next-divider-with-text-left.next-divider-dashed:after,.next-divider-hoz.next-divider-with-text-left.next-divider-dashed:before,.next-divider-hoz.next-divider-with-text-right.next-divider-dashed:after,.next-divider-hoz.next-divider-with-text-right.next-divider-dashed:before{border-style:dashed none none}.next-divider-hoz.next-divider-with-text-left .next-divider-inner-text,.next-divider-hoz.next-divider-with-text-right .next-divider-inner-text{display:inline-block;padding:0 16px}.next-divider-hoz.next-divider-with-text-left:before{top:50%;width:5%}.next-divider-hoz.next-divider-with-text-left:after,.next-divider-hoz.next-divider-with-text-right:before{top:50%;width:95%}.next-divider-hoz.next-divider-with-text-right:after{top:50%;width:5%}.next-divider-inner-text{display:inline-block;padding:0 16px}.next-divider-dashed{background:none;border:dashed #e6e6e6;border-width:1px 0 0}.next-divider-dashed.next-divider-ver{border-width:0 0 0 1px}.next-box{display:flex}.next-box,.next-box *,.next-box :after,.next-box :before,.next-table{box-sizing:border-box}.next-table{position:relative;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e6e6e6;border-left:1px solid #e6e6e6}.next-table *,.next-table :after,.next-table :before{box-sizing:border-box}.next-table .next-table-header tr:first-child th:first-child{border-top-left-radius:0}.next-table .next-table-header tr:first-child th:last-child{border-top-right-radius:0}.next-table .next-table-header tr:last-child th:first-child{border-bottom-left-radius:0}.next-table .next-table-header tr:last-child th:last-child{border-bottom-right-radius:0}.next-table.next-table-layout-fixed{overflow:auto}.next-table.next-table-layout-fixed table{table-layout:fixed}.next-table.next-table-layout-auto table{table-layout:auto}.next-table.next-table-small .next-table-prerow .next-table-cell-wrapper,.next-table.next-table-small td .next-table-cell-wrapper,.next-table.next-table-small th .next-table-cell-wrapper{padding:8px}.next-table table{border-collapse:separate;border-spacing:0;width:100%;background:#fff;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.next-table table tr:first-child td{border-top-width:0}.next-table th{padding:0;background:#f5f5f5;color:#333;text-align:left;font-weight:400;border-right:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6}.next-table th .next-table-cell-wrapper{padding:12px 16px;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.next-table th.next-table-prerow .next-table-cell-wrapper{padding:12px 16px}.next-table th.next-table-word-break-word .next-table-cell-wrapper{word-break:break-word}.next-table th.next-table-fix-left,.next-table th.next-table-fix-right{z-index:1}.next-table-affix{z-index:1;overflow:hidden}.next-table-stickylock .next-table-affix{z-index:9}.next-table-header-resizable{position:relative}.next-table-header-resizable .next-table-resize-handler{position:absolute;right:-5px;top:0;bottom:0;width:10px;background:transparent;cursor:ew-resize}.next-table-header-resizable .next-table-resize-handler:after{position:absolute;display:block;content:" ";width:2px;height:100%;right:50%}.next-table-header-resizable .next-table-resize-handler:hover:after{z-index:1;background:#209bfa}.next-table.next-table-lock-left .next-table-header-resizable .next-table-resize-handler,.next-table.next-table-lock-right .next-table-header-resizable .next-table-resize-handler{cursor:auto}.next-table.next-table-lock-left .next-table-header-resizable .next-table-resize-handler:hover:after,.next-table.next-table-lock-right .next-table-header-resizable .next-table-resize-handler:hover:after{z-index:-1}.next-table td{padding:0;border-right:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6}.next-table td .next-table-cell-wrapper{padding:12px 16px;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.next-table td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow,.next-table td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow,.next-table td .next-table-cell-wrapper .next-table-tree-placeholder{margin-right:8px;outline:0;cursor:pointer}.next-table td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow .next-icon-remote,.next-table td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow:before{width:12px;font-size:12px;line-height:inherit}.next-table td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow:before{content:""}.next-table td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow .next-icon-remote,.next-table td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow:before{width:12px;font-size:12px;line-height:inherit}.next-table td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow:before{content:""}.next-table td.next-table-prerow .next-table-cell-wrapper{padding:12px 16px}.next-table td.next-table-word-break-word .next-table-cell-wrapper{word-break:break-word}.next-table .next-table-expanded .next-table-cell-wrapper,.next-table .next-table-selection .next-table-cell-wrapper{overflow:visible}.next-table.no-header table tr:first-child td{border-top-width:1px}.next-table.only-bottom-border{border-width:0}.next-table.only-bottom-border td,.next-table.only-bottom-border th{border-width:0 0 1px}.next-table.only-bottom-border table tr td:first-child,.next-table.only-bottom-border table tr th:first-child{border-left-width:0}.next-table.only-bottom-border .next-table-body tr td:last-child,.next-table.only-bottom-border .next-table-header tr th:last-child{border-right-width:0}.next-table-loading{display:block;pointer-events:none;opacity:.7;-webkit-filter:blur(1px);filter:blur(1px);filter:"progid:DXImageTransform.Microsoft.Blur(PixelRadius=1, MakeShadow=false)"}.next-table-loading .next-table-loading-content{position:absolute;top:0;right:0;bottom:0;left:0}.next-table.zebra tr:nth-child(odd) td{background:#fff}.next-table.zebra tr:nth-child(2n) td{background:#fafafa}.next-table.zebra .next-table-cell.hovered,.next-table.zebra .next-table-row.hovered td{background:#fafafa;color:#333}.next-table.zebra .next-table-row.selected td{background:#f9f9f9;color:#333}.next-table-empty{color:#ccc;padding:32px 0;text-align:center}.next-table-expanded-row>td{border-width:0 0 1px}.next-table-expanded-row>td:first-child{border-left-width:1px}.next-table-expanded-row>td:last-child{border-right-width:1px}.next-table-expanded-row:last-child>td{border-bottom-width:1px}.next-table-expanded-row .next-table{border-top:0;border-left:0}.next-table-expanded-row .next-table td,.next-table-expanded-row .next-table th{border-right:1px solid #e6e6e6}.next-table-expanded-row .next-table.only-bottom-border td,.next-table-expanded-row .next-table.only-bottom-border th{border-right:0}.next-table-expanded-row .next-table .last td{border-bottom:0}.next-table-expanded-row .next-table td.last,.next-table-expanded-row .next-table th:last-child{border-right:0}.next-table-filter-footer{margin:10px 10px 0}.next-table-filter-footer button{margin-right:5px}.next-table-row{transition:all .1s linear;background:#fff;color:#333}.next-table-row.hidden{display:none}.next-table-row.hovered{background:#fafafa;color:#333}.next-table-row.selected{background:#f9f9f9;color:#333}.next-table-cell.hovered{background:#fafafa;color:#333}.next-table-tree-placeholder{visibility:hidden}.next-table-tree-placeholder .next-icon-remote,.next-table-tree-placeholder:before{width:12px;font-size:12px;line-height:inherit}.last .next-table-expanded-row td{border-bottom-width:1px}.next-table-body,.next-table-header{overflow:auto;font-size:14px}.next-table-column-resize-proxy{position:absolute;top:0;bottom:0;width:0;border-left:2px solid #209bfa;z-index:10;display:none}.next-table-header{margin-bottom:-20px;padding-bottom:20px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none}.next-table-header::-webkit-scrollbar{display:none}.next-table-body{font-size:14px;position:relative}.next-table-fixed{border-right:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6}.next-table-fixed table{table-layout:fixed}.next-table-fixed .next-table-header{background:#f5f5f5}.next-table-fixed table tr td:first-child,.next-table-fixed table tr th:first-child{border-left-width:0}.next-table-fixed .next-table-header th{border-top-width:0}.next-table-fixed .next-table-header tr th:last-child{border-right-width:0}.next-table-fixed .next-table-body td{border-top-width:0}.next-table-fixed .next-table-body tr:last-child td{border-bottom-width:0}.next-table-fixed .next-table-body tr td:last-child{border-right-width:0}.next-table-fixed.only-bottom-border .next-table-body tr:last-child td{border-bottom-width:1px}.next-table-fixed.next-table-group table tr td:first-child,.next-table-fixed.next-table-group table tr th:first-child{border-left-width:1px}.next-table-fixed.next-table-group .next-table-header th{border-top-width:1px}.next-table-fixed.next-table-group .next-table-header tr th:last-child{border-right-width:1px}.next-table-fixed.next-table-group .next-table-body td{border-top-width:1px}.next-table-fixed.next-table-group .next-table-body tr:last-child td{border-bottom-width:1px}.next-table-fixed.next-table-group .next-table-body tr td:last-child,.next-table-fixed.next-table-lock-left .next-table-body tr td:last-child,.next-table-fixed.next-table-lock-left .next-table-header tr th:last-child{border-right-width:1px}.next-table-lock .next-table-body{overflow-x:auto;overflow-y:visible}.next-table-group{border-width:0}.next-table-group.only-bottom-border .next-table-body table,.next-table-group.only-bottom-border .next-table-header table{border-left:0}.next-table-group.only-bottom-border .next-table-body table,.next-table-group.only-bottom-border .next-table-body table.next-table-row,.next-table-group.only-bottom-border .next-table-header table{border-top:0}.next-table-group.only-bottom-border .next-table-body .next-table-group-footer td{border-bottom:0}.next-table-group .next-table-body{margin-top:8px}.next-table-group .next-table-body table{border-top:1px solid #e6e6e6;border-left:1px solid #e6e6e6;margin-bottom:8px}.next-table-group .next-table-body table tr:first-child td{border-top-width:1px}.next-table-group .next-table-body table:last-of-type{margin-bottom:0}.next-table-group .next-table-header table{border-top:1px solid #e6e6e6;border-left:1px solid #e6e6e6}.next-table-group .next-table-group-header td{background:#f5f5f5;color:#333}.next-table-group .next-table-group-header td:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.next-table-group .next-table-group-header td:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.next-table-group .next-table-group-footer td{background:#f5f5f5;color:#333}.next-table-group .next-table-group-footer td:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.next-table-group .next-table-group-footer td:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.next-table-group .next-table-row.hovered,.next-table-group .next-table-row.selected{background:#fff;color:#333}.next-table-lock{position:relative}.next-table-lock table{table-layout:fixed}.next-table-header-inner{overflow:unset}.next-table-header-fixer{content:" ";border-top-right-radius:0;border-bottom-right-radius:0;width:15px;background:inherit;position:absolute;right:0;height:100%;top:0}.next-table-wrap-empty .next-table-lock-left td,.next-table-wrap-empty .next-table-lock-right td{border:none}.next-table-wrap-empty .next-table-lock-left .next-table-empty,.next-table-wrap-empty .next-table-lock-right .next-table-empty{display:none}.next-table-wrap-empty>.next-table-inner>.next-table-body>table{table-layout:fixed}.next-table-lock-left,.next-table-lock-right{position:absolute;left:0;top:0;z-index:1;border:0;transition:box-shadow .3s ease;overflow:hidden}.next-table-lock-left table,.next-table-lock-right table{width:auto}.next-table-lock-left .next-table-body,.next-table-lock-right .next-table-body{overflow-y:scroll;overflow-x:hidden;margin-right:-20px;padding-right:0}.next-table-lock-left.shadow .next-table-body tr td:last-child,.next-table-lock-left.shadow .next-table-header tr th:last-child,.next-table-lock-right.shadow .next-table-body tr td:last-child,.next-table-lock-right.shadow .next-table-header tr th:last-child{border-right-width:0}.next-table-lock-right{right:0;left:auto}.next-table-lock-right table tr td:first-child,.next-table-lock-right table tr th:first-child{border-left-width:1px}.next-table-lock-right.shadow{box-shadow:-2px 0 3px rgba(0,0,0,.12)}.next-table-lock-left.shadow{box-shadow:2px 0 3px rgba(0,0,0,.12)}.next-table-filter{line-height:1}.next-table-sort{cursor:pointer;position:relative;width:16px;display:inline-block;line-height:1}.next-table-sort:focus{outline:0}.next-table-sort>a:before{content:" ";display:inline-block;vertical-align:middle}.next-table-sort .next-icon{position:absolute;left:-2px;color:#333}.next-table-sort .next-icon .next-icon-remote,.next-table-sort .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-table-sort .current .next-icon{color:#209bfa}.next-table-sort .next-icon-ascending{left:2px}.next-table-filter{cursor:pointer;width:20px;display:inline-block}.next-table-filter:focus{outline:0}.next-table-filter .next-icon{color:#333}.next-table-filter .next-icon .next-icon-remote,.next-table-filter .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-table-filter .next-table-filter-active{color:#209bfa}.next-table-filter-menu .next-menu-content{max-height:220px;overflow:auto}.next-table-header-icon{margin-left:8px}.next-table-expanded-ctrl{cursor:pointer}.next-table-expanded-ctrl:focus{outline:0}.next-table-expanded-ctrl.disabled{color:#999}.next-table-expanded-ctrl .next-table-expand-unfold .next-icon-remote,.next-table-expanded-ctrl .next-table-expand-unfold:before{width:12px;font-size:12px;line-height:inherit}.next-table-expanded-ctrl .next-table-expand-unfold:before{content:""}.next-table-expanded-ctrl .next-table-expand-fold .next-icon-remote,.next-table-expanded-ctrl .next-table-expand-fold:before{width:12px;font-size:12px;line-height:inherit}.next-table-expanded-ctrl .next-table-expand-fold:before{content:""}.next-table-fix-left,.next-table-fix-right{background:inherit;position:sticky;z-index:1;background-clip:padding-box}.next-table-ping-left .next-table-expanded-area .next-table-fix-left-last:after{content:none}.next-table-ping-left .next-table-expanded-area .next-table-ping-left .next-table-fix-left-last,.next-table-ping-left .next-table-fix-left-last{border-right-width:0}.next-table-ping-left .next-table-expanded-area .next-table-ping-left .next-table-fix-left-last:after,.next-table-ping-left .next-table-fix-left-last:after{box-shadow:inset 10px 0 8px -8px rgba(0,0,0,.15);position:absolute;top:0;right:0;bottom:0;width:30px;content:"";pointer-events:none;transition:box-shadow .3s,-webkit-box-shadow .3s;transform:translateX(100%)}.next-table-ping-right .next-table-expanded-area .next-table-fix-right-first:after{content:none}.next-table-ping-right .next-table-expanded-area .next-table-ping-right .next-table-fix-right-first:after,.next-table-ping-right .next-table-fix-right-first:after{box-shadow:inset -10px 0 8px -8px rgba(0,0,0,.15);position:absolute;top:0;left:0;bottom:0;width:30px;content:"";pointer-events:none;transition:box-shadow .3s,-webkit-box-shadow .3s;transform:translateX(-100%)}.next-table-fixed.next-table-scrolling-to-right:after,.next-table-lock.next-table-scrolling-to-right:after{box-shadow:inset -10px 0 8px -8px rgba(0,0,0,.15);position:absolute;top:0;right:-30px;bottom:0;width:30px;content:"";pointer-events:none;transition:box-shadow .3s,-webkit-box-shadow .3s;transform:translateX(-100%)}.next-table-fixed.only-bottom-border,.next-table-lock.only-bottom-border{border-right:0}.next-table[dir=rtl] th{text-align:right}.next-table[dir=rtl] .next-table-header-resizable .next-table-resize-handler{right:auto;left:0}.next-table[dir=rtl] td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow,.next-table[dir=rtl] td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow,.next-table[dir=rtl] td .next-table-cell-wrapper .next-table-tree-placeholder{margin-left:3px;margin-right:0;float:right}.next-table[dir=rtl] .next-table-expanded-row td:first-child{border-left-width:0;border-right-width:1px}.next-table[dir=rtl] .next-table-expanded-row td:last-child{border-left-width:1px;border-right-width:0}.next-table[dir=rtl].only-bottom-border .next-table-expanded-row td,.next-table[dir=rtl].only-bottom-border .next-table-expanded-row th{border-width:0 0 1px}.next-table[dir=rtl] .next-table-filter-footer button{margin-left:5px;margin-right:0}.next-table[dir=rtl] .next-table-lock-left,.next-table[dir=rtl] .next-table-lock-right{left:auto;right:0}.next-table[dir=rtl] .next-table-lock-right{right:auto;left:0}.next-table[dir=rtl] .next-table-lock-right table tr td:first-child,.next-table[dir=rtl] .next-table-lock-right table tr th:first-child{border-right-width:1px}.next-table[dir=rtl] .next-table-lock-right.shadow{box-shadow:2px 0 3px rgba(0,0,0,.12)}.next-table[dir=rtl] .next-table-lock-left.shadow{box-shadow:-2px 0 3px rgba(0,0,0,.12)}.next-table[dir=rtl] .next-table-sort .next-icon{right:0;left:auto}.next-table[dir=rtl] .next-table-sort .next-icon-ascending{right:4px;left:auto}.next-table[dir=rtl] .next-table-filter{margin-right:5px;margin-left:0}.next-table-fixed[dir=rtl] table tr td:first-child,.next-table-fixed[dir=rtl] table tr th:first-child{border-left-width:1px;border-right-width:0}.next-table-fixed[dir=rtl] .next-table-body tr td:last-child,.next-table-fixed[dir=rtl] .next-table-header tr th:last-child{border-left-width:1px}.next-calendar2,.next-calendar2 *,.next-calendar2 :after,.next-calendar2 :before{box-sizing:border-box}.next-calendar2 table{border-collapse:collapse;border-spacing:0}.next-calendar2 td,.next-calendar2 th{padding:0}div[dir=rtl].next-calendar2-card .next-calendar2-header-actions,div[dir=rtl].next-calendar2-fullscreen .next-calendar2-header-actions,div[dir=rtl].next-calendar2-panel .next-calendar2-header-actions{margin-right:auto;margin-left:0}div[dir=rtl].next-calendar2-card .next-calendar2-header-actions>:not(:first-child),div[dir=rtl].next-calendar2-card .next-calendar2-header-ranges>:not(:first-child),div[dir=rtl].next-calendar2-fullscreen .next-calendar2-header-actions>:not(:first-child),div[dir=rtl].next-calendar2-fullscreen .next-calendar2-header-ranges>:not(:first-child),div[dir=rtl].next-calendar2-panel .next-calendar2-header-actions>:not(:first-child),div[dir=rtl].next-calendar2-panel .next-calendar2-header-ranges>:not(:first-child){margin-right:8px;margin-left:0}div[dir=rtl].next-calendar2-fullscreen .next-calendar2-cell-value,div[dir=rtl].next-calendar2-fullscreen .next-calendar2-table th{text-align:left}div[dir=rtl].next-calendar2-fullscreen .next-calendar2-table th{padding:0 0 5px 12px}.next-calendar2{font-size:12px;user-select:none;background:#fff}.next-calendar2-header{display:flex}.next-calendar2-table{width:100%;table-layout:fixed}.next-calendar2-cell{cursor:pointer;position:relative;transition:background-color .2s,border .2s}.next-calendar2 .next-calendar2-cell-inner{color:#ccc;outline:none;min-width:24px;position:relative;border:1px solid transparent}.next-calendar2-cell-disabled:before{color:#ccc;background:#fafafa}.next-calendar2-card .next-calendar2-header-actions,.next-calendar2-fullscreen .next-calendar2-header-actions,.next-calendar2-panel .next-calendar2-header-actions{margin-left:auto}.next-calendar2-card .next-calendar2-header-actions>:not(:first-child),.next-calendar2-card .next-calendar2-header-ranges>:not(:first-child),.next-calendar2-fullscreen .next-calendar2-header-actions>:not(:first-child),.next-calendar2-fullscreen .next-calendar2-header-ranges>:not(:first-child),.next-calendar2-panel .next-calendar2-header-actions>:not(:first-child),.next-calendar2-panel .next-calendar2-header-ranges>:not(:first-child){margin-left:8px}.next-calendar2-card .next-calendar2-header-select-month,.next-calendar2-card .next-calendar2-header-select-year,.next-calendar2-fullscreen .next-calendar2-header-select-month,.next-calendar2-fullscreen .next-calendar2-header-select-year,.next-calendar2-panel .next-calendar2-header-select-month,.next-calendar2-panel .next-calendar2-header-select-year{min-width:88px}.next-calendar2-card .next-calendar2-header-select-month .next-input,.next-calendar2-card .next-calendar2-header-select-year .next-input,.next-calendar2-fullscreen .next-calendar2-header-select-month .next-input,.next-calendar2-fullscreen .next-calendar2-header-select-year .next-input,.next-calendar2-panel .next-calendar2-header-select-month .next-input,.next-calendar2-panel .next-calendar2-header-select-year .next-input{min-width:auto}.next-calendar2-card .next-calendar2-body,.next-calendar2-fullscreen .next-calendar2-body,.next-calendar2-panel .next-calendar2-body{padding:8px 0}.next-calendar2-card .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-inner{z-index:2;height:24px;line-height:22px;border-radius:2px;display:inline-block}.next-calendar2-card .next-calendar2,.next-calendar2-panel .next-calendar2{min-height:150px}.next-calendar2-card .next-calendar2-table thead>tr,.next-calendar2-panel .next-calendar2-table thead>tr{height:24px;color:#999}.next-calendar2-card .next-calendar2-table td,.next-calendar2-card .next-calendar2-table th,.next-calendar2-panel .next-calendar2-table td,.next-calendar2-panel .next-calendar2-table th{font-weight:400;text-align:center;padding:4px 0}.next-calendar2-card .next-calendar2-table th,.next-calendar2-panel .next-calendar2-table th{height:32px}.next-calendar2-card .next-calendar2-table-decade,.next-calendar2-card .next-calendar2-table-month,.next-calendar2-card .next-calendar2-table-year,.next-calendar2-panel .next-calendar2-table-decade,.next-calendar2-panel .next-calendar2-table-month,.next-calendar2-panel .next-calendar2-table-year{height:145px}.next-calendar2-card .next-calendar2-table-decade .next-calendar2-cell-inner,.next-calendar2-card .next-calendar2-table-month .next-calendar2-cell-inner,.next-calendar2-card .next-calendar2-table-year .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-decade .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-month .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-year .next-calendar2-cell-inner{min-width:56px}.next-calendar2-card .next-calendar2-table-quarter,.next-calendar2-panel .next-calendar2-table-quarter{height:50px}.next-calendar2-card .next-calendar2-table-quarter .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-quarter .next-calendar2-cell-inner{min-width:56px}.next-calendar2-card .next-calendar2-table-decade .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-decade .next-calendar2-cell-inner{min-width:80px}.next-calendar2-card .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today) .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today) .next-calendar2-cell-inner{color:#666}.next-calendar2-card .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today):hover:not(.next-calendar2-cell-hover) .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today):hover:not(.next-calendar2-cell-hover) .next-calendar2-cell-inner{background:#f9f9f9}.next-calendar2-card .next-calendar2-cell-current.next-calendar2-cell-today:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-current.next-calendar2-cell-today:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner{color:#209bfa}.next-calendar2-card .next-calendar2-cell-current.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-current.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner{color:#fff;background:#209bfa}.next-calendar2-fullscreen .next-calendar2-cell-value,.next-calendar2-fullscreen .next-calendar2-table th{text-align:right}.next-calendar2-fullscreen .next-calendar2-table th{padding:0 12px 5px 0}.next-calendar2-fullscreen .next-calendar2-cell-inner{height:80px;border-top:2px solid #eee;margin:0 4px;padding:4px 8px 0}.next-calendar2-fullscreen td .next-calendar2-cell-inner{height:80px;border-top:2px solid #eee}.next-calendar2-fullscreen .next-calendar2-cell-disabled .next-calendar2-cell-inner{color:#ccc;background:#fafafa}.next-calendar2-fullscreen .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today) .next-calendar2-cell-inner{color:#666}.next-calendar2-fullscreen .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today):hover .next-calendar2-cell-inner{background-color:#f9f9f9}.next-calendar2-fullscreen .next-calendar2-cell-current.next-calendar2-cell-today .next-calendar2-cell-inner{color:#209bfa}.next-calendar2-fullscreen .next-calendar2-cell-current .next-calendar2-cell-inner{background-color:#fff}.next-calendar2-fullscreen .next-calendar2-cell-current.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner{border-top-color:#209bfa;font-weight:700;color:#209bfa;background:#add9ff}.next-calendar2-card .next-calendar2-header{padding:8px;border-bottom:1px solid #eee}.next-calendar2-panel .next-calendar2-header{padding:0 8px;display:flex;align-items:center;border-bottom:1px solid #eee}.next-calendar2-panel .next-calendar2-header-btn{min-width:20px;line-height:20px;color:#666;font-family:inherit;vertical-align:initial;border-radius:2px}.next-calendar2-panel .next-calendar2-header-btn>span,.next-calendar2-panel .next-calendar2-header-text-field{text-align:center;font-size:14px;color:#333;font-weight:bolder;vertical-align:initial}.next-calendar2-panel .next-calendar2-header-btn:hover,.next-calendar2-panel .next-calendar2-header-btn:hover>span{color:#209bfa}.next-calendar2-panel .next-calendar2-header-left-btn:hover,.next-calendar2-panel .next-calendar2-header-right-btn:hover{background:#f9f9f9}.next-calendar2-panel .next-calendar2-header-text-field{flex:1;height:38px;line-height:38px}.next-calendar2-panel .next-calendar2-header-text-field .next-calendar2-header-btn:not(:first-child){margin-left:6px}.next-calendar2-header-select-month-popup,.next-calendar2-header-select-year-popup{min-width:auto}.next-time-picker2-menu{float:left;text-align:center;padding:8px 0}.next-time-picker2-menu:not(:last-child){border-right:1px solid #e6e6e6}.next-time-picker2-menu-title{cursor:default;height:28px;line-height:28px;font-size:12px;font-weight:400;color:#999;background:#fff}.next-time-picker2-menu ul{position:relative;overflow-y:hidden;overflow-x:auto;list-style:none;margin:0;width:54px;padding:0;font-size:12px;height:224px;scrollbar-width:none;-ms-overflow-style:none}.next-time-picker2-menu ul::-webkit-scrollbar{width:0}.next-time-picker2-menu ul:hover{overflow-y:auto}.next-time-picker2-menu ul:after{display:block;height:192px;content:""}.next-time-picker2-menu-item{cursor:pointer;height:32px;line-height:32px;transition:background .1s linear;color:#666;background:#fff;outline:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.next-time-picker2-menu-item:hover{color:#333;background:#f9f9f9}.next-time-picker2-menu-item.next-selected{color:#666;background:#add9ff}.next-time-picker2-menu-item.next-disabled{cursor:not-allowed;color:#ccc;background:#fafafa}.next-time-picker2-panel{box-sizing:border-box;display:flex}.next-time-picker2-panel *,.next-time-picker2-panel :after,.next-time-picker2-panel :before{box-sizing:border-box}.next-time-picker2-panel:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-time-picker2-panel-header{border-bottom:1px solid #e6e6e6}.next-time-picker2-panel-input.next-input{width:100%;padding:6px;border-color:transparent;vertical-align:middle}.next-time-picker2-panel .next-time-picker2-menu{flex:1}.next-time-picker2-panel-range .next-time-picker2-panel-list:last-of-type{margin-left:20px}.next-time-picker2-footer{width:min-content;min-width:100%;box-sizing:border-box;text-align:center;border-top:1px solid #f0f0f0;padding:4px 12px;display:flex;min-height:40px;align-items:center;flex-wrap:wrap}.next-time-picker2-footer-actions{margin-left:auto}.next-time-picker2-wrapper[dir=rtl] .next-time-picker2-menu{float:right}.next-time-picker2-wrapper[dir=rtl] .next-time-picker2-menu:not(:last-child){border-right:none;border-left:1px solid #e6e6e6}.next-time-picker2{display:inline-block}.next-time-picker2,.next-time-picker2 *,.next-time-picker2 :after,.next-time-picker2 :before{box-sizing:border-box}.next-time-picker2-trigger .next-input{width:100%}.next-time-picker2-wrapper{padding:4px 0}.next-time-picker2-body{display:block;overflow:hidden;border:1px solid #e6e6e6;border-radius:3px;background:#fff;box-shadow:none}.next-time-picker2-symbol-clock-icon:before{content:""}.next-time-picker2-input{display:inline-flex;align-items:center;outline:none;box-sizing:border-box;border:1px solid #ddd;vertical-align:middle;width:inherit}.next-time-picker2-input .next-input{border:none;width:100%;height:100%}.next-time-picker2-input .next-input input{height:100%}.next-time-picker2-input.next-time-picker2-input-small{height:24px;border-radius:3px}.next-time-picker2-input.next-time-picker2-input-small .next-input-label{padding-left:8px;font-size:12px}.next-time-picker2-input.next-time-picker2-input-small .next-input-inner{font-size:12px}.next-time-picker2-input.next-time-picker2-input-small .next-input-control,.next-time-picker2-input.next-time-picker2-input-small .next-input-inner-text{padding-right:4px}.next-time-picker2-input.next-time-picker2-input-small input{height:22px;line-height:22px \0 ;padding:0 4px;font-size:12px}.next-time-picker2-input.next-time-picker2-input-small input::placeholder{font-size:12px}.next-time-picker2-input.next-time-picker2-input-small .next-input-text-field{padding:0 4px;font-size:12px;height:22px;line-height:22px}.next-time-picker2-input.next-time-picker2-input-small .next-icon .next-icon-remote,.next-time-picker2-input.next-time-picker2-input-small .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-time-picker2-input.next-time-picker2-input-small .next-input-control{border-radius:0 3px 3px 0}.next-time-picker2-input.next-time-picker2-input-medium{height:32px;border-radius:3px}.next-time-picker2-input.next-time-picker2-input-medium .next-input-label{padding-left:8px;font-size:14px}.next-time-picker2-input.next-time-picker2-input-medium .next-input-inner{font-size:14px}.next-time-picker2-input.next-time-picker2-input-medium .next-input-control,.next-time-picker2-input.next-time-picker2-input-medium .next-input-inner-text{padding-right:8px}.next-time-picker2-input.next-time-picker2-input-medium input{height:30px;line-height:30px \0 ;padding:0 8px;font-size:14px}.next-time-picker2-input.next-time-picker2-input-medium input::placeholder{font-size:14px}.next-time-picker2-input.next-time-picker2-input-medium .next-input-text-field{padding:0 8px;font-size:14px;height:30px;line-height:30px}.next-time-picker2-input.next-time-picker2-input-medium .next-icon .next-icon-remote,.next-time-picker2-input.next-time-picker2-input-medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-time-picker2-input.next-time-picker2-input-medium .next-input-control{border-radius:0 3px 3px 0}.next-time-picker2-input.next-time-picker2-input-large{height:40px;border-radius:3px}.next-time-picker2-input.next-time-picker2-input-large .next-input-label{padding-left:12px;font-size:16px}.next-time-picker2-input.next-time-picker2-input-large .next-input-inner{font-size:16px}.next-time-picker2-input.next-time-picker2-input-large .next-input-control,.next-time-picker2-input.next-time-picker2-input-large .next-input-inner-text{padding-right:8px}.next-time-picker2-input.next-time-picker2-input-large input{height:38px;line-height:38px \0 ;padding:0 12px;font-size:16px}.next-time-picker2-input.next-time-picker2-input-large input::placeholder{font-size:16px}.next-time-picker2-input.next-time-picker2-input-large .next-input-text-field{padding:0 12px;font-size:16px;height:38px;line-height:38px}.next-time-picker2-input.next-time-picker2-input-large .next-icon .next-icon-remote,.next-time-picker2-input.next-time-picker2-input-large .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-time-picker2-input.next-time-picker2-input-large .next-input-control{border-radius:0 3px 3px 0}.next-time-picker2-input:hover{border-color:#ccc;background-color:#fff}.next-time-picker2-input.next-time-picker2-input-focus{border-color:#209bfa;background-color:#fff;box-shadow:0 0 0 2px rgba(32,155,250,.2)}.next-time-picker2-input.next-time-picker2-input-noborder{border-color:transparent!important;box-shadow:none!important}.next-time-picker2-input.next-time-picker2-input-disabled{color:#ccc;border-color:#eee;background-color:#fafafa;cursor:not-allowed}.next-time-picker2-input.next-time-picker2-input-disabled:hover{border-color:#eee;background-color:#fafafa}.next-time-picker2-input.next-time-picker2-input-error{border-color:#d23c26}.next-time-picker2-input-separator{color:#ddd;font-size:12px;display:inline-block;min-width:16px;text-align:center}.next-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;top:0;margin:-1px}.next-date-picker2-footer{width:min-content;min-width:100%;box-sizing:border-box;text-align:center;border-top:1px solid #eee;padding:4px 12px;display:flex;min-height:40px;align-items:center;flex-wrap:wrap;position:relative}.next-date-picker2-footer-preset>.next-btn{margin-right:8px}.next-date-picker2-footer-actions{margin-left:auto}.next-date-picker2-footer-preset-only{width:100%}div[dir=rtl] .next-date-picker2-footer-preset>.next-btn{margin-left:8px;margin-right:0}div[dir=rtl] .next-date-picker2-footer-actions{margin-left:0;margin-right:auto}div[dir=rtl] .next-date-picker2-wrapper .next-calendar2-cell:last-child:before{border-top-right-radius:0;border-bottom-right-radius:0;right:0;border-top-left-radius:2px;border-bottom-left-radius:2px;left:8px}div[dir=rtl] .next-date-picker2-wrapper .next-calendar2-cell:first-child:before{border-top-left-radius:0;border-bottom-left-radius:0;left:0;border-top-right-radius:2px;border-bottom-right-radius:2px;right:8px}div[dir=rtl] .next-date-time-picker-wrapper{border-right:1px solid #eee;border-left:none}div[dir=rtl] .next-date-time-picker-wrapper .next-time-picker2-menu:not(:last-child){border-left:1px solid #dcdee3;border-right:none}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-selected.next-calendar2-cell-range-begin:before{right:50%;left:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-selected.next-calendar2-cell-range-end:before{left:50%;right:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-hover-begin:after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:first-child:after{right:8px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-hover-begin:not(:last-child):after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:first-child:not(.next-calendar2-cell-hover-end):after{left:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-hover-end:after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:last-child:after{left:8px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-hover-end:not(:first-child):after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:last-child:not(.next-calendar2-cell-hover-begin):after{right:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-selected.next-calendar2-cell-hover-begin:after{left:0;right:7px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-selected.next-calendar2-cell-hover-end:after{right:0;left:7px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:first-of-type:after{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none;border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:1px dashed #1274e7}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:last-of-type:after{border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:1px dashed #1274e7}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-edge-end:after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-edge-end:before{right:0;left:8px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-edge-end.next-calendar2-cell-hover:after{border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:1px dashed #1274e7}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover-begin:after{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0;border-right:1px dashed #1274e7;border-top-right-radius:2px;border-bottom-right-radius:2px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover-end:after{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-left:1px dashed #1274e7;border-top-left-radius:2px;border-bottom-left-radius:2px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled):after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled):before{right:8px;left:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:after{right:8px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:1px dashed #1274e7}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:not(.next-calendar2-cell-hover-end):not(.next-calendar2-cell-hover-begin):after{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}div[dir=rtl] .next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:nth-child(2):before{right:50%;left:0}div[dir=rtl] .next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:last-child:before{left:50%;right:0}.next-date-picker2{outline:none;display:inline-table;position:relative;width:inherit}.next-date-picker2-overlay{vertical-align:top;padding:4px 0}.next-date-picker2-overlay-range{padding:12px 0}.next-date-picker2-wrapper{box-shadow:0 4px 16px 0 rgba(0,0,0,.12);background-color:#fff;border:1px solid #eee;border-radius:3px}.next-date-picker2-wrapper .next-calendar2-panel{border-radius:3px}.next-date-picker2-wrapper .next-calendar2-body{width:272px}.next-date-picker2-wrapper .next-calendar2-cell:before{content:"";position:absolute;top:50%;right:0;left:0;z-index:1;height:24px;transform:translateY(-50%)}.next-date-picker2-wrapper .next-calendar2-cell:last-child:before{border-top-right-radius:2px;border-bottom-right-radius:2px;right:8px}.next-date-picker2-wrapper .next-calendar2-cell:first-child:before{border-top-left-radius:2px;border-bottom-left-radius:2px;left:8px}.next-date-picker2-input{display:inline-flex;align-items:center;outline:none;box-sizing:border-box;border:1px solid #ddd;vertical-align:middle;width:inherit;background-color:#fff}.next-date-picker2-input .next-input{border:none;flex-basis:100%;height:100%;width:100%}.next-date-picker2-input .next-input input{height:100%;width:auto}.next-date-picker2-input.next-date-picker2-input-small{height:24px;border-radius:3px}.next-date-picker2-input.next-date-picker2-input-small .next-input-label{padding-left:8px;font-size:12px}.next-date-picker2-input.next-date-picker2-input-small .next-input-inner{font-size:12px}.next-date-picker2-input.next-date-picker2-input-small .next-input-control,.next-date-picker2-input.next-date-picker2-input-small .next-input-inner-text{padding-right:4px}.next-date-picker2-input.next-date-picker2-input-small input{height:22px;line-height:22px \0 ;padding:0 4px;font-size:12px}.next-date-picker2-input.next-date-picker2-input-small input::placeholder{font-size:12px}.next-date-picker2-input.next-date-picker2-input-small .next-input-text-field{padding:0 4px;font-size:12px;height:22px;line-height:22px}.next-date-picker2-input.next-date-picker2-input-small .next-icon .next-icon-remote,.next-date-picker2-input.next-date-picker2-input-small .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-date-picker2-input.next-date-picker2-input-small .next-input-control{border-radius:0 3px 3px 0}.next-date-picker2-input.next-date-picker2-input-medium{height:32px;border-radius:3px}.next-date-picker2-input.next-date-picker2-input-medium .next-input-label{padding-left:8px;font-size:14px}.next-date-picker2-input.next-date-picker2-input-medium .next-input-inner{font-size:14px}.next-date-picker2-input.next-date-picker2-input-medium .next-input-control,.next-date-picker2-input.next-date-picker2-input-medium .next-input-inner-text{padding-right:8px}.next-date-picker2-input.next-date-picker2-input-medium input{height:30px;line-height:30px \0 ;padding:0 8px;font-size:14px}.next-date-picker2-input.next-date-picker2-input-medium input::placeholder{font-size:14px}.next-date-picker2-input.next-date-picker2-input-medium .next-input-text-field{padding:0 8px;font-size:14px;height:30px;line-height:30px}.next-date-picker2-input.next-date-picker2-input-medium .next-icon .next-icon-remote,.next-date-picker2-input.next-date-picker2-input-medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-date-picker2-input.next-date-picker2-input-medium .next-input-control{border-radius:0 3px 3px 0}.next-date-picker2-input.next-date-picker2-input-large{height:40px;border-radius:3px}.next-date-picker2-input.next-date-picker2-input-large .next-input-label{padding-left:12px;font-size:16px}.next-date-picker2-input.next-date-picker2-input-large .next-input-inner{font-size:16px}.next-date-picker2-input.next-date-picker2-input-large .next-input-control,.next-date-picker2-input.next-date-picker2-input-large .next-input-inner-text{padding-right:8px}.next-date-picker2-input.next-date-picker2-input-large input{height:38px;line-height:38px \0 ;padding:0 12px;font-size:16px}.next-date-picker2-input.next-date-picker2-input-large input::placeholder{font-size:16px}.next-date-picker2-input.next-date-picker2-input-large .next-input-text-field{padding:0 12px;font-size:16px;height:38px;line-height:38px}.next-date-picker2-input.next-date-picker2-input-large .next-icon .next-icon-remote,.next-date-picker2-input.next-date-picker2-input-large .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-date-picker2-input.next-date-picker2-input-large .next-input-control{border-radius:0 3px 3px 0}.next-date-picker2-input:hover{border-color:#ccc;background-color:#fff}.next-date-picker2-input.next-date-picker2-input-focus{border-color:#209bfa;background-color:#fff;box-shadow:0 0 0 2px rgba(32,155,250,.2)}.next-date-picker2-input.next-date-picker2-input-noborder{border-color:transparent!important;box-shadow:none!important}.next-date-picker2-input.next-date-picker2-input-disabled{color:#ccc;border-color:#eee;background-color:#fafafa;cursor:not-allowed}.next-date-picker2-input.next-date-picker2-input-disabled:hover{border-color:#eee;background-color:#fafafa}.next-date-picker2-input.next-date-picker2-input-error{border-color:#d23c26}.next-date-picker2-input-separator{color:#ddd;font-size:12px;line-height:12px;display:inline-block;min-width:16px;text-align:center}.next-date-picker2-panel,.next-range-picker2-panel{display:inline-flex}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-range-picker-left .next-calendar2-header-right-btn,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-range-picker-right .next-calendar2-header-left-btn{visibility:hidden}.next-range-picker2-arrow{display:block;transform:translateY(-50%) rotate(-45deg);position:absolute;z-index:1;width:10px;height:10px;margin-left:16.5px;border-color:#eee #eee transparent transparent;border-style:solid;border-width:1px;transition:left .3s ease-out;background:#fff}.next-date-picker2-tl-bl .next-range-picker2-arrow{top:12.5px}.next-date-picker2-bl-tl .next-range-picker2-arrow{bottom:13px;transform:translateY(50%) rotate(135deg)}.next-date-time-picker-wrapper{border-left:1px solid #eee}.next-date-time-picker-wrapper .next-calendar2-body{padding-right:0;padding-left:0}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-disabled .next-calendar2-cell-inner{color:#ccc;background:#fafafa}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected:before{color:#666;background:#add9ff}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected .next-calendar2-cell-inner{color:#666;background:transparent}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-begin .next-calendar2-cell-inner,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-end .next-calendar2-cell-inner{z-index:10;color:#fff;background:#209bfa}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-begin:before{left:50%}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-end:before{right:50%}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-begin-single:before,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-end-single:before{display:none}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:after{content:"";position:absolute;top:50%;right:0;left:0;z-index:2;height:24px;transform:translateY(-50%);border-color:#1274e7 transparent;border-style:dashed;border-width:1px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover.next-calendar2-cell-hover-begin:after,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:first-child:after{left:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover.next-calendar2-cell-hover-end:after,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:last-child:after{right:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover.next-calendar2-cell-selected.next-calendar2-cell-hover-begin:after{left:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover.next-calendar2-cell-selected.next-calendar2-cell-hover-end:after{right:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:1px dashed #1274e7}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:1px dashed #1274e7}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-edge-end:after,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-edge-end:before{right:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-edge-end.next-calendar2-cell-hover:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:1px dashed #1274e7}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover-begin:after{border-top:1px dashed #1274e7;border-left:1px dashed #1274e7;border-top-left-radius:2px;border-bottom-left-radius:2px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover-end:after{border-top:1px dashed #1274e7;border-right:1px dashed #1274e7;border-top-right-radius:2px;border-bottom-right-radius:2px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled):after,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled):before{left:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:1px dashed #1274e7}.next-calendar2-table-week .next-calendar2-cell-hover:after{display:none}.next-calendar2-table-week tr:hover .next-calendar2-cell:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):before{background:#f9f9f9}.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected .next-calendar2-cell-inner,.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:before{color:#666;background-color:#add9ff}.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:last-child .next-calendar2-cell-inner,.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:nth-child(2) .next-calendar2-cell-inner{color:#fff;background:#209bfa}.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:nth-child(2):before{left:50%}.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:last-child:before{right:50%}.next-calendar2-table-week tr:not(.next-calendar2-week-current) td.next-calendar2-cell.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner,.next-calendar2-table-week tr:not(.next-calendar2-week-current) td.next-calendar2-cell.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled):before{background-color:transparent;color:#ccc}.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled):last-child .next-calendar2-cell-inner,.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled):nth-child(2) .next-calendar2-cell-inner{background-color:#add9ff;color:#666}.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled).next-calendar2-cell-week-range-begin:last-child .next-calendar2-cell-inner,.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled).next-calendar2-cell-week-range-begin:nth-child(2) .next-calendar2-cell-inner,.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled).next-calendar2-cell-week-range-end:last-child .next-calendar2-cell-inner,.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled).next-calendar2-cell-week-range-end:nth-child(2) .next-calendar2-cell-inner{color:#fff;background:#209bfa}.next-icon-alibaba:before{content:""}.next-icon-ic_dashboard:before{content:""}.next-icon-ic_form:before{content:""}.next-icon-ic_formbeifen:before{content:""}.next-icon-ic_language:before{content:""}.next-icon-ic_logo:before{content:""}.next-icon-ic_tongzhi:before{content:""}.next-icon-ic_yusuanguanli:before{content:""}.next-icon-taobao:before{content:""} \ No newline at end of file + */.dark{filter:grayscale(.25)}.dark .next-menu-item:not(.next-disabled).next-focused,.dark .next-shell-navigation.next-shell-mini.next-shell-aside{background-color:#2d2d2d!important;color:#fff!important;border-color:#3e3e3e}.dark .next-menu-item{color:#fff!important}.dark .next-nav-embeddable.next-normal .next-menu-sub-menu .next-menu-item,.dark .next-nav-embeddable.next-normal .next-nav-item.next-menu-item,.dark .next-nav-embeddable.next-primary .next-menu-sub-menu .next-menu-item,.dark .next-nav-embeddable.next-primary .next-nav-item.next-menu-item,.dark .next-nav-embeddable.next-secondary .next-menu-sub-menu .next-menu-item,.dark .next-nav-embeddable.next-secondary .next-nav-item.next-menu-item{background-color:#161616!important;color:#929299!important}.dark .next-menu-item:not(.next-disabled):hover{background-color:#424346!important}.dark .next-menu-item.next-selected,.dark .next-menu.next-normal .next-menu-item.next-selected,.dark .next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-focused,.dark .next-nav.next-normal .next-menu-sub-menu .next-menu-item:hover{background-color:#424346!important;color:#209bfa!important}.dark .main-container .right-panel,.dark .next-shell-brand .next-shell-main{background-color:#161616!important}.dark .main-container .right-panel::-webkit-scrollbar,.dark .main-container .right-panel::-webkit-scrollbar-corner,.dark .main-container .right-panel::-webkit-scrollbar-track{background-color:#161616!important}.dark .page-title{color:#fff}.dark .nav-mode,.dark .nav-title{border-color:#1c1d1f}.dark .next-message.next-message-notice.next-inline{background-color:#161616;border-color:#929299}.dark .next-message.next-message-notice.next-inline .next-message-content{color:#c9c9cc}.dark .namespacewrapper{background-color:#303030!important}.dark .namespacewrapper .naming-simple{color:#c9c9cc}.dark .next-table{border-color:#3e3e3e!important}.dark .next-table table{background-color:#303030!important}.dark .query_result_wrapper{color:#fff}.dark .next-table-header th{background-color:#4a4a4a!important;color:#fff}.dark .next-table-row{background-color:#303030!important;color:#c9c9cc}.dark .next-table-sort .next-icon{color:#fff}.dark .next-table td,.dark .next-table th{border-color:#3e3e3e!important}.dark .next-table-row.selected{background:#424346!important;color:#c9c9cc}.dark .next-table-row.hovered{background:#4a4a4a!important;color:#fff}.dark .next-table-header-fixer{background:#4a4a4a!important}.dark .next-table-cell-wrapper a{color:#209bfa}.dark form label{color:#c9c9cc!important}.dark .naming-copy{background:#303030!important;color:#fff!important}.dark .next-menu.next-ver{background-color:#2d2d2d;border-color:#424346}.dark .next-overlay-wrapper .opened .next-menu-item:not(.next-disabled):hover{background-color:#fff}.dark .next-dialog-header,.dark .next-message.next-large.next-title-content .next-message-title{color:#fff}.dark .next-overlay-wrapper .next-overlay-inner{border-color:#1c1d1f;background-color:#161616}.dark .next-input.next-input-textarea,.dark .next-input.next-medium{background-color:#303030!important;border-color:#8d8d93!important;caret-color:#c9c9cc!important}.dark .next-input.next-input-textarea em,.dark .next-input.next-input-textarea input,.dark .next-input.next-input-textarea textarea,.dark .next-input.next-medium em,.dark .next-input.next-medium input,.dark .next-input.next-medium textarea{color:#fff!important}.dark .next-input.next-input-textarea input::placeholder,.dark .next-input.next-medium input::placeholder{color:#929299}.dark .next-input.next-focus,.dark .next-input:hover{border-color:#b8b8bc!important}.dark .next-input.next-input-textarea,.dark .next-input.next-small{background-color:#303030!important;border-color:#8d8d93!important;caret-color:#c9c9cc!important}.dark .next-input.next-input-textarea em,.dark .next-input.next-input-textarea input,.dark .next-input.next-input-textarea textarea,.dark .next-input.next-small em,.dark .next-input.next-small input,.dark .next-input.next-small textarea{color:#fff!important}.dark .next-input.next-input-textarea input::placeholder,.dark .next-input.next-small input::placeholder{color:#929299}.dark .setting-box{background-color:#303030!important;color:#fff!important;border-color:#8d8d93}.dark .next-radio-group .next-radio-label{color:#c9c9cc!important}.dark .main-container{background-color:#161616}.dark .next-shell-brand .next-shell-main{color:#c9c9cc}.dark .next-shell-brand .next-shell-main h1{color:#fff}.dark .next-card-body,.dark .next-card-head,.dark .service-detail .cluster-card{background-color:#303030}.dark .next-card-title,.dark .next-form-item.next-small .next-form-item-label{color:#fff!important}.dark .next-card-subtitle{color:#c9c9cc}.dark .next-tag-group .next-tag-medium{color:#c9c9cc!important}.dark .next-form-item p{color:#c9c9cc}.dark .next-collapse-panel-title{background-color:#161616;color:#c9c9cc}.dark .next-collapse .next-collapse-panel-icon{color:#c9c9cc}.dark .next-collapse-panel-title:hover,.dark .next-collapse-panel-title:hover .next-collapse-panel-icon{background-color:#1c1d1f;color:#fff}.dark .next-collapse{border-color:#1c1d1f}.dark .next-collapse-panel-expanded>.next-collapse-panel-content{background-color:#2d2d2d}.dark .next-collapse-panel-expanded>.next-collapse-panel-content ul li pre{background-color:#303030;border-color:#1c1d1f;color:#c9c9cc}.dark .next-btn.next-btn-normal,.dark .next-btn.next-btn-secondary{background-color:#303030!important;border-color:#8d8d93!important;color:#c9c9cc!important}.dark .next-btn.next-btn-normal:hover,.dark .next-btn.next-btn-secondary:hover{background-color:#373737!important;color:#fff!important;border-color:#b8b8bc!important}.dark .next-pagination .next-pagination-item.next-current{background-color:#8d8d93!important;color:#fff!important}.dark .next-pagination.next-medium .next-pagination-item.next-next:not([disabled]) i,.dark .next-pagination.next-medium .next-pagination-item.next-prev:not([disabled]) i{color:#c9c9cc!important}.dark .next-switch-off .next-switch-btn,.dark .next-switch-on .next-switch-btn{background-color:#c9c9cc!important}.dark .next-switch-off:focus .next-switch-btn,.dark .next-switch-off:hover .next-switch-btn,.dark .next-switch-on:focus .next-switch-btn,.dark .next-switch-on:hover .next-switch-btn{background-color:#fff!important}.dark .next-switch-off{background-color:#303030!important;border-color:#8d8d93!important}.dark .next-switch-off:hover{border-color:#b8b8bc!important;background-color:#373737!important}:global(#root),body,html{height:100%}:global(.mainwrapper){position:absolute!important;top:0;bottom:0;left:0;right:0}:global(.sideleft){float:left;background-color:#eaedf1;position:absolute;top:0;bottom:0;z-index:2;overflow:hidden;width:180px}:global(.sideleft .toptitle){width:100%;height:70px;line-height:70px;background:#d9dee4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;text-indent:20px}:global(.maincontainer){position:absolute;width:auto;top:0;bottom:0;left:180px;right:0;overflow:hidden;overflow-y:auto;-o-transition:all .2s ease;-ms-transition:all .2s ease;-moz-transition:all .2s ease;-webkit-transition:all .2s ease}:global(.viewFramework-product-navbar .product-nav-list li .active){background-color:#fff!important}.next-menu .next-menu-icon-arrow-down{transform:rotate(0deg)!important}li.next-menu-item:not(.next-disabled).next-selected:focus:hover,li.next-menu-item:not(.next-disabled).next-selected:hover,li.next-menu-item:not(.next-disabled):hover{background:#e4f3fe;background:var(--nav-normal-sub-nav-hover-bg-color,#e4f3fe);color:#209bfa;color:var(--nav-normal-sub-nav-hover-text-color,#209bfa)}.next-menu.next-normal .next-menu-item.next-selected{background:#e4f3fe!important;background:var(--nav-normal-sub-nav-selected-bg-color,#e4f3fe)!important;color:#209bfa!important;color:var(--nav-normal-sub-nav-selected-text-color,#209bfa)!important}.clearfix:after{content:".";clear:both;display:block;height:0;overflow:hidden;visibility:hidden}.clearfix{zoom:1}.copy-icon{cursor:pointer;margin-left:4px;color:var(--color-link-1,#298dff)}.layouttitle{height:40px;width:200px;background-color:#09c;color:#fff;line-height:40px;text-align:center;margin:0;padding:0;font-weight:700}.linknav{height:30px;line-height:30px;text-align:center}.righttitle{height:40px;background-color:#000;width:100%;font-weight:700}.product-nav-icon{padding:15px 0 0;height:70px;margin:0}.envcontainer{padding-left:15px;margin-right:auto;margin-left:auto;max-height:450px;overflow:scroll;margin-bottom:100px;display:none;top:50px;left:230px;position:fixed;z-index:99999;width:435px;height:auto;background-color:#fff;border:1px solid #ddd;border-radius:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.envtop{height:50px;line-height:50px;position:fixed;top:0;left:320px;z-index:999;background-color:transparent;-webkit-font-smoothing:antialiased}.envcontainer-top{padding-left:15px;margin-right:auto;margin-left:auto;max-height:450px;overflow:auto;margin-bottom:100px;display:none;top:50px;left:0;position:absolute;z-index:99999;width:435px;height:auto;background-color:#fff;border:1px solid #ddd;border-radius:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.envcontainer-top .row{margin:0!important}.envcontainer-top .active{background-color:#546478}.envcontainer dl dd.active{background-color:#546478;color:#fff}.current-env{display:block;padding:0;font-size:14px;margin:0 0 5px;text-align:center}.current-env a{color:#666;text-decoration:none}.product-nav-title{height:70px;line-height:70px;margin:0;text-align:center;padding:0;font-size:14px;background:#d9dee4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333}.console-title{padding:16px 0}.topbar-nav-item-title{margin:0 0 10px 31px;color:#666;font-weight:700}.dl{height:100%;width:125px;overflow:auto;margin:0 15px 15px 0}.dd{height:24px;line-height:24px;overflow-x:hidden;padding-left:12px;margin-left:20px}.active{color:#fff}.dd:hover{cursor:pointer;opacity:.7;filter:70}.cm-s-xq-light span.cm-keyword{line-height:1em;font-weight:700;color:#5a5cad}.cm-s-xq-light span.cm-atom{color:#6c8cd5}.cm-s-xq-light span.cm-number{color:#164}.cm-s-xq-light span.cm-def{text-decoration:underline}.cm-s-xq-light span.cm-type,.cm-s-xq-light span.cm-variable,.cm-s-xq-light span.cm-variable-2,.cm-s-xq-light span.cm-variable-3{color:#000}.cm-s-xq-light span.cm-comment{color:#0080ff;font-style:italic}.cm-s-xq-light span.cm-string{color:red}.cm-s-xq-light span.cm-meta{color:#ff0}.cm-s-xq-light span.cm-qualifier{color:grey}.cm-s-xq-light span.cm-builtin{color:#7ea656}.cm-s-xq-light span.cm-bracket{color:#cc7}.cm-s-xq-light span.cm-tag{color:#3f7f7f}.cm-s-xq-light span.cm-attribute{color:#7f007f}.cm-s-xq-light span.cm-error{color:red}.cm-s-xq-light .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-xq-light .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important;background:#ff0}.CodeMirror{border:1px solid #eee}.CodeMirror-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:auto;z-index:9999}.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:infobackground;border:1px solid #000;border-radius:4px 4px 4px 4px;color:infotext;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-position:0 100%;background-repeat:repeat-x}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{padding-left:18px;background-position:0 0;background-repeat:no-repeat}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:100% 100%;width:100%;height:100%}@media(min-width:992px){.modal-lg{width:980px}}@media(min-width:768px)and (max-width:992px){.modal-lg{width:750px}}.modal-body table.narrow-table td{padding:8px 0}.add-on.form-control{margin-left:-4px;box-shadow:none;font-size:28px;line-height:32px;padding:0;vertical-align:top}.text-break{word-wrap:break-word;word-break:break-all;white-space:normal}.form-inline{margin-bottom:20px}.console-title{min-height:70px}.form-horizontal .form-group .checkbox{margin-left:0;margin-right:10px}.combox_border,.combox_select{border:1px solid #c2c2c2;width:245px}.combox_border{height:auto;display:inline-block;position:relative}.combox_input{border:0;padding-left:5px;width:85%;vertical-align:middle}.form-inline .combox_input.form-control{width:85%}.combox_button{width:12%;color:#666;text-align:center;vertical-align:middle;cursor:pointer;border-left:1px solid #c2c2c2}ul.combox_select{border-top:0;padding:0;position:absolute;left:-1px;top:20px;display:none;background:#fff;max-height:300px;overflow-y:auto}ul.combox_select li{overflow:hidden;height:30px;line-height:30px;cursor:pointer}ul.combox_select li a{display:block;line-height:28px;padding:0 8px;text-decoration:none;color:#666}ul.combox_select li a:hover{text-decoration:none;background:#f5f5f5}#combox-appanme.combox_border,#combox-appanme .combox_select{width:158px}#combox-appanme .form-control{height:30px}input.error,textarea.error{border:1px solid red}.form-inline .form-group{position:relative}label.error{margin:4px 0;color:red;font-weight:400;position:absolute;right:15px;bottom:-26px}ins{background-color:#c6ffc6;text-decoration:none}del{background-color:#ffc6c6}form.vertical-margin-lg .form-group{margin-bottom:22px}.namespacewrapper{padding:5px 15px;overflow:hidden;background-color:#efefef}.xrange-container{position:relative;border:1px solid #ccc;margin:0;padding:0}.xrange-container .cocofont,.xrange-container .iconfont{cursor:pointer}.xrange-container .label{display:flex;align-items:center;text-align:center;justify-content:space-between;cursor:pointer}.xrange-container .label.is-button{display:flex;border:1px solid #e6ebef;height:32px;padding:6px 12px;background-color:#f5f5f6}.xrange-container .label.is-button>i{font-size:13px}.xrange-container .label.is-empty{padding:0}.xrange-container .label.is-empty.is-button{padding:6px 12px}.xrange-container .label.is-empty>i{font-size:15px;margin-right:0}.xrange-container .label.is-empty>span,.xrange-container .label.is-empty b{display:none}.xrange-container .label>i{font-size:13px;text-align:center}.xrange-container .label>b{padding-top:3px}.xrange-container .label>span{min-width:100px;display:inline-flex;margin-bottom:8px}.xrange-layer{position:fixed;left:0;top:0;width:100%;height:100%;z-index:990;background-color:rgba(0,0,0,.05)}.xrange-panel{display:none;position:relative;right:1px;top:-8px;z-index:1000;border:1px solid #e6e7eb;border-radius:0;box-shadow:1px 1px 3px 0 transparent;width:111px;min-height:302px;background-color:#fff}.xrange-panel.visible{display:block}.xrange-panel .quick-list{display:flex;flex-direction:column;justify-content:space-around;box-sizing:content-box!important;align-items:center}.xrange-panel .quick-list>span{flex:0 0 auto;width:100%;line-height:20px;padding:6px 0 6px 27px;font-size:12px;-webkit-user-select:none;cursor:pointer}.xrange-panel .quick-list>span+span{margin-left:0}.xrange-panel .quick-list>span.active{background-color:#f2f3f7;color:#333;cursor:default}.xrange-panel .xrange-panel-footer{display:flex;align-items:center;justify-content:space-between;height:60px;background-color:#fff;position:absolute;top:300px;left:-539px;min-width:648px;padding:12px 108px 12px 12px}.xrange-panel .xrange-panel-footer .fn-left,.xrange-panel .xrange-panel-footer .fn-right{flex:0 0 auto}.xrange-panel .xrange-panel-footer button+button{margin-left:8px}.xrange-panel .picker-container{display:none;position:relative;margin-top:16px}.xrange-panel .picker-container .next-range-picker-panel{top:-273px!important;left:-540px!important;position:absolute!important;animation:none!important;z-index:999999;border-color:#e6ebef}.next-calendar-card .next-calendar-range-body{background:#fff!important;min-height:227px!important}.xrange-panel .picker-container+.next-range-picker{display:none}.xrange-panel .picker-container .next-date-picker-quick-tool{display:none!important}.xrange-panel.show-picker .picker-container{display:block;min-height:5px}.dingding{background:url(https://g.alicdn.com/cm-design/arms/1.1.27/styles/arms/images/dingding.png) no-repeat 0}.dingding,.wangwang{display:inline-block;padding:5px 0 5px 30px;height:24px;vertical-align:middle}.wangwang{background:url(https://g.alicdn.com/cm-design/arms/1.1.27/styles/arms/images/wangwang.png) no-repeat 0;background-size:24px}@media screen and (min-width:768px){.region-group-list{max-width:784px}}@media screen and (min-width:992px){.region-group-list{max-width:862px}}@media screen and (min-width:1200px){.region-group-list{max-width:600px}}@media screen and (min-width:1330px){.region-group-list{max-width:700px}}@media screen and (min-width:1500px){.region-group-list{max-width:1000px}}.next-switch-medium{border:1px solid transparent;width:48px!important;height:26px!important;border-radius:15px!important}.next-switch-medium>.next-switch-trigger{border:1px solid transparent;position:absolute;left:33px!important;width:24px!important;height:24px!important;border-radius:15px!important}.aliyun-advice{bottom:98px!important}.next-switch-medium>.next-switch-children{font-size:12px!important;position:absolute;height:24px!important;line-height:24px!important}.next-switch-on>.next-switch-trigger{box-shadow:1px 1px 3px 0 rgba(0,0,0,.32)!important;background-color:#fff;border-color:transparent;position:absolute;right:0!important}.next-switch-on>.next-switch-children{left:2px!important;font-size:12px!important}.next-switch-on[disabled]>.next-switch-trigger{position:absolute;right:0!important;box-shadow:1px 1px 3px 0 rgba(0,0,0,.32)!important;background-color:#e6e7eb;border-color:transparent}.next-switch-off>.next-switch-children{right:-6px;color:#979a9c!important}.next-switch-off[disabled]>.next-switch-trigger{left:0!important;box-shadow:1px 1px 3px 0 rgba(0,0,0,.32)!important;background-color:#e6e7eb;border-color:transparent}.next-switch-off>.next-switch-trigger{left:0!important;box-shadow:1px 1px 3px 0 rgba(0,0,0,.32);background-color:#fff;border-color:transparent}.next-switch-off,.next-switch-on{width:58px!important}.next-switch-on{position:relative}.next-menu .next-menu-icon-select{position:absolute;left:4px;top:0;color:#73777a!important}.next-table-cell-wrapper{hyphens:auto!important;word-break:break-word!important}.dash-page-container{height:100%;min-width:980px}.dash-page-container:after{content:"";display:table;clear:both}.dash-left-container{position:relative;float:left;width:77.52%;height:100%}.dash-title-show{width:100%;height:106px;background-color:#fff;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12);margin-bottom:19px;padding-top:20px;padding-bottom:20px;overflow:hidden}.dash-title-item{float:left;height:49px;width:33%;border-right:1px solid #ebecec;line-height:49px;padding-left:30px;padding-right:30px}.dash-title-word{height:19px;line-height:19px;font-size:14px;color:#73777a}.dash-title-num{height:45px;font-size:32px}.dash-title-item:last-child{border:none!important}.dash-menu-list{width:100%;height:104px;background-color:#fff;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12);margin-bottom:19px}.dash-menu-item{position:relative;float:left;width:33.33%;border-right:1px solid #eee;height:100%;padding-top:20px;padding-bottom:20px;cursor:pointer}.dash-menu-item.disabled{cursor:not-allowed;opacity:.7}.dash-menu-item:last-child{border:none}.dash-menu-item:hover{box-shadow:0 3px 6px 0 rgba(0,0,0,.12)}.dash-menu-conent-wrapper{padding-left:60px;padding-right:40px}.dash-menu-pic{position:absolute;width:32px;left:20px}.dash-menu-content-title{height:19px;line-height:19px;color:#373d41;margin-bottom:5px}.dash-menu-content-word{font-size:12px;color:#73777a}.dash-scene-wrapper{width:100%;background-color:#fff;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12);margin-bottom:20px}.dash-scene-title{position:relative;padding-left:20px;height:50px;line-height:50px;border-bottom:1px solid #f0f0f0}.dash-sceneitem{width:100%;height:80px;padding-top:24px}.dash-scenitem-out{border-bottom:1px solid #eee;height:100%}.dash-sceneitem:hover{box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 4px 0 rgba(0,0,0,.12);border-bottom:1px solid #f0f0f0}.dash-sceneitem-progresswrapper{position:relative;width:256px;height:6px}.dash-sceneitem-progresswrapper.green{background-color:#e2f5cf}.dash-sceneitem-progresswrapper.red{background-color:#ffe6e5}.dash-sceneitem-progresswrapper.green .dash-sceneitem-progressinner{height:100%;background-color:#a6e22e}.dash-sceneitem-progresswrapper.red .dash-sceneitem-progressinner{height:100%;background-color:#eb4c4d}.dash-sceneitem-iconshow{position:absolute;right:0;top:5px}.dash-sceneitem:hover.dash-sceneitem-out{border:none}.dash-sceneitem:after{display:table;content:"";clear:both}.dash-sceneitem-title{float:left;height:32.8px;padding-top:5px;width:14.47%;border-right:1px solid #f0f0f0;overflow:hidden;text-overflow:ellipsis}.scene-nomore-data{position:absolute;text-align:center;left:0;right:0;color:#eee;font-size:12px}.dash-sceneitem-content{position:relative;float:left;padding-top:5px;padding-left:30px;width:85.53%}.scene-title-link{position:absolute;right:20px;top:0;font-size:10px}.dash-bottom-show{width:100%;height:42px;line-height:42px;margin-top:18px;text-align:center;background-color:#fff;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12)}.dash-right-container{float:right;height:100%;width:22.44%;padding:10px;background-color:#fff}.dash-bottom-item,.dash-vl{color:#979a9c;margin-right:10px}.dash-doc{background-color:#fff;height:178px;width:100%;margin-bottom:14px}.dash-doc-title{width:100%;height:68px;line-height:68px;padding-left:20px;padding-right:20px;border-bottom:1px solid #eee}.dash-doc-content{width:100%;padding:15px}.dash-card-contentwrappers{width:100%;height:230px;margin-bottom:14px;background-color:#fff;border:1px solid #eee;box-shadow:0 0 0 0 hsla(0,0%,85.1%,.5),0 0 2px 0 rgba(0,0,0,.12)}.dash-card-title{width:100%;height:39px;line-height:39px;margin:0;padding-left:24px;padding-right:24px;color:#4a4a4a;border-bottom:1px solid #eee}.dash-card-contentlist{padding:20px}.dash-card-contentitem{position:relative;text-align:left;font-size:12px;margin-bottom:10px}.next-slick-dots-item button{height:4px!important;width:35px!important;border-radius:10px!important}.next-table-row.hovered{background-color:#f5f7f9!important}.alert-success-text{color:#4a4a4a;font-size:14px;margin:10px 0}.alert-success{border-color:#e0e0e0!important}.row-bg-green{background-color:#e4fdda!important}.row-bg-light-green{background-color:#e3fff8}.row-bg-orange{background-color:#fff3e0}.row-bg-red{background-color:#ffece4!important}/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}*,:after,:before{box-sizing:border-box}ol,ul{list-style:none;margin:0;padding:0}li{margin-left:0}hr{border:solid #e6e6e6;border-width:1px 0 0}a{text-decoration:none}a:link{color:#298dff}a:visited{color:#4a83c5}a:active,a:hover{color:#2580e7}a:active{text-decoration:underline}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-thin.eot);src:url(../console-ui/public/fonts/roboto-thin.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-thin.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-thin.woff) format("woff"),url(../console-ui/public/fonts/roboto-thin.ttf) format("truetype");font-weight:200;font-display:swap}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-light.eot);src:url(../console-ui/public/fonts/roboto-light.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-light.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-light.woff) format("woff"),url(../console-ui/public/fonts/roboto-light.ttf) format("truetype");font-weight:300;font-display:swap}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-regular.eot);src:url(../console-ui/public/fonts/roboto-regular.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-regular.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-regular.woff) format("woff"),url(../console-ui/public/fonts/roboto-regular.ttf) format("truetype");font-weight:400;font-display:swap}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-medium.eot);src:url(../console-ui/public/fonts/roboto-medium.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-medium.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-medium.woff) format("woff"),url(../console-ui/public/fonts/roboto-medium.ttf) format("truetype");font-weight:500;font-display:swap}@font-face{font-family:Roboto;src:url(../console-ui/public/fonts/roboto-bold.eot);src:url(../console-ui/public/fonts/roboto-bold.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/roboto-bold.woff2) format("woff2"),url(../console-ui/public/fonts/roboto-bold.woff) format("woff"),url(../console-ui/public/fonts/roboto-bold.ttf) format("truetype");font-weight:700;font-display:swap}html{font-size:100%}body{font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142;color:#333}button,input,optgroup,select,textarea{font-family:inherit}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{font-weight:inherit}h1{margin-bottom:12px;font-size:24px;line-height:36px}h1,h2{font-weight:500}h2{margin-bottom:10px;font-size:20px;line-height:30px}h3,h4{margin-bottom:8px;font-size:16px}h3,h4,h5{font-weight:400;line-height:24px}h5{margin-bottom:7px;font-size:14px}h6{font-weight:500}h6,p{margin-bottom:7px;font-size:14px;line-height:20px}p{font-weight:400}strong{font-weight:500}small{font-size:75%}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDownSmall{0%{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-moz-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-ms-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-o-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-moz-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-ms-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-o-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(24px);-moz-transform:translateY(24px);-ms-transform:translateY(24px);-o-transform:translateY(24px);transform:translateY(24px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-moz-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-ms-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-o-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@-moz-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@-ms-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@-o-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(20px);-moz-transform:translateY(20px);-ms-transform:translateY(20px);-o-transform:translateY(20px);transform:translateY(20px)}}@-webkit-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@-moz-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@-ms-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@-o-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-20px);-moz-transform:translateX(-20px);-ms-transform:translateX(-20px);-o-transform:translateX(-20px);transform:translateX(-20px)}}@-webkit-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@-moz-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@-ms-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@-o-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(20px);-moz-transform:translateX(20px);-ms-transform:translateX(20px);-o-transform:translateX(20px);transform:translateX(20px)}}@-webkit-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@-moz-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@-ms-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@-o-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-24px);-moz-transform:translateY(-24px);-ms-transform:translateY(-24px);-o-transform:translateY(-24px);transform:translateY(-24px)}}@-webkit-keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@-moz-keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@-ms-keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@-o-keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@keyframes fadeOutUpSmall{0%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);-ms-transform:translateY(-8px);-o-transform:translateY(-8px);transform:translateY(-8px)}}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@-moz-keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@-ms-keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@-o-keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@keyframes slideOutDown{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(2000px);-moz-transform:translateY(2000px);-ms-transform:translateY(2000px);-o-transform:translateY(2000px);transform:translateY(2000px)}}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@-moz-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@-ms-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@-o-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(-2000px);-moz-transform:translateX(-2000px);-ms-transform:translateX(-2000px);-o-transform:translateX(-2000px);transform:translateX(-2000px)}}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@-moz-keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@-ms-keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@-o-keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@keyframes slideOutRight{0%{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}to{opacity:0;-webkit-transform:translateX(2000px);-moz-transform:translateX(2000px);-ms-transform:translateX(2000px);-o-transform:translateX(2000px);transform:translateX(2000px)}}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@-moz-keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@-ms-keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@-o-keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@keyframes slideOutUp{0%{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-2000px);-moz-transform:translateY(-2000px);-ms-transform:translateY(-2000px);-o-transform:translateY(-2000px);transform:translateY(-2000px)}}@-webkit-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-ms-transform:translateY(-100%);-o-transform:translateY(-100%);transform:translateY(-100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-moz-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-ms-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-o-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-moz-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-ms-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-o-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);-o-transform:translateX(100%);transform:translateX(100%)}to{opacity:1;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes slideInUp{0%{opacity:0;-webkit-transform:translateY(100%);-moz-transform:translateY(100%);-ms-transform:translateY(100%);-o-transform:translateY(100%);transform:translateY(100%)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-moz-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-ms-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-o-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@-moz-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@-ms-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@-o-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);-moz-transform:scale3d(.3,.3,.3);-ms-transform:scale3d(.3,.3,.3);-o-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@-webkit-keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-ms-keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-o-keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes zoomInBig{0%{opacity:0;-webkit-transform:scale(.9);-moz-transform:scale(.9);-ms-transform:scale(.9);-o-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-webkit-keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@-moz-keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@-ms-keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@-o-keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@keyframes zoomOutBig{0%{opacity:1}to{opacity:0;-webkit-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}}@-webkit-keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-moz-keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-ms-keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-o-keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@keyframes expandInDown{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-webkit-keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-moz-keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-ms-keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-o-keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@keyframes expandInUp{0%{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-webkit-keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@-moz-keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@-ms-keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@-o-keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@keyframes expandInWithFade{0%{opacity:0}40%{opacity:.1}50%{opacity:.9}to{opacity:1}}@-webkit-keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-moz-keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-ms-keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-o-keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@keyframes expandOutUp{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left top 0;-moz-transform-origin:left top 0;-ms-transform-origin:left top 0;-o-transform-origin:left top 0;transform-origin:left top 0}}@-webkit-keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-moz-keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-ms-keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-o-keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@keyframes expandOutDown{0%{opacity:1;-webkit-transform:scaleY(1);-moz-transform:scaleY(1);-ms-transform:scaleY(1);-o-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}to{opacity:0;-webkit-transform:scaleY(.6);-moz-transform:scaleY(.6);-ms-transform:scaleY(.6);-o-transform:scaleY(.6);transform:scaleY(.6);-webkit-transform-origin:left bottom 0;-moz-transform-origin:left bottom 0;-ms-transform-origin:left bottom 0;-o-transform-origin:left bottom 0;transform-origin:left bottom 0}}@-webkit-keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@-moz-keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@-ms-keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@-o-keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@keyframes expandOutWithFade{0%{opacity:1}70%{opacity:0}to{opacity:0}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-ms-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-o-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.fadeIn{-webkit-animation-name:fadeIn;-moz-animation-name:fadeIn;-ms-animation-name:fadeIn;-o-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeInDown{-webkit-animation-name:fadeInDown;-moz-animation-name:fadeInDown;-ms-animation-name:fadeInDown;-o-animation-name:fadeInDown;animation-name:fadeInDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInDown,.fadeInLeft{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeInLeft{-webkit-animation-name:fadeInLeft;-moz-animation-name:fadeInLeft;-ms-animation-name:fadeInLeft;-o-animation-name:fadeInLeft;animation-name:fadeInLeft;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInRight{-webkit-animation-name:fadeInRight;-moz-animation-name:fadeInRight;-ms-animation-name:fadeInRight;-o-animation-name:fadeInRight;animation-name:fadeInRight;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInRight,.fadeInUp{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeInUp{-webkit-animation-name:fadeInUp;-moz-animation-name:fadeInUp;-ms-animation-name:fadeInUp;-o-animation-name:fadeInUp;animation-name:fadeInUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOut{-webkit-animation-name:fadeOut;-moz-animation-name:fadeOut;-ms-animation-name:fadeOut;-o-animation-name:fadeOut;animation-name:fadeOut;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOut,.fadeOutDown{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeOutDown{-webkit-animation-name:fadeOutDown;-moz-animation-name:fadeOutDown;-ms-animation-name:fadeOutDown;-o-animation-name:fadeOutDown;animation-name:fadeOutDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;-moz-animation-name:fadeOutLeft;-ms-animation-name:fadeOutLeft;-o-animation-name:fadeOutLeft;animation-name:fadeOutLeft;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOutLeft,.fadeOutRight{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeOutRight{-webkit-animation-name:fadeOutRight;-moz-animation-name:fadeOutRight;-ms-animation-name:fadeOutRight;-o-animation-name:fadeOutRight;animation-name:fadeOutRight;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeOutUp{-webkit-animation-name:fadeOutUp;-moz-animation-name:fadeOutUp;-ms-animation-name:fadeOutUp;-o-animation-name:fadeOutUp;animation-name:fadeOutUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideInUp{-webkit-animation-name:slideInUp;-moz-animation-name:slideInUp;-ms-animation-name:slideInUp;-o-animation-name:slideInUp;animation-name:slideInUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideInDown,.slideInUp{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideInDown{-webkit-animation-name:slideInDown;-moz-animation-name:slideInDown;-ms-animation-name:slideInDown;-o-animation-name:slideInDown;animation-name:slideInDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideInLeft{-webkit-animation-name:slideInLeft;-moz-animation-name:slideInLeft;-ms-animation-name:slideInLeft;-o-animation-name:slideInLeft;animation-name:slideInLeft;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideInLeft,.slideInRight{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideInRight{-webkit-animation-name:slideInRight;-moz-animation-name:slideInRight;-ms-animation-name:slideInRight;-o-animation-name:slideInRight;animation-name:slideInRight;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.35s;-moz-animation-duration:.35s;-ms-animation-duration:.35s;-o-animation-duration:.35s;animation-duration:.35s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideOutUp{-webkit-animation-name:slideOutUp;-moz-animation-name:slideOutUp;-ms-animation-name:slideOutUp;-o-animation-name:slideOutUp;animation-name:slideOutUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideOutRight,.slideOutUp{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideOutRight{-webkit-animation-name:slideOutRight;-moz-animation-name:slideOutRight;-ms-animation-name:slideOutRight;-o-animation-name:slideOutRight;animation-name:slideOutRight;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideOutLeft{-webkit-animation-name:slideOutLeft;-moz-animation-name:slideOutLeft;-ms-animation-name:slideOutLeft;-o-animation-name:slideOutLeft;animation-name:slideOutLeft;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.slideOutDown,.slideOutLeft{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.slideOutDown{-webkit-animation-name:slideOutDown;-moz-animation-name:slideOutDown;-ms-animation-name:slideOutDown;-o-animation-name:slideOutDown;animation-name:slideOutDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.zoomIn{-webkit-animation-name:zoomIn;-moz-animation-name:zoomIn;-ms-animation-name:zoomIn;-o-animation-name:zoomIn;animation-name:zoomIn;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.zoomIn,.zoomOut{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.zoomOut{-webkit-animation-name:zoomOut;-moz-animation-name:zoomOut;-ms-animation-name:zoomOut;-o-animation-name:zoomOut;animation-name:zoomOut;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.expandInDown{-webkit-animation-name:expandInDown;-moz-animation-name:expandInDown;-ms-animation-name:expandInDown;-o-animation-name:expandInDown;animation-name:expandInDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.expandInDown,.expandOutUp{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.expandOutUp{-webkit-animation-name:expandOutUp;-moz-animation-name:expandOutUp;-ms-animation-name:expandOutUp;-o-animation-name:expandOutUp;animation-name:expandOutUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.15s;-moz-animation-duration:.15s;-ms-animation-duration:.15s;-o-animation-duration:.15s;animation-duration:.15s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.expandInUp{-webkit-animation-name:expandInUp;-moz-animation-name:expandInUp;-ms-animation-name:expandInUp;-o-animation-name:expandInUp;animation-name:expandInUp;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.expandInUp,.expandOutDown{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.expandOutDown{-webkit-animation-name:expandOutDown;-moz-animation-name:expandOutDown;-ms-animation-name:expandOutDown;-o-animation-name:expandOutDown;animation-name:expandOutDown;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.15s;-moz-animation-duration:.15s;-ms-animation-duration:.15s;-o-animation-duration:.15s;animation-duration:.15s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInDownSmall{-webkit-animation-name:fadeInDownSmall;-moz-animation-name:fadeInDownSmall;-ms-animation-name:fadeInDownSmall;-o-animation-name:fadeInDownSmall;animation-name:fadeInDownSmall;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.fadeInDownSmall,.fadeOutUpSmall{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.fadeOutUpSmall{-webkit-animation-name:fadeOutUpSmall;-moz-animation-name:fadeOutUpSmall;-ms-animation-name:fadeOutUpSmall;-o-animation-name:fadeOutUpSmall;animation-name:fadeOutUpSmall;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-ms-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.zoomInBig{-webkit-animation-name:zoomInBig;-moz-animation-name:zoomInBig;-ms-animation-name:zoomInBig;-o-animation-name:zoomInBig;animation-name:zoomInBig;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.2s;-moz-animation-duration:.2s;-ms-animation-duration:.2s;-o-animation-duration:.2s;animation-duration:.2s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);-moz-animation-timing-function:cubic-bezier(0,0,.2,1);-ms-animation-timing-function:cubic-bezier(0,0,.2,1);-o-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.zoomInBig,.zoomOutBig{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.zoomOutBig{-webkit-animation-name:zoomOutBig;-moz-animation-name:zoomOutBig;-ms-animation-name:zoomOutBig;-o-animation-name:zoomOutBig;animation-name:zoomOutBig;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.2s;-moz-animation-duration:.2s;-ms-animation-duration:.2s;-o-animation-duration:.2s;animation-duration:.2s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);-moz-animation-timing-function:cubic-bezier(0,0,.2,1);-ms-animation-timing-function:cubic-bezier(0,0,.2,1);-o-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.pulse{-webkit-animation-name:pulse;-moz-animation-name:pulse;-ms-animation-name:pulse;-o-animation-name:pulse;animation-name:pulse;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.3s;-moz-animation-duration:.3s;-ms-animation-duration:.3s;-o-animation-duration:.3s;animation-duration:.3s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-moz-animation-timing-function:cubic-bezier(.4,0,.2,1);-ms-animation-timing-function:cubic-bezier(.4,0,.2,1);-o-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.expand-enter{overflow:hidden}.expand-enter-active{transition:all .3s ease-out}.expand-enter-active>*{-webkit-animation-name:expandInWithFade;-moz-animation-name:expandInWithFade;-ms-animation-name:expandInWithFade;-o-animation-name:expandInWithFade;animation-name:expandInWithFade;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.2s;-moz-animation-duration:.2s;-ms-animation-duration:.2s;-o-animation-duration:.2s;animation-duration:.2s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;-ms-animation-fill-mode:forwards;-o-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.expand-leave{overflow:hidden}.expand-leave-active{transition:all .2s ease-out}.expand-leave-active>*{-webkit-animation-name:expandOutWithFade;-moz-animation-name:expandOutWithFade;-ms-animation-name:expandOutWithFade;-o-animation-name:expandOutWithFade;animation-name:expandOutWithFade;-webkit-animation-iteration-count:1;-moz-animation-iteration-count:1;-ms-animation-iteration-count:1;-o-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-duration:.2s;-moz-animation-duration:.2s;-ms-animation-duration:.2s;-o-animation-duration:.2s;animation-duration:.2s;-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);-moz-animation-timing-function:cubic-bezier(.23,1,.32,1);-ms-animation-timing-function:cubic-bezier(.23,1,.32,1);-o-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1);-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;-ms-animation-fill-mode:forwards;-o-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}.next-icon[dir=rtl]:before{transform:rotateY(180deg)}@font-face{font-family:NextIcon;src:url(../console-ui/public/fonts/font_1533967_slipq25tezj.eot);src:url(../console-ui/public/fonts/font_1533967_slipq25tezj.eot?#iefix) format("embedded-opentype"),url(../console-ui/public/fonts/font_1533967_slipq25tezj.woff2) format("woff2"),url(../console-ui/public/fonts/font_1533967_slipq25tezj.woff) format("woff"),url(../console-ui/public/fonts/font_1533967_slipq25tezj.ttf) format("truetype"),url(../console-ui/public/fonts/font_1533967_slipq25tezj.svg#NextIcon) format("svg");font-display:swap}.next-icon{display:inline-block;font-family:NextIcon;font-style:normal;font-weight:400;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.next-icon:before{display:inline-block;vertical-align:middle;text-align:center}.next-icon-smile:before{content:""}.next-icon-cry:before{content:""}.next-icon-success:before{content:""}.next-icon-warning:before{content:""}.next-icon-prompt:before{content:""}.next-icon-error:before{content:""}.next-icon-help:before{content:""}.next-icon-clock:before{content:""}.next-icon-success-filling:before{content:""}.next-icon-delete-filling:before{content:""}.next-icon-favorites-filling:before{content:""}.next-icon-add:before{content:""}.next-icon-minus:before{content:""}.next-icon-arrow-up:before{content:""}.next-icon-arrow-down:before{content:""}.next-icon-arrow-left:before{content:""}.next-icon-arrow-right:before{content:""}.next-icon-arrow-double-left:before{content:""}.next-icon-arrow-double-right:before{content:""}.next-icon-switch:before{content:""}.next-icon-sorting:before{content:""}.next-icon-descending:before{content:""}.next-icon-ascending:before{content:""}.next-icon-select:before{content:""}.next-icon-semi-select:before{content:""}.next-icon-search:before{content:""}.next-icon-close:before{content:""}.next-icon-ellipsis:before{content:""}.next-icon-picture:before{content:""}.next-icon-calendar:before{content:""}.next-icon-ashbin:before{content:""}.next-icon-upload:before{content:""}.next-icon-download:before{content:""}.next-icon-set:before{content:""}.next-icon-edit:before{content:""}.next-icon-refresh:before{content:""}.next-icon-filter:before{content:""}.next-icon-attachment:before{content:""}.next-icon-account:before{content:""}.next-icon-email:before{content:""}.next-icon-atm:before{content:""}.next-icon-loading:before{content:"";animation:loadingCircle 1s linear infinite}.next-icon-eye:before{content:""}.next-icon-copy:before{content:""}.next-icon-toggle-left:before{content:""}.next-icon-toggle-right:before{content:""}.next-icon-eye-close:before{content:""}.next-icon-unlock:before{content:""}.next-icon-lock:before{content:""}.next-icon-exit:before{content:""}.next-icon-chart-bar:before{content:""}.next-icon-chart-pie:before{content:""}.next-icon-form:before{content:""}.next-icon-detail:before{content:""}.next-icon-list:before{content:""}.next-icon-dashboard:before{content:""}.next-icon.next-xxs .next-icon-remote,.next-icon.next-xxs:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-icon.next-xxs{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-icon.next-xxs:before{width:16px;font-size:16px}}.next-icon.next-xs .next-icon-remote,.next-icon.next-xs:before{width:12px;font-size:12px;line-height:inherit}.next-icon.next-small .next-icon-remote,.next-icon.next-small:before{width:16px;font-size:16px;line-height:inherit}.next-icon.next-medium .next-icon-remote,.next-icon.next-medium:before{width:20px;font-size:20px;line-height:inherit}.next-icon.next-large .next-icon-remote,.next-icon.next-large:before{width:24px;font-size:24px;line-height:inherit}.next-icon.next-xl .next-icon-remote,.next-icon.next-xl:before{width:32px;font-size:32px;line-height:inherit}.next-icon.next-xxl .next-icon-remote,.next-icon.next-xxl:before{width:48px;font-size:48px;line-height:inherit}.next-icon.next-xxxl .next-icon-remote,.next-icon.next-xxxl:before{width:64px;font-size:64px;line-height:inherit}.next-icon.next-inherit .next-icon-remote,.next-icon.next-inherit:before{width:inherit;font-size:inherit;line-height:inherit}.next-icon .next-icon-remote,.next-icon.next-inherit .next-icon-remote{width:1em;height:1em;vertical-align:middle;fill:currentColor}.next-overlay-wrapper .next-overlay-inner{z-index:1001}.next-overlay-wrapper .next-overlay-backdrop{position:fixed;z-index:1001;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.3);transition:opacity .3s cubic-bezier(.4,0,.2,1);opacity:0}.next-overlay-wrapper.opened .next-overlay-backdrop{opacity:1}.next-loading-fusion-reactor[dir=rtl]{-webkit-animation-name:nextVectorRouteRTL;-moz-animation-name:nextVectorRouteRTL;-ms-animation-name:nextVectorRouteRTL;-o-animation-name:nextVectorRouteRTL;animation-name:nextVectorRouteRTL}@-webkit-keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}@-moz-keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}@-ms-keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}@-o-keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}@keyframes nextVectorRouteRTL{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}25%{-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}30%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}50%{-webkit-transform:rotate(-180deg);-moz-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-o-transform:rotate(-180deg);transform:rotate(-180deg)}55%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}75%{-webkit-transform:rotate(-270deg);-moz-transform:rotate(-270deg);-ms-transform:rotate(-270deg);-o-transform:rotate(-270deg);transform:rotate(-270deg)}80%{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(-1turn);-moz-transform:rotate(-1turn);-ms-transform:rotate(-1turn);-o-transform:rotate(-1turn);transform:rotate(-1turn)}}.next-loading{position:relative}.next-loading.next-open{pointer-events:none}.next-loading .next-loading-component{opacity:.7;-webkit-filter:blur(1px);filter:blur(1px);filter:"progid:DXImageTransform.Microsoft.Blur(PixelRadius=1, MakeShadow=false)";position:relative;pointer-events:none}.next-loading-masker{position:absolute;top:0;bottom:0;left:0;right:0;z-index:99;opacity:.2;background:#fff}.next-loading-inline{display:inline-block}.next-loading-tip{display:block;position:absolute;top:50%;left:50%;z-index:4;transform:translate(-50%,-50%);text-align:center}.next-loading-tip-fullscreen{top:inherit;left:inherit;transform:inherit}.next-loading-tip-placeholder{display:none}.next-loading-right-tip .next-loading-indicator{display:inline-block}.next-loading-right-tip .next-loading-tip-content{position:absolute;display:block;top:50%;right:0;transform:translateY(-50%)}.next-loading-right-tip .next-loading-tip-placeholder{display:inline-block;visibility:hidden;margin-left:1em}.next-loading-fusion-reactor{display:inline-block;width:40px;height:40px;position:relative;margin:0;-webkit-animation-duration:5.6s;-moz-animation-duration:5.6s;-ms-animation-duration:5.6s;-o-animation-duration:5.6s;animation-duration:5.6s;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-o-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;-moz-animation-timing-function:linear;-ms-animation-timing-function:linear;-o-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-name:nextVectorRoute;-moz-animation-name:nextVectorRoute;-ms-animation-name:nextVectorRoute;-o-animation-name:nextVectorRoute;animation-name:nextVectorRoute}.next-loading-fusion-reactor .next-loading-dot{position:absolute;margin:auto;width:12px;height:12px;border-radius:50%;background:#209bfa;-webkit-animation-timing-function:ease-in-out;-moz-animation-timing-function:ease-in-out;-ms-animation-timing-function:ease-in-out;-o-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-o-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-duration:1.4s;-moz-animation-duration:1.4s;-ms-animation-duration:1.4s;-o-animation-duration:1.4s;animation-duration:1.4s}.next-loading-fusion-reactor .next-loading-dot:first-child{top:0;bottom:0;left:0;-webkit-animation-name:nextVectorDotsX;-moz-animation-name:nextVectorDotsX;-ms-animation-name:nextVectorDotsX;-o-animation-name:nextVectorDotsX;animation-name:nextVectorDotsX}.next-loading-fusion-reactor .next-loading-dot:nth-child(2){left:0;right:0;top:0;opacity:.8;-webkit-animation-name:nextVectorDotsY;-moz-animation-name:nextVectorDotsY;-ms-animation-name:nextVectorDotsY;-o-animation-name:nextVectorDotsY;animation-name:nextVectorDotsY}.next-loading-fusion-reactor .next-loading-dot:nth-child(3){top:0;bottom:0;right:0;opacity:.6;-webkit-animation-name:nextVectorDotsXR;-moz-animation-name:nextVectorDotsXR;-ms-animation-name:nextVectorDotsXR;-o-animation-name:nextVectorDotsXR;animation-name:nextVectorDotsXR}.next-loading-fusion-reactor .next-loading-dot:nth-child(4){left:0;right:0;bottom:0;opacity:.2;-webkit-animation-name:nextVectorDotsYR;-moz-animation-name:nextVectorDotsYR;-ms-animation-name:nextVectorDotsYR;-o-animation-name:nextVectorDotsYR;animation-name:nextVectorDotsYR}.next-loading-medium-fusion-reactor{width:24px;height:24px}.next-loading-medium-fusion-reactor .next-loading-dot{width:8px;height:8px}.next-loading-medium-fusion-reactor .next-loading-dot:first-child{-webkit-animation-name:nextVectorDotsX-medium;-moz-animation-name:nextVectorDotsX-medium;-ms-animation-name:nextVectorDotsX-medium;-o-animation-name:nextVectorDotsX-medium;animation-name:nextVectorDotsX-medium}.next-loading-medium-fusion-reactor .next-loading-dot:nth-child(2){-webkit-animation-name:nextVectorDotsY-medium;-moz-animation-name:nextVectorDotsY-medium;-ms-animation-name:nextVectorDotsY-medium;-o-animation-name:nextVectorDotsY-medium;animation-name:nextVectorDotsY-medium}.next-loading-medium-fusion-reactor .next-loading-dot:nth-child(3){-webkit-animation-name:nextVectorDotsXR-medium;-moz-animation-name:nextVectorDotsXR-medium;-ms-animation-name:nextVectorDotsXR-medium;-o-animation-name:nextVectorDotsXR-medium;animation-name:nextVectorDotsXR-medium}.next-loading-medium-fusion-reactor .next-loading-dot:nth-child(4){-webkit-animation-name:nextVectorDotsYR-medium;-moz-animation-name:nextVectorDotsYR-medium;-ms-animation-name:nextVectorDotsYR-medium;-o-animation-name:nextVectorDotsYR-medium;animation-name:nextVectorDotsYR-medium}@-webkit-keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@-moz-keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@-ms-keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@-o-keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes nextVectorRoute{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}5%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}25%{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}30%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}50%{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}55%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}75%{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}80%{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}to{-webkit-transform:rotate(1turn);-moz-transform:rotate(1turn);-ms-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@-moz-keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@-ms-keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@-o-keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@keyframes nextVectorDotsYR{25%{bottom:0}45%,50%{bottom:12.8px;height:14.4px;width:14.4px}90%{bottom:0;height:12px;width:12px}}@-webkit-keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@-moz-keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@-ms-keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@-o-keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@keyframes nextVectorDotsY{25%{top:0}45%,50%{top:12.8px;height:14.4px;width:14.4px}90%{top:0;height:12px;width:12px}}@-webkit-keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@-moz-keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@-ms-keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@-o-keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@keyframes nextVectorDotsX{25%{left:0}45%,50%{left:12.8px;width:14.4px;height:14.4px}90%{left:0;height:12px;width:12px}}@-webkit-keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@-moz-keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@-ms-keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@-o-keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@keyframes nextVectorDotsXR{25%{right:0}45%,50%{right:12.8px;width:14.4px;height:14.4px}90%{right:0;height:12px;width:12px}}@-webkit-keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@-moz-keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@-ms-keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@-o-keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@keyframes nextVectorDotsYR-medium{25%{bottom:0}45%,50%{bottom:7.2px;height:9.6px;width:9.6px}90%{bottom:0;height:8px;width:8px}}@-webkit-keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@-moz-keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@-ms-keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@-o-keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@keyframes nextVectorDotsY-medium{25%{top:0}45%,50%{top:7.2px;height:9.6px;width:9.6px}90%{top:0;height:8px;width:8px}}@-webkit-keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@-moz-keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@-ms-keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@-o-keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@keyframes nextVectorDotsX-medium{25%{left:0}45%,50%{left:7.2px;width:9.6px;height:9.6px}90%{left:0;height:8px;width:8px}}@-webkit-keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}@-moz-keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}@-ms-keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}@-o-keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}@keyframes nextVectorDotsXR-medium{25%{right:0}45%,50%{right:7.2px;width:9.6px;height:9.6px}90%{right:0;height:8px;width:8px}}.next-radio-button-large[dir=rtl]>label:first-child{margin-left:-1px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0}.next-radio-button-large[dir=rtl]>label:last-child{margin-left:0;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-large[dir=rtl] .next-radio-label{height:38px;line-height:38px;font-size:16px}.next-radio-button-medium[dir=rtl]>label:first-child{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-medium[dir=rtl]>label:last-child{margin-left:0;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-small[dir=rtl]>label:first-child{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-small[dir=rtl]>label:last-child{margin-left:0;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-wrapper[dir=rtl] .next-radio-label{margin-left:0;margin-right:4px}.next-radio-group[dir=rtl] .next-radio-label{margin-right:4px;margin-left:16px}.next-radio-button[dir=rtl]>label .next-radio-label{margin:0}.next-radio-wrapper{outline:0;display:inline-block}.next-radio-wrapper .next-radio{box-sizing:border-box;display:inline-block;vertical-align:middle;position:relative;line-height:1}.next-radio-wrapper .next-radio *,.next-radio-wrapper .next-radio :after,.next-radio-wrapper .next-radio :before{box-sizing:border-box}.next-radio-wrapper .next-radio input[type=radio]{opacity:0;position:absolute;vertical-align:middle;top:0;left:0;width:16px;height:16px;margin:0;cursor:pointer}.next-radio-wrapper .next-radio-inner{display:block;width:16px;height:16px;background:#fff;border-radius:50%;border:1px solid #ddd;transition:all .1s linear;box-shadow:none}.next-radio-wrapper .next-radio-inner:after{transform:scale(0);position:absolute;border-radius:50%;top:50%;margin-top:-2px;left:50%;margin-left:-2px;background:#fff;content:"";transition:all .1s linear}.next-radio-wrapper.checked .next-radio-inner{border-color:#209bfa;background:#209bfa}.next-radio-wrapper.checked .next-radio-inner:after{width:4px;height:4px;font-weight:700;background:#fff;transform:scale(1)}.next-radio-wrapper.checked.hovered .next-radio-inner,.next-radio-wrapper.checked:hover .next-radio-inner{border-color:transparent}.next-radio-wrapper.disabled input[type=radio]{cursor:not-allowed}.next-radio-wrapper.disabled .next-radio-inner{border-color:#eee;background:#fafafa}.next-radio-wrapper.disabled .next-radio-inner:after{background:#ccc}.next-radio-wrapper.disabled .next-radio-inner.hovered,.next-radio-wrapper.disabled .next-radio-inner:hover{border-color:#eee}.next-radio-wrapper.disabled.checked .next-radio-inner{border-color:#eee;background:#fafafa}.next-radio-wrapper.disabled.checked .next-radio-inner:after{background:#ccc}.next-radio-wrapper.disabled .next-radio-label{color:#ccc}.next-radio-wrapper:not(.disabled).hovered .next-radio-inner,.next-radio-wrapper:not(.disabled):hover .next-radio-inner{border-color:#209bfa;background-color:#add9ff}.next-radio-wrapper:not(.disabled).hovered .next-radio-label,.next-radio-wrapper:not(.disabled):hover .next-radio-label{cursor:pointer}.next-radio-wrapper.checked:not(.disabled).hovered .next-radio-inner,.next-radio-wrapper.checked:not(.disabled):hover .next-radio-inner{border-color:transparent;background:#1274e7}.next-radio-wrapper.checked:not(.disabled).hovered .next-radio-inner:after,.next-radio-wrapper.checked:not(.disabled):hover .next-radio-inner:after{background:#fff}.next-radio-button .next-radio,.next-radio-button input[type=radio]{width:0;height:0}.next-radio-button>label{display:inline-block;box-sizing:border-box;position:relative;z-index:1;margin:0 0 0 -1px;border:1px solid #ddd;background-color:#fff;transition:all .1s linear;vertical-align:middle}.next-radio-button>label .next-radio-label{display:block;color:#333;margin:0;transition:all .1s linear}.next-radio-button>label.hovered,.next-radio-button>label:hover{z-index:10;border-color:#ccc;background-color:#f9f9f9}.next-radio-button>label.hovered .next-radio-label,.next-radio-button>label:hover .next-radio-label{color:#333}.next-radio-button>label.checked{z-index:11;border-color:#209bfa;background-color:#fff}.next-radio-button>label.checked .next-radio-label{color:#209bfa}.next-radio-button>label.disabled{z-index:0;cursor:not-allowed;border-color:#eee;background-color:#fafafa}.next-radio-button>label.disabled .next-radio-label{color:#ccc}.next-radio-button>label.checked.disabled{z-index:0;border-color:#eee;background-color:#f9f9f9}.next-radio-button>label.checked.disabled .next-radio-label{color:#ccc}.next-radio-button-large>label{padding:0 8px;height:40px;line-height:40px}.next-radio-button-large>label:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-large>label:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-large .next-radio-label{height:38px;line-height:38px;font-size:16px}.next-radio-button-medium>label{padding:0 8px;height:32px;line-height:32px}.next-radio-button-medium>label:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-medium>label:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-medium .next-radio-label{height:30px;line-height:30px;font-size:14px}.next-radio-button-small>label{padding:0 8px;height:20px;line-height:20px}.next-radio-button-small>label:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-radio-button-small>label:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.next-radio-button-small .next-radio-label{height:18px;line-height:18px;font-size:12px}.next-radio-single-input input[type=radio]{opacity:0;position:absolute;top:0;left:0;margin:0}.next-radio-group{display:inline-block}.next-radio-group .next-radio-wrapper{margin-right:12px}.next-radio-group .next-radio-wrapper:last-child{margin-right:0}.next-radio-group .next-radio-label{color:#333}.next-radio-group.disabled .next-radio-label{color:#ccc}.next-radio-group.next-radio-button .next-radio-wrapper{margin-right:0}.next-radio-group-ver .next-radio-wrapper{display:block;margin-bottom:8px}.next-radio-label{margin:0 4px;font-size:14px;vertical-align:middle;line-height:1;color:#333}@-moz-document url-prefix(){.next-radio{margin-top:-1px}@supports(animation:calc(0s)){.next-radio{margin-top:-3px}}}.next-badge{position:relative;display:inline-block;vertical-align:middle;line-height:1}.next-badge,.next-badge *,.next-badge :after,.next-badge :before{box-sizing:border-box}.next-badge .next-badge-count{color:#fff;background:#d23c26;text-align:center;white-space:nowrap;border-radius:8px;position:absolute;width:auto;height:16px;min-width:16px;padding:0 4px;font-size:12px;line-height:16px;transform:translateX(-50%);top:-.5em;border:0 solid #fff}.next-badge .next-badge-count a,.next-badge .next-badge-count a:hover{color:#fff}.next-badge .next-badge-dot{color:#fff;background:#d23c26;text-align:center;white-space:nowrap;border-radius:8px;position:absolute;width:8px;height:8px;min-width:8px;padding:0;font-size:1px;line-height:1;transform:translateX(-50%);top:-.5em}.next-badge .next-badge-dot a,.next-badge .next-badge-dot a:hover{color:#fff}.next-badge .next-badge-custom{line-height:1.166667;white-space:nowrap;font-size:12px;padding-left:4px;padding-right:4px;border-radius:3px;transform:translateX(-50%)}.next-badge .next-badge-custom>*{line-height:1}.next-badge .next-badge-custom>.next-icon:before,.next-badge .next-badge-custom>i:before{font-size:inherit;width:auto;vertical-align:top}.next-badge .next-badge-scroll-number{position:absolute;top:-4px;z-index:10;overflow:hidden;transform-origin:left center}.next-badge-scroll-number-only{position:relative;display:inline-block;transition:transform .1s linear,-webkit-transform .1s linear;min-width:8px}.next-badge-scroll-number-only span{display:block;height:16px;line-height:16px;font-size:12px}.next-badge-not-a-wrapper .next-badge-count,.next-badge-not-a-wrapper .next-badge-custom,.next-badge-not-a-wrapper .next-badge-dot{position:relative;display:block;top:auto;transform:translateX(0)}.next-badge-list-wrapper{margin-left:0}.next-badge-list-wrapper li{margin-bottom:0;list-style:none}.next-badge[dir=rtl] .next-badge-custom{padding-right:4px;padding-left:4px}.next-badge[dir=rtl] .next-badge-scroll-number{left:0;transform-origin:right center}.next-balloon{position:absolute;top:0;max-width:300px;border-style:solid;border-radius:3px;font-size:14px;font-weight:400;word-wrap:break-all;word-wrap:break-word;z-index:0}.next-balloon,.next-balloon *,.next-balloon :after,.next-balloon :before{box-sizing:border-box}.next-balloon:focus,.next-balloon :focus{outline:0}.next-balloon-title{margin-bottom:8px;font-size:16px;font-weight:700}.next-balloon-title.next-balloon-closable{padding:0 40px 0 0}.next-balloon-title.next-balloon-closable .next-balloon-close{top:-1px;transform:translateY(16px);right:16px}.next-balloon-primary{color:#333;border-color:#209bfa;background-color:#add9ff;box-shadow:0 1px 3px 0 rgba(0,0,0,.12);border-width:1px}.next-balloon-primary .next-balloon-close{position:absolute;top:-1px;transform:translateY(15px);right:12px;font-size:16px;cursor:pointer;color:#999}.next-balloon-primary .next-balloon-close .next-icon{width:16px;height:16px;line-height:1em}.next-balloon-primary .next-balloon-close .next-icon:before{width:16px;height:16px;font-size:16px;line-height:1em}.next-balloon-primary .next-balloon-close :hover{color:#333}.next-balloon-primary .next-balloon-arrow{position:absolute;display:block;width:24px;height:24px;overflow:hidden;background:0 0;pointer-events:none}.next-balloon-primary .next-balloon-arrow .next-balloon-arrow-content{content:"";position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:12px;height:12px;margin:auto;background-color:#add9ff;border:1px solid #209bfa;pointer-events:auto}.next-balloon-primary.next-balloon-top .next-balloon-arrow{top:-24px;left:calc(50% - 12px)}.next-balloon-primary.next-balloon-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-primary.next-balloon-right .next-balloon-arrow{top:calc(50% - 12px);right:-24px}.next-balloon-primary.next-balloon-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-primary.next-balloon-bottom .next-balloon-arrow{left:calc(50% - 12px);bottom:-24px}.next-balloon-primary.next-balloon-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-primary.next-balloon-left .next-balloon-arrow{top:calc(50% - 12px);left:-24px}.next-balloon-primary.next-balloon-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-primary.next-balloon-left-top .next-balloon-arrow{top:6px;left:-24px}.next-balloon-primary.next-balloon-left-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-primary.next-balloon-left-bottom .next-balloon-arrow{bottom:6px;left:-24px}.next-balloon-primary.next-balloon-left-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-primary.next-balloon-right-top .next-balloon-arrow{top:6px;right:-24px}.next-balloon-primary.next-balloon-right-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-primary.next-balloon-right-bottom .next-balloon-arrow{bottom:6px;right:-24px}.next-balloon-primary.next-balloon-right-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-primary.next-balloon-top-left .next-balloon-arrow{left:6px;top:-24px}.next-balloon-primary.next-balloon-top-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-primary.next-balloon-top-right .next-balloon-arrow{right:6px;top:-24px}.next-balloon-primary.next-balloon-top-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-primary.next-balloon-bottom-left .next-balloon-arrow{left:6px;bottom:-24px}.next-balloon-primary.next-balloon-bottom-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-primary.next-balloon-bottom-right .next-balloon-arrow{right:6px;bottom:-24px}.next-balloon-primary.next-balloon-bottom-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-normal{color:#333;border-color:#e6e6e6;background-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-width:1px}.next-balloon-normal .next-balloon-close{position:absolute;top:-1px;transform:translateY(15px);right:12px;font-size:16px;cursor:pointer;color:#999}.next-balloon-normal .next-balloon-close .next-icon{width:16px;height:16px;line-height:1em}.next-balloon-normal .next-balloon-close .next-icon:before{width:16px;height:16px;font-size:16px;line-height:1em}.next-balloon-normal .next-balloon-close :hover{color:#666}.next-balloon-normal .next-balloon-arrow{position:absolute;display:block;width:24px;height:24px;overflow:hidden;background:0 0;pointer-events:none}.next-balloon-normal .next-balloon-arrow .next-balloon-arrow-content{content:"";position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:12px;height:12px;margin:auto;background-color:#fff;border:1px solid #e6e6e6;pointer-events:auto}.next-balloon-normal.next-balloon-top .next-balloon-arrow{top:-24px;left:calc(50% - 12px)}.next-balloon-normal.next-balloon-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-normal.next-balloon-right .next-balloon-arrow{top:calc(50% - 12px);right:-24px}.next-balloon-normal.next-balloon-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-normal.next-balloon-bottom .next-balloon-arrow{left:calc(50% - 12px);bottom:-24px}.next-balloon-normal.next-balloon-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-normal.next-balloon-left .next-balloon-arrow{top:calc(50% - 12px);left:-24px}.next-balloon-normal.next-balloon-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-normal.next-balloon-left-top .next-balloon-arrow{top:6px;left:-24px}.next-balloon-normal.next-balloon-left-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-normal.next-balloon-left-bottom .next-balloon-arrow{bottom:6px;left:-24px}.next-balloon-normal.next-balloon-left-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-normal.next-balloon-right-top .next-balloon-arrow{top:6px;right:-24px}.next-balloon-normal.next-balloon-right-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-normal.next-balloon-right-bottom .next-balloon-arrow{bottom:6px;right:-24px}.next-balloon-normal.next-balloon-right-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-normal.next-balloon-top-left .next-balloon-arrow{left:6px;top:-24px}.next-balloon-normal.next-balloon-top-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-normal.next-balloon-top-right .next-balloon-arrow{right:6px;top:-24px}.next-balloon-normal.next-balloon-top-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-normal.next-balloon-bottom-left .next-balloon-arrow{left:6px;bottom:-24px}.next-balloon-normal.next-balloon-bottom-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-normal.next-balloon-bottom-right .next-balloon-arrow{right:6px;bottom:-24px}.next-balloon-normal.next-balloon-bottom-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon.visible{display:block}.next-balloon.hidden{display:none}.next-balloon-medium{padding:16px}.next-balloon-closable{padding:16px 40px 16px 16px}.next-balloon-tooltip{box-sizing:border-box;position:absolute;top:0;max-width:300px;border-radius:3px;font-size:14px;font-weight:400;z-index:0;word-wrap:break-all;word-wrap:break-word;color:#fafafa;background-color:#333;box-shadow:none;border:1px solid transparent}.next-balloon-tooltip *,.next-balloon-tooltip :after,.next-balloon-tooltip :before{box-sizing:border-box}.next-balloon-tooltip .next-balloon-arrow{position:absolute;display:block;width:24px;height:24px;overflow:hidden;background:0 0;pointer-events:none}.next-balloon-tooltip .next-balloon-arrow .next-balloon-arrow-content{content:"";position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:12px;height:12px;margin:auto;background-color:#333;border:1px solid transparent;pointer-events:auto}.next-balloon-tooltip-top .next-balloon-arrow{top:-24px;left:calc(50% - 12px)}.next-balloon-tooltip-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-tooltip-right .next-balloon-arrow{top:calc(50% - 12px);right:-24px}.next-balloon-tooltip-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip-bottom .next-balloon-arrow{left:calc(50% - 12px);bottom:-24px}.next-balloon-tooltip-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-tooltip-left .next-balloon-arrow{top:calc(50% - 12px);left:-24px}.next-balloon-tooltip-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip-left-top .next-balloon-arrow{top:6px;left:-24px}.next-balloon-tooltip-left-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip-left-bottom .next-balloon-arrow{bottom:6px;left:-24px}.next-balloon-tooltip-left-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip-right-top .next-balloon-arrow{top:6px;right:-24px}.next-balloon-tooltip-right-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip-right-bottom .next-balloon-arrow{bottom:6px;right:-24px}.next-balloon-tooltip-right-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip-top-left .next-balloon-arrow{left:6px;top:-24px}.next-balloon-tooltip-top-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-tooltip-top-right .next-balloon-arrow{right:6px;top:-24px}.next-balloon-tooltip-top-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(12px) rotate(45deg)}.next-balloon-tooltip-bottom-left .next-balloon-arrow{left:6px;bottom:-24px}.next-balloon-tooltip-bottom-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-tooltip-bottom-right .next-balloon-arrow{right:6px;bottom:-24px}.next-balloon-tooltip-bottom-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateY(-12px) rotate(45deg)}.next-balloon-tooltip.visible{display:block}.next-balloon-tooltip.hidden{display:none}.next-balloon-tooltip-medium{padding:8px}.next-balloon[dir=rtl].next-balloon-primary .next-balloon-close{left:12px;right:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-right .next-balloon-arrow{left:-24px;right:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-left .next-balloon-arrow{right:-24px;left:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-left-top .next-balloon-arrow{right:-24px;left:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-left-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-left-bottom .next-balloon-arrow{right:-24px;left:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-left-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-right-top .next-balloon-arrow{left:-24px;right:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-right-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-right-bottom .next-balloon-arrow{left:-24px;right:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-right-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-top-left .next-balloon-arrow{right:10px;left:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-top-right .next-balloon-arrow{left:10px;right:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-bottom-left .next-balloon-arrow{right:10px;left:auto}.next-balloon[dir=rtl].next-balloon-primary.next-balloon-bottom-right .next-balloon-arrow{left:10px;right:auto}.next-balloon[dir=rtl].next-balloon-normal .next-balloon-close{left:12px;right:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-right .next-balloon-arrow{left:-24px;right:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-left .next-balloon-arrow{right:-24px;left:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-left-top .next-balloon-arrow{right:-24px;left:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-left-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-left-bottom .next-balloon-arrow{right:-24px;left:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-left-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-right-top .next-balloon-arrow{left:-24px;right:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-right-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-right-bottom .next-balloon-arrow{left:-24px;right:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-right-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-top-left .next-balloon-arrow{right:10px;left:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-top-right .next-balloon-arrow{left:10px;right:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-bottom-left .next-balloon-arrow{right:10px;left:auto}.next-balloon[dir=rtl].next-balloon-normal.next-balloon-bottom-right .next-balloon-arrow{left:10px;right:auto}.next-balloon[dir=rtl].next-balloon-closable{padding:16px 16px 16px 40px}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right .next-balloon-arrow{left:-24px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left .next-balloon-arrow{right:-24px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left-top .next-balloon-arrow{right:-24px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left-bottom .next-balloon-arrow{right:-24px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-left-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right-top .next-balloon-arrow{left:-24px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right-bottom .next-balloon-arrow{left:-24px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-right-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-top-left .next-balloon-arrow{right:10px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-top-right .next-balloon-arrow{left:10px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-bottom-left .next-balloon-arrow{right:10px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-bottom-right .next-balloon-arrow{left:10px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-right .next-balloon-arrow{right:-24px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-right .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-left .next-balloon-arrow{left:-24px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-left .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-left-top .next-balloon-arrow{left:-24px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-left-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-left-bottom .next-balloon-arrow{left:-24px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-left-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-right-top .next-balloon-arrow{right:-24px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-right-top .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-right-bottom .next-balloon-arrow{right:-24px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-right-bottom .next-balloon-arrow .next-balloon-arrow-content{transform:translateX(-12px) rotate(45deg)}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-top-left .next-balloon-arrow{left:10px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-top-right .next-balloon-arrow{right:10px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-bottom-left .next-balloon-arrow{left:10px;right:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-v2.next-balloon-tooltip-bottom-right .next-balloon-arrow{right:10px;left:auto}.next-balloon-tooltip[dir=rtl].next-balloon-tooltip-medium{padding:8px}.next-menu[dir=rtl] .next-menu-item-helper{float:left}.next-menu[dir=rtl] .next-menu-item .next-checkbox,.next-menu[dir=rtl] .next-menu-item .next-radio{margin-left:4px;margin-right:0}.next-menu[dir=rtl] .next-menu-hoz-right{float:left}.next-menu[dir=rtl] .next-menu-hoz-icon-arrow.next-icon{left:6px;right:auto}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon{margin-left:0;margin-right:-18px}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon .next-icon-remote,.next-menu[dir=rtl] .next-menu-icon-selected.next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-menu[dir=rtl] .next-menu-icon-selected.next-icon.next-menu-icon-right{right:auto;left:4px}.next-menu[dir=rtl] .next-menu-icon-arrow.next-icon{left:10px;right:auto}.next-menu{position:relative;min-width:100px;margin:0;list-style:none;border:1px solid #e6e6e6;border-radius:3px;box-shadow:none;background:#fff;line-height:32px;font-size:14px;animation-duration:.3s;animation-timing-function:ease}.next-menu,.next-menu *,.next-menu :after,.next-menu :before{box-sizing:border-box}.next-menu:focus,.next-menu :focus{outline:0}.next-menu-spacing-lr{padding:0}.next-menu-spacing-lr.next-menu-outside>.next-menu{height:100%;overflow-y:auto}.next-menu-spacing-tb{padding:0}.next-menu.next-ver{padding:8px 0}.next-menu.next-ver .next-menu-item{padding:0 20px}.next-menu.next-hoz{padding:8px 0}.next-menu.next-hoz .next-menu-item{padding:0 20px}.next-menu-embeddable,.next-menu-embeddable .next-menu-item.next-disabled,.next-menu-embeddable .next-menu-item.next-disabled .next-menu-item-text>a{background:transparent;border:none}.next-menu-embeddable{box-shadow:none}.next-menu-embeddable .next-menu-item-inner{height:100%}.next-menu-content{position:relative}.next-menu-content,.next-menu-sub-menu{padding:0;margin:0;list-style:none}.next-menu-sub-menu.next-expand-enter{overflow:hidden}.next-menu-sub-menu.next-expand-enter-active{transition:height .3s ease}.next-menu-sub-menu.next-expand-leave{overflow:hidden}.next-menu-sub-menu.next-expand-leave-active{transition:height .3s ease}.next-menu-item{position:relative;transition:background .1s linear;color:#333;cursor:pointer}.next-menu-item-helper{float:right;color:#999;font-style:normal;font-size:14px}.next-menu-item .next-checkbox,.next-menu-item .next-radio{margin-right:4px}.next-menu-item.next-selected{color:#333;background-color:#fff;border-radius:0}.next-menu-item.next-selected .next-menu-icon-arrow{color:#666}.next-menu-item.next-selected .next-menu-icon-selected{color:#209bfa}.next-menu-item.next-disabled,.next-menu-item.next-disabled .next-menu-item-text>a{color:#ccc;background-color:#fff;border-radius:0;cursor:not-allowed}.next-menu-item.next-disabled .next-menu-icon-arrow,.next-menu-item.next-disabled .next-menu-icon-selected,.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#ccc}.next-menu-item:not(.next-disabled).next-focused,.next-menu-item:not(.next-disabled).next-selected.next-focused,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover,.next-menu-item:not(.next-disabled).next-selected:focus,.next-menu-item:not(.next-disabled).next-selected:focus:hover,.next-menu-item:not(.next-disabled).next-selected:hover,.next-menu-item:not(.next-disabled):hover{color:#333;background-color:#f9f9f9;border-radius:0}.next-menu-item:not(.next-disabled).next-focused .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected.next-focused .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected:focus .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected:focus:hover .next-menu-icon-arrow,.next-menu-item:not(.next-disabled).next-selected:hover .next-menu-icon-arrow,.next-menu-item:not(.next-disabled):hover .next-menu-icon-arrow{color:#333}.next-menu-item:not(.next-disabled).next-focused .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected.next-focused .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected.next-focused:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:focus .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:focus:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled).next-selected:hover .next-menu-icon-selected,.next-menu-item:not(.next-disabled):hover .next-menu-icon-selected{color:#209bfa}.next-menu-item-inner{height:32px;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.next-menu-item .next-menu-item-text{vertical-align:middle}.next-menu-item .next-menu-item-text>a{display:inline-block;text-decoration:none;color:#333}.next-menu-item .next-menu-item-text>a:before{position:absolute;background-color:transparent;top:0;left:0;bottom:0;right:0;content:""}.next-menu.next-hoz{padding:0}.next-menu.next-hoz.next-menu-nowrap{overflow:hidden;white-space:nowrap}.next-menu.next-hoz.next-menu-nowrap .next-menu-more{text-align:center}.next-menu.next-hoz .next-menu-content>.next-menu-item,.next-menu.next-hoz>.next-menu-item,.next-menu.next-hoz>.next-menu-sub-menu-wrapper{display:inline-block;vertical-align:top}.next-menu.next-hoz .next-menu-content,.next-menu.next-hoz .next-menu-footer,.next-menu.next-hoz .next-menu-header{display:inline-block}.next-menu-hoz-right{float:right}.next-menu-group-label{padding:0 12px;color:#999}.next-menu-divider{margin:8px 12px;border-bottom:1px solid #eee}.next-menu .next-menu-icon-selected.next-icon{position:absolute;top:0;margin-left:-16px}.next-menu .next-menu-icon-selected.next-icon .next-icon-remote,.next-menu .next-menu-icon-selected.next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-menu .next-menu-icon-selected.next-icon.next-menu-icon-right{right:4px}.next-menu .next-menu-symbol-icon-selected.next-menu-icon-selected:before{content:""}.next-menu .next-menu-icon-arrow.next-icon{position:absolute;top:0;right:10px;color:#666;transition:all .1s linear}.next-menu .next-menu-icon-arrow.next-icon .next-icon-remote,.next-menu .next-menu-icon-arrow.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-menu .next-menu-icon-arrow-down:before{content:""}.next-menu .next-menu-icon-arrow-down.next-open{transform:rotate(180deg)}.next-menu .next-menu-icon-arrow-down.next-open .next-icon-remote,.next-menu .next-menu-icon-arrow-down.next-open:before{width:20px;font-size:20px;line-height:inherit}.next-menu .next-menu-symbol-popupfold:before{content:""}.next-menu .next-menu-icon-arrow-right.next-open{transform:rotate(-90deg)}.next-menu .next-menu-icon-arrow-right.next-open .next-icon-remote,.next-menu .next-menu-icon-arrow-right.next-open:before{width:20px;font-size:20px;line-height:inherit}.next-menu .next-menu-hoz-icon-arrow.next-icon{position:absolute;top:0;right:6px;color:#666;transition:all .1s linear}.next-menu .next-menu-hoz-icon-arrow.next-icon .next-icon-remote,.next-menu .next-menu-hoz-icon-arrow.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-menu .next-menu-hoz-icon-arrow.next-icon:before{content:""}.next-menu-unfold-icon:before{content:""}.next-menu .next-menu-hoz-icon-arrow.next-open{transform:rotate(180deg)}.next-menu .next-menu-hoz-icon-arrow.next-open .next-icon-remote,.next-menu .next-menu-hoz-icon-arrow.next-open:before{width:12px;font-size:12px;line-height:inherit}.next-menu.next-context{line-height:24px}.next-menu.next-context .next-menu-item-inner{height:24px}.next-breadcrumb{display:block;margin:0;padding:0;white-space:nowrap;height:16px;line-height:16px}.next-breadcrumb .next-breadcrumb-item{display:inline-block}.next-breadcrumb .next-breadcrumb-item .next-breadcrumb-text{display:inline-block;text-decoration:none;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:all .1s linear}.next-breadcrumb .next-breadcrumb-item .next-breadcrumb-text>b{font-weight:400}.next-breadcrumb .next-breadcrumb-item .next-breadcrumb-separator{display:inline-block;vertical-align:top}.next-breadcrumb .next-breadcrumb-text{height:16px;min-width:16px;font-size:12px;line-height:16px}.next-breadcrumb .next-breadcrumb-separator{height:16px;margin:0 8px;font-size:16px;line-height:16px}.next-breadcrumb .next-breadcrumb-separator .next-icon:before{display:block}.next-breadcrumb .next-breadcrumb-separator .next-icon .next-icon-remote,.next-breadcrumb .next-breadcrumb-separator .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-breadcrumb .next-breadcrumb-text-ellipsis{font-size:12px}.next-breadcrumb .next-breadcrumb-text{color:#666}.next-breadcrumb .next-breadcrumb-text>b{color:#209bfa}.next-breadcrumb .next-breadcrumb-text>a{color:#666;text-decoration:none;text-align:center}.next-breadcrumb .next-breadcrumb-text.activated,.next-breadcrumb .next-breadcrumb-text.activated>a{color:#333;font-weight:700}.next-breadcrumb .next-breadcrumb-text-ellipsis{color:#666;cursor:default}.next-breadcrumb .next-breadcrumb-text-ellipsis-clickable{color:#666;cursor:pointer}.next-breadcrumb .next-breadcrumb-separator{color:#999}.next-breadcrumb .next-breadcrumb-text:not(.next-breadcrumb-text-ellipsis):hover>a,.next-breadcrumb a.next-breadcrumb-text.activated:hover>a,.next-breadcrumb a.next-breadcrumb-text:not(.next-breadcrumb-text-ellipsis):hover,.next-breadcrumb a.next-breadcrumb-text:not(.next-breadcrumb-text-ellipsis):hover>b{color:#209bfa}.next-breadcrumb a.next-breadcrumb-text.activated:hover{color:#209bfa;font-weight:700}.next-breadcrumb-icon-sep:before{content:""}.next-breadcrumb-dropdown-wrapper{padding:4px 0}.next-btn,.next-btn *,.next-btn :after,.next-btn :before{box-sizing:border-box}.next-btn::-moz-focus-inner{border:0;padding:0}.next-btn,.next-btn:active,.next-btn:focus,.next-btn:hover{outline:0}@keyframes loadingCircle{0%{transform-origin:50% 50%;transform:rotate(0deg)}to{transform-origin:50% 50%;transform:rotate(1turn)}}.next-btn{position:relative;display:inline-block;box-shadow:none;text-decoration:none;text-align:center;text-transform:none;white-space:nowrap;vertical-align:middle;user-select:none;transition:all .1s linear;line-height:1;cursor:pointer}.next-btn:after{text-align:center;position:absolute;opacity:0;visibility:hidden;transition:opacity .1s linear}.next-btn:before{content:"";height:100%;width:0}.next-btn .next-icon,.next-btn:before{display:inline-block;vertical-align:middle}.next-btn .next-icon{font-size:0}.next-btn>.next-btn-helper,.next-btn>div,.next-btn>span{display:inline-block;vertical-align:middle}.next-btn>.next-btn-helper{text-decoration:inherit}.next-btn.hover,.next-btn:hover{box-shadow:none}.next-btn.next-small{border-radius:3px;padding:0 16px;height:24px;font-size:12px;border-width:1px}.next-btn.next-small>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn.next-small>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-small>.next-btn-icon.next-icon-first:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn.next-small>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-small>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn.next-small>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-small>.next-btn-icon.next-icon-alone:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small>.next-btn-icon-size{margin-right:4px}.next-btn.next-small.next-btn-loading:before{width:12px;height:12px;font-size:12px;line-height:12px;left:16px;top:50%;text-align:center;margin-right:4px}.next-btn.next-small.next-btn-loading>.next-icon{display:none}.next-btn.next-small>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn.next-small>.next-btn-custom-loading-icon.show{width:12px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn.next-medium{border-radius:3px;padding:0 20px;height:32px;font-size:14px;border-width:1px}.next-btn.next-medium>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn.next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn.next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn.next-medium>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-medium>.next-btn-icon.next-icon-alone:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium>.next-btn-icon-size{margin-right:4px}.next-btn.next-medium.next-btn-loading:before{width:20px;height:20px;font-size:20px;line-height:20px;left:20px;top:50%;text-align:center;margin-right:4px}.next-btn.next-medium.next-btn-loading>.next-icon{display:none}.next-btn.next-medium>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn.next-medium>.next-btn-custom-loading-icon.show{width:20px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn.next-large{border-radius:3px;padding:0 24px;height:40px;font-size:16px;border-width:1px}.next-btn.next-large>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn.next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn.next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn.next-large>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn.next-large>.next-btn-icon.next-icon-alone:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large>.next-btn-icon-size{margin-right:4px}.next-btn.next-large.next-btn-loading:before{width:20px;height:20px;font-size:20px;line-height:20px;left:24px;top:50%;text-align:center;margin-right:4px}.next-btn.next-large.next-btn-loading>.next-icon{display:none}.next-btn.next-large>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn.next-large>.next-btn-custom-loading-icon.show{width:20px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn.next-btn-normal{border-style:solid;background:#fff;border-color:#ddd}.next-btn.next-btn-normal,.next-btn.next-btn-normal.visited,.next-btn.next-btn-normal:link,.next-btn.next-btn-normal:visited{color:#333}.next-btn.next-btn-normal.active,.next-btn.next-btn-normal.hover,.next-btn.next-btn-normal:active,.next-btn.next-btn-normal:focus,.next-btn.next-btn-normal:hover{color:#333;background:#f9f9f9;border-color:#ccc;text-decoration:none}.next-btn.next-btn-primary{border-style:solid;background:#209bfa;border-color:transparent}.next-btn.next-btn-primary,.next-btn.next-btn-primary.visited,.next-btn.next-btn-primary:link,.next-btn.next-btn-primary:visited{color:#fff}.next-btn.next-btn-primary.active,.next-btn.next-btn-primary.hover,.next-btn.next-btn-primary:active,.next-btn.next-btn-primary:focus,.next-btn.next-btn-primary:hover{color:#fff;background:#1274e7;border-color:transparent;text-decoration:none}.next-btn.next-btn-secondary{border-style:solid;background:#fff;border-color:#209bfa}.next-btn.next-btn-secondary,.next-btn.next-btn-secondary.visited,.next-btn.next-btn-secondary:link,.next-btn.next-btn-secondary:visited{color:#209bfa}.next-btn.next-btn-secondary.active,.next-btn.next-btn-secondary.hover,.next-btn.next-btn-secondary:active,.next-btn.next-btn-secondary:focus,.next-btn.next-btn-secondary:hover{color:#fff;background:#1274e7;border-color:#1274e7;text-decoration:none}.next-btn.disabled,.next-btn[disabled]{cursor:not-allowed}.next-btn.disabled.next-btn-normal,.next-btn[disabled].next-btn-normal{background:#fafafa;border-color:#eee}.next-btn.disabled.next-btn-normal,.next-btn.disabled.next-btn-normal.visited,.next-btn.disabled.next-btn-normal:link,.next-btn.disabled.next-btn-normal:visited,.next-btn[disabled].next-btn-normal,.next-btn[disabled].next-btn-normal.visited,.next-btn[disabled].next-btn-normal:link,.next-btn[disabled].next-btn-normal:visited{color:#ccc}.next-btn.disabled.next-btn-normal.active,.next-btn.disabled.next-btn-normal.hover,.next-btn.disabled.next-btn-normal:active,.next-btn.disabled.next-btn-normal:focus,.next-btn.disabled.next-btn-normal:hover,.next-btn[disabled].next-btn-normal.active,.next-btn[disabled].next-btn-normal.hover,.next-btn[disabled].next-btn-normal:active,.next-btn[disabled].next-btn-normal:focus,.next-btn[disabled].next-btn-normal:hover{color:#ccc;background:#fafafa;border-color:#eee;text-decoration:none}.next-btn.disabled.next-btn-primary,.next-btn[disabled].next-btn-primary{background:#fafafa;border-color:#eee}.next-btn.disabled.next-btn-primary,.next-btn.disabled.next-btn-primary.visited,.next-btn.disabled.next-btn-primary:link,.next-btn.disabled.next-btn-primary:visited,.next-btn[disabled].next-btn-primary,.next-btn[disabled].next-btn-primary.visited,.next-btn[disabled].next-btn-primary:link,.next-btn[disabled].next-btn-primary:visited{color:#ccc}.next-btn.disabled.next-btn-primary.active,.next-btn.disabled.next-btn-primary.hover,.next-btn.disabled.next-btn-primary:active,.next-btn.disabled.next-btn-primary:focus,.next-btn.disabled.next-btn-primary:hover,.next-btn[disabled].next-btn-primary.active,.next-btn[disabled].next-btn-primary.hover,.next-btn[disabled].next-btn-primary:active,.next-btn[disabled].next-btn-primary:focus,.next-btn[disabled].next-btn-primary:hover{color:#ccc;background:#fafafa;border-color:#eee;text-decoration:none}.next-btn.disabled.next-btn-secondary,.next-btn[disabled].next-btn-secondary{background:#fafafa;border-color:#eee}.next-btn.disabled.next-btn-secondary,.next-btn.disabled.next-btn-secondary.visited,.next-btn.disabled.next-btn-secondary:link,.next-btn.disabled.next-btn-secondary:visited,.next-btn[disabled].next-btn-secondary,.next-btn[disabled].next-btn-secondary.visited,.next-btn[disabled].next-btn-secondary:link,.next-btn[disabled].next-btn-secondary:visited{color:#ccc}.next-btn.disabled.next-btn-secondary.active,.next-btn.disabled.next-btn-secondary.hover,.next-btn.disabled.next-btn-secondary:active,.next-btn.disabled.next-btn-secondary:focus,.next-btn.disabled.next-btn-secondary:hover,.next-btn[disabled].next-btn-secondary.active,.next-btn[disabled].next-btn-secondary.hover,.next-btn[disabled].next-btn-secondary:active,.next-btn[disabled].next-btn-secondary:focus,.next-btn[disabled].next-btn-secondary:hover{color:#ccc;background:#fafafa;border-color:#eee;text-decoration:none}.next-btn-warning{border-style:solid}.next-btn-warning.next-btn-primary{background:#d23c26;border-color:#d23c26}.next-btn-warning.next-btn-primary,.next-btn-warning.next-btn-primary.visited,.next-btn-warning.next-btn-primary:link,.next-btn-warning.next-btn-primary:visited{color:#fff}.next-btn-warning.next-btn-primary.active,.next-btn-warning.next-btn-primary.hover,.next-btn-warning.next-btn-primary:active,.next-btn-warning.next-btn-primary:focus,.next-btn-warning.next-btn-primary:hover{color:#fff;background:#b7321e;border-color:#b7321e;text-decoration:none}.next-btn-warning.next-btn-primary.disabled,.next-btn-warning.next-btn-primary[disabled]{background:#fafafa;border-color:#e6e6e6}.next-btn-warning.next-btn-primary.disabled,.next-btn-warning.next-btn-primary.disabled.visited,.next-btn-warning.next-btn-primary.disabled:link,.next-btn-warning.next-btn-primary.disabled:visited,.next-btn-warning.next-btn-primary[disabled],.next-btn-warning.next-btn-primary[disabled].visited,.next-btn-warning.next-btn-primary[disabled]:link,.next-btn-warning.next-btn-primary[disabled]:visited{color:#ccc}.next-btn-warning.next-btn-primary.disabled.active,.next-btn-warning.next-btn-primary.disabled.hover,.next-btn-warning.next-btn-primary.disabled:active,.next-btn-warning.next-btn-primary.disabled:focus,.next-btn-warning.next-btn-primary.disabled:hover,.next-btn-warning.next-btn-primary[disabled].active,.next-btn-warning.next-btn-primary[disabled].hover,.next-btn-warning.next-btn-primary[disabled]:active,.next-btn-warning.next-btn-primary[disabled]:focus,.next-btn-warning.next-btn-primary[disabled]:hover{color:#ccc;background:#fafafa;border-color:#e6e6e6;text-decoration:none}.next-btn-warning.next-btn-normal{background:#fff;border-color:#d23c26}.next-btn-warning.next-btn-normal,.next-btn-warning.next-btn-normal.visited,.next-btn-warning.next-btn-normal:link,.next-btn-warning.next-btn-normal:visited{color:#d23c26}.next-btn-warning.next-btn-normal.active,.next-btn-warning.next-btn-normal.hover,.next-btn-warning.next-btn-normal:active,.next-btn-warning.next-btn-normal:focus,.next-btn-warning.next-btn-normal:hover{color:#fff;background:#b7321e;border-color:#b7321e;text-decoration:none}.next-btn-warning.next-btn-normal.disabled,.next-btn-warning.next-btn-normal[disabled]{background:#fafafa;border-color:#eee}.next-btn-warning.next-btn-normal.disabled,.next-btn-warning.next-btn-normal.disabled.visited,.next-btn-warning.next-btn-normal.disabled:link,.next-btn-warning.next-btn-normal.disabled:visited,.next-btn-warning.next-btn-normal[disabled],.next-btn-warning.next-btn-normal[disabled].visited,.next-btn-warning.next-btn-normal[disabled]:link,.next-btn-warning.next-btn-normal[disabled]:visited{color:#ccc}.next-btn-warning.next-btn-normal.disabled.active,.next-btn-warning.next-btn-normal.disabled.hover,.next-btn-warning.next-btn-normal.disabled:active,.next-btn-warning.next-btn-normal.disabled:focus,.next-btn-warning.next-btn-normal.disabled:hover,.next-btn-warning.next-btn-normal[disabled].active,.next-btn-warning.next-btn-normal[disabled].hover,.next-btn-warning.next-btn-normal[disabled]:active,.next-btn-warning.next-btn-normal[disabled]:focus,.next-btn-warning.next-btn-normal[disabled]:hover{color:#ccc;background:#fafafa;border-color:#eee;text-decoration:none}.next-btn-text{border-radius:0;user-select:text}.next-btn-text,.next-btn-text.hover,.next-btn-text:hover{box-shadow:none}.next-btn-text.next-btn-primary{background:transparent;border-color:transparent}.next-btn-text.next-btn-primary,.next-btn-text.next-btn-primary.visited,.next-btn-text.next-btn-primary:link,.next-btn-text.next-btn-primary:visited{color:#298dff}.next-btn-text.next-btn-primary.active,.next-btn-text.next-btn-primary.hover,.next-btn-text.next-btn-primary:active,.next-btn-text.next-btn-primary:focus,.next-btn-text.next-btn-primary:hover{color:#1274e7;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-primary.disabled,.next-btn-text.next-btn-primary[disabled]{background:transparent;border-color:transparent}.next-btn-text.next-btn-primary.disabled,.next-btn-text.next-btn-primary.disabled.visited,.next-btn-text.next-btn-primary.disabled:link,.next-btn-text.next-btn-primary.disabled:visited,.next-btn-text.next-btn-primary[disabled],.next-btn-text.next-btn-primary[disabled].visited,.next-btn-text.next-btn-primary[disabled]:link,.next-btn-text.next-btn-primary[disabled]:visited{color:#ccc}.next-btn-text.next-btn-primary.disabled.active,.next-btn-text.next-btn-primary.disabled.hover,.next-btn-text.next-btn-primary.disabled:active,.next-btn-text.next-btn-primary.disabled:focus,.next-btn-text.next-btn-primary.disabled:hover,.next-btn-text.next-btn-primary[disabled].active,.next-btn-text.next-btn-primary[disabled].hover,.next-btn-text.next-btn-primary[disabled]:active,.next-btn-text.next-btn-primary[disabled]:focus,.next-btn-text.next-btn-primary[disabled]:hover{color:#ccc;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-secondary{background:transparent;border-color:transparent}.next-btn-text.next-btn-secondary,.next-btn-text.next-btn-secondary.visited,.next-btn-text.next-btn-secondary:link,.next-btn-text.next-btn-secondary:visited{color:#666}.next-btn-text.next-btn-secondary.active,.next-btn-text.next-btn-secondary.hover,.next-btn-text.next-btn-secondary:active,.next-btn-text.next-btn-secondary:focus,.next-btn-text.next-btn-secondary:hover{color:#209bfa;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-secondary.disabled,.next-btn-text.next-btn-secondary[disabled]{background:transparent;border-color:transparent}.next-btn-text.next-btn-secondary.disabled,.next-btn-text.next-btn-secondary.disabled.visited,.next-btn-text.next-btn-secondary.disabled:link,.next-btn-text.next-btn-secondary.disabled:visited,.next-btn-text.next-btn-secondary[disabled],.next-btn-text.next-btn-secondary[disabled].visited,.next-btn-text.next-btn-secondary[disabled]:link,.next-btn-text.next-btn-secondary[disabled]:visited{color:#ccc}.next-btn-text.next-btn-secondary.disabled.active,.next-btn-text.next-btn-secondary.disabled.hover,.next-btn-text.next-btn-secondary.disabled:active,.next-btn-text.next-btn-secondary.disabled:focus,.next-btn-text.next-btn-secondary.disabled:hover,.next-btn-text.next-btn-secondary[disabled].active,.next-btn-text.next-btn-secondary[disabled].hover,.next-btn-text.next-btn-secondary[disabled]:active,.next-btn-text.next-btn-secondary[disabled]:focus,.next-btn-text.next-btn-secondary[disabled]:hover{color:#ccc;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-normal{background:transparent;border-color:transparent}.next-btn-text.next-btn-normal,.next-btn-text.next-btn-normal.visited,.next-btn-text.next-btn-normal:link,.next-btn-text.next-btn-normal:visited{color:#333}.next-btn-text.next-btn-normal.active,.next-btn-text.next-btn-normal.hover,.next-btn-text.next-btn-normal:active,.next-btn-text.next-btn-normal:focus,.next-btn-text.next-btn-normal:hover{color:#209bfa;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-btn-normal.disabled,.next-btn-text.next-btn-normal[disabled]{background:transparent;border-color:transparent}.next-btn-text.next-btn-normal.disabled,.next-btn-text.next-btn-normal.disabled.visited,.next-btn-text.next-btn-normal.disabled:link,.next-btn-text.next-btn-normal.disabled:visited,.next-btn-text.next-btn-normal[disabled],.next-btn-text.next-btn-normal[disabled].visited,.next-btn-text.next-btn-normal[disabled]:link,.next-btn-text.next-btn-normal[disabled]:visited{color:#ccc}.next-btn-text.next-btn-normal.disabled.active,.next-btn-text.next-btn-normal.disabled.hover,.next-btn-text.next-btn-normal.disabled:active,.next-btn-text.next-btn-normal.disabled:focus,.next-btn-text.next-btn-normal.disabled:hover,.next-btn-text.next-btn-normal[disabled].active,.next-btn-text.next-btn-normal[disabled].hover,.next-btn-text.next-btn-normal[disabled]:active,.next-btn-text.next-btn-normal[disabled]:focus,.next-btn-text.next-btn-normal[disabled]:hover{color:#ccc;background:transparent;border-color:transparent;text-decoration:none}.next-btn-text.next-large{border-radius:0;padding:0;height:24px;font-size:14px;border-width:0}.next-btn-text.next-large>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn-text.next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-large>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn-text.next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-large>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn-text.next-large>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-large>.next-btn-icon.next-icon-alone:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-large>.next-btn-icon-size{margin-right:4px}.next-btn-text.next-large.next-btn-loading:before{width:20px;height:20px;font-size:20px;line-height:20px;left:0;top:50%;text-align:center;margin-right:4px}.next-btn-text.next-large.next-btn-loading>.next-icon{display:none}.next-btn-text.next-large>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn-text.next-large>.next-btn-custom-loading-icon.show{width:20px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn-text.next-medium{border-radius:0;padding:0;height:20px;font-size:14px;border-width:0}.next-btn-text.next-medium>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn-text.next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-medium>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn-text.next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-medium>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn-text.next-medium>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-medium>.next-btn-icon.next-icon-alone:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text.next-medium>.next-btn-icon-size{margin-right:4px}.next-btn-text.next-medium.next-btn-loading:before{width:20px;height:20px;font-size:20px;line-height:20px;left:0;top:50%;text-align:center;margin-right:4px}.next-btn-text.next-medium.next-btn-loading>.next-icon{display:none}.next-btn-text.next-medium>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn-text.next-medium>.next-btn-custom-loading-icon.show{width:20px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn-text.next-small{border-radius:0;padding:0;height:16px;font-size:12px;border-width:0}.next-btn-text.next-small>.next-btn-icon.next-icon-first{transform:scale(1);margin-left:0;margin-right:4px}.next-btn-text.next-small>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text.next-small>.next-btn-icon.next-icon-first:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text.next-small>.next-btn-icon.next-icon-last{transform:scale(1);margin-left:4px;margin-right:0}.next-btn-text.next-small>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text.next-small>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text.next-small>.next-btn-icon.next-icon-alone{transform:scale(1)}.next-btn-text.next-small>.next-btn-icon.next-icon-alone .next-icon-remote,.next-btn-text.next-small>.next-btn-icon.next-icon-alone:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text.next-small>.next-btn-icon-size{margin-right:4px}.next-btn-text.next-small.next-btn-loading:before{width:12px;height:12px;font-size:12px;line-height:12px;left:0;top:50%;text-align:center;margin-right:4px}.next-btn-text.next-small.next-btn-loading>.next-icon{display:none}.next-btn-text.next-small>.next-btn-custom-loading-icon{opacity:0;width:0}.next-btn-text.next-small>.next-btn-custom-loading-icon.show{width:12px;margin-right:4px;opacity:1;transition:all .1s linear}.next-btn-text.next-btn-loading{background:transparent;border-color:transparent}.next-btn-text.next-btn-loading,.next-btn-text.next-btn-loading.visited,.next-btn-text.next-btn-loading:link,.next-btn-text.next-btn-loading:visited{color:#333}.next-btn-text.next-btn-loading.active,.next-btn-text.next-btn-loading.hover,.next-btn-text.next-btn-loading:active,.next-btn-text.next-btn-loading:focus,.next-btn-text.next-btn-loading:hover{color:#333;background:transparent;border-color:transparent;text-decoration:none}.next-btn-loading{pointer-events:none}.next-btn-loading:before{font-family:NextIcon;content:"";opacity:1;visibility:visible;animation:loadingCircle 2s linear infinite}.next-btn-loading:after{content:"";display:inline-block;position:static;height:100%;width:0;vertical-align:middle}.next-btn-custom-loading{pointer-events:none}.next-btn-ghost{box-shadow:none;border-style:solid}.next-btn-ghost.next-btn-dark{background:transparent;border-color:#fff}.next-btn-ghost.next-btn-dark,.next-btn-ghost.next-btn-dark.visited,.next-btn-ghost.next-btn-dark:link,.next-btn-ghost.next-btn-dark:visited{color:#fff}.next-btn-ghost.next-btn-dark.active,.next-btn-ghost.next-btn-dark.hover,.next-btn-ghost.next-btn-dark:active,.next-btn-ghost.next-btn-dark:focus,.next-btn-ghost.next-btn-dark:hover{color:#fff;background:hsla(0,0%,100%,.8);border-color:#fff;text-decoration:none}.next-btn-ghost.next-btn-dark.disabled,.next-btn-ghost.next-btn-dark[disabled]{background:transparent;border-color:hsla(0,0%,100%,.4)}.next-btn-ghost.next-btn-dark.disabled,.next-btn-ghost.next-btn-dark.disabled.visited,.next-btn-ghost.next-btn-dark.disabled:link,.next-btn-ghost.next-btn-dark.disabled:visited,.next-btn-ghost.next-btn-dark[disabled],.next-btn-ghost.next-btn-dark[disabled].visited,.next-btn-ghost.next-btn-dark[disabled]:link,.next-btn-ghost.next-btn-dark[disabled]:visited{color:hsla(0,0%,100%,.4)}.next-btn-ghost.next-btn-dark.disabled.active,.next-btn-ghost.next-btn-dark.disabled.hover,.next-btn-ghost.next-btn-dark.disabled:active,.next-btn-ghost.next-btn-dark.disabled:focus,.next-btn-ghost.next-btn-dark.disabled:hover,.next-btn-ghost.next-btn-dark[disabled].active,.next-btn-ghost.next-btn-dark[disabled].hover,.next-btn-ghost.next-btn-dark[disabled]:active,.next-btn-ghost.next-btn-dark[disabled]:focus,.next-btn-ghost.next-btn-dark[disabled]:hover{color:hsla(0,0%,100%,.4);background:transparent;border-color:hsla(0,0%,100%,.4);text-decoration:none}.next-btn-ghost.next-btn-light{background:transparent;border-color:#333}.next-btn-ghost.next-btn-light,.next-btn-ghost.next-btn-light.visited,.next-btn-ghost.next-btn-light:link,.next-btn-ghost.next-btn-light:visited{color:#333}.next-btn-ghost.next-btn-light.active,.next-btn-ghost.next-btn-light.hover,.next-btn-ghost.next-btn-light:active,.next-btn-ghost.next-btn-light:focus,.next-btn-ghost.next-btn-light:hover{color:#999;background:rgba(0,0,0,.92);border-color:#333;text-decoration:none}.next-btn-ghost.next-btn-light.disabled,.next-btn-ghost.next-btn-light[disabled]{background:transparent;border-color:rgba(0,0,0,.1)}.next-btn-ghost.next-btn-light.disabled,.next-btn-ghost.next-btn-light.disabled.visited,.next-btn-ghost.next-btn-light.disabled:link,.next-btn-ghost.next-btn-light.disabled:visited,.next-btn-ghost.next-btn-light[disabled],.next-btn-ghost.next-btn-light[disabled].visited,.next-btn-ghost.next-btn-light[disabled]:link,.next-btn-ghost.next-btn-light[disabled]:visited{color:rgba(0,0,0,.1)}.next-btn-ghost.next-btn-light.disabled.active,.next-btn-ghost.next-btn-light.disabled.hover,.next-btn-ghost.next-btn-light.disabled:active,.next-btn-ghost.next-btn-light.disabled:focus,.next-btn-ghost.next-btn-light.disabled:hover,.next-btn-ghost.next-btn-light[disabled].active,.next-btn-ghost.next-btn-light[disabled].hover,.next-btn-ghost.next-btn-light[disabled]:active,.next-btn-ghost.next-btn-light[disabled]:focus,.next-btn-ghost.next-btn-light[disabled]:hover{color:rgba(0,0,0,.1);background:transparent;border-color:rgba(0,0,0,.1);text-decoration:none}.next-btn-group{position:relative;display:inline-block;vertical-align:middle}.next-btn-group>.next-btn{position:relative;float:left;box-shadow:none}.next-btn-group>.next-btn.active,.next-btn-group>.next-btn:active,.next-btn-group>.next-btn:focus,.next-btn-group>.next-btn:hover{z-index:1}.next-btn-group>.next-btn.disabled,.next-btn-group>.next-btn[disabled]{z-index:0}.next-btn-group .next-btn.next-btn{margin:0 0 0 -1px}.next-btn-group .next-btn:not(:first-child):not(:last-child){border-radius:0}.next-btn-group>.next-btn:first-child{margin:0}.next-btn-group>.next-btn:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.next-btn-group>.next-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.next-btn-group>.next-btn-primary:not(:first-child){border-left-color:hsla(0,0%,100%,.2)}.next-btn-group>.next-btn-primary:not(:first-child):hover{border-left-color:transparent}.next-btn-group>.next-btn-primary:not(:first-child).disabled,.next-btn-group>.next-btn-primary:not(:first-child)[disabled]{border-left-color:#eee}.next-btn-group[dir=rtl]>.next-btn{float:right}.next-btn-group[dir=rtl] .next-btn.next-btn{margin:0 -1px 0 0}.next-btn-group[dir=rtl]>.next-btn:first-child:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.next-btn-group[dir=rtl]>.next-btn:last-child:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0}.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child){border-right-color:hsla(0,0%,100%,.2)}.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child):hover{border-right-color:transparent}.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child).disabled,.next-btn-group[dir=rtl]>.next-btn-primary:not(:first-child)[disabled]{border-right-color:#eee}.next-btn.next-small[dir=rtl]{border-radius:3px}.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-first:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-small[dir=rtl]>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px;line-height:inherit}.next-btn.next-small[dir=rtl].next-btn-loading{padding-left:16px;padding-right:32px}.next-btn.next-small[dir=rtl].next-btn-loading:after{right:16px;top:50%;margin-right:0;margin-left:4px}.next-btn.next-medium[dir=rtl]{border-radius:3px}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-medium[dir=rtl]>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-medium[dir=rtl].next-btn-loading{padding-left:20px;padding-right:44px}.next-btn.next-medium[dir=rtl].next-btn-loading:after{right:20px;top:50%;margin-right:0;margin-left:4px}.next-btn.next-large[dir=rtl]{border-radius:3px}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn.next-large[dir=rtl]>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn.next-large[dir=rtl].next-btn-loading{padding-left:24px;padding-right:48px}.next-btn.next-large[dir=rtl].next-btn-loading:after{right:24px;top:50%;margin-right:0;margin-left:4px}.next-btn-text[dir=rtl].next-large{border-radius:0}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-large>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text[dir=rtl].next-large.next-btn-loading{padding-left:0;padding-right:24px}.next-btn-text[dir=rtl].next-large.next-btn-loading:after{right:0;top:50%;margin-right:0;margin-left:4px}.next-btn-text[dir=rtl].next-medium{border-radius:0}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-first:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-medium>.next-btn-icon.next-icon-last:before{width:20px;font-size:20px;line-height:inherit}.next-btn-text[dir=rtl].next-medium.next-btn-loading{padding-left:0;padding-right:24px}.next-btn-text[dir=rtl].next-medium.next-btn-loading:after{right:0;top:50%;margin-right:0;margin-left:4px}.next-btn-text[dir=rtl].next-small{border-radius:0}.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-first{margin-left:4px;margin-right:0}.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-first .next-icon-remote,.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-first:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-last{margin-left:0;margin-right:4px}.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-last .next-icon-remote,.next-btn-text[dir=rtl].next-small>.next-btn-icon.next-icon-last:before{width:12px;font-size:12px;line-height:inherit}.next-btn-text[dir=rtl].next-small.next-btn-loading{padding-left:0;padding-right:16px}.next-btn-text[dir=rtl].next-small.next-btn-loading:after{right:0;top:50%;margin-right:0;margin-left:4px}.next-input{vertical-align:middle;display:inline-table;border-collapse:separate;font-size:0;line-height:1;width:200px;border-spacing:0;transition:all .1s linear;border:1px solid #ddd;background-color:#fff}.next-input,.next-input *,.next-input :after,.next-input :before{box-sizing:border-box}.next-input input{height:100%}.next-input input[type=reset],.next-input input[type=submit]{-webkit-appearance:button;cursor:pointer}.next-input input::-moz-focus-inner{border:0;padding:0}.next-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #fff inset;border-radius:3px}.next-input input[type=password]::-ms-reveal{display:none}.next-input textarea{resize:none}.next-input input,.next-input textarea{width:100%;border:none;outline:none;padding:0;margin:0;font-weight:400;vertical-align:middle;background-color:transparent;color:#333}.next-input input::-ms-clear,.next-input textarea::-ms-clear{display:none}.next-input.next-small{height:24px;border-radius:3px}.next-input.next-small .next-input-label{padding-left:8px;font-size:12px}.next-input.next-small .next-input-inner{font-size:12px}.next-input.next-small .next-input-control,.next-input.next-small .next-input-inner-text{padding-right:4px}.next-input.next-small input{height:22px;line-height:22px \0 ;padding:0 4px;font-size:12px}.next-input.next-small input::placeholder{font-size:12px}.next-input.next-small .next-input-text-field{padding:0 4px;font-size:12px;height:22px;line-height:22px}.next-input.next-small .next-icon .next-icon-remote,.next-input.next-small .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-input.next-small .next-input-control{border-radius:0 3px 3px 0}.next-input.next-medium{height:32px;border-radius:3px}.next-input.next-medium .next-input-label{padding-left:8px;font-size:14px}.next-input.next-medium .next-input-inner{font-size:14px}.next-input.next-medium .next-input-control,.next-input.next-medium .next-input-inner-text{padding-right:8px}.next-input.next-medium input{height:30px;line-height:30px \0 ;padding:0 8px;font-size:14px}.next-input.next-medium input::placeholder{font-size:14px}.next-input.next-medium .next-input-text-field{padding:0 8px;font-size:14px;height:30px;line-height:30px}.next-input.next-medium .next-icon .next-icon-remote,.next-input.next-medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-input.next-medium .next-input-control{border-radius:0 3px 3px 0}.next-input.next-large{height:40px;border-radius:3px}.next-input.next-large .next-input-label{padding-left:12px;font-size:16px}.next-input.next-large .next-input-inner{font-size:16px}.next-input.next-large .next-input-control,.next-input.next-large .next-input-inner-text{padding-right:8px}.next-input.next-large input{height:38px;line-height:38px \0 ;padding:0 12px;font-size:16px}.next-input.next-large input::placeholder{font-size:16px}.next-input.next-large .next-input-text-field{padding:0 12px;font-size:16px;height:38px;line-height:38px}.next-input.next-large .next-icon .next-icon-remote,.next-input.next-large .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-input.next-large .next-input-control{border-radius:0 3px 3px 0}.next-input.next-input-textarea{height:auto;border-radius:3px;font-size:0}.next-input.next-input-textarea textarea{color:#333;padding:4px 8px;font-size:14px;border-radius:3px}.next-input.next-input-textarea.next-small textarea{font-size:14px}.next-input.next-input-textarea.next-large textarea{font-size:16px}.next-input.next-input-textarea .next-input-control{display:block;width:auto;border-radius:3px}.next-input.next-input-textarea .next-input-textarea-control{display:flex;justify-content:end;padding:0 8px 4px}.next-input.next-input-textarea .next-input-len,.next-input.next-input-textarea .next-input-textarea-clear{display:block;text-align:right;width:auto}.next-input.next-input-textarea .next-input-textarea-clear{cursor:pointer;padding-left:4px}.next-input.next-input-textarea .next-input-textarea-control-line:after{content:"|";color:#eee;display:inline-block;font-size:14px}.next-input-hint-wrap{color:#999;position:relative}.next-input-hint-wrap .next-input-clear{opacity:0;z-index:1;position:absolute}.next-input-hint-wrap .next-input-hint{opacity:1}.next-input .next-icon-eye-close:hover,.next-input .next-icon-eye:hover,.next-input .next-input-clear-icon:hover{cursor:pointer;color:#666}.next-input .next-input-hover-show{opacity:0}.next-input.next-focus,.next-input:hover{border-color:#ccc;background-color:#fff}.next-input.next-focus .next-input-clear,.next-input:hover .next-input-clear{opacity:1}.next-input.next-focus .next-input-clear+.next-input-hint,.next-input:hover .next-input-clear+.next-input-hint{opacity:0}.next-input.next-focus .next-input-hover-show,.next-input .next-input-clear:focus,.next-input:hover .next-input-hover-show{opacity:1}.next-input .next-input-clear:focus+.next-input-hint{opacity:0}.next-input.next-focus{border-color:#209bfa;background-color:#fff;box-shadow:0 0 0 2px rgba(32,155,250,.2)}.next-input.next-warning{border-color:#f1c826;background-color:#fff}.next-input.next-warning.next-focus,.next-input.next-warning:hover{border-color:#f1c826}.next-input.next-warning.next-focus{box-shadow:0 0 0 2px rgba(241,200,38,.2)}.next-input.next-error{border-color:#d23c26;background-color:#fff}.next-input.next-error input,.next-input.next-error textarea{color:#333}.next-input.next-error.next-focus,.next-input.next-error:hover{border-color:#d23c26}.next-input.next-error.next-focus{box-shadow:0 0 0 2px rgba(210,60,38,.2)}.next-input.next-hidden{display:none}.next-input.next-noborder{border:none;box-shadow:none}.next-input-control .next-input-len,.next-input-control .next-input-textarea-clear{font-size:12px;line-height:12px;color:#999;display:table-cell;width:1px;vertical-align:bottom}.next-input-control .next-input-len.next-error,.next-input-control .next-input-textarea-clear.next-error{color:#d23c26}.next-input-control .next-input-len.next-warning,.next-input-control .next-input-textarea-clear.next-warning{color:#f1c826}.next-input-control>*{display:table-cell;width:1%;top:0}.next-input-control>:not(:last-child){padding-right:4px}.next-input-control .next-icon{transition:all .1s linear;color:#999}.next-input-control .next-input-warning-icon{color:#f1c826}.next-input-control .next-input-warning-icon:before{content:""}.next-input-control .next-input-success-icon{color:#1ad78c}.next-input-control .next-input-success-icon:before{content:""}.next-input-control .next-input-loading-icon{color:#298dff}.next-input-control .next-input-loading-icon:before{content:"";animation:loadingCircle 1s linear infinite}.next-input-control .next-input-clear-icon:before{content:""}.next-input-inner-text,.next-input-label{color:#666}.next-input input::-moz-placeholder,.next-input textarea::-moz-placeholder{color:#ccc;opacity:1}.next-input input:-ms-input-placeholder,.next-input textarea:-ms-input-placeholder{color:#ccc}.next-input input::-webkit-input-placeholder,.next-input textarea::-webkit-input-placeholder{color:#ccc}.next-input.next-disabled{color:#ccc;cursor:not-allowed}.next-input.next-disabled,.next-input.next-disabled:hover{border-color:#eee;background-color:#fafafa}.next-input.next-disabled input,.next-input.next-disabled textarea{-webkit-text-fill-color:#ccc;color:#ccc}.next-input.next-disabled input::-moz-placeholder,.next-input.next-disabled textarea::-moz-placeholder{color:#ccc;opacity:1}.next-input.next-disabled input:-ms-input-placeholder,.next-input.next-disabled textarea:-ms-input-placeholder{color:#ccc}.next-input.next-disabled input::-webkit-input-placeholder,.next-input.next-disabled textarea::-webkit-input-placeholder{color:#ccc}.next-input.next-disabled .next-input-hint-wrap,.next-input.next-disabled .next-input-inner-text,.next-input.next-disabled .next-input-label,.next-input.next-disabled .next-input-len{color:#ccc}.next-input.next-disabled .next-input-hint-wrap .next-input-clear{opacity:0}.next-input.next-disabled .next-input-hint-wrap .next-input-hint{opacity:1}.next-input.next-disabled .next-input-hint-wrap .next-input-clear-icon:hover{cursor:not-allowed;color:#ccc}.next-input.next-disabled .next-icon{color:#ccc}.next-input-control,.next-input-inner,.next-input-label{display:table-cell;width:1px;vertical-align:middle;line-height:1;background-color:transparent;white-space:nowrap}.next-input-group{display:inline-table;border-collapse:separate;border-spacing:0;line-height:0;width:100%;overflow:hidden}.next-input-group,.next-input-group *,.next-input-group :after,.next-input-group :before{box-sizing:border-box}.next-input-group-auto-width{width:100%;border-radius:0!important}.next-input-group>.next-input{border-radius:0}.next-input-group>.next-input.next-focus,.next-input-group>.next-input:hover{position:relative;z-index:1}.next-input-group>.next-input:first-child.next-large,.next-input-group>.next-input:first-child.next-medium,.next-input-group>.next-input:first-child.next-small{border-top-left-radius:3px!important;border-bottom-left-radius:3px!important}.next-input-group>.next-input:last-child.next-large,.next-input-group>.next-input:last-child.next-medium,.next-input-group>.next-input:last-child.next-small{border-top-right-radius:3px!important;border-bottom-right-radius:3px!important}.next-input-group-addon{width:1px;display:table-cell;vertical-align:middle;white-space:nowrap}.next-input-group-addon:first-child,.next-input-group-addon:first-child>*{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.next-input-group-addon:first-child>*{margin-right:-1px}.next-input-group-addon:first-child>.next-focus{position:relative;z-index:1}.next-input-group-addon:first-child>*>.next-input{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.next-input-group-addon:first-child>*>.next-input.next-focus{position:relative;z-index:1}.next-input-group-addon:last-child,.next-input-group-addon:last-child>*{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.next-input-group-addon:last-child>*{margin-left:-1px}.next-input-group-addon:last-child>*>.next-input{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.next-input-group-text{color:#999;background-color:#f9f9f9;text-align:center;border:1px solid #ddd;padding:0 8px}.next-input-group-text:first-child{border-right-width:0}.next-input-group-text:last-child{border-left-width:0}.next-input-group-text.next-disabled{color:#ccc;cursor:not-allowed}.next-input-group-text.next-disabled,.next-input-group-text.next-disabled:hover{border-color:#eee;background-color:#fafafa}.next-input-group-text.next-small{font-size:12px;border-radius:3px}.next-input-group-text.next-medium{font-size:14px;border-radius:3px}.next-input-group-text.next-large{font-size:16px;border-radius:3px}.next-input[dir=rtl].next-small .next-input-label{padding-left:0;padding-right:8px}.next-input[dir=rtl].next-small .next-input-control{padding-right:0;padding-left:4px}.next-input[dir=rtl].next-medium .next-input-label{padding-left:0;padding-right:8px}.next-input[dir=rtl].next-medium .next-input-control{padding-right:0;padding-left:8px}.next-input[dir=rtl].next-large .next-input-label{padding-left:0;padding-right:12px}.next-input[dir=rtl].next-large .next-input-control{padding-right:0;padding-left:8px}.next-input[dir=rtl].next-input-textarea .next-input-len{text-align:left}.next-input[dir=rtl] .next-input-control>:not(:last-child){padding-left:4px;padding-right:0}.next-input-group[dir=rtl]>.next-input:first-child.next-large,.next-input-group[dir=rtl]>.next-input:first-child.next-medium,.next-input-group[dir=rtl]>.next-input:first-child.next-small{border-top-left-radius:0!important;border-bottom-left-radius:0!important;border-top-right-radius:3px!important;border-bottom-right-radius:3px!important}.next-input-group[dir=rtl]>.next-input:last-child.next-large,.next-input-group[dir=rtl]>.next-input:last-child.next-medium,.next-input-group[dir=rtl]>.next-input:last-child.next-small{border-top-left-radius:3px!important;border-bottom-left-radius:3px!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.next-input-group[dir=rtl] .next-input-group-addon:first-child,.next-input-group[dir=rtl] .next-input-group-addon:first-child>*>.next-input,.next-input-group[dir=rtl] .next-input-group-addon:first-child>.next-input{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.next-input-group[dir=rtl] .next-input-group-addon:first-child.next-large,.next-input-group[dir=rtl] .next-input-group-addon:first-child.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:first-child.next-small,.next-input-group[dir=rtl] .next-input-group-addon:first-child>*>.next-input.next-large,.next-input-group[dir=rtl] .next-input-group-addon:first-child>*>.next-input.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:first-child>*>.next-input.next-small,.next-input-group[dir=rtl] .next-input-group-addon:first-child>.next-input.next-large,.next-input-group[dir=rtl] .next-input-group-addon:first-child>.next-input.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:first-child>.next-input.next-small{border-bottom-right-radius:3px!important;border-top-right-radius:3px!important}.next-input-group[dir=rtl] .next-input-group-addon:first-child>*{margin-left:-1px;border-bottom-left-radius:0!important;border-top-left-radius:0!important}.next-input-group[dir=rtl] .next-input-group-addon:last-child,.next-input-group[dir=rtl] .next-input-group-addon:last-child>*>.next-input,.next-input-group[dir=rtl] .next-input-group-addon:last-child>.next-input{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.next-input-group[dir=rtl] .next-input-group-addon:last-child.next-large,.next-input-group[dir=rtl] .next-input-group-addon:last-child.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:last-child.next-small,.next-input-group[dir=rtl] .next-input-group-addon:last-child>*>.next-input.next-large,.next-input-group[dir=rtl] .next-input-group-addon:last-child>*>.next-input.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:last-child>*>.next-input.next-small,.next-input-group[dir=rtl] .next-input-group-addon:last-child>.next-input.next-large,.next-input-group[dir=rtl] .next-input-group-addon:last-child>.next-input.next-medium,.next-input-group[dir=rtl] .next-input-group-addon:last-child>.next-input.next-small{border-bottom-left-radius:3px!important;border-top-left-radius:3px!important}.next-input-group[dir=rtl] .next-input-group-addon:last-child>*{margin-right:-1px;border-bottom-right-radius:0!important;border-top-right-radius:0!important}.next-input-group[dir=rtl] .next-input-group-text:first-child{border-right-width:1px;border-left:0}.next-input-group[dir=rtl] .next-input-group-text:last-child{border-left-width:1px;border-right:0}.next-calendar,.next-calendar *,.next-calendar :after,.next-calendar :before{box-sizing:border-box}.next-calendar table{border-collapse:collapse;border-spacing:0}.next-calendar td,.next-calendar th{padding:0}@keyframes cellZoomIn{0%{transform:scale(.5)}to{transform:scale(1)}}@keyframes cellHover{0%{opacity:0}to{opacity:1}}@keyframes enterToLeft{0%{transform:translate(-40%);opacity:0}50%{opacity:.6}to{opacity:1;transform:translate(0)}}@keyframes enterToRight{0%{transform:translate(40%);opacity:0}50%{opacity:.6}to{opacity:1;transform:translate(0)}}.next-calendar-card .next-calendar-header,.next-calendar-fullscreen .next-calendar-header{text-align:right}.next-calendar-card .next-calendar-header .next-select,.next-calendar-fullscreen .next-calendar-header .next-select{margin-right:4px;vertical-align:top}.next-calendar-card .next-calendar-header .next-menu,.next-calendar-fullscreen .next-calendar-header .next-menu{text-align:left}.next-calendar-card .next-calendar-header,.next-calendar-fullscreen .next-calendar-header{margin-bottom:8px}.next-calendar-panel-header{position:relative;background:#fff;margin-bottom:8px;border-bottom:1px solid transparent}.next-calendar-panel-header-full,.next-calendar-panel-header-left,.next-calendar-panel-header-right{height:32px;line-height:32px}.next-calendar-panel-header-full .next-calendar-btn,.next-calendar-panel-header-left .next-calendar-btn,.next-calendar-panel-header-right .next-calendar-btn{vertical-align:top;font-weight:700;margin:0 4px;background:transparent;border-color:transparent}.next-calendar-panel-header-full .next-calendar-btn,.next-calendar-panel-header-full .next-calendar-btn.visited,.next-calendar-panel-header-full .next-calendar-btn:link,.next-calendar-panel-header-full .next-calendar-btn:visited,.next-calendar-panel-header-left .next-calendar-btn,.next-calendar-panel-header-left .next-calendar-btn.visited,.next-calendar-panel-header-left .next-calendar-btn:link,.next-calendar-panel-header-left .next-calendar-btn:visited,.next-calendar-panel-header-right .next-calendar-btn,.next-calendar-panel-header-right .next-calendar-btn.visited,.next-calendar-panel-header-right .next-calendar-btn:link,.next-calendar-panel-header-right .next-calendar-btn:visited{color:#000}.next-calendar-panel-header-full .next-calendar-btn.active,.next-calendar-panel-header-full .next-calendar-btn.hover,.next-calendar-panel-header-full .next-calendar-btn:active,.next-calendar-panel-header-full .next-calendar-btn:focus,.next-calendar-panel-header-full .next-calendar-btn:hover,.next-calendar-panel-header-left .next-calendar-btn.active,.next-calendar-panel-header-left .next-calendar-btn.hover,.next-calendar-panel-header-left .next-calendar-btn:active,.next-calendar-panel-header-left .next-calendar-btn:focus,.next-calendar-panel-header-left .next-calendar-btn:hover,.next-calendar-panel-header-right .next-calendar-btn.active,.next-calendar-panel-header-right .next-calendar-btn.hover,.next-calendar-panel-header-right .next-calendar-btn:active,.next-calendar-panel-header-right .next-calendar-btn:focus,.next-calendar-panel-header-right .next-calendar-btn:hover{color:#fff;background:transparent;border-color:transparent;text-decoration:none}.next-calendar-panel-header-left,.next-calendar-panel-header-right{display:inline-block;width:50%;text-align:center}.next-calendar-panel-header-full{width:100%;text-align:center}.next-calendar-panel-menu{max-height:210px;overflow:auto;text-align:left}.next-calendar-btn{cursor:pointer;padding:0;margin:0;border:0;background:transparent;outline:none;height:100%}.next-calendar-btn>.next-icon.next-icon .next-icon-remote,.next-calendar-btn>.next-icon.next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-calendar-btn .next-icon{margin-left:4px}.next-calendar-btn-next-decade,.next-calendar-btn-next-month,.next-calendar-btn-next-year,.next-calendar-btn-prev-decade,.next-calendar-btn-prev-month,.next-calendar-btn-prev-year{position:absolute;top:0;background:transparent;border-color:transparent}.next-calendar-btn-next-decade,.next-calendar-btn-next-decade.visited,.next-calendar-btn-next-decade:link,.next-calendar-btn-next-decade:visited,.next-calendar-btn-next-month,.next-calendar-btn-next-month.visited,.next-calendar-btn-next-month:link,.next-calendar-btn-next-month:visited,.next-calendar-btn-next-year,.next-calendar-btn-next-year.visited,.next-calendar-btn-next-year:link,.next-calendar-btn-next-year:visited,.next-calendar-btn-prev-decade,.next-calendar-btn-prev-decade.visited,.next-calendar-btn-prev-decade:link,.next-calendar-btn-prev-decade:visited,.next-calendar-btn-prev-month,.next-calendar-btn-prev-month.visited,.next-calendar-btn-prev-month:link,.next-calendar-btn-prev-month:visited,.next-calendar-btn-prev-year,.next-calendar-btn-prev-year.visited,.next-calendar-btn-prev-year:link,.next-calendar-btn-prev-year:visited{color:#666}.next-calendar-btn-next-decade.active,.next-calendar-btn-next-decade.hover,.next-calendar-btn-next-decade:active,.next-calendar-btn-next-decade:focus,.next-calendar-btn-next-decade:hover,.next-calendar-btn-next-month.active,.next-calendar-btn-next-month.hover,.next-calendar-btn-next-month:active,.next-calendar-btn-next-month:focus,.next-calendar-btn-next-month:hover,.next-calendar-btn-next-year.active,.next-calendar-btn-next-year.hover,.next-calendar-btn-next-year:active,.next-calendar-btn-next-year:focus,.next-calendar-btn-next-year:hover,.next-calendar-btn-prev-decade.active,.next-calendar-btn-prev-decade.hover,.next-calendar-btn-prev-decade:active,.next-calendar-btn-prev-decade:focus,.next-calendar-btn-prev-decade:hover,.next-calendar-btn-prev-month.active,.next-calendar-btn-prev-month.hover,.next-calendar-btn-prev-month:active,.next-calendar-btn-prev-month:focus,.next-calendar-btn-prev-month:hover,.next-calendar-btn-prev-year.active,.next-calendar-btn-prev-year.hover,.next-calendar-btn-prev-year:active,.next-calendar-btn-prev-year:focus,.next-calendar-btn-prev-year:hover{color:#209bfa;background:transparent;border-color:transparent;text-decoration:none}.next-calendar-btn-prev-decade,.next-calendar-btn-prev-year{left:8px}.next-calendar-btn-prev-month{left:28px}.next-calendar-btn-next-month{right:28px}.next-calendar-btn-next-decade,.next-calendar-btn-next-year{right:8px}.next-calendar-fullscreen .next-calendar-th{text-align:right;color:#333;font-size:16px;font-weight:700;padding-right:12px;padding-bottom:4px}.next-calendar-fullscreen .next-calendar-cell{font-size:14px}.next-calendar-fullscreen .next-calendar-cell.next-selected .next-calendar-date,.next-calendar-fullscreen .next-calendar-cell.next-selected .next-calendar-month{font-weight:700;background:#add9ff;color:#209bfa;border-color:#209bfa}.next-calendar-fullscreen .next-calendar-cell.next-disabled .next-calendar-date,.next-calendar-fullscreen .next-calendar-cell.next-disabled .next-calendar-month{cursor:not-allowed;background:#fafafa;color:#ccc;border-color:#eee}.next-calendar-fullscreen .next-calendar-date,.next-calendar-fullscreen .next-calendar-month{text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 4px;padding:4px 8px;min-height:80px;transition:background .1s linear;background:#fff;color:#333;border-color:currentcolor #e6e6e6 #e6e6e6;border-top:2px solid #e6e6e6}.next-calendar-fullscreen .next-calendar-date:hover,.next-calendar-fullscreen .next-calendar-month:hover{background:#add9ff;color:#209bfa;border-color:#209bfa}.next-calendar-fullscreen .next-calendar-cell-next-month .next-calendar-date,.next-calendar-fullscreen .next-calendar-cell-prev-month .next-calendar-date{background:transparent;color:#ccc;border-color:transparent}.next-calendar-fullscreen .next-calendar-cell-current .next-calendar-date,.next-calendar-fullscreen .next-calendar-cell-current .next-calendar-month{font-weight:700;background:#fff;color:#209bfa;border-color:#209bfa}.next-calendar-card .next-calendar-th,.next-calendar-panel .next-calendar-th,.next-calendar-range .next-calendar-th{text-align:center;color:#999;font-size:12px;font-weight:400}.next-calendar-card .next-calendar-cell,.next-calendar-panel .next-calendar-cell,.next-calendar-range .next-calendar-cell{text-align:center;font-size:12px}.next-calendar-card .next-calendar-cell.next-selected .next-calendar-date,.next-calendar-card .next-calendar-cell.next-selected .next-calendar-month,.next-calendar-card .next-calendar-cell.next-selected .next-calendar-year,.next-calendar-panel .next-calendar-cell.next-selected .next-calendar-date,.next-calendar-panel .next-calendar-cell.next-selected .next-calendar-month,.next-calendar-panel .next-calendar-cell.next-selected .next-calendar-year,.next-calendar-range .next-calendar-cell.next-selected .next-calendar-date,.next-calendar-range .next-calendar-cell.next-selected .next-calendar-month,.next-calendar-range .next-calendar-cell.next-selected .next-calendar-year{animation:cellZoomIn .4s cubic-bezier(.23,1,.32,1);font-weight:700;background:#209bfa;color:#fff;border-color:#209bfa}.next-calendar-card .next-calendar-cell.next-disabled .next-calendar-date,.next-calendar-card .next-calendar-cell.next-disabled .next-calendar-month,.next-calendar-card .next-calendar-cell.next-disabled .next-calendar-year,.next-calendar-panel .next-calendar-cell.next-disabled .next-calendar-date,.next-calendar-panel .next-calendar-cell.next-disabled .next-calendar-month,.next-calendar-panel .next-calendar-cell.next-disabled .next-calendar-year,.next-calendar-range .next-calendar-cell.next-disabled .next-calendar-date,.next-calendar-range .next-calendar-cell.next-disabled .next-calendar-month,.next-calendar-range .next-calendar-cell.next-disabled .next-calendar-year{cursor:not-allowed;background:#fafafa;color:#ccc;border-color:#fafafa}.next-calendar-card .next-calendar-cell.next-inrange .next-calendar-date,.next-calendar-panel .next-calendar-cell.next-inrange .next-calendar-date,.next-calendar-range .next-calendar-cell.next-inrange .next-calendar-date{background:#e4f3fe;color:#209bfa;border-color:#e4f3fe}.next-calendar-card .next-calendar-date,.next-calendar-card .next-calendar-month,.next-calendar-card .next-calendar-year,.next-calendar-panel .next-calendar-date,.next-calendar-panel .next-calendar-month,.next-calendar-panel .next-calendar-year,.next-calendar-range .next-calendar-date,.next-calendar-range .next-calendar-month,.next-calendar-range .next-calendar-year{text-align:center;background:#fff;color:#666;border:1px solid #fff}.next-calendar-card .next-calendar-date:hover,.next-calendar-card .next-calendar-month:hover,.next-calendar-card .next-calendar-year:hover,.next-calendar-panel .next-calendar-date:hover,.next-calendar-panel .next-calendar-month:hover,.next-calendar-panel .next-calendar-year:hover,.next-calendar-range .next-calendar-date:hover,.next-calendar-range .next-calendar-month:hover,.next-calendar-range .next-calendar-year:hover{cursor:pointer;background:#e4f3fe;color:#209bfa;border-color:#e4f3fe}.next-calendar-card .next-calendar-date,.next-calendar-panel .next-calendar-date,.next-calendar-range .next-calendar-date{width:24px;height:24px;line-height:22px;margin:4px auto;border-radius:3px}.next-calendar-card .next-calendar-month,.next-calendar-panel .next-calendar-month,.next-calendar-range .next-calendar-month{width:60px;height:24px;line-height:22px;margin:8px auto;border-radius:3px}.next-calendar-card .next-calendar-year,.next-calendar-panel .next-calendar-year,.next-calendar-range .next-calendar-year{width:48px;height:24px;line-height:22px;margin:8px auto;border-radius:3px}.next-calendar-card .next-calendar-cell-next-month .next-calendar-date,.next-calendar-card .next-calendar-cell-prev-month .next-calendar-date,.next-calendar-panel .next-calendar-cell-next-month .next-calendar-date,.next-calendar-panel .next-calendar-cell-prev-month .next-calendar-date,.next-calendar-range .next-calendar-cell-next-month .next-calendar-date,.next-calendar-range .next-calendar-cell-prev-month .next-calendar-date{background:#fff;color:#ccc;border-color:#fff}.next-calendar-card .next-calendar-cell-current .next-calendar-date,.next-calendar-card .next-calendar-cell-current .next-calendar-month,.next-calendar-card .next-calendar-cell-current .next-calendar-year,.next-calendar-panel .next-calendar-cell-current .next-calendar-date,.next-calendar-panel .next-calendar-cell-current .next-calendar-month,.next-calendar-panel .next-calendar-cell-current .next-calendar-year,.next-calendar-range .next-calendar-cell-current .next-calendar-date,.next-calendar-range .next-calendar-cell-current .next-calendar-month,.next-calendar-range .next-calendar-cell-current .next-calendar-year{font-weight:700;background:#fff;color:#209bfa;border-color:transparent}.next-calendar-panel.next-calendar-week .next-calendar-tbody tr{cursor:pointer}.next-calendar-panel.next-calendar-week .next-calendar-tbody tr:hover .next-calendar-cell .next-calendar-date{background:#e4f3fe;color:#209bfa;border-color:#e4f3fe}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-cell.next-selected .next-calendar-date{font-weight:400;background:transparent;border-color:transparent}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-date{position:relative;color:#209bfa}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-date:before{content:"";position:absolute;left:-1px;top:-1px;bottom:-1px;right:-1px;background:#e4f3fe;border:1px solid #e4f3fe;border-radius:3px}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-date>span{position:relative}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-end,.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-start{color:#fff}.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-end:before,.next-calendar-panel.next-calendar-week .next-calendar-tbody .next-calendar-week-active-start:before{background:#209bfa;border-color:#209bfa}.next-calendar[dir=rtl] .next-calendar-header{text-align:left}.next-calendar[dir=rtl] .next-calendar-header .next-select{margin-right:0;margin-left:4px}.next-calendar[dir=rtl] .next-calendar-header .next-menu{text-align:right}.next-calendar[dir=rtl] .next-calendar-btn-prev-decade,.next-calendar[dir=rtl] .next-calendar-btn-prev-year{left:auto;right:8px}.next-calendar[dir=rtl] .next-calendar-btn-prev-month{left:auto;right:28px}.next-calendar[dir=rtl] .next-calendar-btn-next-month{right:auto;left:28px}.next-calendar[dir=rtl] .next-calendar-btn-next-decade,.next-calendar[dir=rtl] .next-calendar-btn-next-year{right:auto;left:8px}.next-calendar-fullscreen[dir=rtl] .next-calendar-th{text-align:left;padding-left:12px;padding-right:0}.next-calendar-fullscreen[dir=rtl] .next-calendar-date,.next-calendar-fullscreen[dir=rtl] .next-calendar-month{text-align:left}.next-calendar-range[dir=rtl] .next-calendar-body-left,.next-calendar-range[dir=rtl] .next-calendar-body-right{float:right}.next-calendar-range[dir=rtl] .next-calendar-body-left{padding-right:0;padding-left:8px}.next-calendar-range[dir=rtl] .next-calendar-body-right{padding-left:0;padding-right:8px}.next-calendar-table{width:100%;table-layout:fixed}.next-calendar-range .next-calendar-body-left,.next-calendar-range .next-calendar-body-right{float:left;width:50%}.next-calendar-range .next-calendar-body-left{padding-right:8px}.next-calendar-range .next-calendar-body-right{padding-left:8px}.next-calendar-range .next-calendar-body:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-calendar-symbol-prev:before{content:""}.next-calendar-symbol-next:before{content:""}.next-calendar-symbol-prev-super:before{content:""}.next-calendar-symbol-next-super:before{content:""}.next-card,.next-card:after,.next-card:before{box-sizing:border-box}.next-card[dir=rtl] .next-card-extra{left:0;right:auto}.next-card[dir=rtl] .next-card-title:before{right:0;left:auto}.next-card[dir=rtl] .next-card-subtitle{float:left;padding-right:8px;padding-left:0}.next-card[dir=rtl] .next-card-head-show-bullet .next-card-title{padding-left:0;padding-right:8px}.next-card,.next-card *,.next-card :after,.next-card :before{box-sizing:border-box}.next-card{min-width:100px;border:0 solid #e6e6e6;border-radius:3px;box-shadow:none;background:#fff;overflow:hidden}.next-card-noborder{border:0}.next-card-head{background:#fff;padding-left:24px;padding-right:24px}.next-card-head-show-bullet .next-card-title{padding-left:8px}.next-card-head-show-bullet .next-card-title:before{content:"";display:inline-block;height:16px;width:3px;background:#209bfa;position:absolute;left:0;top:calc(50% - 8px)}.next-card-head-main{position:relative;margin-top:0;margin-bottom:0;height:64px;line-height:64px}.next-card-title{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80%;height:100%;color:#333;font-size:16px;font-weight:400}.next-card-subtitle{font-size:12px;color:#666;padding-left:8px}.next-card-extra{position:absolute;right:0;top:0;height:100%;font-size:14px;color:#298dff}.next-card-body{padding-bottom:20px;padding-left:24px;padding-right:24px}.next-card-show-divider>.next-card-head>.next-card-head-main{border-bottom:1px solid #eee}.next-card-show-divider>.next-card-body{padding-top:20px}.next-card-hide-divider>.next-card-body{padding-top:0}.next-card-free{padding:0}.next-card-content{overflow:hidden;transition:all .3s ease;position:relative}.next-card-footer .next-icon{transition:all .1s linear}.next-card-footer .next-icon.next-icon-arrow-down.expand{transform-origin:50% 47%;transform:rotate(180deg)}.next-card-header{background:#fff;padding:0 24px;margin-bottom:20px;margin-top:20px}.next-card-media,.next-card-media>*{display:block;background-size:cover;background-repeat:no-repeat;background-position:50%;object-fit:cover;width:100%}.next-card-header-titles{overflow:hidden}.next-card-header-extra{float:right;text-align:right}.next-card-header-extra .next--btn{margin-left:12px;vertical-align:middle}.next-card-header-title{color:#333;font-size:16px;font-weight:400;line-height:1.5}.next-card-header-subtitle{font-size:12px;color:#666}.next-card-actions{display:block;padding:20px 24px}.next-card-actions .next-btn:not(:last-child){margin-right:12px;vertical-align:middle}.next-card-divider{border-style:none;width:100%;margin:0;position:relative;overflow:visible}.next-card-divider:before{content:"";display:block;border-bottom:1px solid #eee}.next-card-divider--inset{padding:0 24px}.next-card-content-container{margin-top:20px;padding-bottom:20px;padding-left:24px;padding-right:24px;font-size:14px;line-height:1.5;color:#666}.next-cascader{display:inline-block;overflow:auto;border:1px solid #e6e6e6;border-radius:3px}.next-cascader,.next-cascader *,.next-cascader :after,.next-cascader :before{box-sizing:border-box}.next-cascader-inner:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-cascader-menu-wrapper{float:left;overflow:auto;width:auto;min-width:100px;height:192px;overflow-x:hidden;overflow-y:auto}.next-cascader-menu-wrapper+.next-cascader-menu-wrapper{border-left:1px solid #e6e6e6}.next-cascader-menu{position:relative;padding:0;border:none;border-radius:0;box-shadow:none;min-width:auto;min-height:100%}.next-cascader-menu.next-has-right-border{border-right:1px solid #e6e6e6}.next-cascader-menu-item.next-expanded{color:#333;background-color:#f9f9f9}.next-cascader-menu-icon-right{position:absolute;top:0;right:10px;color:#666}.next-cascader-menu-icon-right:hover{color:#333}.next-cascader-menu-icon-expand.next-icon .next-icon-remote,.next-cascader-menu-icon-expand.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-cascader-menu-icon-loading.next-icon .next-icon-remote,.next-cascader-menu-icon-loading.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-cascader-menu-item.next-expanded .next-cascader-menu-icon-right{color:#333}.next-cascader-menu-item.next-expanded .next-cascader-menu-icon-loading{color:#209bfa}.next-cascader-filtered-list{height:192px;padding:0;border:none;border-radius:0;box-shadow:none;overflow:auto}.next-cascader-filtered-list .next-menu-item-inner{overflow:visible}.next-cascader-filtered-item em{color:#209bfa;font-style:normal}.next-cascader[dir=rtl] .next-cascader-menu-wrapper{float:right;border-left:none;border-right:1px solid #e6e6e6}.next-cascader[dir=rtl] .next-cascader-menu-wrapper:first-child{border-right:none}.next-cascader[dir=rtl] .next-cascader-menu.next-has-right-border{border-right:none;border-left:1px solid #e6e6e6}.next-cascader[dir=rtl] .next-cascader-menu-icon-right{right:auto;left:10px}.next-cascader-select,.next-cascader-select *,.next-cascader-select :after,.next-cascader-select :before{box-sizing:border-box}.next-cascader-select-dropdown{box-sizing:border-box;border:1px solid #e6e6e6;border-radius:3px;box-shadow:none}.next-cascader-select-dropdown *,.next-cascader-select-dropdown :after,.next-cascader-select-dropdown :before{box-sizing:border-box}.next-cascader-select-dropdown .next-cascader{display:block;border:none;box-shadow:none}.next-cascader-select-not-found{padding:0;border:none;box-shadow:none;overflow:auto;color:#999}.next-cascader-select-not-found .next-menu-item:hover{color:#999;background:#fff;cursor:default}.next-checkbox-wrapper[dir=rtl]{margin-right:8px;margin-left:0}.next-checkbox-wrapper[dir=rtl]:first-child{margin-right:0}.next-checkbox-wrapper[dir=rtl]>.next-checkbox-label{margin-right:4px;margin-left:0}.next-checkbox-wrapper{box-sizing:border-box;display:inline-block}.next-checkbox-wrapper *,.next-checkbox-wrapper :after,.next-checkbox-wrapper :before{box-sizing:border-box}.next-checkbox-wrapper .next-checkbox{display:inline-block;position:relative;line-height:1;vertical-align:middle}.next-checkbox-wrapper input[type=checkbox]{opacity:0;position:absolute;top:0;left:0;width:16px;height:16px;margin:0;cursor:pointer}.next-checkbox-wrapper .next-checkbox-inner{display:block;width:16px;height:16px;background:#fff;border-radius:3px;border:1px solid #ddd;transition:all .1s linear;text-align:left;box-shadow:none}.next-checkbox-wrapper .next-checkbox-inner>.next-icon{transform:scale(0);position:absolute;top:0;opacity:0;line-height:16px;transition:all .1s linear;color:#fff;left:2px;margin-left:0}.next-checkbox-wrapper .next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper .next-checkbox-inner>.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-checkbox-wrapper .next-checkbox-inner>.next-icon:before{vertical-align:top;margin-top:0}.next-checkbox-wrapper .next-checkbox-inner>.next-checkbox-select-icon:before{content:""}.next-checkbox-wrapper .next-checkbox-inner>.next-checkbox-semi-select-icon:before{content:""}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner{border-color:transparent;background-color:#209bfa}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner.hovered,.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner:hover,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner.hovered,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner:hover{border-color:transparent}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon{opacity:1;transform:scale(1);margin-left:0}.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.checked.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.checked>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner{border-color:transparent;background-color:#209bfa}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner.hovered,.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner:hover,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner.hovered,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner:hover{border-color:transparent}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon{opacity:1;transform:scaleX(1);margin-left:0}.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.indeterminate.focused>.next-checkbox>.next-checkbox-inner>.next-icon:before,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon .next-icon-remote,.next-checkbox-wrapper.indeterminate>.next-checkbox>.next-checkbox-inner>.next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-checkbox-wrapper.focused>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper.hovered>.next-checkbox>.next-checkbox-inner,.next-checkbox-wrapper:not(.disabled):hover>.next-checkbox>.next-checkbox-inner{border-color:#209bfa;background-color:#add9ff}.next-checkbox-wrapper.focused .next-checkbox-label,.next-checkbox-wrapper.hovered .next-checkbox-label,.next-checkbox-wrapper:not(.disabled):hover .next-checkbox-label{cursor:pointer}.next-checkbox-wrapper.checked:not(.disabled).hovered>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.checked:not(.disabled):hover>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.indeterminate:not(.disabled).hovered>.next-checkbox .next-checkbox-inner,.next-checkbox-wrapper.indeterminate:not(.disabled):hover>.next-checkbox .next-checkbox-inner{border-color:transparent;background-color:#1274e7}.next-checkbox-wrapper.checked:not(.disabled).hovered>.next-checkbox .next-checkbox-inner>.next-icon,.next-checkbox-wrapper.checked:not(.disabled):hover>.next-checkbox .next-checkbox-inner>.next-icon,.next-checkbox-wrapper.indeterminate:not(.disabled).hovered>.next-checkbox .next-checkbox-inner>.next-icon,.next-checkbox-wrapper.indeterminate:not(.disabled):hover>.next-checkbox .next-checkbox-inner>.next-icon{color:#fff;opacity:1}.next-checkbox-wrapper.disabled input[type=checkbox]{cursor:not-allowed}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner,.next-checkbox-wrapper.disabled .next-checkbox-inner{border-color:#eee;background:#fafafa}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner.hovered,.next-checkbox-wrapper.disabled.checked .next-checkbox-inner:hover,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner.hovered,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner:hover{border-color:#eee}.next-checkbox-wrapper.disabled.checked .next-checkbox-inner>.next-icon,.next-checkbox-wrapper.disabled.indeterminate .next-checkbox-inner>.next-icon{color:#ccc;opacity:1}.next-checkbox-wrapper.disabled.checked.focused .next-checkbox-inner{border-color:#eee;background:#fafafa}.next-checkbox-wrapper.disabled.checked.focused .next-checkbox-inner>.next-icon{color:#ccc;opacity:1}.next-checkbox-wrapper.disabled .next-checkbox-label{color:#ccc;cursor:not-allowed}.next-checkbox-group .next-checkbox-wrapper{display:inline-block;margin-right:12px}.next-checkbox-group .next-checkbox-wrapper:last-child{margin-right:0}.next-checkbox-group-ver .next-checkbox-wrapper{display:block;margin-left:0;margin-right:0;margin-bottom:8px}.next-checkbox-label{font-size:14px;color:#333;vertical-align:middle;margin:0 4px;line-height:1}.next-collapse[dir=rtl] .next-collapse-panel-title{padding:8px 36px 8px 0}.next-collapse[dir=rtl] .next-collapse-panel-icon{left:inherit;right:12px;transform:rotate(180deg);margin-left:0;margin-right:0}.next-collapse[dir=rtl] .next-collapse-panel-icon .next-icon-remote,.next-collapse[dir=rtl] .next-collapse-panel-icon:before{width:16px;font-size:16px;line-height:inherit}.next-collapse{border:1px solid #e6e6e6;border-radius:3px}.next-collapse,.next-collapse *,.next-collapse :after,.next-collapse :before{box-sizing:border-box}.next-collapse:focus,.next-collapse :focus{outline:0}.next-collapse-panel:not(:first-child){border-top:1px solid #e6e6e6}.next-collapse .next-collapse-panel-icon{position:absolute;color:#333;transition:transform .1s linear;left:12px;margin-top:-2px;margin-left:0;margin-right:0}.next-collapse .next-collapse-panel-icon .next-icon-remote,.next-collapse .next-collapse-panel-icon:before{width:16px;font-size:16px;line-height:inherit}.next-collapse-panel-title{position:relative;line-height:1.5;background:#f9f9f9;font-size:14px;font-weight:400;color:#333;cursor:pointer;padding:8px 0 8px 36px;transition:background .1s linear}.next-collapse-panel-title:hover{background:#f5f5f5;color:#333;font-weight:400}.next-collapse-panel-title:hover .next-collapse-panel-icon{color:#333}.next-collapse-panel-content{height:0;line-height:1.5;padding:0 16px;background:#fff;font-size:14px;color:#666;transition:all .3s ease;opacity:0}.next-collapse-panel-expanded>.next-collapse-panel-content{display:block;padding:12px 16px;height:auto;opacity:1}.next-collapse .next-collapse-unfold-icon:before{content:""}.next-collapse-panel-hidden>.next-collapse-panel-content{overflow:hidden}.next-collapse .next-collapse-panel-icon:before{content:""}.next-collapse .next-collapse-panel-icon.next-collapse-panel-icon-expanded{transform:rotate(90deg);margin-left:0;margin-right:0}.next-collapse .next-collapse-panel-icon.next-collapse-panel-icon-expanded .next-icon-remote,.next-collapse .next-collapse-panel-icon.next-collapse-panel-icon-expanded:before{width:16px;font-size:16px;line-height:inherit}.next-collapse-disabled,.next-collapse-panel-disabled:not(:first-child){border-color:#eee}.next-collapse-panel-disabled>.next-collapse-panel-title{cursor:not-allowed;color:#ccc;background:#f9f9f9}.next-collapse-panel-disabled .next-collapse-panel-icon{color:#ccc}.next-collapse-panel-disabled .next-collapse-panel-title:hover{font-weight:400}.next-collapse-panel-disabled .next-collapse-panel-title:hover .next-collapse-panel-icon{color:#ccc}.next-collapse-panel-disabled:hover{color:#ccc;background:#f9f9f9}.next-time-picker-menu{float:left;text-align:center}.next-time-picker-menu:not(:last-child){border-right:1px solid #ddd}.next-time-picker-menu-title{cursor:default;height:28px;line-height:28px;font-size:12px;font-weight:400;color:#999;background:#fff}.next-time-picker-menu ul{position:relative;overflow-y:auto;list-style:none;margin:0;padding:0;font-size:12px;height:196px}.next-time-picker-menu-item{cursor:pointer;height:28px;line-height:28px;transition:background .1s linear;color:#666;background:#fff;outline:none}.next-time-picker-menu-item:hover{color:#333;background:#f9f9f9}.next-time-picker-menu-item.next-selected{font-weight:700;color:#666;background:#f9f9f9}.next-time-picker-menu-item.next-disabled{cursor:not-allowed;color:#ccc;background:#fff}.next-time-picker-panel,.next-time-picker-panel *,.next-time-picker-panel :after,.next-time-picker-panel :before{box-sizing:border-box}.next-time-picker-panel:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-time-picker-panel-header{border-bottom:1px solid #e6e6e6}.next-time-picker-panel-input.next-input{width:100%;padding:6px;border-color:transparent;vertical-align:middle}.next-time-picker-panel-col-3 .next-time-picker-menu{width:33.3333333333%}.next-time-picker-panel-col-2 .next-time-picker-menu{width:50%}.next-time-picker-panel-col-1 .next-time-picker-menu{width:100%}.next-time-picker-body[dir=rtl] .next-time-picker-menu{float:right}.next-time-picker-body[dir=rtl] .next-time-picker-menu:not(:last-child){border-right:none;border-left:1px solid #ddd}.next-time-picker{display:inline-block;width:200px}.next-time-picker,.next-time-picker *,.next-time-picker :after,.next-time-picker :before{box-sizing:border-box}.next-time-picker-trigger .next-input{width:100%}.next-time-picker-body{overflow:hidden;width:200px;border:1px solid #e6e6e6;border-radius:3px;background:#fff;box-shadow:none}.next-time-picker-symbol-clock-icon:before{content:""}.next-range-picker-panel-input-separator,.next-range-picker-trigger-separator{cursor:default;display:inline-block;text-align:center;color:#ccc;width:16px;font-size:12px;vertical-align:middle}.next-date-picker,.next-month-picker,.next-week-picker,.next-year-picker{display:inline-block;width:200px}.next-date-picker-input,.next-month-picker-input,.next-week-picker-input,.next-year-picker-input{width:100%}.next-date-picker-body,.next-month-picker-body,.next-week-picker-body,.next-year-picker-body{width:288px}.next-date-picker-panel-input.next-input,.next-month-picker-panel-input.next-input,.next-week-picker-panel-input.next-input,.next-year-picker-panel-input.next-input{width:100%;background:transparent}.next-date-picker-body.next-date-picker-body-show-time .next-date-picker-panel-input.next-input{width:49%}.next-date-picker-body.next-date-picker-body-show-time .next-date-picker-panel-input.next-input:first-child{margin-right:2%}.next-range-picker{display:inline-block;width:336px}.next-range-picker-input{width:100%}.next-range-picker-trigger{border:1px solid #ddd;background-color:#fff}.next-range-picker-trigger:hover{border-color:#ccc;background-color:#fff}.next-range-picker-trigger.next-error{border-color:#d23c26}.next-range-picker-trigger-input.next-input{height:auto;width:calc(50% - 8px)}.next-range-picker.next-disabled .next-range-picker-trigger{color:#ccc;border-color:#eee;background-color:#fafafa;cursor:not-allowed}.next-range-picker.next-disabled .next-range-picker-trigger:hover{border-color:#eee;background-color:#fafafa}.next-range-picker.next-large .next-range-picker-panel-input,.next-range-picker.next-large .next-range-picker-trigger,.next-range-picker.next-medium .next-range-picker-panel-input,.next-range-picker.next-medium .next-range-picker-trigger,.next-range-picker.next-small .next-range-picker-panel-input,.next-range-picker.next-small .next-range-picker-trigger{border-radius:3px}.next-range-picker-body{width:600px}.next-range-picker-panel-input-end-date.next-input,.next-range-picker-panel-input-start-date.next-input{width:calc(50% - 8px)}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-end-date,.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-end-time,.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-start-date,.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-start-time{width:calc(25% - 8px)}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-start-date{margin-right:8px}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-input-end-time{margin-left:8px}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time-end,.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time-start{width:50%;float:left}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time-start{border-right:1px solid #e6e6e6}.next-range-picker-body.next-range-picker-body-show-time .next-range-picker-panel-time-end{border-left:1px solid #e6e6e6}.next-date-picker-body[dir=rtl] .next-date-picker-panel-footer{text-align:left}.next-date-picker-body[dir=rtl] .next-date-picker-panel-footer>.next-btn:not(:last-child){margin-right:0;margin-left:16px}.next-date-picker-body[dir=rtl].next-date-picker-body-show-time .next-date-picker-panel-input.next-input:first-child{margin-left:2%;margin-right:0}.next-date-picker-body[dir=rtl].next-date-picker-body-show-time .next-time-picker-menu{float:right}.next-date-picker-body[dir=rtl].next-date-picker-body-show-time .next-time-picker-menu:not(:last-child){border-right:none;border-left:1px solid #ddd}.next-range-picker-body[dir=rtl] .next-range-picker-panel-input{text-align:right}.next-range-picker-body[dir=rtl] .next-date-picker-panel-footer{text-align:left}.next-range-picker-body[dir=rtl] .next-date-picker-panel-footer>.next-btn:not(:last-child){margin-right:0;margin-left:16px}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-input-start-date{margin-right:0;margin-left:8px}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-input-end-time{margin-left:0;margin-right:8px}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-time-end,.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-time-start{float:right}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-time-start{border-right:none;border-left:1px solid #e6e6e6}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-range-picker-panel-time-end{border-left:none;border-right:1px solid #e6e6e6}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-time-picker-menu{float:right}.next-range-picker-body[dir=rtl].next-range-picker-body-show-time .next-time-picker-menu:not(:last-child){border-right:none;border-left:1px solid #ddd}.next-date-picker,.next-date-picker *,.next-date-picker :after,.next-date-picker :before,.next-month-picker,.next-month-picker *,.next-month-picker :after,.next-month-picker :before,.next-range-picker,.next-range-picker *,.next-range-picker :after,.next-range-picker :before,.next-week-picker,.next-week-picker *,.next-week-picker :after,.next-week-picker :before,.next-year-picker,.next-year-picker *,.next-year-picker :after,.next-year-picker :before{box-sizing:border-box}.next-date-picker-body,.next-month-picker-body,.next-range-picker-body,.next-week-picker-body,.next-year-picker-body{border:1px solid #e6e6e6;border-radius:3px;box-shadow:none;background:#fff}.next-date-picker-panel-header,.next-month-picker-panel-header,.next-range-picker-panel-header,.next-week-picker-panel-header,.next-year-picker-panel-header{padding:6px;text-align:center}.next-date-picker-panel-time,.next-month-picker-panel-time,.next-range-picker-panel-time,.next-week-picker-panel-time,.next-year-picker-panel-time{border-top:1px solid #e6e6e6}.next-date-picker-panel-footer,.next-month-picker-panel-footer,.next-range-picker-panel-footer,.next-week-picker-panel-footer,.next-year-picker-panel-footer{text-align:right;padding:8px 20px;border-top:1px solid #e6e6e6}.next-date-picker-panel-footer>.next-btn:not(:last-child),.next-date-picker-panel-tools>.next-btn:not(:last-child),.next-month-picker-panel-footer>.next-btn:not(:last-child),.next-month-picker-panel-tools>.next-btn:not(:last-child),.next-range-picker-panel-footer>.next-btn:not(:last-child),.next-range-picker-panel-tools>.next-btn:not(:last-child),.next-week-picker-panel-footer>.next-btn:not(:last-child),.next-week-picker-panel-tools>.next-btn:not(:last-child),.next-year-picker-panel-footer>.next-btn:not(:last-child),.next-year-picker-panel-tools>.next-btn:not(:last-child){margin-right:16px}.next-date-picker-panel-tools,.next-month-picker-panel-tools,.next-range-picker-panel-tools,.next-week-picker-panel-tools,.next-year-picker-panel-tools{float:left}.next-date-picker .next-calendar-panel-header,.next-month-picker .next-calendar-panel-header,.next-range-picker .next-calendar-panel-header,.next-week-picker .next-calendar-panel-header,.next-year-picker .next-calendar-panel-header{margin-left:-1px;margin-right:-1px}.next-date-picker .next-input input,.next-month-picker .next-input input,.next-range-picker .next-input input,.next-week-picker .next-input input,.next-year-picker .next-input input{vertical-align:baseline}.next-date-picker-symbol-calendar-icon:before,.next-month-picker-symbol-calendar-icon:before,.next-range-picker-symbol-calendar-icon:before,.next-week-picker-symbol-calendar-icon:before,.next-year-picker-symbol-calendar-icon:before{content:""}.next-range-picker-panel-body .next-calendar{display:inline-block;width:50%}.next-message{position:relative;display:block;vertical-align:baseline;animation-duration:.3s;animation-timing-function:ease-in-out}.next-message,.next-message *,.next-message :after,.next-message :before{box-sizing:border-box}.next-message:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-message .next-message-close{color:#999;font-size:0;position:absolute;cursor:pointer}.next-message .next-message-close .next-icon-close{width:12px;height:12px;line-height:1em}.next-message .next-message-close .next-icon-close:before{width:12px;height:12px;font-size:12px;line-height:1em}.next-message .next-message-close:hover{color:#666}.next-message.next-message-success.next-inline{background-color:#e5fff5;border-color:#e5fff5;box-shadow:none;border-style:solid}.next-message.next-message-success.next-inline .next-message-title{color:#333}.next-message.next-message-success.next-inline .next-message-content{color:#666}.next-message.next-message-success.next-inline .next-message-symbol{color:#1ad78c}.next-message.next-message-success.next-inline .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-success.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-success.next-addon .next-message-title{color:#333}.next-message.next-message-success.next-addon .next-message-content{color:#666}.next-message.next-message-success.next-addon .next-message-symbol{color:#1ad78c}.next-message.next-message-success.next-addon .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-success.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-success.next-toast .next-message-title{color:#333}.next-message.next-message-success.next-toast .next-message-content{color:#666}.next-message.next-message-success.next-toast .next-message-symbol{color:#1ad78c}.next-message.next-message-success.next-toast .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-warning.next-inline{background-color:#fff9e0;border-color:#fff9e0;box-shadow:none;border-style:solid}.next-message.next-message-warning.next-inline .next-message-title{color:#333}.next-message.next-message-warning.next-inline .next-message-content{color:#666}.next-message.next-message-warning.next-inline .next-message-symbol{color:#f1c826}.next-message.next-message-warning.next-inline .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-warning.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-warning.next-addon .next-message-title{color:#333}.next-message.next-message-warning.next-addon .next-message-content{color:#666}.next-message.next-message-warning.next-addon .next-message-symbol{color:#f1c826}.next-message.next-message-warning.next-addon .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-warning.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-warning.next-toast .next-message-title{color:#333}.next-message.next-message-warning.next-toast .next-message-content{color:#666}.next-message.next-message-warning.next-toast .next-message-symbol{color:#f1c826}.next-message.next-message-warning.next-toast .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-error.next-inline{background-color:#ffece4;border-color:#ffece4;box-shadow:none;border-style:solid}.next-message.next-message-error.next-inline .next-message-title{color:#333}.next-message.next-message-error.next-inline .next-message-content{color:#666}.next-message.next-message-error.next-inline .next-message-symbol{color:#d23c26}.next-message.next-message-error.next-inline .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-error.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-error.next-addon .next-message-title{color:#333}.next-message.next-message-error.next-addon .next-message-content{color:#666}.next-message.next-message-error.next-addon .next-message-symbol{color:#d23c26}.next-message.next-message-error.next-addon .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-error.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-error.next-toast .next-message-title{color:#333}.next-message.next-message-error.next-toast .next-message-content{color:#666}.next-message.next-message-error.next-toast .next-message-symbol{color:#d23c26}.next-message.next-message-error.next-toast .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-notice.next-inline{background-color:#e4f3fe;border-color:#e4f3fe;box-shadow:none;border-style:solid}.next-message.next-message-notice.next-inline .next-message-title{color:#333}.next-message.next-message-notice.next-inline .next-message-content{color:#666}.next-message.next-message-notice.next-inline .next-message-symbol{color:#298dff}.next-message.next-message-notice.next-inline .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-notice.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-notice.next-addon .next-message-title{color:#333}.next-message.next-message-notice.next-addon .next-message-content{color:#666}.next-message.next-message-notice.next-addon .next-message-symbol{color:#298dff}.next-message.next-message-notice.next-addon .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-notice.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-notice.next-toast .next-message-title{color:#333}.next-message.next-message-notice.next-toast .next-message-content{color:#666}.next-message.next-message-notice.next-toast .next-message-symbol{color:#298dff}.next-message.next-message-notice.next-toast .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-help.next-inline{background-color:#fff9e0;border-color:#fff9e0;box-shadow:none;border-style:solid}.next-message.next-message-help.next-inline .next-message-title{color:#333}.next-message.next-message-help.next-inline .next-message-content{color:#666}.next-message.next-message-help.next-inline .next-message-symbol{color:#f1c826}.next-message.next-message-help.next-inline .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-help.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-help.next-addon .next-message-title{color:#333}.next-message.next-message-help.next-addon .next-message-content{color:#666}.next-message.next-message-help.next-addon .next-message-symbol{color:#f1c826}.next-message.next-message-help.next-addon .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-help.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-help.next-toast .next-message-title{color:#333}.next-message.next-message-help.next-toast .next-message-content{color:#666}.next-message.next-message-help.next-toast .next-message-symbol{color:#f1c826}.next-message.next-message-help.next-toast .next-message-symbol-icon:before{vertical-align:top;content:""}.next-message.next-message-loading.next-inline{background-color:#fff;border-color:#fff;box-shadow:none;border-style:solid}.next-message.next-message-loading.next-inline .next-message-title{color:#333}.next-message.next-message-loading.next-inline .next-message-content{color:#666}.next-message.next-message-loading.next-inline .next-message-symbol{color:#209bfa}.next-message.next-message-loading.next-inline .next-message-symbol-icon:before{vertical-align:top;content:"";animation:loadingCircle 1s linear infinite}.next-message.next-message-loading.next-addon{background-color:transparent;border-color:transparent;box-shadow:none;border-style:solid}.next-message.next-message-loading.next-addon .next-message-title{color:#333}.next-message.next-message-loading.next-addon .next-message-content{color:#666}.next-message.next-message-loading.next-addon .next-message-symbol{color:#209bfa}.next-message.next-message-loading.next-addon .next-message-symbol-icon:before{vertical-align:top;content:"";animation:loadingCircle 1s linear infinite}.next-message.next-message-loading.next-toast{background-color:#fff;border-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);border-style:solid}.next-message.next-message-loading.next-toast .next-message-title{color:#333}.next-message.next-message-loading.next-toast .next-message-content{color:#666}.next-message.next-message-loading.next-toast .next-message-symbol{color:#209bfa}.next-message.next-message-loading.next-toast .next-message-symbol-icon:before{vertical-align:top;content:"";animation:loadingCircle 1s linear infinite}.next-message.next-medium{border-width:1px;padding:12px}.next-message.next-medium .next-message-symbol{float:left;line-height:16px}.next-message.next-medium .next-message-symbol .next-icon-remote,.next-message.next-medium .next-message-symbol:before{width:16px;font-size:16px;line-height:inherit}.next-message.next-medium .next-message-title{padding:0 20px 0 24px;font-size:16px;line-height:16px}.next-message.next-medium .next-message-content{margin-top:8px;padding:0 20px 0 24px;font-size:14px;line-height:1.5}.next-message.next-medium .next-message-symbol+.next-message-content{margin-top:0}.next-message.next-medium.next-only-content .next-message-content,.next-message.next-medium.next-title-content .next-message-title{line-height:16px}.next-message.next-medium .next-message-close{top:12px;right:12px}.next-message.next-medium.next-inline,.next-message.next-medium.next-toast{border-radius:3px}.next-message.next-large{border-width:2px;padding:16px}.next-message.next-large .next-message-symbol{float:left;line-height:24px}.next-message.next-large .next-message-symbol .next-icon-remote,.next-message.next-large .next-message-symbol:before{width:24px;font-size:24px;line-height:inherit}.next-message.next-large .next-message-title{padding:0 20px 0 36px;font-size:20px;line-height:20px}.next-message.next-large .next-message-content{margin-top:8px;padding:0 20px 0 36px;font-size:14px;line-height:1.5}.next-message.next-large .next-message-symbol+.next-message-content{margin-top:0}.next-message.next-large.next-only-content .next-message-content,.next-message.next-large.next-title-content .next-message-title{line-height:24px}.next-message.next-large .next-message-close{top:16px;right:16px}.next-message.next-large.next-inline,.next-message.next-large.next-toast{border-radius:3px}.next-message[dir=rtl] .next-message-symbol{float:right}.next-message[dir=rtl].next-medium .next-message-title{padding:0 24px 0 20px}.next-message[dir=rtl].next-medium .next-message-close{left:12px;right:auto}.next-message[dir=rtl].next-large .next-message-title{padding:0 36px 0 20px}.next-message[dir=rtl].next-large .next-message-close{left:16px;right:auto}.next-message-wrapper-v2{margin:0;padding:0;position:fixed;left:0;z-index:1001;width:100%;pointer-events:none}.next-message-list{padding:8px;text-align:center}.next-message-list .next-message{display:inline-block;pointer-events:all}.next-message-fade-leave{animation-duration:.3s;animation-play-state:paused;animation-fill-mode:both;animation-timing-function:ease}.next-message-fade-leave.next-message-fade-leave-active{animation-name:MessageFadeOut;animation-play-state:running}@keyframes MessageFadeOut{0%{max-height:150px;margin-bottom:16px;opacity:1}to{max-height:0;margin-bottom:0;padding-top:0;padding-bottom:0;opacity:0}}.next-dialog[dir=rtl],.next-dialog[dir=rtl] .next-dialog-footer.next-align-left{text-align:right}.next-dialog[dir=rtl] .next-dialog-footer.next-align-center{text-align:center}.next-dialog[dir=rtl] .next-dialog-footer.next-align-right{text-align:left}.next-dialog[dir=rtl] .next-dialog-btn+.next-dialog-btn{margin-right:4px;margin-left:0}.next-dialog[dir=rtl] .next-dialog-close{left:12px;right:auto}.next-dialog{position:fixed;z-index:1001;background:#fff;border:1px solid #e6e6e6;border-radius:6px;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);text-align:left;overflow:hidden;max-width:90%}.next-dialog,.next-dialog *,.next-dialog :after,.next-dialog :before{box-sizing:border-box}.next-dialog-header{padding:12px 20px;border-bottom:0 solid transparent;font-size:16px;font-weight:400;background:transparent;color:#333}.next-dialog-body{padding:20px;font-size:14px;line-height:1.5;color:#666}.next-dialog-body-no-footer{margin-bottom:0}.next-dialog-body-no-padding{padding:0}.next-dialog-footer{padding:12px 20px;border-top:0 solid transparent;background:transparent}.next-dialog-footer.next-align-left{text-align:left}.next-dialog-footer.next-align-center{text-align:center}.next-dialog-footer.next-align-right{text-align:right}.next-dialog-footer-fixed-height{position:absolute;width:100%;bottom:0}.next-dialog-btn+.next-dialog-btn{margin-left:4px}.next-dialog-close{position:absolute;top:12px;right:12px;width:16px;cursor:pointer}.next-dialog-close,.next-dialog-close:link,.next-dialog-close:visited{height:16px;color:#999}.next-dialog-close:hover{background:transparent;color:#333}.next-dialog-close .next-dialog-close-icon.next-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px;width:16px;height:16px;line-height:1em}.next-dialog-close .next-dialog-close-icon.next-icon:before{width:16px;height:16px;font-size:16px;line-height:1em}.next-dialog-container{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1001;padding:40px;overflow:auto;text-align:center;box-sizing:border-box}.next-dialog-container:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.next-dialog-container .next-dialog{display:inline-block;position:relative;vertical-align:middle}.next-dialog-quick .next-dialog-body{padding:20px}.next-dialog .next-dialog-message.next-message{min-width:300px;padding:0}.next-dialog-wrapper{position:fixed;top:0;left:0;bottom:0;right:0;overflow:auto}.next-dialog-inner-wrapper{display:flex;position:relative;top:100px;pointer-events:none;padding-bottom:24px}.next-dialog-v2{pointer-events:auto;margin:0 auto}.next-dialog-v2 .next-dialog-header{word-break:break-word;padding-right:40px}.next-dialog-v2 .next-dialog-body{padding-right:40px}.next-dialog-v2 .next-dialog-header+.next-dialog-body{padding:20px}.next-dialog-v2 .next-dialog-header+.next-dialog-body-no-footer{margin-bottom:0}.next-dialog-v2 .next-dialog-body.next-dialog-body-no-padding{padding:0}.next-dialog.next-dialog-v2{position:relative}.next-dialog-centered{text-align:center}.next-dialog-centered:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:""}.next-dialog-centered .next-dialog-v2{margin:40px 0;display:inline-block;text-align:left;vertical-align:middle}.next-drawer{position:fixed;z-index:1001;background:#fff;border:1px solid #e6e6e6;box-shadow:0 4px 8px 0 rgba(0,0,0,.12);overflow:auto;animation-duration:.3s;animation-timing-function:ease-in-out}.next-drawer,.next-drawer *,.next-drawer :after,.next-drawer :before{box-sizing:border-box}.next-drawer-left,.next-drawer-right{height:100%;max-width:80%;width:240px}.next-drawer-bottom,.next-drawer-top{width:100%}.next-drawer-header{padding:12px 20px;border-bottom:1px solid #e6e6e6;font-size:16px;background:#fff;color:#333}.next-drawer-no-title{padding:0;border-bottom:0}.next-drawer-body{padding:20px;font-size:14px;line-height:1.5;color:#666}.next-drawer-close{position:absolute;top:12px;right:12px;width:16px;cursor:pointer}.next-drawer-close,.next-drawer-close:link,.next-drawer-close:visited{height:16px;color:#999}.next-drawer-close:hover{background:transparent;color:#333}.next-drawer-close .next-drawer-close-icon.next-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px;width:16px;height:16px;line-height:1em}.next-drawer-close .next-drawer-close-icon.next-icon:before{width:16px;height:16px;font-size:16px;line-height:1em}.next-drawer-wrapper{position:fixed}.next-drawer-wrapper .next-drawer-v2{position:static;width:100%;height:100%}.next-drawer-wrapper .next-drawer-content{display:flex;flex-flow:column nowrap;width:100%;height:100%}.next-drawer-wrapper .next-drawer-header{display:flex;align-items:center;justify-content:space-between}.next-drawer-wrapper .next-drawer-body{flex-grow:1;overflow:auto;word-wrap:break-word;font-size:14px}.next-drawer-wrapper.next-drawer-right{width:400px;right:0;top:0;height:100%}.next-drawer-wrapper.next-drawer-right .next-drawer-v2{height:100%}.next-drawer-wrapper.next-drawer-left{width:400px;left:0;top:0;height:100%}.next-drawer-wrapper.next-drawer-left .next-drawer-v2{height:100%}.next-drawer-wrapper.next-drawer-top{height:400px;left:0;top:0;width:100%}.next-drawer-wrapper.next-drawer-top .next-drawer-v2{width:100%}.next-drawer-wrapper.next-drawer-bottom{height:400px;left:0;bottom:0;width:100%}.next-drawer-wrapper.next-drawer-bottom .next-drawer-v2{width:100%}.next-row{display:flex}.next-row,.next-row *,.next-row :after,.next-row :before{box-sizing:border-box}.next-row.next-row-wrap{flex-wrap:wrap}@media(min-width:320px){.next-row.next-row-fixed{width:320px}}@media(min-width:480px){.next-row.next-row-fixed{width:480px}}@media(min-width:720px){.next-row.next-row-fixed{width:720px}}@media(min-width:990px){.next-row.next-row-fixed{width:990px}}@media(min-width:1200px){.next-row.next-row-fixed{width:1200px}}@media(min-width:1500px){.next-row.next-row-fixed{width:1500px}}.next-row.next-row-fixed-xxs{width:320px}.next-row.next-row-fixed-xs{width:480px}.next-row.next-row-fixed-s{width:720px}.next-row.next-row-fixed-m{width:990px}.next-row.next-row-fixed-l{width:1200px}.next-row.next-row-fixed-xl{width:1500px}.next-row.next-row-justify-start{justify-content:flex-start}.next-row.next-row-justify-end{justify-content:flex-end}.next-row.next-row-justify-center{justify-content:center}.next-row.next-row-justify-space-between{justify-content:space-between}.next-row.next-row-justify-space-around{justify-content:space-around}.next-row.next-row-align-top{align-items:flex-start}.next-row.next-row-align-bottom{align-items:flex-end}.next-row.next-row-align-center{align-items:center}.next-row.next-row-align-baseline{align-items:baseline}.next-row.next-row-align-stretch{align-items:stretch}.next-col{flex:1}.next-col.next-col-top{align-self:flex-start}.next-col.next-col-bottom{align-self:flex-end}.next-col.next-col-center{align-self:center}@media (min-width:0\0)and (min-resolution:0.001dpcm){.next-row{display:table;width:100%}.next-col{display:table-cell;vertical-align:top}}.next-col-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-24{flex:0 0 100%;width:100%;max-width:100%}@media(min-width:320px){.next-col-xxs-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-xxs-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-xxs-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-xxs-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-xxs-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-xxs-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-xxs-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-xxs-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-xxs-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-xxs-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-xxs-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-xxs-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-xxs-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-xxs-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-xxs-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-xxs-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-xxs-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-xxs-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-xxs-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-xxs-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-xxs-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-xxs-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-xxs-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-xxs-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:480px){.next-col-xs-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-xs-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-xs-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-xs-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-xs-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-xs-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-xs-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-xs-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-xs-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-xs-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-xs-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-xs-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-xs-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-xs-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-xs-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-xs-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-xs-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-xs-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-xs-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-xs-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-xs-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-xs-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-xs-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-xs-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:720px){.next-col-s-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-s-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-s-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-s-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-s-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-s-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-s-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-s-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-s-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-s-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-s-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-s-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-s-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-s-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-s-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-s-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-s-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-s-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-s-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-s-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-s-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-s-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-s-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-s-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:990px){.next-col-m-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-m-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-m-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-m-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-m-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-m-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-m-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-m-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-m-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-m-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-m-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-m-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-m-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-m-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-m-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-m-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-m-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-m-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-m-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-m-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-m-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-m-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-m-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-m-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:1200px){.next-col-l-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-l-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-l-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-l-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-l-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-l-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-l-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-l-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-l-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-l-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-l-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-l-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-l-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-l-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-l-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-l-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-l-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-l-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-l-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-l-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-l-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-l-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-l-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-l-24{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:1500px){.next-col-xl-1{flex:0 0 4.1666666667%;width:4.1666666667%;max-width:4.1666666667%}.next-col-xl-2{flex:0 0 8.3333333333%;width:8.3333333333%;max-width:8.3333333333%}.next-col-xl-3{flex:0 0 12.5%;width:12.5%;max-width:12.5%}.next-col-xl-4{flex:0 0 16.6666666667%;width:16.6666666667%;max-width:16.6666666667%}.next-col-xl-5{flex:0 0 20.8333333333%;width:20.8333333333%;max-width:20.8333333333%}.next-col-xl-6{flex:0 0 25%;width:25%;max-width:25%}.next-col-xl-7{flex:0 0 29.1666666667%;width:29.1666666667%;max-width:29.1666666667%}.next-col-xl-8{flex:0 0 33.3333333333%;width:33.3333333333%;max-width:33.3333333333%}.next-col-xl-9{flex:0 0 37.5%;width:37.5%;max-width:37.5%}.next-col-xl-10{flex:0 0 41.6666666667%;width:41.6666666667%;max-width:41.6666666667%}.next-col-xl-11{flex:0 0 45.8333333333%;width:45.8333333333%;max-width:45.8333333333%}.next-col-xl-12{flex:0 0 50%;width:50%;max-width:50%}.next-col-xl-13{flex:0 0 54.1666666667%;width:54.1666666667%;max-width:54.1666666667%}.next-col-xl-14{flex:0 0 58.3333333333%;width:58.3333333333%;max-width:58.3333333333%}.next-col-xl-15{flex:0 0 62.5%;width:62.5%;max-width:62.5%}.next-col-xl-16{flex:0 0 66.6666666667%;width:66.6666666667%;max-width:66.6666666667%}.next-col-xl-17{flex:0 0 70.8333333333%;width:70.8333333333%;max-width:70.8333333333%}.next-col-xl-18{flex:0 0 75%;width:75%;max-width:75%}.next-col-xl-19{flex:0 0 79.1666666667%;width:79.1666666667%;max-width:79.1666666667%}.next-col-xl-20{flex:0 0 83.3333333333%;width:83.3333333333%;max-width:83.3333333333%}.next-col-xl-21{flex:0 0 87.5%;width:87.5%;max-width:87.5%}.next-col-xl-22{flex:0 0 91.6666666667%;width:91.6666666667%;max-width:91.6666666667%}.next-col-xl-23{flex:0 0 95.8333333333%;width:95.8333333333%;max-width:95.8333333333%}.next-col-xl-24{flex:0 0 100%;width:100%;max-width:100%}}.next-col-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-5p5{flex:0 0 100%;width:100%;max-width:100%}@media(min-width:320px){.next-col-xxs-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-xxs-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-xxs-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-xxs-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-xxs-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:480px){.next-col-xs-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-xs-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-xs-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-xs-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-xs-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:720px){.next-col-s-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-s-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-s-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-s-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-s-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:990px){.next-col-m-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-m-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-m-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-m-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-m-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:1200px){.next-col-l-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-l-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-l-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-l-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-l-5p5{flex:0 0 100%;width:100%;max-width:100%}}@media(min-width:1500px){.next-col-xl-1p5{flex:0 0 20%;width:20%;max-width:20%}.next-col-xl-2p5{flex:0 0 40%;width:40%;max-width:40%}.next-col-xl-3p5{flex:0 0 60%;width:60%;max-width:60%}.next-col-xl-4p5{flex:0 0 80%;width:80%;max-width:80%}.next-col-xl-5p5{flex:0 0 100%;width:100%;max-width:100%}}.next-col-fixed-1{flex:0 0 20px;width:20px;max-width:20px}.next-col-fixed-2{flex:0 0 40px;width:40px;max-width:40px}.next-col-fixed-3{flex:0 0 60px;width:60px;max-width:60px}.next-col-fixed-4{flex:0 0 80px;width:80px;max-width:80px}.next-col-fixed-5{flex:0 0 100px;width:100px;max-width:100px}.next-col-fixed-6{flex:0 0 120px;width:120px;max-width:120px}.next-col-fixed-7{flex:0 0 140px;width:140px;max-width:140px}.next-col-fixed-8{flex:0 0 160px;width:160px;max-width:160px}.next-col-fixed-9{flex:0 0 180px;width:180px;max-width:180px}.next-col-fixed-10{flex:0 0 200px;width:200px;max-width:200px}.next-col-fixed-11{flex:0 0 220px;width:220px;max-width:220px}.next-col-fixed-12{flex:0 0 240px;width:240px;max-width:240px}.next-col-fixed-13{flex:0 0 260px;width:260px;max-width:260px}.next-col-fixed-14{flex:0 0 280px;width:280px;max-width:280px}.next-col-fixed-15{flex:0 0 300px;width:300px;max-width:300px}.next-col-fixed-16{flex:0 0 320px;width:320px;max-width:320px}.next-col-fixed-17{flex:0 0 340px;width:340px;max-width:340px}.next-col-fixed-18{flex:0 0 360px;width:360px;max-width:360px}.next-col-fixed-19{flex:0 0 380px;width:380px;max-width:380px}.next-col-fixed-20{flex:0 0 400px;width:400px;max-width:400px}.next-col-fixed-21{flex:0 0 420px;width:420px;max-width:420px}.next-col-fixed-22{flex:0 0 440px;width:440px;max-width:440px}.next-col-fixed-23{flex:0 0 460px;width:460px;max-width:460px}.next-col-fixed-24{flex:0 0 480px;width:480px;max-width:480px}.next-col-fixed-25{flex:0 0 500px;width:500px;max-width:500px}.next-col-fixed-26{flex:0 0 520px;width:520px;max-width:520px}.next-col-fixed-27{flex:0 0 540px;width:540px;max-width:540px}.next-col-fixed-28{flex:0 0 560px;width:560px;max-width:560px}.next-col-fixed-29{flex:0 0 580px;width:580px;max-width:580px}.next-col-fixed-30{flex:0 0 600px;width:600px;max-width:600px}.next-col-offset-1{margin-left:4.1666666667%}.next-col-offset-2{margin-left:8.3333333333%}.next-col-offset-3{margin-left:12.5%}.next-col-offset-4{margin-left:16.6666666667%}.next-col-offset-5{margin-left:20.8333333333%}.next-col-offset-6{margin-left:25%}.next-col-offset-7{margin-left:29.1666666667%}.next-col-offset-8{margin-left:33.3333333333%}.next-col-offset-9{margin-left:37.5%}.next-col-offset-10{margin-left:41.6666666667%}.next-col-offset-11{margin-left:45.8333333333%}.next-col-offset-12{margin-left:50%}.next-col-offset-13{margin-left:54.1666666667%}.next-col-offset-14{margin-left:58.3333333333%}.next-col-offset-15{margin-left:62.5%}.next-col-offset-16{margin-left:66.6666666667%}.next-col-offset-17{margin-left:70.8333333333%}.next-col-offset-18{margin-left:75%}.next-col-offset-19{margin-left:79.1666666667%}.next-col-offset-20{margin-left:83.3333333333%}.next-col-offset-21{margin-left:87.5%}.next-col-offset-22{margin-left:91.6666666667%}.next-col-offset-23{margin-left:95.8333333333%}.next-col-offset-24{margin-left:100%}@media(min-width:320px){.next-col-xxs-offset-1{margin-left:4.1666666667%}.next-col-xxs-offset-2{margin-left:8.3333333333%}.next-col-xxs-offset-3{margin-left:12.5%}.next-col-xxs-offset-4{margin-left:16.6666666667%}.next-col-xxs-offset-5{margin-left:20.8333333333%}.next-col-xxs-offset-6{margin-left:25%}.next-col-xxs-offset-7{margin-left:29.1666666667%}.next-col-xxs-offset-8{margin-left:33.3333333333%}.next-col-xxs-offset-9{margin-left:37.5%}.next-col-xxs-offset-10{margin-left:41.6666666667%}.next-col-xxs-offset-11{margin-left:45.8333333333%}.next-col-xxs-offset-12{margin-left:50%}.next-col-xxs-offset-13{margin-left:54.1666666667%}.next-col-xxs-offset-14{margin-left:58.3333333333%}.next-col-xxs-offset-15{margin-left:62.5%}.next-col-xxs-offset-16{margin-left:66.6666666667%}.next-col-xxs-offset-17{margin-left:70.8333333333%}.next-col-xxs-offset-18{margin-left:75%}.next-col-xxs-offset-19{margin-left:79.1666666667%}.next-col-xxs-offset-20{margin-left:83.3333333333%}.next-col-xxs-offset-21{margin-left:87.5%}.next-col-xxs-offset-22{margin-left:91.6666666667%}.next-col-xxs-offset-23{margin-left:95.8333333333%}.next-col-xxs-offset-24{margin-left:100%}}@media(min-width:480px){.next-col-xs-offset-1{margin-left:4.1666666667%}.next-col-xs-offset-2{margin-left:8.3333333333%}.next-col-xs-offset-3{margin-left:12.5%}.next-col-xs-offset-4{margin-left:16.6666666667%}.next-col-xs-offset-5{margin-left:20.8333333333%}.next-col-xs-offset-6{margin-left:25%}.next-col-xs-offset-7{margin-left:29.1666666667%}.next-col-xs-offset-8{margin-left:33.3333333333%}.next-col-xs-offset-9{margin-left:37.5%}.next-col-xs-offset-10{margin-left:41.6666666667%}.next-col-xs-offset-11{margin-left:45.8333333333%}.next-col-xs-offset-12{margin-left:50%}.next-col-xs-offset-13{margin-left:54.1666666667%}.next-col-xs-offset-14{margin-left:58.3333333333%}.next-col-xs-offset-15{margin-left:62.5%}.next-col-xs-offset-16{margin-left:66.6666666667%}.next-col-xs-offset-17{margin-left:70.8333333333%}.next-col-xs-offset-18{margin-left:75%}.next-col-xs-offset-19{margin-left:79.1666666667%}.next-col-xs-offset-20{margin-left:83.3333333333%}.next-col-xs-offset-21{margin-left:87.5%}.next-col-xs-offset-22{margin-left:91.6666666667%}.next-col-xs-offset-23{margin-left:95.8333333333%}.next-col-xs-offset-24{margin-left:100%}}@media(min-width:720px){.next-col-s-offset-1{margin-left:4.1666666667%}.next-col-s-offset-2{margin-left:8.3333333333%}.next-col-s-offset-3{margin-left:12.5%}.next-col-s-offset-4{margin-left:16.6666666667%}.next-col-s-offset-5{margin-left:20.8333333333%}.next-col-s-offset-6{margin-left:25%}.next-col-s-offset-7{margin-left:29.1666666667%}.next-col-s-offset-8{margin-left:33.3333333333%}.next-col-s-offset-9{margin-left:37.5%}.next-col-s-offset-10{margin-left:41.6666666667%}.next-col-s-offset-11{margin-left:45.8333333333%}.next-col-s-offset-12{margin-left:50%}.next-col-s-offset-13{margin-left:54.1666666667%}.next-col-s-offset-14{margin-left:58.3333333333%}.next-col-s-offset-15{margin-left:62.5%}.next-col-s-offset-16{margin-left:66.6666666667%}.next-col-s-offset-17{margin-left:70.8333333333%}.next-col-s-offset-18{margin-left:75%}.next-col-s-offset-19{margin-left:79.1666666667%}.next-col-s-offset-20{margin-left:83.3333333333%}.next-col-s-offset-21{margin-left:87.5%}.next-col-s-offset-22{margin-left:91.6666666667%}.next-col-s-offset-23{margin-left:95.8333333333%}.next-col-s-offset-24{margin-left:100%}}@media(min-width:990px){.next-col-m-offset-1{margin-left:4.1666666667%}.next-col-m-offset-2{margin-left:8.3333333333%}.next-col-m-offset-3{margin-left:12.5%}.next-col-m-offset-4{margin-left:16.6666666667%}.next-col-m-offset-5{margin-left:20.8333333333%}.next-col-m-offset-6{margin-left:25%}.next-col-m-offset-7{margin-left:29.1666666667%}.next-col-m-offset-8{margin-left:33.3333333333%}.next-col-m-offset-9{margin-left:37.5%}.next-col-m-offset-10{margin-left:41.6666666667%}.next-col-m-offset-11{margin-left:45.8333333333%}.next-col-m-offset-12{margin-left:50%}.next-col-m-offset-13{margin-left:54.1666666667%}.next-col-m-offset-14{margin-left:58.3333333333%}.next-col-m-offset-15{margin-left:62.5%}.next-col-m-offset-16{margin-left:66.6666666667%}.next-col-m-offset-17{margin-left:70.8333333333%}.next-col-m-offset-18{margin-left:75%}.next-col-m-offset-19{margin-left:79.1666666667%}.next-col-m-offset-20{margin-left:83.3333333333%}.next-col-m-offset-21{margin-left:87.5%}.next-col-m-offset-22{margin-left:91.6666666667%}.next-col-m-offset-23{margin-left:95.8333333333%}.next-col-m-offset-24{margin-left:100%}}@media(min-width:1200px){.next-col-l-offset-1{margin-left:4.1666666667%}.next-col-l-offset-2{margin-left:8.3333333333%}.next-col-l-offset-3{margin-left:12.5%}.next-col-l-offset-4{margin-left:16.6666666667%}.next-col-l-offset-5{margin-left:20.8333333333%}.next-col-l-offset-6{margin-left:25%}.next-col-l-offset-7{margin-left:29.1666666667%}.next-col-l-offset-8{margin-left:33.3333333333%}.next-col-l-offset-9{margin-left:37.5%}.next-col-l-offset-10{margin-left:41.6666666667%}.next-col-l-offset-11{margin-left:45.8333333333%}.next-col-l-offset-12{margin-left:50%}.next-col-l-offset-13{margin-left:54.1666666667%}.next-col-l-offset-14{margin-left:58.3333333333%}.next-col-l-offset-15{margin-left:62.5%}.next-col-l-offset-16{margin-left:66.6666666667%}.next-col-l-offset-17{margin-left:70.8333333333%}.next-col-l-offset-18{margin-left:75%}.next-col-l-offset-19{margin-left:79.1666666667%}.next-col-l-offset-20{margin-left:83.3333333333%}.next-col-l-offset-21{margin-left:87.5%}.next-col-l-offset-22{margin-left:91.6666666667%}.next-col-l-offset-23{margin-left:95.8333333333%}.next-col-l-offset-24{margin-left:100%}}@media(min-width:1500px){.next-col-xl-offset-1{margin-left:4.1666666667%}.next-col-xl-offset-2{margin-left:8.3333333333%}.next-col-xl-offset-3{margin-left:12.5%}.next-col-xl-offset-4{margin-left:16.6666666667%}.next-col-xl-offset-5{margin-left:20.8333333333%}.next-col-xl-offset-6{margin-left:25%}.next-col-xl-offset-7{margin-left:29.1666666667%}.next-col-xl-offset-8{margin-left:33.3333333333%}.next-col-xl-offset-9{margin-left:37.5%}.next-col-xl-offset-10{margin-left:41.6666666667%}.next-col-xl-offset-11{margin-left:45.8333333333%}.next-col-xl-offset-12{margin-left:50%}.next-col-xl-offset-13{margin-left:54.1666666667%}.next-col-xl-offset-14{margin-left:58.3333333333%}.next-col-xl-offset-15{margin-left:62.5%}.next-col-xl-offset-16{margin-left:66.6666666667%}.next-col-xl-offset-17{margin-left:70.8333333333%}.next-col-xl-offset-18{margin-left:75%}.next-col-xl-offset-19{margin-left:79.1666666667%}.next-col-xl-offset-20{margin-left:83.3333333333%}.next-col-xl-offset-21{margin-left:87.5%}.next-col-xl-offset-22{margin-left:91.6666666667%}.next-col-xl-offset-23{margin-left:95.8333333333%}.next-col-xl-offset-24{margin-left:100%}}.next-col-offset-fixed-1{margin-left:20px}.next-col-offset-fixed-2{margin-left:40px}.next-col-offset-fixed-3{margin-left:60px}.next-col-offset-fixed-4{margin-left:80px}.next-col-offset-fixed-5{margin-left:100px}.next-col-offset-fixed-6{margin-left:120px}.next-col-offset-fixed-7{margin-left:140px}.next-col-offset-fixed-8{margin-left:160px}.next-col-offset-fixed-9{margin-left:180px}.next-col-offset-fixed-10{margin-left:200px}.next-col-offset-fixed-11{margin-left:220px}.next-col-offset-fixed-12{margin-left:240px}.next-col-offset-fixed-13{margin-left:260px}.next-col-offset-fixed-14{margin-left:280px}.next-col-offset-fixed-15{margin-left:300px}.next-col-offset-fixed-16{margin-left:320px}.next-col-offset-fixed-17{margin-left:340px}.next-col-offset-fixed-18{margin-left:360px}.next-col-offset-fixed-19{margin-left:380px}.next-col-offset-fixed-20{margin-left:400px}.next-col-offset-fixed-21{margin-left:420px}.next-col-offset-fixed-22{margin-left:440px}.next-col-offset-fixed-23{margin-left:460px}.next-col-offset-fixed-24{margin-left:480px}.next-col-offset-fixed-25{margin-left:500px}.next-col-offset-fixed-26{margin-left:520px}.next-col-offset-fixed-27{margin-left:540px}.next-col-offset-fixed-28{margin-left:560px}.next-col-offset-fixed-29{margin-left:580px}.next-col-offset-fixed-30{margin-left:600px}.next-col-offset-fixed-xxs-1{margin-left:20px}.next-col-offset-fixed-xxs-2{margin-left:40px}.next-col-offset-fixed-xxs-3{margin-left:60px}.next-col-offset-fixed-xxs-4{margin-left:80px}.next-col-offset-fixed-xxs-5{margin-left:100px}.next-col-offset-fixed-xxs-6{margin-left:120px}.next-col-offset-fixed-xxs-7{margin-left:140px}.next-col-offset-fixed-xxs-8{margin-left:160px}.next-col-offset-fixed-xxs-9{margin-left:180px}.next-col-offset-fixed-xxs-10{margin-left:200px}.next-col-offset-fixed-xxs-11{margin-left:220px}.next-col-offset-fixed-xxs-12{margin-left:240px}.next-col-offset-fixed-xxs-13{margin-left:260px}.next-col-offset-fixed-xxs-14{margin-left:280px}.next-col-offset-fixed-xxs-15{margin-left:300px}.next-col-offset-fixed-xxs-16{margin-left:320px}.next-col-offset-fixed-xxs-17{margin-left:340px}.next-col-offset-fixed-xxs-18{margin-left:360px}.next-col-offset-fixed-xxs-19{margin-left:380px}.next-col-offset-fixed-xxs-20{margin-left:400px}.next-col-offset-fixed-xxs-21{margin-left:420px}.next-col-offset-fixed-xxs-22{margin-left:440px}.next-col-offset-fixed-xxs-23{margin-left:460px}.next-col-offset-fixed-xxs-24{margin-left:480px}.next-col-offset-fixed-xxs-25{margin-left:500px}.next-col-offset-fixed-xxs-26{margin-left:520px}.next-col-offset-fixed-xxs-27{margin-left:540px}.next-col-offset-fixed-xxs-28{margin-left:560px}.next-col-offset-fixed-xxs-29{margin-left:580px}.next-col-offset-fixed-xxs-30{margin-left:600px}.next-col-offset-fixed-xs-1{margin-left:20px}.next-col-offset-fixed-xs-2{margin-left:40px}.next-col-offset-fixed-xs-3{margin-left:60px}.next-col-offset-fixed-xs-4{margin-left:80px}.next-col-offset-fixed-xs-5{margin-left:100px}.next-col-offset-fixed-xs-6{margin-left:120px}.next-col-offset-fixed-xs-7{margin-left:140px}.next-col-offset-fixed-xs-8{margin-left:160px}.next-col-offset-fixed-xs-9{margin-left:180px}.next-col-offset-fixed-xs-10{margin-left:200px}.next-col-offset-fixed-xs-11{margin-left:220px}.next-col-offset-fixed-xs-12{margin-left:240px}.next-col-offset-fixed-xs-13{margin-left:260px}.next-col-offset-fixed-xs-14{margin-left:280px}.next-col-offset-fixed-xs-15{margin-left:300px}.next-col-offset-fixed-xs-16{margin-left:320px}.next-col-offset-fixed-xs-17{margin-left:340px}.next-col-offset-fixed-xs-18{margin-left:360px}.next-col-offset-fixed-xs-19{margin-left:380px}.next-col-offset-fixed-xs-20{margin-left:400px}.next-col-offset-fixed-xs-21{margin-left:420px}.next-col-offset-fixed-xs-22{margin-left:440px}.next-col-offset-fixed-xs-23{margin-left:460px}.next-col-offset-fixed-xs-24{margin-left:480px}.next-col-offset-fixed-xs-25{margin-left:500px}.next-col-offset-fixed-xs-26{margin-left:520px}.next-col-offset-fixed-xs-27{margin-left:540px}.next-col-offset-fixed-xs-28{margin-left:560px}.next-col-offset-fixed-xs-29{margin-left:580px}.next-col-offset-fixed-xs-30{margin-left:600px}.next-col-offset-fixed-s-1{margin-left:20px}.next-col-offset-fixed-s-2{margin-left:40px}.next-col-offset-fixed-s-3{margin-left:60px}.next-col-offset-fixed-s-4{margin-left:80px}.next-col-offset-fixed-s-5{margin-left:100px}.next-col-offset-fixed-s-6{margin-left:120px}.next-col-offset-fixed-s-7{margin-left:140px}.next-col-offset-fixed-s-8{margin-left:160px}.next-col-offset-fixed-s-9{margin-left:180px}.next-col-offset-fixed-s-10{margin-left:200px}.next-col-offset-fixed-s-11{margin-left:220px}.next-col-offset-fixed-s-12{margin-left:240px}.next-col-offset-fixed-s-13{margin-left:260px}.next-col-offset-fixed-s-14{margin-left:280px}.next-col-offset-fixed-s-15{margin-left:300px}.next-col-offset-fixed-s-16{margin-left:320px}.next-col-offset-fixed-s-17{margin-left:340px}.next-col-offset-fixed-s-18{margin-left:360px}.next-col-offset-fixed-s-19{margin-left:380px}.next-col-offset-fixed-s-20{margin-left:400px}.next-col-offset-fixed-s-21{margin-left:420px}.next-col-offset-fixed-s-22{margin-left:440px}.next-col-offset-fixed-s-23{margin-left:460px}.next-col-offset-fixed-s-24{margin-left:480px}.next-col-offset-fixed-s-25{margin-left:500px}.next-col-offset-fixed-s-26{margin-left:520px}.next-col-offset-fixed-s-27{margin-left:540px}.next-col-offset-fixed-s-28{margin-left:560px}.next-col-offset-fixed-s-29{margin-left:580px}.next-col-offset-fixed-s-30{margin-left:600px}.next-col-offset-fixed-m-1{margin-left:20px}.next-col-offset-fixed-m-2{margin-left:40px}.next-col-offset-fixed-m-3{margin-left:60px}.next-col-offset-fixed-m-4{margin-left:80px}.next-col-offset-fixed-m-5{margin-left:100px}.next-col-offset-fixed-m-6{margin-left:120px}.next-col-offset-fixed-m-7{margin-left:140px}.next-col-offset-fixed-m-8{margin-left:160px}.next-col-offset-fixed-m-9{margin-left:180px}.next-col-offset-fixed-m-10{margin-left:200px}.next-col-offset-fixed-m-11{margin-left:220px}.next-col-offset-fixed-m-12{margin-left:240px}.next-col-offset-fixed-m-13{margin-left:260px}.next-col-offset-fixed-m-14{margin-left:280px}.next-col-offset-fixed-m-15{margin-left:300px}.next-col-offset-fixed-m-16{margin-left:320px}.next-col-offset-fixed-m-17{margin-left:340px}.next-col-offset-fixed-m-18{margin-left:360px}.next-col-offset-fixed-m-19{margin-left:380px}.next-col-offset-fixed-m-20{margin-left:400px}.next-col-offset-fixed-m-21{margin-left:420px}.next-col-offset-fixed-m-22{margin-left:440px}.next-col-offset-fixed-m-23{margin-left:460px}.next-col-offset-fixed-m-24{margin-left:480px}.next-col-offset-fixed-m-25{margin-left:500px}.next-col-offset-fixed-m-26{margin-left:520px}.next-col-offset-fixed-m-27{margin-left:540px}.next-col-offset-fixed-m-28{margin-left:560px}.next-col-offset-fixed-m-29{margin-left:580px}.next-col-offset-fixed-m-30{margin-left:600px}.next-col-offset-fixed-l-1{margin-left:20px}.next-col-offset-fixed-l-2{margin-left:40px}.next-col-offset-fixed-l-3{margin-left:60px}.next-col-offset-fixed-l-4{margin-left:80px}.next-col-offset-fixed-l-5{margin-left:100px}.next-col-offset-fixed-l-6{margin-left:120px}.next-col-offset-fixed-l-7{margin-left:140px}.next-col-offset-fixed-l-8{margin-left:160px}.next-col-offset-fixed-l-9{margin-left:180px}.next-col-offset-fixed-l-10{margin-left:200px}.next-col-offset-fixed-l-11{margin-left:220px}.next-col-offset-fixed-l-12{margin-left:240px}.next-col-offset-fixed-l-13{margin-left:260px}.next-col-offset-fixed-l-14{margin-left:280px}.next-col-offset-fixed-l-15{margin-left:300px}.next-col-offset-fixed-l-16{margin-left:320px}.next-col-offset-fixed-l-17{margin-left:340px}.next-col-offset-fixed-l-18{margin-left:360px}.next-col-offset-fixed-l-19{margin-left:380px}.next-col-offset-fixed-l-20{margin-left:400px}.next-col-offset-fixed-l-21{margin-left:420px}.next-col-offset-fixed-l-22{margin-left:440px}.next-col-offset-fixed-l-23{margin-left:460px}.next-col-offset-fixed-l-24{margin-left:480px}.next-col-offset-fixed-l-25{margin-left:500px}.next-col-offset-fixed-l-26{margin-left:520px}.next-col-offset-fixed-l-27{margin-left:540px}.next-col-offset-fixed-l-28{margin-left:560px}.next-col-offset-fixed-l-29{margin-left:580px}.next-col-offset-fixed-l-30{margin-left:600px}.next-col-offset-fixed-xl-1{margin-left:20px}.next-col-offset-fixed-xl-2{margin-left:40px}.next-col-offset-fixed-xl-3{margin-left:60px}.next-col-offset-fixed-xl-4{margin-left:80px}.next-col-offset-fixed-xl-5{margin-left:100px}.next-col-offset-fixed-xl-6{margin-left:120px}.next-col-offset-fixed-xl-7{margin-left:140px}.next-col-offset-fixed-xl-8{margin-left:160px}.next-col-offset-fixed-xl-9{margin-left:180px}.next-col-offset-fixed-xl-10{margin-left:200px}.next-col-offset-fixed-xl-11{margin-left:220px}.next-col-offset-fixed-xl-12{margin-left:240px}.next-col-offset-fixed-xl-13{margin-left:260px}.next-col-offset-fixed-xl-14{margin-left:280px}.next-col-offset-fixed-xl-15{margin-left:300px}.next-col-offset-fixed-xl-16{margin-left:320px}.next-col-offset-fixed-xl-17{margin-left:340px}.next-col-offset-fixed-xl-18{margin-left:360px}.next-col-offset-fixed-xl-19{margin-left:380px}.next-col-offset-fixed-xl-20{margin-left:400px}.next-col-offset-fixed-xl-21{margin-left:420px}.next-col-offset-fixed-xl-22{margin-left:440px}.next-col-offset-fixed-xl-23{margin-left:460px}.next-col-offset-fixed-xl-24{margin-left:480px}.next-col-offset-fixed-xl-25{margin-left:500px}.next-col-offset-fixed-xl-26{margin-left:520px}.next-col-offset-fixed-xl-27{margin-left:540px}.next-col-offset-fixed-xl-28{margin-left:560px}.next-col-offset-fixed-xl-29{margin-left:580px}.next-col-offset-fixed-xl-30{margin-left:600px}.next-col.next-col-hidden{display:none}@media(min-width:320px)and (max-width:479px){.next-col.next-col-xxs-hidden{display:none}}@media(min-width:480px)and (max-width:719px){.next-col.next-col-xs-hidden{display:none}}@media(min-width:720px)and (max-width:989px){.next-col.next-col-s-hidden{display:none}}@media(min-width:990px)and (max-width:1199px){.next-col.next-col-m-hidden{display:none}}@media(min-width:1200px)and (max-width:1499px){.next-col.next-col-l-hidden{display:none}}@media(min-width:1500px){.next-col.next-col-xl-hidden{display:none}}.next-row.next-row-hidden{display:none}@media(min-width:320px)and (max-width:479px){.next-row.next-row-xxs-hidden{display:none}}@media(min-width:480px)and (max-width:719px){.next-row.next-row-xs-hidden{display:none}}@media(min-width:720px)and (max-width:989px){.next-row.next-row-s-hidden{display:none}}@media(min-width:990px)and (max-width:1199px){.next-row.next-row-m-hidden{display:none}}@media(min-width:1200px)and (max-width:1499px){.next-row.next-row-l-hidden{display:none}}@media(min-width:1500px){.next-row.next-row-xl-hidden{display:none}}.next-col-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}@media(min-width:320px){.next-col-xxs-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-xxs-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-xxs-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-xxs-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-xxs-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-xxs-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-xxs-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-xxs-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-xxs-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-xxs-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-xxs-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-xxs-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-xxs-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-xxs-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-xxs-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-xxs-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-xxs-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-xxs-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-xxs-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-xxs-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-xxs-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-xxs-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-xxs-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-xxs-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:480px){.next-col-xs-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-xs-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-xs-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-xs-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-xs-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-xs-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-xs-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-xs-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-xs-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-xs-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-xs-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-xs-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-xs-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-xs-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-xs-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-xs-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-xs-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-xs-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-xs-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-xs-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-xs-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-xs-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-xs-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-xs-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:720px){.next-col-s-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-s-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-s-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-s-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-s-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-s-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-s-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-s-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-s-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-s-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-s-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-s-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-s-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-s-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-s-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-s-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-s-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-s-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-s-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-s-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-s-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-s-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-s-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-s-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:990px){.next-col-m-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-m-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-m-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-m-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-m-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-m-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-m-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-m-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-m-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-m-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-m-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-m-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-m-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-m-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-m-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-m-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-m-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-m-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-m-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-m-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-m-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-m-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-m-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-m-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:1200px){.next-col-l-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-l-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-l-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-l-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-l-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-l-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-l-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-l-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-l-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-l-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-l-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-l-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-l-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-l-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-l-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-l-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-l-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-l-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-l-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-l-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-l-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-l-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-l-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-l-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}@media(min-width:1500px){.next-col-xl-offset-1[dir=rtl]{margin-right:4.1666666667%;margin-left:auto}.next-col-xl-offset-2[dir=rtl]{margin-right:8.3333333333%;margin-left:auto}.next-col-xl-offset-3[dir=rtl]{margin-right:12.5%;margin-left:auto}.next-col-xl-offset-4[dir=rtl]{margin-right:16.6666666667%;margin-left:auto}.next-col-xl-offset-5[dir=rtl]{margin-right:20.8333333333%;margin-left:auto}.next-col-xl-offset-6[dir=rtl]{margin-right:25%;margin-left:auto}.next-col-xl-offset-7[dir=rtl]{margin-right:29.1666666667%;margin-left:auto}.next-col-xl-offset-8[dir=rtl]{margin-right:33.3333333333%;margin-left:auto}.next-col-xl-offset-9[dir=rtl]{margin-right:37.5%;margin-left:auto}.next-col-xl-offset-10[dir=rtl]{margin-right:41.6666666667%;margin-left:auto}.next-col-xl-offset-11[dir=rtl]{margin-right:45.8333333333%;margin-left:auto}.next-col-xl-offset-12[dir=rtl]{margin-right:50%;margin-left:auto}.next-col-xl-offset-13[dir=rtl]{margin-right:54.1666666667%;margin-left:auto}.next-col-xl-offset-14[dir=rtl]{margin-right:58.3333333333%;margin-left:auto}.next-col-xl-offset-15[dir=rtl]{margin-right:62.5%;margin-left:auto}.next-col-xl-offset-16[dir=rtl]{margin-right:66.6666666667%;margin-left:auto}.next-col-xl-offset-17[dir=rtl]{margin-right:70.8333333333%;margin-left:auto}.next-col-xl-offset-18[dir=rtl]{margin-right:75%;margin-left:auto}.next-col-xl-offset-19[dir=rtl]{margin-right:79.1666666667%;margin-left:auto}.next-col-xl-offset-20[dir=rtl]{margin-right:83.3333333333%;margin-left:auto}.next-col-xl-offset-21[dir=rtl]{margin-right:87.5%;margin-left:auto}.next-col-xl-offset-22[dir=rtl]{margin-right:91.6666666667%;margin-left:auto}.next-col-xl-offset-23[dir=rtl]{margin-right:95.8333333333%;margin-left:auto}.next-col-xl-offset-24[dir=rtl]{margin-right:100%;margin-left:auto}}.next-col-offset-fixed-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-xxs-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-xxs-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-xxs-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-xxs-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-xxs-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-xxs-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-xxs-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-xxs-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-xxs-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-xxs-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-xxs-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-xxs-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-xxs-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-xxs-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-xxs-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-xxs-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-xxs-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-xxs-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-xxs-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-xxs-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-xxs-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-xxs-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-xxs-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-xxs-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-xxs-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-xxs-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-xxs-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-xxs-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-xxs-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-xxs-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-xs-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-xs-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-xs-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-xs-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-xs-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-xs-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-xs-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-xs-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-xs-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-xs-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-xs-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-xs-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-xs-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-xs-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-xs-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-xs-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-xs-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-xs-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-xs-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-xs-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-xs-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-xs-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-xs-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-xs-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-xs-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-xs-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-xs-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-xs-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-xs-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-xs-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-s-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-s-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-s-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-s-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-s-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-s-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-s-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-s-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-s-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-s-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-s-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-s-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-s-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-s-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-s-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-s-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-s-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-s-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-s-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-s-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-s-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-s-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-s-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-s-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-s-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-s-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-s-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-s-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-s-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-s-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-m-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-m-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-m-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-m-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-m-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-m-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-m-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-m-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-m-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-m-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-m-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-m-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-m-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-m-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-m-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-m-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-m-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-m-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-m-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-m-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-m-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-m-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-m-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-m-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-m-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-m-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-m-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-m-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-m-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-m-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-l-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-l-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-l-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-l-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-l-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-l-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-l-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-l-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-l-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-l-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-l-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-l-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-l-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-l-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-l-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-l-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-l-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-l-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-l-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-l-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-l-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-l-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-l-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-l-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-l-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-l-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-l-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-l-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-l-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-l-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-col-offset-fixed-xl-1[dir=rtl]{margin-right:20px;margin-left:auto}.next-col-offset-fixed-xl-2[dir=rtl]{margin-right:40px;margin-left:auto}.next-col-offset-fixed-xl-3[dir=rtl]{margin-right:60px;margin-left:auto}.next-col-offset-fixed-xl-4[dir=rtl]{margin-right:80px;margin-left:auto}.next-col-offset-fixed-xl-5[dir=rtl]{margin-right:100px;margin-left:auto}.next-col-offset-fixed-xl-6[dir=rtl]{margin-right:120px;margin-left:auto}.next-col-offset-fixed-xl-7[dir=rtl]{margin-right:140px;margin-left:auto}.next-col-offset-fixed-xl-8[dir=rtl]{margin-right:160px;margin-left:auto}.next-col-offset-fixed-xl-9[dir=rtl]{margin-right:180px;margin-left:auto}.next-col-offset-fixed-xl-10[dir=rtl]{margin-right:200px;margin-left:auto}.next-col-offset-fixed-xl-11[dir=rtl]{margin-right:220px;margin-left:auto}.next-col-offset-fixed-xl-12[dir=rtl]{margin-right:240px;margin-left:auto}.next-col-offset-fixed-xl-13[dir=rtl]{margin-right:260px;margin-left:auto}.next-col-offset-fixed-xl-14[dir=rtl]{margin-right:280px;margin-left:auto}.next-col-offset-fixed-xl-15[dir=rtl]{margin-right:300px;margin-left:auto}.next-col-offset-fixed-xl-16[dir=rtl]{margin-right:320px;margin-left:auto}.next-col-offset-fixed-xl-17[dir=rtl]{margin-right:340px;margin-left:auto}.next-col-offset-fixed-xl-18[dir=rtl]{margin-right:360px;margin-left:auto}.next-col-offset-fixed-xl-19[dir=rtl]{margin-right:380px;margin-left:auto}.next-col-offset-fixed-xl-20[dir=rtl]{margin-right:400px;margin-left:auto}.next-col-offset-fixed-xl-21[dir=rtl]{margin-right:420px;margin-left:auto}.next-col-offset-fixed-xl-22[dir=rtl]{margin-right:440px;margin-left:auto}.next-col-offset-fixed-xl-23[dir=rtl]{margin-right:460px;margin-left:auto}.next-col-offset-fixed-xl-24[dir=rtl]{margin-right:480px;margin-left:auto}.next-col-offset-fixed-xl-25[dir=rtl]{margin-right:500px;margin-left:auto}.next-col-offset-fixed-xl-26[dir=rtl]{margin-right:520px;margin-left:auto}.next-col-offset-fixed-xl-27[dir=rtl]{margin-right:540px;margin-left:auto}.next-col-offset-fixed-xl-28[dir=rtl]{margin-right:560px;margin-left:auto}.next-col-offset-fixed-xl-29[dir=rtl]{margin-right:580px;margin-left:auto}.next-col-offset-fixed-xl-30[dir=rtl]{margin-right:600px;margin-left:auto}.next-responsive-grid{box-sizing:border-box;display:grid}.next-responsive-grid *,.next-responsive-grid :after,.next-responsive-grid :before{box-sizing:border-box}.next-responsive-grid-ie{display:block}.next-form,.next-form *,.next-form :after,.next-form :before{box-sizing:border-box}.next-form-preview.next-form-item .next-form-item-label{color:#666}.next-form-preview.next-form-item .next-form-preview{color:#333}.next-form-preview.next-form-item.next-medium .next-form-item-label{font-size:14px;line-height:28px}.next-form-preview.next-form-item.next-small .next-form-item-label{font-size:12px;line-height:20px}.next-form-preview.next-form-item.next-large .next-form-item-label{font-size:16px;line-height:40px}.next-form-responsive-grid .next-form-item-control{flex:1}.next-form-responsive-grid .next-form-item{margin-bottom:0}.next-form-responsive-grid .next-form-item .next-form-item-help-margin-offset{margin-top:0}.next-form-responsive-grid .next-form-item.next-left{display:flex}.next-form-responsive-grid.next-small .next-responsive-grid{gap:16px}.next-form-responsive-grid.next-small .next-form-item.next-left .next-form-item-label{line-height:1.4;margin-top:6px;margin-bottom:6px}.next-form-responsive-grid.next-medium .next-responsive-grid{gap:20px}.next-form-responsive-grid.next-medium .next-form-item.next-left .next-form-item-label{line-height:1.4;margin-top:9px;margin-bottom:9px}.next-form-responsive-grid.next-large .next-responsive-grid{gap:24px}.next-form-responsive-grid.next-large .next-form-item.next-left .next-form-item-label{line-height:1.4;margin-top:12px;margin-bottom:12px}.next-form-item{margin-bottom:16px}.next-form-item.has-error>.next-form-item-control>.next-form-item-help{color:#d23c26}.next-form-item.has-warning>.next-form-item-control>.next-form-item-help{color:#f1c826}.next-form-item .next-form-item-label,.next-form-item .next-form-text-align,.next-form-item p{line-height:32px}.next-form-item .next-form-text-align,.next-form-item p{margin:0}.next-form-item .next-checkbox-group,.next-form-item .next-checkbox-wrapper,.next-form-item .next-radio-group,.next-form-item .next-radio-wrapper,.next-form-item .next-rating{line-height:28px}.next-form-item .next-form-preview{font-size:14px;line-height:28px}.next-form-item .next-form-preview.next-input-textarea>p{font-size:14px;text-align:justify;min-height:19.6px;line-height:1.4;margin-top:4.2px}.next-form-item .next-form-item-label{font-size:14px}.next-form-item .next-form-item-label>label{display:inline-block;line-height:1.5}.next-form-item.next-large{margin-bottom:20px}.next-form-item.next-large .next-form-item-label,.next-form-item.next-large .next-form-text-align,.next-form-item.next-large p{line-height:40px}.next-form-item.next-large .next-checkbox-group,.next-form-item.next-large .next-checkbox-wrapper,.next-form-item.next-large .next-radio-group,.next-form-item.next-large .next-radio-wrapper,.next-form-item.next-large .next-rating{line-height:39px}.next-form-item.next-large .next-form-preview{font-size:16px;line-height:40px}.next-form-item.next-large .next-form-preview.next-input-textarea>p{font-size:16px;text-align:justify;min-height:22.4px;line-height:1.4;margin-top:8.8px}.next-form-item.next-large .next-switch{margin-top:7px}.next-form-item.next-large .next-form-item-label{font-size:16px}.next-form-item.next-large .next-form-item-help-margin-offset{margin-top:-20px}.next-form-item.next-small{margin-bottom:12px}.next-form-item.next-small .next-checkbox-group,.next-form-item.next-small .next-checkbox-wrapper,.next-form-item.next-small .next-form-item-label,.next-form-item.next-small .next-form-text-align,.next-form-item.next-small .next-radio-group,.next-form-item.next-small .next-radio-wrapper,.next-form-item.next-small .next-rating,.next-form-item.next-small p{line-height:24px}.next-form-item.next-small .next-form-preview{font-size:12px;line-height:20px}.next-form-item.next-small .next-form-preview.next-input-textarea>p{font-size:12px;text-align:justify;min-height:16.8px;line-height:1.4;margin-top:1.6px}.next-form-item.next-small .next-form-item-label{font-size:12px}.next-form-item.next-small .next-form-item-help-margin-offset{margin-top:-12px}.next-form-item.next-top>.next-form-item-label{margin-bottom:2px}.next-form-item.next-inset .next-form-item-label{padding-right:0;padding-left:0;line-height:inherit}.next-form-item-control .next-form-text-align{margin:0}.next-form-item-control>.next-input,.next-form-item-control>.next-input-group,.next-form-item-fullwidth .next-form-item-control>.next-date-picker,.next-form-item-fullwidth .next-form-item-control>.next-input,.next-form-item-fullwidth .next-form-item-control>.next-input-group,.next-form-item-fullwidth .next-form-item-control>.next-month-picker,.next-form-item-fullwidth .next-form-item-control>.next-range-picker,.next-form-item-fullwidth .next-form-item-control>.next-select,.next-form-item-fullwidth .next-form-item-control>.next-time-picker,.next-form-item-fullwidth .next-form-item-control>.next-year-picker{width:100%}.next-form-item-fullwidth .next-form-item-control>.next-date-picker2 .next-date-picker2-input input{width:inherit}.next-form-item-label{display:inline-block;vertical-align:top;color:#666;text-align:right;padding-right:12px}.next-form-item-label label[required]:before{margin-right:4px;content:"*";color:#d23c26}.next-form-item-label.has-colon label:after{content:":";position:relative;top:-.5px;margin:0 0 0 2px}.next-form-item-label.next-left{text-align:left}.next-form-item-label.next-left>label[required]:before{display:none}.next-form-item-label.next-left>label[required]:after{margin-left:4px;content:"*";color:#d23c26}.next-form-item-help{margin-top:4px;font-size:12px;line-height:1.5;color:#999}.next-form .next-form-item-help-margin-offset{margin-top:-16px}.next-form.next-inline .next-form-item{display:inline-block;vertical-align:top}.next-form.next-inline .next-form-item.next-left .next-form-item-control{display:inline-block;vertical-align:top;line-height:0}.next-form.next-inline .next-form-item:not(:last-child){margin-right:20px}.next-form.next-inline .next-form-item.next-large:not(:last-child){margin-right:24px}.next-form.next-inline .next-form-item.next-small:not(:last-child){margin-right:16px}@media screen and (min-width:0\0)and (min-resolution:0.001dpcm){.next-form-item.next-left>.next-form-item-label,.next-form.next-inline .next-form-item.next-left .next-form-item-control{display:table-cell}}.next-form[dir=rtl] .next-form-item-label{text-align:left;padding-left:12px;padding-right:0}.next-form[dir=rtl].next-inline .next-form-item:not(:last-child){margin-left:20px;margin-right:0}.next-form[dir=rtl].next-inline .next-form-item.next-large:not(:last-child){margin-left:24px;margin-right:0}.next-form[dir=rtl].next-inline .next-form-item.next-small:not(:last-child){margin-left:16px;margin-right:0}.next-avatar{position:relative;display:inline-block;overflow:hidden;color:#fff;white-space:nowrap;text-align:center;vertical-align:middle;background:#f2f2f2;border:0 solid #fff;box-shadow:none;width:40px;height:40px;line-height:40px;border-radius:50%}.next-avatar-image{background:transparent}.next-avatar-string{position:absolute;left:50%;transform-origin:0 center}.next-avatar-large{width:52px;height:52px;line-height:52px;border-radius:50%}.next-avatar-large-string{position:absolute;left:50%;transform-origin:0 center}.next-avatar-small{width:28px;height:28px;line-height:28px;border-radius:50%}.next-avatar-small-string{position:absolute;left:50%;transform-origin:0 center}.next-avatar-square{border-radius:3px}.next-avatar>img{display:block;width:100%;height:100%;object-fit:cover}.next-select{display:inline-block;position:relative;font-size:0;vertical-align:middle}.next-select,.next-select *,.next-select :after,.next-select :before{box-sizing:border-box}.next-select-trigger{min-width:100px;outline:0;transition:all .1s linear}.next-select-trigger .next-input-label{flex:0 0 auto;width:auto}.next-select-trigger .next-select-values{display:block;width:100%;flex:1 1 0;overflow:hidden}.next-select-trigger .next-select-values>em{font-style:inherit}.next-select-trigger .next-select-values input{padding-left:0;padding-right:0}.next-select-trigger .next-input-control{flex:0 0 auto;width:auto}.next-select-trigger .next-input-control>*{display:inline-block;width:auto}.next-select-trigger .next-input-control>.next-select-arrow{padding-right:0}.next-select-trigger .next-input.next-disabled em{color:#ccc}.next-select-trigger .next-input.next-disabled .next-select-arrow{cursor:not-allowed}.next-select-trigger .next-select-clear{display:none}.next-select-trigger.next-has-clear:hover .next-select-clear{display:inline-block}.next-select-trigger.next-has-clear:hover .next-select-arrow{display:none}.next-select .next-select-inner{display:inline-flex;align-items:center;width:100%;min-width:100px;outline:0;color:#333}.next-select .next-select-inner .next-tag{line-height:1;margin-right:4px;margin-bottom:3px;padding-left:0;padding-right:0}.next-select .next-select-inner .next-input-inner{width:auto}.next-select-trigger-search{position:relative;display:inline-block;vertical-align:top;overflow:hidden;width:100%;max-width:100%}.next-select-trigger-search>input,.next-select-trigger-search>span{display:block;font-size:inherit;font-family:inherit;letter-spacing:inherit;white-space:nowrap;overflow:hidden}.next-select-trigger-search input{position:absolute;background-color:transparent;width:100%;height:100%!important;z-index:1;left:0;border:0;outline:0;margin:0;padding:0;cursor:inherit}.next-select-trigger-search>span{position:relative;visibility:hidden;white-space:pre;max-width:100%;z-index:-1}.next-select-single.next-no-search{cursor:pointer}.next-select-single.next-has-search.next-active .next-select-values>em{display:none}.next-select-single.next-inactive .next-select-values>em+.next-select-trigger-search,.next-select-single.next-no-search .next-select-values>em+.next-select-trigger-search{width:1px;opacity:0;filter:alpha(opacity=0)}.next-select-single .next-select-values{display:inline-flex;align-items:center}.next-select-single .next-select-values>em{vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.next-select-multiple .next-select-compact{position:relative;white-space:nowrap}.next-select-multiple .next-select-compact .next-select-trigger-search{width:auto}.next-select-multiple .next-select-compact .next-select-tag-compact{position:absolute;top:0;right:0;z-index:1;padding:0 4px 0 16px;color:#333;background:linear-gradient(90deg,transparent,#fff 10px)}.next-select-multiple .next-disabled .next-select-tag-compact{background:linear-gradient(90deg,transparent,#fafafa 10px)}.next-select-multiple .next-select-values,.next-select-tag .next-select-values{margin-bottom:-3px;height:auto!important}.next-select-multiple .next-select-trigger-search,.next-select-tag .next-select-trigger-search{margin-bottom:3px}.next-select-multiple .next-tag+.next-select-trigger-search,.next-select-tag .next-tag+.next-select-trigger-search{width:auto;min-width:1px}.next-select-multiple .next-input,.next-select-tag .next-input{height:auto;align-items:start}.next-select-multiple.next-small .next-select-values,.next-select-tag.next-small .next-select-values{min-height:22px;padding-top:4px;padding-bottom:4px;line-height:14px}.next-select-multiple.next-small .next-select-values-compact,.next-select-tag.next-small .next-select-values-compact{height:24px!important}.next-select-multiple.next-small .next-tag,.next-select-tag.next-small .next-tag{border:0;padding-top:0;padding-bottom:0;height:14px}.next-select-multiple.next-small .next-tag-body,.next-select-multiple.next-small .next-tag .next-tag-body,.next-select-multiple.next-small .next-tag .next-tag-close-btn,.next-select-tag.next-small .next-tag-body,.next-select-tag.next-small .next-tag .next-tag-body,.next-select-tag.next-small .next-tag .next-tag-close-btn{line-height:14px}.next-select-multiple.next-small .next-input-control,.next-select-multiple.next-small .next-input-inner,.next-select-multiple.next-small .next-input-label,.next-select-multiple.next-small .next-select-tag-compact,.next-select-tag.next-small .next-input-control,.next-select-tag.next-small .next-input-inner,.next-select-tag.next-small .next-input-label,.next-select-tag.next-small .next-select-tag-compact{line-height:22px}.next-select-multiple.next-medium .next-select-values,.next-select-tag.next-medium .next-select-values{min-height:30px;padding-top:5px;padding-bottom:5px;line-height:20px}.next-select-multiple.next-medium .next-select-values-compact,.next-select-tag.next-medium .next-select-values-compact{height:32px!important}.next-select-multiple.next-medium .next-tag,.next-select-tag.next-medium .next-tag{padding-top:1px;padding-bottom:1px;height:20px}.next-select-multiple.next-medium .next-tag .next-tag-body,.next-select-multiple.next-medium .next-tag .next-tag-close-btn,.next-select-tag.next-medium .next-tag .next-tag-body,.next-select-tag.next-medium .next-tag .next-tag-close-btn{line-height:18px}.next-select-multiple.next-medium .next-input-control,.next-select-multiple.next-medium .next-input-inner,.next-select-multiple.next-medium .next-input-label,.next-select-multiple.next-medium .next-select-tag-compact,.next-select-tag.next-medium .next-input-control,.next-select-tag.next-medium .next-input-inner,.next-select-tag.next-medium .next-input-label,.next-select-tag.next-medium .next-select-tag-compact{line-height:30px}.next-select-multiple.next-large .next-select-values,.next-select-tag.next-large .next-select-values{min-height:38px;padding-top:7px;padding-bottom:7px;line-height:24px}.next-select-multiple.next-large .next-select-values-compact,.next-select-tag.next-large .next-select-values-compact{height:40px!important}.next-select-multiple.next-large .next-tag,.next-select-tag.next-large .next-tag{padding-top:3px;padding-bottom:3px;height:24px}.next-select-multiple.next-large .next-tag .next-tag-body,.next-select-multiple.next-large .next-tag .next-tag-close-btn,.next-select-tag.next-large .next-tag .next-tag-body,.next-select-tag.next-large .next-tag .next-tag-close-btn{line-height:18px}.next-select-multiple.next-large .next-input-control,.next-select-multiple.next-large .next-input-inner,.next-select-multiple.next-large .next-input-label,.next-select-multiple.next-large .next-select-tag-compact,.next-select-tag.next-large .next-input-control,.next-select-tag.next-large .next-input-inner,.next-select-tag.next-large .next-input-label,.next-select-tag.next-large .next-select-tag-compact{line-height:38px}.next-select-auto-complete{width:160px}.next-select-auto-complete .next-input{width:100%}.next-select-auto-complete .next-input .next-input-hint-wrap{padding-right:1px}.next-select-auto-complete .next-input .next-select-arrow{padding-left:0}.next-select.next-active .next-select-arrow .next-icon-arrow-down{transform:rotate(180deg)}.next-select .next-select-unfold-icon:before{content:""}.next-select-symbol-fold:before{content:""}.next-select-arrow{cursor:pointer;width:auto!important;text-align:center;transition:all .1s linear}.next-select-popup-wrap{animation-duration:.3s;animation-timing-function:ease;padding:0}.next-select-spacing-tb{padding:0}.next-select-menu-wrapper{max-height:260px;overflow:auto;border:1px solid #e6e6e6;border-radius:3px;box-shadow:none}.next-select-menu-wrapper .next-select-menu{max-height:none;border:none}.next-select-menu{max-height:260px;overflow:auto}.next-select-menu .next-select-menu-empty-content{padding-left:8px;padding-right:8px;color:#999}.next-select-menu.next-select-auto-complete-menu.next-select-menu-empty{display:none}.next-select-menu .next-menu-item-text .next-icon{vertical-align:middle}.next-select-all{display:block;cursor:pointer;padding:0 8px;margin:0 12px 8px;border-bottom:1px solid #e6e6e6}.next-select-all:hover{color:#2580e7}.next-select-all .next-menu-icon-selected.next-icon{display:inline-block!important;top:auto;color:#209bfa}.next-select-highlight{color:#209bfa;font-size:14px}.next-select-in-ie.next-select-trigger .next-select-values{overflow:visible}.next-select-in-ie.next-select-trigger .next-input-control,.next-select-in-ie.next-select-trigger .next-input-label{width:1px}.next-select-in-ie.next-select-trigger .next-input-control>*{display:table-cell;width:1%}.next-select-in-ie.next-select-trigger .next-select-arrow{display:table-cell}.next-select-in-ie.next-select-trigger .next-select-clear{display:none}.next-select-in-ie.next-select-trigger.next-select-multiple .next-select-inner,.next-select-in-ie.next-select-trigger.next-select-tag .next-select-inner{vertical-align:top}.next-select-in-ie.next-select-trigger .next-select-inner,.next-select-in-ie.next-select-trigger.next-select-single .next-select-values{display:inline-table}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-small .next-select-values{line-height:24px}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-medium .next-select-values{line-height:32px}.next-select-in-ie.next-select-trigger.next-select-single .next-input.next-large .next-select-values{line-height:40px}.next-select-in-ie.next-select-trigger .next-select-trigger-search>span{max-width:100px}.next-select-in-ie.next-select-trigger.next-select-single.next-select-in-ie-fixwidth .next-select-values{position:relative}.next-select-in-ie.next-select-trigger.next-select-single.next-select-in-ie-fixwidth .next-select-values>em{position:absolute;display:inline-block;height:100%;line-height:1;vertical-align:middle;overflow:hidden;left:4px;right:0;top:30%}.next-select-in-ie.next-select-trigger.next-select-single.next-inactive .next-select-values>em+.next-select-trigger-search,.next-select-in-ie.next-select-trigger.next-select-single.next-no-search .next-select-values>em+.next-select-trigger-search{filter:alpha(opacity=0);font-size:0}.next-select-in-ie.next-select-trigger.next-no-search .next-select-trigger-search input{color:inherit}@media screen and (-webkit-min-device-pixel-ratio:0){.next-select-multiple .next-select-compact .next-select-tag-compact{background:linear-gradient(90deg,hsla(0,0%,100%,0),#fff 10px)}.next-select-multiple .next-disabled .next-select-tag-compact{background:linear-gradient(90deg,hsla(0,0%,100%,0),#fafafa 10px)}}.next-select.next-select-multiple[dir=rtl] .next-select-compact .next-select-tag-compact{left:0;right:auto;padding:0 16px 0 4px;background:linear-gradient(270deg,hsla(0,0%,100%,0),#fff 10px)}.next-list-header{border-bottom:1px solid #e6e6e6;color:#333}.next-list-footer{border-top:1px solid #e6e6e6;color:#666}.next-list-loading.next-loading{display:block}.next-list-empty{font-size:14px;color:#ccc;padding:32px 0;text-align:center}.next-list-items{margin:0;padding:0;list-style:none}.next-list-item{display:table;display:flex;width:100%;color:#666}.next-list-item-extra,.next-list-item-media{display:table-cell;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;min-width:1px;flex-shrink:0;vertical-align:top}.next-list-item-extra{color:#999}.next-list-item-content{display:table-cell;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;flex:1;width:100%;vertical-align:middle}.next-list-item-title{color:#333}.next-list-medium .next-list-header{padding:16px 0;font-size:20px;font-weight:700}.next-list-medium .next-list-footer{padding:16px 0}.next-list-medium .next-list-item-media{padding-right:8px}.next-list-medium .next-list-item-extra{padding-left:8px}.next-list-medium .next-list-item{font-size:14px;line-height:1.5;padding:16px 0}.next-list-medium .next-list-item-title{font-weight:400;font-size:16px;line-height:1.5}.next-list-small .next-list-header{padding:8px 0;font-size:16px;font-weight:700}.next-list-small .next-list-footer{padding:8px 0}.next-list-small .next-list-item-media{padding-right:8px}.next-list-small .next-list-item-extra{padding-left:8px}.next-list-small .next-list-item{font-size:14px;font-weight:400;line-height:1.3;padding:8px 0}.next-list-small .next-list-item-title{font-size:14px;line-height:1.5}.next-list-divider .next-list-item{border-bottom:1px solid #e6e6e6}.next-list-divider .next-list-item:last-child{border-bottom:none}.next-list[dir=rtl] .next-list-item-media{padding-left:8px;padding-right:0}.next-list[dir=rtl] .next-list-item-extra{padding-right:8px;padding-left:0}.next-list[dir=rtl] .next-list-small .next-list-item-media{padding-left:8px;padding-right:0}.next-list[dir=rtl] .next-list-small .next-list-item-extra{padding-right:8px;padding-left:0}.next-menu-btn{display:inline-block;box-shadow:none}.next-menu-btn-spacing-tb{padding:0}.next-menu-btn .next-icon{transition:transform .1s linear}.next-menu-btn .next-menu-btn-arrow:before{content:""}.next-menu-btn.next-expand .next-menu-btn-arrow{transform:rotate(180deg)}.next-menu-btn-symbol-unfold:before{content:""}.next-menu-btn.next-btn-normal .next-menu-btn-arrow{color:#999}.next-menu-btn.next-btn-normal:hover .next-menu-btn-arrow{color:#333}.next-menu-btn.next-btn-secondary .next-menu-btn-arrow{color:#209bfa}.next-menu-btn.next-btn-secondary:hover .next-menu-btn-arrow{color:#fff}.next-menu-btn.next-btn-secondary.next-btn-text:hover .next-menu-btn-arrow{color:#209bfa}.next-menu-btn.next-btn-primary .next-menu-btn-arrow,.next-menu-btn.next-btn-primary:hover .next-menu-btn-arrow{color:#fff}.next-menu-btn.next-btn-text.next-btn-normal .next-menu-btn-arrow{color:#333}.next-menu-btn.next-btn-text.next-btn-normal:hover .next-menu-btn-arrow{color:#209bfa}.next-menu-btn.next-btn-text.next-btn-primary .next-menu-btn-arrow{color:#298dff}.next-menu-btn.next-btn-text.next-btn-primary:hover .next-menu-btn-arrow{color:#1274e7}.next-menu-btn.next-btn-ghost.next-btn-light .next-menu-btn-arrow{color:#333}.next-menu-btn.next-btn-ghost.next-btn-light:hover .next-menu-btn-arrow{color:#999}.next-menu-btn.next-btn-ghost.next-btn-dark .next-menu-btn-arrow,.next-menu-btn.next-btn-ghost.next-btn-dark:hover .next-menu-btn-arrow{color:#fff}.next-menu-btn.disabled .next-menu-btn-arrow,.next-menu-btn.next-btn-text.disabled .next-menu-btn-arrow,.next-menu-btn.next-btn-text[disabled] .next-menu-btn-arrow,.next-menu-btn[disabled] .next-menu-btn-arrow{color:#ccc}.next-menu-btn[disabled].next-btn-ghost.next-btn-dark .next-menu-btn-arrow{color:hsla(0,0%,100%,.4)}.next-menu-btn[disabled].next-btn-ghost.next-btn-light .next-menu-btn-arrow{color:rgba(0,0,0,.1)}.next-nav{min-width:auto;border-radius:0}.next-nav,.next-nav *,.next-nav :after,.next-nav :before{box-sizing:border-box}.next-nav-icon.next-icon{margin-right:12px;font-weight:inherit}.next-nav-icon.next-icon .next-icon-remote,.next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav-group-label{height:40px;line-height:40px;font-size:14px}.next-nav-item .next-menu-item-text>span,.next-nav-item .next-nav-group-label>span{opacity:1;transition:opacity .1s linear}.next-nav-item .next-menu-item-text>a{text-decoration:none;color:inherit}.next-nav-item.next-focused .next-menu-hoz-icon-arrow.next-icon,.next-nav-item.next-focused .next-menu-icon-arrow.next-icon,.next-nav-item .next-menu-hoz-icon-arrow.next-icon,.next-nav-item .next-menu-icon-arrow.next-icon,.next-nav-item.next-opened .next-menu-hoz-icon-arrow.next-icon,.next-nav-item.next-opened .next-menu-icon-arrow.next-icon,.next-nav-item.next-selected .next-menu-hoz-icon-arrow.next-icon,.next-nav-item.next-selected .next-menu-icon-arrow.next-icon,.next-nav-item:hover .next-menu-hoz-icon-arrow.next-icon,.next-nav-item:hover .next-menu-icon-arrow.next-icon{color:inherit;top:0;transform-origin:center 50%}.next-nav.next-active .next-nav-item:before{position:absolute;transition:all .3s ease;content:""}.next-nav.next-hoz{padding:0;height:44px;line-height:42px;font-size:14px}.next-nav.next-hoz .next-menu-item.next-nav-item{margin-left:0;margin-right:0;padding:0 20px;border-radius:0}.next-nav.next-hoz .next-menu-item,.next-nav.next-hoz .next-menu-sub-menu-wrapper>.next-menu-item{margin-top:0;margin-bottom:0}.next-nav.next-hoz .next-menu-item-inner{height:42px;font-size:14px}.next-nav.next-hoz .next-menu-item.next-nav-item.next-nav-with-title{line-height:1;padding:12px 8px}.next-nav.next-hoz .next-menu-item.next-nav-item.next-nav-with-title .next-menu-item-inner{height:auto;min-height:42px}.next-nav.next-hoz .next-menu-item.next-nav-item.next-nav-with-title .next-nav-text{display:block;line-height:1;margin-top:8px;overflow:hidden;text-overflow:ellipsis}.next-nav.next-hoz .next-nav-group-label .next-menu-item-inner{height:40px;line-height:40px;font-size:14px}.next-nav.next-hoz .next-menu-header{float:left;height:42px}.next-nav.next-hoz .next-menu-footer{float:right;height:42px}.next-nav.next-hoz .next-nav-item:before{width:0;left:50%;height:2px}.next-nav.next-hoz .next-nav-item:hover:before{height:0}.next-nav.next-hoz.next-top .next-nav-item:before{top:-1px}.next-nav.next-hoz.next-bottom .next-nav-item:before{bottom:-1px}.next-nav.next-hoz .next-selected.next-nav-item:before{width:100%;left:0;height:2px}.next-nav.next-ver{padding:0;transition:width .3s ease;line-height:52px;font-size:14px}.next-nav.next-ver .next-menu-item.next-nav-item{margin-left:0;margin-right:0;padding:0 16px;border-radius:0}.next-nav.next-ver .next-menu-item:not(:first-child),.next-nav.next-ver .next-menu-sub-menu-wrapper:not(:first-child)>.next-menu-item{margin-top:0}.next-nav.next-ver .next-menu-item:not(:last-child),.next-nav.next-ver .next-menu-sub-menu-wrapper:not(:last-child)>.next-menu-item{margin-bottom:0}.next-nav.next-ver .next-menu-item-inner{height:52px;font-size:14px}.next-nav.next-ver .next-menu-item.next-nav-item.next-nav-with-title{line-height:1;padding:12px 8px}.next-nav.next-ver .next-menu-item.next-nav-item.next-nav-with-title .next-menu-item-inner{height:auto;min-height:52px}.next-nav.next-ver .next-menu-item.next-nav-item.next-nav-with-title .next-nav-text{display:block;line-height:1;margin-top:8px;overflow:hidden;text-overflow:ellipsis}.next-nav.next-ver .next-nav-group-label .next-menu-item-inner{height:40px;line-height:40px;font-size:14px}.next-nav.next-ver>.next-menu-item:first-child,.next-nav.next-ver>.next-menu-sub-menu-wrapper:first-child>.next-menu-item{margin-top:0}.next-nav.next-ver>.next-menu-item:last-child,.next-nav.next-ver>.next-menu-sub-menu-wrapper:last-child>.next-menu-item{margin-bottom:0}.next-nav.next-ver .next-menu-sub-menu{line-height:52px}.next-nav.next-ver .next-menu-sub-menu .next-menu-item-inner{height:52px;font-size:14px}.next-nav.next-ver .next-nav-item:before{height:0;top:50%;width:2px}.next-nav.next-ver .next-nav-item:hover:before{width:0}.next-nav.next-ver.next-left .next-nav-item:before,.next-nav.next-ver.next-top .next-nav-item:before{left:-1px}.next-nav.next-ver.next-bottom .next-nav-item:before,.next-nav.next-ver.next-right .next-nav-item:before{right:-1px}.next-nav.next-ver .next-selected.next-nav-item:before{height:100%;top:0;width:2px}.next-nav.next-primary{border-width:0;background:#222;border-color:#222;color:#ddd;font-weight:400;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12)}.next-nav.next-primary.next-hoz{line-height:44px}.next-nav.next-primary.next-hoz .next-menu-footer,.next-nav.next-primary.next-hoz .next-menu-header,.next-nav.next-primary.next-hoz .next-menu-item-inner{line-height:44px;height:44px}.next-nav.next-primary.next-hoz.next-top .next-nav-item:before{top:0}.next-nav.next-primary.next-hoz.next-bottom .next-nav-item:before{bottom:0}.next-nav.next-primary.next-ver.next-left .next-nav-item:before{left:0}.next-nav.next-primary.next-ver.next-right .next-nav-item:before{right:0}.next-nav.next-primary .next-nav-item.next-menu-item{background:#222;color:#ddd}.next-nav.next-primary .next-nav-item.next-menu-item.next-focused,.next-nav.next-primary .next-nav-item.next-menu-item:hover{background:#333;color:#fff;font-weight:400}.next-nav.next-primary .next-nav-item.next-menu-item.next-selected{background:#333;color:#fff;font-weight:700}.next-nav.next-primary .next-nav-item.next-menu-item.next-selected.next-nav-item{background:#333;color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item.next-opened{background:#222;color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item.next-child-selected{font-weight:700;background:transparent;color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item.next-child-selected.next-nav-popup,.next-nav.next-primary .next-nav-item.next-menu-item.next-opened.next-nav-popup{color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item:before,.next-nav.next-primary .next-nav-item.next-menu-item:hover:before{background:#209bfa}.next-nav.next-primary .next-menu-sub-menu .next-menu-item.next-opened{background:#222;color:#fff}.next-nav.next-primary .next-nav-group-label{color:#999;font-weight:400}.next-nav.next-primary .next-menu-sub-menu .next-menu-item{background:#151515;color:#ddd;font-weight:400}.next-nav.next-primary .next-menu-sub-menu .next-menu-item.next-focused,.next-nav.next-primary .next-menu-sub-menu .next-menu-item:hover{background:#333;color:#ddd}.next-nav.next-primary .next-menu-sub-menu .next-menu-item.next-selected,.next-nav.next-primary .next-menu-sub-menu .next-menu-item.next-selected.next-nav-item{background:#333;color:#fff}.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled,.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a{color:#ccc;cursor:not-allowed}.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-icon-arrow,.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-icon-selected,.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-nav.next-primary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#ccc}.next-nav.next-secondary{border-width:0;background:#209bfa;border-color:#209bfa;color:#fff;font-weight:400;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12)}.next-nav.next-secondary.next-hoz{line-height:44px}.next-nav.next-secondary.next-hoz .next-menu-footer,.next-nav.next-secondary.next-hoz .next-menu-header,.next-nav.next-secondary.next-hoz .next-menu-item-inner{line-height:44px;height:44px}.next-nav.next-secondary.next-hoz.next-top .next-nav-item:before{top:0}.next-nav.next-secondary.next-hoz.next-bottom .next-nav-item:before{bottom:0}.next-nav.next-secondary.next-ver.next-left .next-nav-item:before{left:0}.next-nav.next-secondary.next-ver.next-right .next-nav-item:before{right:0}.next-nav.next-secondary .next-nav-item.next-menu-item{background:#209bfa;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-focused,.next-nav.next-secondary .next-nav-item.next-menu-item:hover{background:#1274e7;color:#fff;font-weight:400}.next-nav.next-secondary .next-nav-item.next-menu-item.next-selected{background:#1274e7;color:#fff;font-weight:700}.next-nav.next-secondary .next-nav-item.next-menu-item.next-selected.next-nav-item{background:#1274e7;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-opened{background:transparent;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-child-selected{font-weight:700;background:transparent;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-child-selected.next-nav-popup,.next-nav.next-secondary .next-nav-item.next-menu-item.next-opened.next-nav-popup{color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item:before,.next-nav.next-secondary .next-nav-item.next-menu-item:hover:before{background:#1274e7}.next-nav.next-secondary .next-menu-sub-menu .next-menu-item.next-opened{background:transparent;color:#fff}.next-nav.next-secondary .next-nav-group-label{color:#fff;font-weight:400}.next-nav.next-secondary .next-menu-sub-menu .next-menu-item{background:#209bfa;color:#fff;font-weight:400}.next-nav.next-secondary .next-menu-sub-menu .next-menu-item.next-focused,.next-nav.next-secondary .next-menu-sub-menu .next-menu-item.next-selected,.next-nav.next-secondary .next-menu-sub-menu .next-menu-item.next-selected.next-nav-item,.next-nav.next-secondary .next-menu-sub-menu .next-menu-item:hover{background:#1274e7;color:#fff}.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled,.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a{color:#add9ff;cursor:not-allowed}.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-icon-arrow,.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-icon-selected,.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-nav.next-secondary .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#add9ff}.next-nav.next-normal{border-color:#eee;font-weight:400;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12)}.next-nav.next-normal,.next-nav.next-normal .next-nav-item.next-menu-item{background:#fff;color:#666}.next-nav.next-normal .next-nav-item.next-menu-item.next-focused,.next-nav.next-normal .next-nav-item.next-menu-item:hover{background:#fff;color:#333;font-weight:500}.next-nav.next-normal .next-nav-item.next-menu-item.next-selected{background:#e4f3fe;color:#209bfa;font-weight:700}.next-nav.next-normal .next-nav-item.next-menu-item.next-selected.next-nav-item{background:#e4f3fe;color:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item.next-opened{background:transparent;color:#333}.next-nav.next-normal .next-nav-item.next-menu-item.next-child-selected{font-weight:400;background:transparent;color:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item.next-opened.next-nav-popup{color:#333}.next-nav.next-normal .next-nav-item.next-menu-item.next-child-selected.next-nav-popup{color:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item:before{background:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item:hover:before{background:#1b84e0}.next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-opened{background:transparent;color:#333}.next-nav.next-normal .next-nav-group-label{color:#999;font-weight:400}.next-nav.next-normal .next-menu-sub-menu .next-menu-item{background:#fafafa;color:#666;font-weight:400}.next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-focused,.next-nav.next-normal .next-menu-sub-menu .next-menu-item:hover{background:#f9f9f9;color:#298dff}.next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-selected,.next-nav.next-normal .next-menu-sub-menu .next-menu-item.next-selected.next-nav-item{background:#e4f3fe;color:#209bfa}.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled,.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a{color:#999;cursor:not-allowed}.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-icon-arrow,.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-icon-selected,.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-nav.next-normal .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#999}.next-nav.next-line{background:transparent;border-color:#e6e6e6;color:#333;font-weight:400;box-shadow:none}.next-nav.next-line.next-hoz{border-right-color:transparent}.next-nav.next-line.next-hoz,.next-nav.next-line.next-ver{border-top-color:transparent;border-left-color:transparent}.next-nav.next-line.next-ver{border-bottom-color:transparent}.next-nav.next-line .next-nav-item.next-menu-item{background:transparent;color:#333}.next-nav.next-line .next-nav-item.next-menu-item.next-focused,.next-nav.next-line .next-nav-item.next-menu-item:hover{background:transparent;color:#209bfa;font-weight:400}.next-nav.next-line .next-nav-item.next-menu-item.next-selected{background:transparent;color:#209bfa;font-weight:700}.next-nav.next-line .next-nav-item.next-menu-item.next-opened,.next-nav.next-line .next-nav-item.next-menu-item.next-selected.next-nav-item{background:transparent;color:#209bfa}.next-nav.next-line .next-nav-item.next-menu-item.next-child-selected{font-weight:400;background:transparent;color:#209bfa}.next-nav.next-line .next-nav-item.next-menu-item.next-child-selected.next-nav-popup,.next-nav.next-line .next-nav-item.next-menu-item.next-opened.next-nav-popup{color:#209bfa}.next-nav.next-line .next-nav-item.next-menu-item:before,.next-nav.next-line .next-nav-item.next-menu-item:hover:before{background:#209bfa}.next-nav.next-line .next-menu-sub-menu .next-menu-item.next-opened{background:transparent;color:#209bfa}.next-nav.next-line .next-nav-group-label{color:#999;font-weight:400}.next-nav.next-line .next-menu-sub-menu .next-menu-item{background:transparent;color:#333;font-weight:400}.next-nav.next-line .next-menu-sub-menu .next-menu-item.next-focused,.next-nav.next-line .next-menu-sub-menu .next-menu-item.next-selected,.next-nav.next-line .next-menu-sub-menu .next-menu-item.next-selected.next-nav-item,.next-nav.next-line .next-menu-sub-menu .next-menu-item:hover{background:transparent;color:#209bfa}.next-nav.next-line .next-nav-item.next-menu-item.next-disabled,.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a{color:#999;cursor:not-allowed}.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-icon-arrow,.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-icon-selected,.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-arrow,.next-nav.next-line .next-nav-item.next-menu-item.next-disabled .next-menu-item-text>a .next-menu-icon-selected{color:#999}.next-nav.next-icon-only.next-icon-only-text{padding-top:4px;padding-bottom:4px}.next-nav.next-icon-only.next-custom-icon-only-width{text-align:center}.next-nav.next-icon-only .next-menu-item-inner{text-overflow:clip}.next-nav.next-icon-only.next-normal .next-nav-icon.next-icon{margin-left:2px;margin-right:2px}.next-nav.next-icon-only.next-normal .next-nav-icon.next-icon .next-icon-remote,.next-nav.next-icon-only.next-normal .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only.next-primary .next-nav-icon.next-icon{margin-left:3px;margin-right:3px}.next-nav.next-icon-only.next-primary .next-nav-icon.next-icon .next-icon-remote,.next-nav.next-icon-only.next-primary .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only.next-secondary .next-nav-icon.next-icon{margin-left:3px;margin-right:3px}.next-nav.next-icon-only.next-secondary .next-nav-icon.next-icon .next-icon-remote,.next-nav.next-icon-only.next-secondary .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only .next-nav-icon-only-arrow.next-icon{margin-left:3px;margin-right:3px;transition:all .1s linear;transform-origin:center 50%}.next-nav.next-icon-only .next-nav-icon-only-arrow.next-icon .next-icon-remote,.next-nav.next-icon-only .next-nav-icon-only-arrow.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down{transform:rotate(180deg);margin-left:3px;margin-right:3px}.next-nav.next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down .next-icon-remote,.next-nav.next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down:before{width:20px;font-size:20px;line-height:inherit}.next-nav.next-icon-only .next-menu-hoz-icon-arrow,.next-nav.next-icon-only .next-menu-icon-arrow{display:none}.next-nav-embeddable.next-normal,.next-nav-embeddable.next-primary,.next-nav-embeddable.next-secondary{height:100%;background:transparent;box-shadow:none;border:none}.next-nav-embeddable.next-normal .next-menu-sub-menu .next-menu-item,.next-nav-embeddable.next-normal .next-nav-item.next-menu-item,.next-nav-embeddable.next-primary .next-menu-sub-menu .next-menu-item,.next-nav-embeddable.next-primary .next-nav-item.next-menu-item,.next-nav-embeddable.next-secondary .next-menu-sub-menu .next-menu-item,.next-nav-embeddable.next-secondary .next-nav-item.next-menu-item{background:transparent}.next-nav-embeddable.next-normal.next-icon-only .next-nav-icon.next-icon,.next-nav-embeddable.next-primary.next-icon-only .next-nav-icon.next-icon,.next-nav-embeddable.next-secondary.next-icon-only .next-nav-icon.next-icon{margin-left:3px;margin-right:3px}.next-nav-embeddable.next-normal.next-icon-only .next-nav-icon.next-icon .next-icon-remote,.next-nav-embeddable.next-normal.next-icon-only .next-nav-icon.next-icon:before,.next-nav-embeddable.next-primary.next-icon-only .next-nav-icon.next-icon .next-icon-remote,.next-nav-embeddable.next-primary.next-icon-only .next-nav-icon.next-icon:before,.next-nav-embeddable.next-secondary.next-icon-only .next-nav-icon.next-icon .next-icon-remote,.next-nav-embeddable.next-secondary.next-icon-only .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav-embeddable.next-nav.next-hoz .next-menu-item-inner,.next-nav-embeddable.next-nav.next-hoz .next-menu-sub-menu .next-menu-item,.next-nav-embeddable.next-nav.next-hoz .next-nav-item.next-menu-item{height:100%}.next-nav-embeddable,.next-nav-embeddable .next-nav-item.next-disabled,.next-nav-embeddable .next-nav-item.next-disabled .next-menu-item-text>a{background:transparent;border:none}.next-nav[dir=rtl] .next-nav-icon.next-icon{margin-left:12px;margin-right:0}.next-nav[dir=rtl] .next-nav-icon.next-icon .next-icon-remote,.next-nav[dir=rtl] .next-nav-icon.next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-nav[dir=rtl].next-hoz .next-menu-header{float:right}.next-nav[dir=rtl].next-hoz .next-menu-footer{float:left}.next-nav[dir=rtl].next-hoz .next-nav-item:before{width:0;left:50%}.next-nav[dir=rtl].next-hoz .next-selected.next-nav-item:before{width:100%;left:auto;right:0}.next-nav[dir=rtl].next-ver.next-left .next-nav-item:before{right:0;right:-1px;left:auto}.next-nav[dir=rtl].next-ver.next-right .next-nav-item:before{left:0;left:-1px;right:auto}.next-nav[dir=rtl].next-primary.next-ver.next-left .next-nav-item:before{right:0;left:auto}.next-nav[dir=rtl].next-primary.next-ver.next-right .next-nav-item:before{left:0;right:auto}.next-nav[dir=rtl].next-secondary.next-ver.next-left .next-nav-item:before{right:0;left:auto}.next-nav[dir=rtl].next-secondary.next-ver.next-right .next-nav-item:before{left:0;right:auto}.next-nav[dir=rtl] .next-nav.next-line.next-ver{border-color:transparent}.next-nav[dir=rtl].next-icon-only .next-nav-icon-only-arrow.next-icon,.next-nav[dir=rtl].next-icon-only .next-nav-icon.next-icon,.next-nav[dir=rtl].next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down{margin-left:0;margin-right:-1px}.next-nav[dir=rtl].next-icon-only .next-nav-icon-only-arrow.next-icon .next-icon-remote,.next-nav[dir=rtl].next-icon-only .next-nav-icon-only-arrow.next-icon:before,.next-nav[dir=rtl].next-icon-only .next-nav-icon.next-icon .next-icon-remote,.next-nav[dir=rtl].next-icon-only .next-nav-icon.next-icon:before,.next-nav[dir=rtl].next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down .next-icon-remote,.next-nav[dir=rtl].next-icon-only .next-nav-item.next-opened .next-nav-icon-only-arrow.next-icon-arrow-down:before{width:20px;font-size:20px;line-height:inherit}.next-number-picker{display:inline-block}.next-number-picker,.next-number-picker *,.next-number-picker :after,.next-number-picker :before{box-sizing:border-box}.next-number-picker .next-btn{padding:0!important;line-height:0!important;box-shadow:none!important}.next-number-picker-normal .next-input{width:100%}.next-number-picker-normal .next-input .next-input-control{padding-right:0;height:100%}.next-number-picker-normal:not(.next-number-picker-no-trigger) .next-input input{padding-right:2px}.next-number-picker-normal .next-btn{display:block}.next-number-picker-normal .next-btn:hover{z-index:1}.next-number-picker-normal .next-btn:first-child{border-right:none;border-top:none;height:50%;border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.next-number-picker-normal .next-btn:last-child{border-right:none;border-bottom:none;margin-top:-1px;height:calc(50% + 1px);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:0}.next-number-picker-normal .next-number-picker-handler{transition:opacity .1s linear;height:100%;display:block}.next-number-picker-normal:not(.next-number-picker-show-trigger) .next-number-picker-handler{opacity:0}.next-number-picker-normal.hover .next-number-picker-handler,.next-number-picker-normal:hover .next-number-picker-handler{opacity:1}.next-number-picker-normal .next-input.next-disabled .next-number-picker-handler{opacity:0}.next-number-picker-normal .next-number-picker-up-icon:before{content:""}.next-number-picker-normal .next-number-picker-down-icon:before{content:""}.next-number-picker-normal.next-small{width:68px}.next-number-picker-normal.next-small .next-btn{width:20px}.next-number-picker-normal.next-small .next-btn:first-child{border-top-right-radius:3px}.next-number-picker-normal.next-small .next-btn:last-child{border-bottom-right-radius:3px}.next-number-picker-normal.next-small .next-icon .next-icon-remote,.next-number-picker-normal.next-small .next-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-number-picker-normal.next-small .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-number-picker-normal.next-small .next-icon:before{width:16px;font-size:16px}}.next-number-picker-normal.next-medium{width:80px}.next-number-picker-normal.next-medium .next-btn{width:20px}.next-number-picker-normal.next-medium .next-btn:first-child{border-top-right-radius:3px}.next-number-picker-normal.next-medium .next-btn:last-child{border-bottom-right-radius:3px}.next-number-picker-normal.next-medium .next-icon .next-icon-remote,.next-number-picker-normal.next-medium .next-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-number-picker-normal.next-medium .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-number-picker-normal.next-medium .next-icon:before{width:16px;font-size:16px}}.next-number-picker-normal.next-large{width:80px}.next-number-picker-normal.next-large .next-btn{width:20px}.next-number-picker-normal.next-large .next-btn:first-child{border-top-right-radius:3px}.next-number-picker-normal.next-large .next-btn:last-child{border-bottom-right-radius:3px}.next-number-picker-normal.next-large .next-icon .next-icon-remote,.next-number-picker-normal.next-large .next-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-number-picker-normal.next-large .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-number-picker-normal.next-large .next-icon:before{width:16px;font-size:16px}}.next-number-picker-inline input{text-align:center}.next-number-picker-inline .next-input input{padding:0}.next-number-picker-inline .next-number-picker-add-icon:before{content:""}.next-number-picker-inline .next-number-picker-minus-icon:before{content:""}.next-number-picker-inline.next-small{width:68px;min-width:72px}.next-number-picker-inline.next-small .next-icon .next-icon-remote,.next-number-picker-inline.next-small .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-number-picker-inline.next-small .next-btn{height:24px}.next-number-picker-inline.next-small .next-before .next-btn{margin-right:2px;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-number-picker-inline.next-small .next-after .next-btn{margin-left:2px;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-number-picker-inline.next-medium{width:100px;min-width:96px}.next-number-picker-inline.next-medium .next-icon .next-icon-remote,.next-number-picker-inline.next-medium .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-number-picker-inline.next-medium .next-btn{height:32px}.next-number-picker-inline.next-medium .next-before .next-btn{margin-right:2px;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-number-picker-inline.next-medium .next-after .next-btn{margin-left:2px;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-number-picker-inline.next-large{width:128px;min-width:120px}.next-number-picker-inline.next-large .next-icon .next-icon-remote,.next-number-picker-inline.next-large .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-number-picker-inline.next-large .next-btn{height:40px}.next-number-picker-inline.next-large .next-before .next-btn{margin-right:2px;border-top-left-radius:3px;border-bottom-left-radius:3px}.next-number-picker-inline.next-large .next-after .next-btn{margin-left:2px;border-top-right-radius:3px;border-bottom-right-radius:3px}.next-number-picker-inline .next-btn.next-small{width:24px}.next-number-picker-inline .next-btn.next-medium{width:32px}.next-number-picker-inline .next-btn.next-large{width:40px}@-moz-document url-prefix(){.next-number-picker-normal.next-small .next-number-picker-handler{height:22px}.next-number-picker-normal.next-medium .next-number-picker-handler{height:30px}.next-number-picker-normal.next-large .next-number-picker-handler{height:38px}}.next-number-picker-normal[dir=rtl] .next-btn:first-child{border-right:1px solid #ddd;border-left:0;border-top-right-radius:0}.next-number-picker-normal[dir=rtl] .next-btn:first-child.next-large,.next-number-picker-normal[dir=rtl] .next-btn:first-child.next-medium,.next-number-picker-normal[dir=rtl] .next-btn:first-child.next-small{border-top-left-radius:3px}.next-number-picker-normal[dir=rtl] .next-btn:last-child{border-right:1px solid #ddd;border-left:0;border-bottom-right-radius:0}.next-number-picker-normal[dir=rtl] .next-btn:last-child.next-large,.next-number-picker-normal[dir=rtl] .next-btn:last-child.next-medium,.next-number-picker-normal[dir=rtl] .next-btn:last-child.next-small{border-bottom-left-radius:3px}.next-number-picker-normal[dir=rtl] .next-input .next-input-control{padding-left:0}.next-number-picker-inline[dir=rtl] .next-before .next-btn{margin-right:0}.next-number-picker-inline[dir=rtl] .next-before .next-btn.next-large,.next-number-picker-inline[dir=rtl] .next-before .next-btn.next-medium,.next-number-picker-inline[dir=rtl] .next-before .next-btn.next-small{margin-left:2px;border-top-right-radius:3px!important;border-bottom-right-radius:3px!important}.next-number-picker-inline[dir=rtl] .next-after .next-btn{margin-left:0}.next-number-picker-inline[dir=rtl] .next-after .next-btn.next-large,.next-number-picker-inline[dir=rtl] .next-after .next-btn.next-medium,.next-number-picker-inline[dir=rtl] .next-after .next-btn.next-small{margin-right:2px;border-top-left-radius:3px!important;border-bottom-left-radius:3px!important}.next-pagination[dir=rtl] .next-pagination-total{margin-right:0;margin-left:16px}.next-pagination[dir=rtl] .next-pagination-jump-go{margin-left:0;margin-right:4px}.next-pagination[dir=rtl] .next-pagination-size-selector-title{margin-right:0;margin-left:4px}.next-pagination[dir=rtl] .next-pagination-size-selector-btn.next-btn-text+.next-pagination-size-selector-btn{border-left:none;border-right:1px solid #e6e6e6}.next-pagination[dir=rtl] .next-pagination-pages+.next-pagination-size-selector,.next-pagination[dir=rtl] .next-pagination-size-selector+.next-pagination-pages{margin-left:0;margin-right:40px}.next-pagination[dir=rtl].next-start .next-pagination-pages{float:left}.next-pagination[dir=rtl].next-end .next-pagination-pages,.next-pagination[dir=rtl].next-start .next-pagination-size-selector{float:right}.next-pagination[dir=rtl].next-end .next-pagination-size-selector{float:left}.next-pagination[dir=rtl].next-small .next-pagination-list{margin:0 4px}.next-pagination[dir=rtl].next-small .next-pagination-total{line-height:24px;vertical-align:middle}.next-pagination[dir=rtl].next-small .next-pagination-item{padding:0 6px;border-width:1px;border-radius:3px}.next-pagination[dir=rtl].next-small .next-pagination-item+.next-pagination-item{margin:0 4px 0 0}.next-pagination[dir=rtl].next-small .next-pagination-ellipsis{height:24px;line-height:24px;margin-left:8px;margin-right:8px}.next-pagination[dir=rtl].next-small .next-pagination-ellipsis .next-icon-remote,.next-pagination[dir=rtl].next-small .next-pagination-ellipsis:before{width:12px;font-size:12px;line-height:inherit}.next-pagination[dir=rtl].next-small .next-pagination-display,.next-pagination[dir=rtl].next-small .next-pagination-display em,.next-pagination[dir=rtl].next-small .next-pagination-jump-text{font-size:12px}.next-pagination[dir=rtl].next-small .next-pagination-jump-input{width:28px}.next-pagination[dir=rtl].next-small .next-pagination-size-selector-title{height:24px;line-height:24px;font-size:12px;vertical-align:middle}.next-pagination[dir=rtl].next-small .next-pagination-size-selector-btn{padding:0 8px}.next-pagination[dir=rtl].next-small .next-pagination-item.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-small .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination[dir=rtl].next-small .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-small .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination[dir=rtl].next-medium .next-pagination-list{margin:0 4px}.next-pagination[dir=rtl].next-medium .next-pagination-total{line-height:32px;vertical-align:middle}.next-pagination[dir=rtl].next-medium .next-pagination-item{padding:0 10px;border-width:1px;border-radius:3px}.next-pagination[dir=rtl].next-medium .next-pagination-item+.next-pagination-item{margin:0 4px 0 0}.next-pagination[dir=rtl].next-medium .next-pagination-ellipsis{height:32px;line-height:32px;margin-left:8px;margin-right:8px}.next-pagination[dir=rtl].next-medium .next-pagination-ellipsis .next-icon-remote,.next-pagination[dir=rtl].next-medium .next-pagination-ellipsis:before{width:12px;font-size:12px;line-height:inherit}.next-pagination[dir=rtl].next-medium .next-pagination-display,.next-pagination[dir=rtl].next-medium .next-pagination-display em,.next-pagination[dir=rtl].next-medium .next-pagination-jump-text{font-size:14px}.next-pagination[dir=rtl].next-medium .next-pagination-jump-input{width:36px}.next-pagination[dir=rtl].next-medium .next-pagination-size-selector-title{height:32px;line-height:32px;font-size:14px;vertical-align:middle}.next-pagination[dir=rtl].next-medium .next-pagination-size-selector-btn{padding:0 12px}.next-pagination[dir=rtl].next-medium .next-pagination-item.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-medium .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination[dir=rtl].next-medium .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-medium .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination[dir=rtl].next-large .next-pagination-list{margin:0 8px}.next-pagination[dir=rtl].next-large .next-pagination-total{line-height:40px;vertical-align:middle}.next-pagination[dir=rtl].next-large .next-pagination-item{padding:0 15px;border-width:1px;border-radius:3px}.next-pagination[dir=rtl].next-large .next-pagination-item+.next-pagination-item{margin:0 8px 0 0}.next-pagination[dir=rtl].next-large .next-pagination-ellipsis{height:40px;line-height:40px;margin-left:8px;margin-right:8px}.next-pagination[dir=rtl].next-large .next-pagination-ellipsis .next-icon-remote,.next-pagination[dir=rtl].next-large .next-pagination-ellipsis:before{width:16px;font-size:16px;line-height:inherit}.next-pagination[dir=rtl].next-large .next-pagination-display,.next-pagination[dir=rtl].next-large .next-pagination-display em,.next-pagination[dir=rtl].next-large .next-pagination-jump-text{font-size:16px}.next-pagination[dir=rtl].next-large .next-pagination-jump-input{width:48px}.next-pagination[dir=rtl].next-large .next-pagination-size-selector-title{height:40px;line-height:40px;font-size:16px;vertical-align:middle}.next-pagination[dir=rtl].next-large .next-pagination-size-selector-btn{padding:0 16px}.next-pagination[dir=rtl].next-large .next-pagination-item.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-large .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination[dir=rtl].next-large .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination[dir=rtl].next-large .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination{font-size:0}.next-pagination,.next-pagination *,.next-pagination :after,.next-pagination :before{box-sizing:border-box}.next-pagination:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-pagination-total{display:inline-block;font-size:14px;margin-right:16px}.next-pagination-pages{display:inline-block}.next-pagination-list{display:inline-block;vertical-align:top}.next-pagination .next-pagination-item:not([disabled]){display:inline-block;border-style:solid;border-color:#ddd;background:#fff;color:#333;box-shadow:none}.next-pagination .next-pagination-item{transition:none}.next-pagination .next-pagination-item.next-current{border-color:#209bfa;background:#209bfa;color:#fff;box-shadow:none}.next-pagination .next-pagination-item.next-current:focus,.next-pagination .next-pagination-item.next-current:hover{border-color:#209bfa;background:#fff;color:#209bfa;box-shadow:none}.next-pagination-ellipsis{display:inline-block;color:#999;vertical-align:top}.next-pagination-display{display:inline-block;margin:0 16px;color:#333;vertical-align:middle}.next-pagination-display em{font-style:normal;color:#209bfa}.next-pagination-jump-text{display:inline-block;vertical-align:middle;color:#999}.next-pagination-jump-input{margin:0 4px;vertical-align:top}.next-pagination-jump-go{margin-left:4px;vertical-align:top}.next-pagination-size-selector{display:inline-block;position:relative}.next-pagination-size-selector-title{margin-right:4px;color:#999}.next-pagination-size-selector-filter{display:inline-block;vertical-align:middle}.next-pagination-size-selector-dropdown{vertical-align:top;min-width:64px}.next-pagination-size-selector-dropdown .next-select-inner,.next-pagination-size-selector-popup{min-width:64px}.next-pagination-size-selector-btn.next-btn-text{height:auto;line-height:normal;color:#666;border-radius:0}.next-pagination-size-selector-btn.next-btn-text.next-current{color:#209bfa}.next-pagination-size-selector-btn.next-btn-text+.next-pagination-size-selector-btn{border-left:1px solid #e6e6e6}.next-pagination-pages+.next-pagination-size-selector,.next-pagination-size-selector+.next-pagination-pages{margin-left:40px}.next-pagination.next-hide{display:none}.next-pagination.next-start .next-pagination-pages{float:right}.next-pagination.next-end .next-pagination-pages,.next-pagination.next-start .next-pagination-size-selector{float:left}.next-pagination.next-end .next-pagination-size-selector{float:right}.next-pagination.next-small .next-pagination-list{margin:0 4px}.next-pagination.next-small .next-pagination-total{line-height:24px;vertical-align:middle}.next-pagination.next-small .next-pagination-item{padding:0 6px;border-width:1px;border-radius:3px}.next-pagination.next-small .next-pagination-item+.next-pagination-item{margin:0 0 0 4px}.next-pagination.next-small .next-pagination-ellipsis{height:24px;line-height:24px;margin-left:8px;margin-right:8px}.next-pagination.next-small .next-pagination-ellipsis .next-icon-remote,.next-pagination.next-small .next-pagination-ellipsis:before{width:12px;font-size:12px;line-height:inherit}.next-pagination.next-small .next-pagination-display,.next-pagination.next-small .next-pagination-display em,.next-pagination.next-small .next-pagination-jump-text{font-size:12px}.next-pagination.next-small .next-pagination-jump-input{width:28px}.next-pagination.next-small .next-pagination-size-selector-title{height:24px;line-height:24px;font-size:12px;vertical-align:middle}.next-pagination.next-small .next-pagination-size-selector-btn{padding:0 8px}.next-pagination.next-small .next-pagination-item.next-next:not([disabled]) i,.next-pagination.next-small .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination.next-small .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination.next-small .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination.next-small.next-arrow-only .next-pagination-item.next-next,.next-pagination.next-small.next-arrow-only .next-pagination-item.next-prev{width:20px;padding:0}.next-pagination.next-small.next-arrow-only .next-pagination-item.next-next .next-icon,.next-pagination.next-small.next-arrow-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-small.next-arrow-prev-only .next-pagination-item.next-prev{width:20px;padding:0}.next-pagination.next-small.next-arrow-prev-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-small.next-no-border .next-pagination-item.next-next,.next-pagination.next-small.next-no-border .next-pagination-item.next-prev{padding:0;border:none;background-color:transparent;box-shadow:none}.next-pagination.next-small.next-no-border .next-pagination-item.next-next .next-icon,.next-pagination.next-small.next-no-border .next-pagination-item.next-prev .next-icon{margin:0}.next-pagination.next-small.next-no-border .next-pagination-item.next-next:not([disabled]):hover i,.next-pagination.next-small.next-no-border .next-pagination-item.next-prev:not([disabled]):hover i{color:#209bfa}.next-pagination.next-small.next-no-border .next-pagination-display{margin:0 8px}.next-pagination.next-small.next-mini .next-pagination-item.next-prev{margin-right:4px}.next-pagination.next-small.next-mini .next-pagination-item.next-next{margin-left:4px}.next-pagination.next-medium .next-pagination-list{margin:0 4px}.next-pagination.next-medium .next-pagination-total{line-height:32px;vertical-align:middle}.next-pagination.next-medium .next-pagination-item{padding:0 10px;border-width:1px;border-radius:3px}.next-pagination.next-medium .next-pagination-item+.next-pagination-item{margin:0 0 0 4px}.next-pagination.next-medium .next-pagination-ellipsis{height:32px;line-height:32px;margin-left:8px;margin-right:8px}.next-pagination.next-medium .next-pagination-ellipsis .next-icon-remote,.next-pagination.next-medium .next-pagination-ellipsis:before{width:12px;font-size:12px;line-height:inherit}.next-pagination.next-medium .next-pagination-display,.next-pagination.next-medium .next-pagination-display em,.next-pagination.next-medium .next-pagination-jump-text{font-size:14px}.next-pagination.next-medium .next-pagination-jump-input{width:36px}.next-pagination.next-medium .next-pagination-size-selector-title{height:32px;line-height:32px;font-size:14px;vertical-align:middle}.next-pagination.next-medium .next-pagination-size-selector-btn{padding:0 12px}.next-pagination.next-medium .next-pagination-item.next-next:not([disabled]) i,.next-pagination.next-medium .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination.next-medium .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination.next-medium .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination.next-medium.next-arrow-only .next-pagination-item.next-next,.next-pagination.next-medium.next-arrow-only .next-pagination-item.next-prev{width:28px;padding:0}.next-pagination.next-medium.next-arrow-only .next-pagination-item.next-next .next-icon,.next-pagination.next-medium.next-arrow-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-medium.next-arrow-prev-only .next-pagination-item.next-prev{width:28px;padding:0}.next-pagination.next-medium.next-arrow-prev-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-medium.next-no-border .next-pagination-item.next-next,.next-pagination.next-medium.next-no-border .next-pagination-item.next-prev{padding:0;border:none;background-color:transparent;box-shadow:none}.next-pagination.next-medium.next-no-border .next-pagination-item.next-next .next-icon,.next-pagination.next-medium.next-no-border .next-pagination-item.next-prev .next-icon{margin:0}.next-pagination.next-medium.next-no-border .next-pagination-item.next-next:not([disabled]):hover i,.next-pagination.next-medium.next-no-border .next-pagination-item.next-prev:not([disabled]):hover i{color:#209bfa}.next-pagination.next-medium.next-no-border .next-pagination-display{margin:0 12px}.next-pagination.next-medium.next-mini .next-pagination-item.next-prev{margin-right:4px}.next-pagination.next-medium.next-mini .next-pagination-item.next-next{margin-left:4px}.next-pagination.next-large .next-pagination-list{margin:0 8px}.next-pagination.next-large .next-pagination-total{line-height:40px;vertical-align:middle}.next-pagination.next-large .next-pagination-item{padding:0 15px;border-width:1px;border-radius:3px}.next-pagination.next-large .next-pagination-item+.next-pagination-item{margin:0 0 0 8px}.next-pagination.next-large .next-pagination-ellipsis{height:40px;line-height:40px;margin-left:8px;margin-right:8px}.next-pagination.next-large .next-pagination-ellipsis .next-icon-remote,.next-pagination.next-large .next-pagination-ellipsis:before{width:16px;font-size:16px;line-height:inherit}.next-pagination.next-large .next-pagination-display,.next-pagination.next-large .next-pagination-display em,.next-pagination.next-large .next-pagination-jump-text{font-size:16px}.next-pagination.next-large .next-pagination-jump-input{width:48px}.next-pagination.next-large .next-pagination-size-selector-title{height:40px;line-height:40px;font-size:16px;vertical-align:middle}.next-pagination.next-large .next-pagination-size-selector-btn{padding:0 16px}.next-pagination.next-large .next-pagination-item.next-next:not([disabled]) i,.next-pagination.next-large .next-pagination-item.next-prev:not([disabled]) i{color:#666}.next-pagination.next-large .next-pagination-item:hover.next-next:not([disabled]) i,.next-pagination.next-large .next-pagination-item:hover.next-prev:not([disabled]) i{color:#333}.next-pagination.next-large.next-arrow-only .next-pagination-item.next-next,.next-pagination.next-large.next-arrow-only .next-pagination-item.next-prev{width:40px;padding:0}.next-pagination.next-large.next-arrow-only .next-pagination-item.next-next .next-icon,.next-pagination.next-large.next-arrow-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-large.next-arrow-prev-only .next-pagination-item.next-prev{width:40px;padding:0}.next-pagination.next-large.next-arrow-prev-only .next-pagination-item.next-prev .next-icon{margin:0 auto}.next-pagination.next-large.next-no-border .next-pagination-item.next-next,.next-pagination.next-large.next-no-border .next-pagination-item.next-prev{padding:0;border:none;background-color:transparent;box-shadow:none}.next-pagination.next-large.next-no-border .next-pagination-item.next-next .next-icon,.next-pagination.next-large.next-no-border .next-pagination-item.next-prev .next-icon{margin:0}.next-pagination.next-large.next-no-border .next-pagination-item.next-next:not([disabled]):hover i,.next-pagination.next-large.next-no-border .next-pagination-item.next-prev:not([disabled]):hover i{color:#209bfa}.next-pagination.next-large.next-no-border .next-pagination-display{margin:0 16px}.next-pagination.next-large.next-mini .next-pagination-item.next-prev{margin-right:8px}.next-pagination.next-large.next-mini .next-pagination-item.next-next{margin-left:8px}.next-pagination-icon-prev:before{content:""}.next-pagination-icon-next:before{content:""}.next-pagination-icon-ellipsis:before{content:""}.next-paragraph{color:#333}.next-paragraph-short{line-height:1.5}.next-paragraph-long{line-height:1.7}.next-paragraph-medium,.next-paragraph-small{font-size:14px}.next-progress-circle[dir=rtl] .next-progress-circle-container{transform:scaleX(-1)}.next-progress-line[dir=rtl] .next-progress-line-overlay{left:auto;right:0}.next-progress-line,.next-progress-line *,.next-progress-line :after,.next-progress-line :before{box-sizing:border-box}.next-progress-line{width:100%;display:inline-block;position:relative}.next-progress-line-container{display:inline-block;width:100%;vertical-align:middle}.next-progress-line-underlay{position:relative;overflow:hidden;width:100%;background:#f5f5f5}.next-progress-line-overlay{position:absolute;left:0;top:0;transition:all .3s ease}.next-progress-line-overlay-normal{background:#209bfa}.next-progress-line-overlay-success{background:#1ad78c}.next-progress-line-overlay-error,.next-progress-line-overlay-started{background:#d23c26}.next-progress-line-overlay-middle{background:#f1c826}.next-progress-line-overlay-finishing{background:#1ad78c}.next-progress-line.next-small .next-progress-line-underlay{border-radius:12px;height:4px}.next-progress-line.next-small .next-progress-line-overlay{height:4px;border-radius:12px;top:50%;margin-top:-2px}.next-progress-line.next-small .next-progress-line-text{font-size:12px;line-height:4px}.next-progress-line.next-medium .next-progress-line-underlay{border-radius:12px;height:8px}.next-progress-line.next-medium .next-progress-line-overlay{height:8px;border-radius:12px;top:50%;margin-top:-4px}.next-progress-line.next-medium .next-progress-line-text{font-size:12px;line-height:8px}.next-progress-line.next-large .next-progress-line-underlay{border-radius:12px;height:12px}.next-progress-line.next-large .next-progress-line-overlay{height:12px;border-radius:12px;top:50%;margin-top:-6px}.next-progress-line.next-large .next-progress-line-text{font-size:14px;line-height:12px}.next-progress-line-show-info .next-progress-line-container{padding-right:60px;margin-right:-60px}.next-progress-line-show-info .next-progress-line-text{width:50px;text-align:left;margin-left:10px;vertical-align:middle;display:inline-block;color:#333}.next-progress-line-show-border .next-progress-line-underlay{border:1px solid #e6e6e6}.next-progress-line-show-border.next-small .next-progress-line-underlay{border-radius:12px;height:6px}.next-progress-line-show-border.next-small .next-progress-line-overlay{height:4px;border-radius:12px;top:50%;margin-top:-2px}.next-progress-line-show-border.next-small .next-progress-line-text{font-size:12px;line-height:6px}.next-progress-line-show-border.next-medium .next-progress-line-underlay{border-radius:12px;height:10px}.next-progress-line-show-border.next-medium .next-progress-line-overlay{height:8px;border-radius:12px;top:50%;margin-top:-4px}.next-progress-line-show-border.next-medium .next-progress-line-text{font-size:12px;line-height:10px}.next-progress-line-show-border.next-large .next-progress-line-underlay{border-radius:12px;height:14px}.next-progress-line-show-border.next-large .next-progress-line-overlay{height:12px;border-radius:12px;top:50%;margin-top:-6px}.next-progress-line-show-border.next-large .next-progress-line-text{font-size:14px;line-height:14px}.next-progress-circle,.next-progress-circle *,.next-progress-circle :after,.next-progress-circle :before{box-sizing:border-box}.next-progress-circle{position:relative;display:inline-block}.next-progress-circle-underlay{stroke-width:8px;stroke:#f5f5f5}.next-progress-circle-overlay{transition:all .3s ease;stroke-linecap:round;stroke-width:8px}.next-progress-circle-overlay-normal{stroke:#209bfa}.next-progress-circle-overlay-success{stroke:#1ad78c}.next-progress-circle-overlay-error,.next-progress-circle-overlay-started{stroke:#d23c26}.next-progress-circle-overlay-middle{stroke:#f1c826}.next-progress-circle-overlay-finishing{stroke:#1ad78c}.next-progress-circle.next-small{width:100px;height:100px;font-size:20px}.next-progress-circle.next-medium{width:116px;height:116px;font-size:24px}.next-progress-circle.next-large{width:132px;height:132px;font-size:36px}.next-progress-circle-text{display:block;position:absolute;width:100%;top:50%;left:0;text-align:center;line-height:1;-webkit-transform:translateY(-50%);transform:translateY(-50%);transition:transform .3s ease;color:#333}.next-range{width:100%;font-family:inherit;font-weight:400;font-size:inherit;line-height:inherit;vertical-align:baseline;display:flex;flex-direction:column;cursor:pointer}.next-range,.next-range *,.next-range :after,.next-range :before{box-sizing:border-box}.next-range .next-range-inner{position:relative}.next-range .next-range-inner:only-child{margin-top:auto;margin-bottom:auto}.next-range .next-range-track{position:absolute;width:100%;top:50%;border-radius:0}.next-range .next-range-selected{position:absolute;width:0;top:50%;left:0;border-radius:0}.next-range .next-range-scale{position:relative;width:100%;height:12px}.next-range .next-range-scale .next-range-scale-item{position:absolute;left:0;width:2px;border:1px solid;border-radius:0}.next-range .next-range-scale .next-range-scale-item:last-child{margin-left:-2px}.next-range .next-range-slider{position:absolute;top:50%;left:0;border-radius:50%}.next-range .next-range-slider-inner{position:absolute;top:50%;left:50%;border:1px solid #ddd;border-radius:50%;transition:transform .1s linear,border-color .1s linear}.next-range .next-range-frag.next-range-active .next-range-slider .next-range-slider-inner,.next-range .next-range-slider.next-range-slider-moving .next-range-slider-inner{border:2px solid #209bfa;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12);transform:scale(1.2)}.next-range .next-range-mark{position:relative;cursor:auto}.next-range .next-range-mark .next-range-mark-text{position:absolute;left:0;transform:translateX(-50%);padding-left:2px;text-align:center}.next-range .next-range-frag{position:absolute;top:0}.next-range .next-range-frag .next-range-slider{left:0}.next-range .next-range-frag .next-range-slider:nth-child(2){left:100%}.next-range .next-range-frag .next-range-selected{width:100%}.next-range.disabled{cursor:not-allowed}.next-range.disabled .next-range-mark{cursor:auto}.next-range .next-range-track,.next-range .next-range-track:hover{background:#ddd}.next-range .next-range-selected,.next-range .next-range-selected:hover{background:#209bfa}.next-range .next-range-scale .next-range-scale-item{border-color:#ddd;background:#ddd}.next-range .next-range-scale .next-range-scale-item:hover{border-color:#ddd}.next-range .next-range-scale .next-range-scale-item.activated{border-color:#209bfa;background:#209bfa}.next-range .next-range-scale .next-range-scale-item.activated:hover{border-color:#209bfa}.next-range .next-range-slider-inner{background:#fff;border-color:#ddd}.next-range .next-range-slider-inner:hover{background:#fff;box-shadow:20px 20px 30px 0 rgba(0,0,0,.15);transform:scale(1.2)}.next-range .next-range-mark .next-range-mark-text,.next-range .next-range-mark .next-range-mark-text:hover{color:#999}.next-range .next-range-mark .next-range-mark-text.activated,.next-range .next-range-mark .next-range-mark-text.activated:hover{color:#333}.next-range.disabled .next-range-track{background:#ddd}.next-range.disabled .next-range-selected{background:#ccc}.next-range.disabled .next-range-scale-item{border-color:#ddd}.next-range.disabled .next-range-scale-item.activated{border-color:#ccc}.next-range.disabled .next-range-slider-inner{background:#eee;border-color:#eee;transform:none;box-shadow:none}.next-range.disabled .next-range-mark-text{color:#ccc}.next-range.disabled .next-range-mark-text.activated{color:#999}.next-range .next-range-selected,.next-range .next-range-track{height:4px;margin-top:-2px}.next-range .next-range-frag{margin-top:4px;height:4px}.next-range .next-range-slider{box-shadow:1px 1px 3px 0 rgba(0,0,0,.12)}.next-range .next-range-slider,.next-range .next-range-slider-inner{height:16px;width:16px;margin-top:-8px;margin-left:-8px}.next-range .next-range-mark{display:block}.next-range .next-range-mark .next-range-mark-text{font-size:14px;font-weight:400;line-height:20px;height:20px}.next-range .next-range-mark.next-range-mark-below{height:30px}.next-range .next-range-mark.next-range-mark-below .next-range-mark-text{bottom:0}.next-range .next-range-mark.next-range-mark-above{height:30px}.next-range .next-range-scale .next-range-scale-item{height:12px}.next-range.simulation-hover>.next-range-slider-inner{background:#fff;box-shadow:20px 20px 30px 0 rgba(0,0,0,.15);transform:scale(1.2)}.next-range.simulation-hover .next-range-selected{background:#209bfa}.next-range.simulation-hover .next-range-track{background:#ddd}.next-range.simulation-hover .next-range-scale-item{border-color:#ddd}.next-range.simulation-hover .next-range-scale-item.activated{border-color:#209bfa}.next-range.simulation-click>.next-range-slider-inner{border:2px solid #209bfa;box-shadow:4px 4px 8px 0 rgba(0,0,0,.12);transform:scale(1.2)}.next-range[dir=rtl] .next-range-mark{position:relative;cursor:auto}.next-range[dir=rtl] .next-range-mark .next-range-mark-text{position:absolute;right:0;transform:translateX(50%);padding-right:2px;text-align:center}.next-rating[dir=rtl] .next-rating-overlay{right:0;left:auto}.next-rating[dir=rtl] .next-rating-overlay .next-rating-icon,.next-rating[dir=rtl] .next-rating-underlay .next-rating-icon{margin-right:4px;margin-left:0}.next-rating[dir=rtl] .next-rating-overlay .next-rating-icon:last-child,.next-rating[dir=rtl] .next-rating-underlay .next-rating-icon:last-child{margin-left:4px}.next-rating{vertical-align:top;display:inline-block;position:relative}.next-rating:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-rating-base,.next-rating-text{float:left}.next-rating-base-disabled,.next-rating-base-disabled .next-rating-overlay .next-rating-icon,.next-rating-base-disabled .next-rating-underlay .next-rating-icon{cursor:not-allowed}.next-rating-symbol-icon:before{content:""}.next-rating-underlay{white-space:nowrap;overflow:hidden}.next-rating-underlay .next-icon{color:#f2f2f2}.next-rating-stroke-mode .next-rating-underlay .next-icon{color:transparent;-webkit-text-stroke:1px #209bfa}.next-rating-overlay{white-space:nowrap;overflow:hidden;position:absolute;width:0;top:0;left:0}.next-rating-overlay .next-icon{color:#209bfa}.next-rating-overlay .next-rating-icon,.next-rating-underlay .next-rating-icon{cursor:pointer;margin-left:4px}.next-rating-overlay .next-rating-icon:last-child,.next-rating-underlay .next-rating-icon:last-child{margin-right:4px}.next-rating-overlay .next-icon,.next-rating-underlay .next-icon{transition:all .1s linear}.next-rating-overlay .next-icon.hover,.next-rating-underlay .next-icon.hover{transform:scale3d(1.1,1.1,1.1)}.next-rating-overlay .next-icon.clicked,.next-rating-underlay .next-icon.clicked{transform:scale3d(.9,.9,.9)}.next-rating-info{position:absolute;top:calc(100% + 4px);left:0;border:1px solid #f2f2f2;background:#fff;padding:4px 8px 3px;font-size:12px;white-space:nowrap}.next-rating-info:after{position:absolute;content:"";width:4px;height:4px;transform:rotate(45deg);background:#fff;border-color:#f2f2f2 transparent transparent #f2f2f2;border-style:solid;border-width:1px;top:-3px;left:4px}.next-rating.hover,.next-rating:focus .next-rating-base:not(.next-rating-base-disabled){outline:none}.next-rating.hover .next-rating-overlay .next-icon,.next-rating:focus .next-rating-base:not(.next-rating-base-disabled) .next-rating-overlay .next-icon{color:#209bfa}.next-rating-grade-low.hover .next-rating-overlay .next-icon,.next-rating-grade-low .next-rating-overlay .next-icon{color:#666}.next-rating-grade-high.hover .next-rating-overlay .next-icon,.next-rating-grade-high .next-rating-overlay .next-icon{color:#209bfa}.next-rating-small{font-size:12px}.next-rating-small .next-icon .next-icon-remote,.next-rating-small .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-rating-small .next-rating-text{margin-left:8px}.next-rating-medium{font-size:14px}.next-rating-medium .next-icon .next-icon-remote,.next-rating-medium .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-rating-medium .next-rating-text{margin-left:12px}.next-rating-large{font-size:16px}.next-rating-large .next-icon .next-icon-remote,.next-rating-large .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-rating-large .next-rating-text{margin-left:16px}.next-search-simple[dir=rtl].next-large .next-search-icon{margin-left:12px;margin-right:0}.next-search-simple[dir=rtl].next-medium .next-search-icon{margin-left:8px;margin-right:0}.next-search-simple[dir=rtl].next-normal .next-search-left .next-search-left-addon{border-left:1px solid #ddd;border-right:none}.next-search-simple[dir=rtl].next-dark .next-search-left{border-color:#666}.next-search-simple[dir=rtl].next-dark .next-search-left .next-search-left-addon{border-right:1px solid #ddd}.next-search-simple[dir=rtl].next-dark:hover .next-search-left{border-color:#999}.next-search-simple[dir=rtl].next-dark .next-search-icon{color:#666}.next-search-simple[dir=rtl].next-dark .next-search-icon:hover{color:#999}.next-search-normal[dir=rtl] .next-search-left{border-left:none;border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0}.next-search-normal[dir=rtl] .next-search-btn.next-btn{border-radius:3px 0 0 3px!important}.next-search-normal[dir=rtl] .next-input{border-radius:0 3px 3px 0}.next-search-normal[dir=rtl].next-primary .next-input{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px}.next-search-normal[dir=rtl].next-primary .next-search-left .next-search-left-addon{border-left:1px solid #eee;border-right:none}.next-search-normal[dir=rtl].next-secondary .next-input{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px}.next-search-normal[dir=rtl].next-secondary .next-search-left .next-search-left-addon{border-left:1px solid #eee;border-right:none}.next-search-normal[dir=rtl].next-normal .next-input{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px}.next-search-normal[dir=rtl].next-normal .next-search-left .next-search-left-addon{border-left:1px solid #eee;border-right:none}.next-search-normal[dir=rtl].next-dark .next-search-left .next-search-left-addon{border-left:1px solid #209bfa;border-right:none}.next-search{width:100%;display:inline-block}.next-search,.next-search *,.next-search :after,.next-search :before{box-sizing:border-box}.next-search.next-search-focus{box-shadow:none}.next-search.next-search-focus .next-input{background-color:#fff}.next-search.next-search-focus.next-search-normal.next-primary .next-search-left,.next-search.next-search-focus.next-search-normal.next-secondary .next-search-left{border-color:#209bfa}.next-search.next-search-focus.next-search-normal.next-normal .next-search-left{border-color:#ccc}.next-search.next-search-focus.next-search-normal.next-dark .next-search-left{border-color:#209bfa}.next-search.next-search-focus.next-search-simple.next-dark .next-search-left{border-color:#ddd}.next-search.next-search-focus.next-search-simple.next-normal .next-search-left{border-color:#ccc}.next-search .next-input,.next-search .next-select{border:none;box-shadow:none}.next-search .next-select .next-input,.next-search .next-select .next-input .next-input-text-field{height:auto}.next-search .next-search-left{border-style:solid;transition:all .1s linear}.next-search .next-search-left-addon .next-input,.next-search .next-search-left-addon .next-select-trigger-search{min-height:100%;border-bottom-right-radius:0;border-top-right-radius:0}.next-search .next-search-left-addon .next-select-values{line-height:1}.next-search .next-search-left-addon.next-input-group-addon .next-select{margin:0}.next-search .next-search-left-addon+.next-search-input .next-input{border-bottom-left-radius:0;border-top-left-radius:0}.next-search .next-search-input{width:100%}.next-search .next-search-btn{box-shadow:none}.next-search .next-search-symbol-icon:before{content:""}.next-search-normal{width:600px}.next-search-normal .next-search-left{border-top-left-radius:3px;border-bottom-left-radius:3px}.next-search-normal .next-input{border-radius:3px 0 0 3px}.next-search-normal .next-btn{border-radius:0 3px 3px 0}.next-search-normal.next-primary .next-search-left{border-color:#209bfa}.next-search-normal.next-primary .next-search-left .next-search-left-addon{border-right:1px solid #eee}.next-search-normal.next-primary:hover .next-btn,.next-search-normal.next-primary:hover .next-search-left{border-color:#209bfa}.next-search-normal.next-primary .next-search-btn{background:#209bfa;border-color:#209bfa;color:#fff}.next-search-normal.next-primary .next-search-btn:hover{background:#1274e7;border-color:#209bfa;color:#fff}.next-search-normal.next-primary .next-search-btn .next-icon,.next-search-normal.next-primary .next-search-btn .next-icon:hover{color:#fff}.next-search-normal.next-primary.next-large{box-shadow:none}.next-search-normal.next-primary.next-large .next-search-btn,.next-search-normal.next-primary.next-large .next-search-left{border-width:1px;height:40px}.next-search-normal.next-primary.next-large .next-search-input{height:38px;overflow-y:hidden}.next-search-normal.next-primary.next-large .next-search-input input{height:38px;line-height:38px \0 }.next-search-normal.next-primary.next-large .next-select{height:38px}.next-search-normal.next-primary.next-large .next-search-btn{font-size:16px}.next-search-normal.next-primary.next-large .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-primary.next-large .next-search-btn .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-search-normal.next-primary.next-large .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-primary.next-medium{box-shadow:none}.next-search-normal.next-primary.next-medium .next-search-btn,.next-search-normal.next-primary.next-medium .next-search-left{border-width:1px;height:32px}.next-search-normal.next-primary.next-medium .next-search-input{height:30px;overflow-y:hidden}.next-search-normal.next-primary.next-medium .next-search-input input{height:30px;line-height:30px \0 }.next-search-normal.next-primary.next-medium .next-select{height:30px}.next-search-normal.next-primary.next-medium .next-search-btn{font-size:16px}.next-search-normal.next-primary.next-medium .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-primary.next-medium .next-search-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-normal.next-primary.next-medium .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-primary .next-input{border-top-left-radius:2px;border-bottom-left-radius:2px}.next-search-normal.next-secondary .next-search-left{border-color:#ddd}.next-search-normal.next-secondary .next-search-left .next-search-left-addon{border-right:1px solid #eee}.next-search-normal.next-secondary:hover .next-btn,.next-search-normal.next-secondary:hover .next-search-left{border-color:#209bfa}.next-search-normal.next-secondary .next-search-btn{background:#209bfa;border-color:#209bfa;color:#fff}.next-search-normal.next-secondary .next-search-btn:hover{background:#1274e7;border-color:#209bfa;color:#fff}.next-search-normal.next-secondary .next-search-btn .next-icon,.next-search-normal.next-secondary .next-search-btn .next-icon:hover{color:#fff}.next-search-normal.next-secondary.next-large{box-shadow:none}.next-search-normal.next-secondary.next-large .next-search-btn,.next-search-normal.next-secondary.next-large .next-search-left{border-width:1px;height:40px}.next-search-normal.next-secondary.next-large .next-search-input{height:38px;overflow-y:hidden}.next-search-normal.next-secondary.next-large .next-search-input input{height:38px;line-height:38px \0 }.next-search-normal.next-secondary.next-large .next-select{height:38px}.next-search-normal.next-secondary.next-large .next-search-btn{font-size:16px}.next-search-normal.next-secondary.next-large .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-secondary.next-large .next-search-btn .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-search-normal.next-secondary.next-large .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-secondary.next-medium{box-shadow:none}.next-search-normal.next-secondary.next-medium .next-search-btn,.next-search-normal.next-secondary.next-medium .next-search-left{border-width:1px;height:32px}.next-search-normal.next-secondary.next-medium .next-search-input{height:30px;overflow-y:hidden}.next-search-normal.next-secondary.next-medium .next-search-input input{height:30px;line-height:30px \0 }.next-search-normal.next-secondary.next-medium .next-select{height:30px}.next-search-normal.next-secondary.next-medium .next-search-btn{font-size:16px}.next-search-normal.next-secondary.next-medium .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-secondary.next-medium .next-search-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-normal.next-secondary.next-medium .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-secondary .next-input{border-top-left-radius:2px;border-bottom-left-radius:2px}.next-search-normal.next-normal .next-search-left{border-color:#ddd}.next-search-normal.next-normal .next-search-left .next-search-left-addon{border-right:1px solid #eee}.next-search-normal.next-normal:hover .next-btn,.next-search-normal.next-normal:hover .next-search-left{border-color:#ccc}.next-search-normal.next-normal .next-search-btn{background:#fafafa;border-color:#ddd;color:#666}.next-search-normal.next-normal .next-search-btn:hover{background:#f5f5f5;border-color:#ccc;color:#333}.next-search-normal.next-normal .next-search-btn .next-icon{color:#666}.next-search-normal.next-normal .next-search-btn .next-icon:hover{color:#333}.next-search-normal.next-normal.next-large{box-shadow:none}.next-search-normal.next-normal.next-large .next-search-btn,.next-search-normal.next-normal.next-large .next-search-left{border-width:1px;height:40px}.next-search-normal.next-normal.next-large .next-search-input{height:38px;overflow-y:hidden}.next-search-normal.next-normal.next-large .next-search-input input{height:38px;line-height:38px \0 }.next-search-normal.next-normal.next-large .next-select{height:38px}.next-search-normal.next-normal.next-large .next-search-btn{font-size:16px}.next-search-normal.next-normal.next-large .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-normal.next-large .next-search-btn .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-search-normal.next-normal.next-large .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-normal.next-medium{box-shadow:none}.next-search-normal.next-normal.next-medium .next-search-btn,.next-search-normal.next-normal.next-medium .next-search-left{border-width:1px;height:32px}.next-search-normal.next-normal.next-medium .next-search-input{height:30px;overflow-y:hidden}.next-search-normal.next-normal.next-medium .next-search-input input{height:30px;line-height:30px \0 }.next-search-normal.next-normal.next-medium .next-select{height:30px}.next-search-normal.next-normal.next-medium .next-search-btn{font-size:16px}.next-search-normal.next-normal.next-medium .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-normal.next-medium .next-search-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-normal.next-normal.next-medium .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-normal .next-input{border-top-left-radius:2px;border-bottom-left-radius:2px}.next-search-normal.next-dark .next-search-left{border-color:#209bfa}.next-search-normal.next-dark .next-search-left .next-search-left-addon{border-right:1px solid #209bfa}.next-search-normal.next-dark:hover .next-btn,.next-search-normal.next-dark:hover .next-search-left{border-color:#209bfa}.next-search-normal.next-dark .next-search-btn{background:#209bfa;border-color:#209bfa;color:#fff}.next-search-normal.next-dark .next-search-btn:hover{background:#1274e7;border-color:#209bfa;color:#fff}.next-search-normal.next-dark .next-search-btn .next-icon,.next-search-normal.next-dark .next-search-btn .next-icon:hover,.next-search-normal.next-dark .next-select-inner,.next-search-normal.next-dark input{color:#fff}.next-search-normal.next-dark .next-input,.next-search-normal.next-dark .next-select{background:hsla(0,0%,100%,0)}.next-search-normal.next-dark.next-large{box-shadow:none}.next-search-normal.next-dark.next-large .next-search-btn,.next-search-normal.next-dark.next-large .next-search-left{border-width:1px;height:40px}.next-search-normal.next-dark.next-large .next-search-input{height:38px;overflow-y:hidden}.next-search-normal.next-dark.next-large .next-search-input input{height:38px;line-height:38px \0 }.next-search-normal.next-dark.next-large .next-select{height:38px}.next-search-normal.next-dark.next-large .next-search-btn{font-size:16px}.next-search-normal.next-dark.next-large .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-dark.next-large .next-search-btn .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-search-normal.next-dark.next-large .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal.next-dark.next-medium{box-shadow:none}.next-search-normal.next-dark.next-medium .next-search-btn,.next-search-normal.next-dark.next-medium .next-search-left{border-width:1px;height:32px}.next-search-normal.next-dark.next-medium .next-search-input{height:30px;overflow-y:hidden}.next-search-normal.next-dark.next-medium .next-search-input input{height:30px;line-height:30px \0 }.next-search-normal.next-dark.next-medium .next-select{height:30px}.next-search-normal.next-dark.next-medium .next-search-btn{font-size:16px}.next-search-normal.next-dark.next-medium .next-search-btn .next-icon .next-icon-remote,.next-search-normal.next-dark.next-medium .next-search-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-normal.next-dark.next-medium .next-search-btn .next-search-btn-text{display:inline-block;padding-left:0}.next-search-normal:not([dir=rtl]) .next-search-left{border-right:none}.next-search-simple{width:300px;box-shadow:none;border-radius:3px}.next-search-simple .next-search-icon{cursor:pointer;transition:all .1s linear}.next-search-simple .next-input,.next-search-simple .next-search-left{border-radius:3px}.next-search-simple.next-large .next-search-icon{margin-right:12px}.next-search-simple.next-medium .next-search-icon{margin-right:8px}.next-search-simple.next-normal .next-search-left{border-color:#ddd}.next-search-simple.next-normal .next-search-left .next-search-left-addon{border-right:1px solid #ddd}.next-search-simple.next-normal:hover .next-search-left{border-color:#ccc}.next-search-simple.next-normal .next-search-icon{color:#999}.next-search-simple.next-normal .next-search-icon:hover{color:#666}.next-search-simple.next-normal .next-search-left{border-width:1px}.next-search-simple.next-normal.next-large .next-search-icon .next-icon-remote,.next-search-simple.next-normal.next-large .next-search-icon:before{width:20px;font-size:20px;line-height:inherit}.next-search-simple.next-normal.next-medium .next-search-icon .next-icon-remote,.next-search-simple.next-normal.next-medium .next-search-icon:before{width:12px;font-size:12px;line-height:inherit}.next-search-simple.next-dark .next-search-left{border-color:#666}.next-search-simple.next-dark .next-search-left .next-search-left-addon{border-right:1px solid #ddd}.next-search-simple.next-dark:hover .next-search-left{border-color:#999}.next-search-simple.next-dark .next-search-icon{color:#666}.next-search-simple.next-dark .next-search-icon:hover{color:#999}.next-search-simple.next-dark .next-select-inner,.next-search-simple.next-dark input{color:#fff}.next-search-simple.next-dark .next-input,.next-search-simple.next-dark .next-select{background:hsla(0,0%,100%,0)}.next-search-simple.next-dark .next-search-left{border-width:1px}.next-search-simple.next-dark.next-large .next-search-icon .next-icon-remote,.next-search-simple.next-dark.next-large .next-search-icon:before,.next-search-simple.next-dark.next-medium .next-search-icon .next-icon-remote,.next-search-simple.next-dark.next-medium .next-search-icon:before{width:20px;font-size:20px;line-height:inherit}.next-search-simple .next-select.next-large{height:38px}.next-search-simple .next-select.next-medium{height:30px}.next-slick{position:relative;display:block;-webkit-touch-callout:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:rgba(0,0,0,0)}.next-slick,.next-slick *,.next-slick :after,.next-slick :before{box-sizing:border-box}.next-slick-initialized .next-slick-slide{display:block}.next-slick-list{position:relative;overflow:hidden;display:block;margin:0;padding:0;transform:translateZ(0)}.next-slick-list:focus{outline:none}.next-slick-list.dragging{cursor:pointer;cursor:hand}.next-slick-track{position:relative;top:0;left:0;display:block;transform:translateZ(0)}.next-slick-slide{float:left;height:100%;min-height:1px;outline:0;transition:all .1s linear}.next-slick[dir=rtl] .next-slick-slide{float:right}.next-slick-slide img{display:block}.next-slick-arrow{display:block;position:absolute;cursor:pointer;text-align:center;transition:all .1s linear}.next-slick-arrow.inner{color:#fff;background:#000;opacity:.2;padding:0;border:none}.next-slick-arrow.inner:focus,.next-slick-arrow.inner:hover{color:#fff;background:#000;opacity:.4}.next-slick-arrow.inner.disabled{color:#ccc;background:#fafafa;opacity:.5}.next-slick-arrow.outer{color:#666;background:transparent;opacity:.32;padding:0;border:none;border-radius:0}.next-slick-arrow.outer:focus,.next-slick-arrow.outer:hover{color:#333;background:transparent;opacity:.32}.next-slick-arrow.outer.disabled{color:#ccc;background:transparent;opacity:.32}.next-slick-arrow.disabled{cursor:not-allowed}.next-slick-dots{display:block;position:absolute;margin:0;padding:0}.next-slick-dots-item{position:relative;display:inline-block;cursor:pointer}.next-slick-dots-item button{cursor:pointer;border:0 solid #fff;outline:none;padding:0;height:8px;width:8px;border-radius:50%;background:rgba(0,0,0,.32)}.next-slick-dots-item button:focus,.next-slick-dots-item button:hover{background-color:hsla(0,0%,100%,.5);border-color:#fff}.next-slick-dots-item.active button{background:#209bfa;border-color:#fff;animation:zoom .3s cubic-bezier(.86,0,.07,1)}.next-slick-dots.hoz{width:100%;bottom:12px;left:0;text-align:center}.next-slick-dots.hoz .next-slick-dots-item{margin:0 4px}.next-slick-dots.ver{width:16px;top:0;right:20px;bottom:0;display:flex;justify-content:center;flex-direction:column}.next-slick-dots.ver .next-slick-dots-item{margin:0}.next-slick.next-slick-hoz.next-slick-outer{padding:0 24px}.next-slick.next-slick-hoz .next-slick-arrow.medium{width:28px;height:56px;line-height:56px}.next-slick.next-slick-hoz .next-slick-arrow.medium .next-icon .next-icon-remote,.next-slick.next-slick-hoz .next-slick-arrow.medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-slick.next-slick-hoz .next-slick-arrow.medium.inner{top:calc(50% - 28px)}.next-slick.next-slick-hoz .next-slick-arrow.medium.inner.next-slick-prev{left:0}.next-slick.next-slick-hoz .next-slick-arrow.medium.inner.next-slick-next{right:0}.next-slick.next-slick-hoz .next-slick-arrow.medium.outer{top:calc(50% - 28px)}.next-slick.next-slick-hoz .next-slick-arrow.medium.outer.next-slick-prev{left:-4px}.next-slick.next-slick-hoz .next-slick-arrow.medium.outer.next-slick-next{right:-4px}.next-slick.next-slick-hoz .next-slick-arrow.large{width:48px;height:96px;line-height:96px}.next-slick.next-slick-hoz .next-slick-arrow.large .next-icon .next-icon-remote,.next-slick.next-slick-hoz .next-slick-arrow.large .next-icon:before{width:32px;font-size:32px;line-height:inherit}.next-slick.next-slick-hoz .next-slick-arrow.large.inner{top:calc(50% - 48px)}.next-slick.next-slick-hoz .next-slick-arrow.large.inner.next-slick-prev{left:0}.next-slick.next-slick-hoz .next-slick-arrow.large.inner.next-slick-next{right:0}.next-slick.next-slick-hoz .next-slick-arrow.large.outer{top:calc(50% - 48px)}.next-slick.next-slick-hoz .next-slick-arrow.large.outer.next-slick-prev{left:-8px}.next-slick.next-slick-hoz .next-slick-arrow.large.outer.next-slick-next{right:-8px}.next-slick.next-slick-ver.next-slick-outer{padding:24px 0}.next-slick.next-slick-ver .next-slick-slide{display:block;height:auto}.next-slick.next-slick-ver .next-slick-arrow.medium{width:56px;height:28px;line-height:28px}.next-slick.next-slick-ver .next-slick-arrow.medium .next-icon .next-icon-remote,.next-slick.next-slick-ver .next-slick-arrow.medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-slick.next-slick-ver .next-slick-arrow.medium.inner{left:calc(50% - 28px)}.next-slick.next-slick-ver .next-slick-arrow.medium.inner.next-slick-prev{top:0}.next-slick.next-slick-ver .next-slick-arrow.medium.inner.next-slick-next{bottom:0}.next-slick.next-slick-ver .next-slick-arrow.medium.outer{left:calc(50% - 28px)}.next-slick.next-slick-ver .next-slick-arrow.medium.outer.next-slick-prev{top:-4px}.next-slick.next-slick-ver .next-slick-arrow.medium.outer.next-slick-next{bottom:-4px}.next-slick.next-slick-ver .next-slick-arrow.large{width:96px;height:48px;line-height:48px}.next-slick.next-slick-ver .next-slick-arrow.large .next-icon .next-icon-remote,.next-slick.next-slick-ver .next-slick-arrow.large .next-icon:before{width:32px;font-size:32px;line-height:inherit}.next-slick.next-slick-ver .next-slick-arrow.large.inner{left:calc(50% - 48px)}.next-slick.next-slick-ver .next-slick-arrow.large.inner.next-slick-prev{top:0}.next-slick.next-slick-ver .next-slick-arrow.large.inner.next-slick-next{bottom:0}.next-slick.next-slick-ver .next-slick-arrow.large.outer{left:calc(50% - 48px)}.next-slick.next-slick-ver .next-slick-arrow.large.outer.next-slick-prev{top:-16px}.next-slick.next-slick-ver .next-slick-arrow.large.outer.next-slick-next{bottom:-16px}.next-split-btn{display:inline-block;position:relative}.next-split-btn-spacing-tb{padding:0}.next-split-btn-trigger .next-icon{transition:transform .1s linear}.next-split-btn-trigger.next-expand .next-split-btn-symbol-fold{transform:rotate(180deg)}.next-split-btn-trigger.next-btn-normal:not(:disabled):not(.disabled) .next-icon{color:#999}.next-split-btn-trigger.next-small{padding-left:4px;padding-right:4px}.next-split-btn-trigger.next-medium{padding-left:8px;padding-right:8px}.next-split-btn-symbol-fold:before{content:""}.next-split-btn-symbol-unfold:before{content:""}.next-step,.next-step *,.next-step:after,.next-step :after,.next-step:before,.next-step :before{box-sizing:border-box}.next-step{width:100%;position:relative;border:none}.next-step-item{position:relative;vertical-align:middle;outline:0;height:100%}.next-step-item-body{outline:0}.next-step-item-node{transition:all .1s linear}.next-step-item-node.clicked{transform:scale3d(.8,.8,.8)}.next-step-horizontal{overflow:hidden}.next-step-horizontal>.next-step-item{display:inline-block;text-align:left}.next-step-vertical>.next-step-item{display:block;text-align:center}.next-step-arrow{display:flex}.next-step-arrow .next-step-item{flex:1;height:32px;line-height:32px;margin-left:16px;margin-right:4px}.next-step-arrow .next-step-item:before{content:"";position:absolute;left:-16px;top:0;z-index:1;border:16px solid transparent}.next-step-arrow .next-step-item:after{content:"";position:absolute;right:-16px;top:0;z-index:1;border-top:16px solid transparent;border-bottom:16px solid transparent;border-left:16px solid transparent}.next-step-arrow .next-step-item .next-step-item-container{min-width:100px;height:32px;cursor:pointer}.next-step-arrow .next-step-item .next-step-item-container .next-step-item-title{height:32px;line-height:32px;font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.next-step-arrow>.next-step-item-wait{background:#f5f5f5}.next-step-arrow>.next-step-item-wait .next-step-item-tail-overlay{background:#000}.next-step-arrow>.next-step-item-wait .next-step-item-tail-underlay{background:#ccc}.next-step-arrow>.next-step-item-wait>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-arrow>.next-step-item-wait>.next-step-item-container .next-step-item-node{color:#000}.next-step-arrow>.next-step-item-wait>.next-step-item-container .next-step-item-node-circle,.next-step-arrow>.next-step-item-wait>.next-step-item-container .next-step-item-node-dot{background:#f5f5f5;border-color:#000}.next-step-arrow>.next-step-item-wait .next-step-item-title{color:#999;word-break:break-word}.next-step-arrow>.next-step-item-wait .next-step-item-content{color:#999;font-size:12px;line-height:1.5;word-break:break-word}.next-step-arrow>.next-step-item-wait .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-arrow>.next-step-item-wait .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-arrow>.next-step-item-wait .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-arrow>.next-step-item-wait .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-arrow>.next-step-item-wait .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-arrow>.next-step-item-wait .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-arrow>.next-step-item-wait:before{border:16px solid #f5f5f5;border-left-color:transparent}.next-step-arrow>.next-step-item-wait:after{border-left-color:#f5f5f5}.next-step-arrow>.next-step-item-process{background:#209bfa}.next-step-arrow>.next-step-item-process .next-step-item-tail-overlay{background:#000}.next-step-arrow>.next-step-item-process .next-step-item-tail-underlay{background:#ccc}.next-step-arrow>.next-step-item-process>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-arrow>.next-step-item-process>.next-step-item-container .next-step-item-node{color:#000}.next-step-arrow>.next-step-item-process>.next-step-item-container .next-step-item-node-circle,.next-step-arrow>.next-step-item-process>.next-step-item-container .next-step-item-node-dot{background:#209bfa;border-color:#000}.next-step-arrow>.next-step-item-process .next-step-item-title{color:#fff;word-break:break-word}.next-step-arrow>.next-step-item-process .next-step-item-content{color:#fff;font-size:12px;line-height:1.5;word-break:break-word}.next-step-arrow>.next-step-item-process .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-arrow>.next-step-item-process .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-arrow>.next-step-item-process .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-arrow>.next-step-item-process .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-arrow>.next-step-item-process .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-arrow>.next-step-item-process .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-arrow>.next-step-item-process:before{border:16px solid #209bfa;border-left-color:transparent}.next-step-arrow>.next-step-item-process:after{border-left-color:#209bfa}.next-step-arrow>.next-step-item-finish{background:#add9ff}.next-step-arrow>.next-step-item-finish .next-step-item-tail-overlay{background:#000}.next-step-arrow>.next-step-item-finish .next-step-item-tail-underlay{background:#ccc}.next-step-arrow>.next-step-item-finish>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-arrow>.next-step-item-finish>.next-step-item-container .next-step-item-node{color:#000}.next-step-arrow>.next-step-item-finish>.next-step-item-container .next-step-item-node-circle,.next-step-arrow>.next-step-item-finish>.next-step-item-container .next-step-item-node-dot{background:#add9ff;border-color:#000}.next-step-arrow>.next-step-item-finish .next-step-item-title{color:#209bfa;word-break:break-word}.next-step-arrow>.next-step-item-finish .next-step-item-content{color:#209bfa;font-size:12px;line-height:1.5;word-break:break-word}.next-step-arrow>.next-step-item-finish .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-arrow>.next-step-item-finish .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-arrow>.next-step-item-finish .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-arrow>.next-step-item-finish .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-arrow>.next-step-item-finish .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-arrow>.next-step-item-finish .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-arrow>.next-step-item-finish:before{border:16px solid #add9ff;border-left-color:transparent}.next-step-arrow>.next-step-item-finish:after{border-left-color:#add9ff}.next-step-arrow .next-step-item-disabled{cursor:not-allowed;background:#fafafa}.next-step-arrow .next-step-item-disabled .next-step-item-tail-overlay{background:#000}.next-step-arrow .next-step-item-disabled .next-step-item-tail-underlay{background:#ccc}.next-step-arrow .next-step-item-disabled>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-arrow .next-step-item-disabled>.next-step-item-container .next-step-item-node{color:#000}.next-step-arrow .next-step-item-disabled>.next-step-item-container .next-step-item-node-circle,.next-step-arrow .next-step-item-disabled>.next-step-item-container .next-step-item-node-dot{background:#fafafa;border-color:#000}.next-step-arrow .next-step-item-disabled .next-step-item-title{color:#ccc;word-break:break-word}.next-step-arrow .next-step-item-disabled .next-step-item-content{color:#ccc;font-size:12px;line-height:1.5;word-break:break-word}.next-step-arrow .next-step-item-disabled .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-arrow .next-step-item-disabled .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-arrow .next-step-item-disabled .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-arrow .next-step-item-disabled .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-arrow .next-step-item-disabled .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-arrow .next-step-item-disabled .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-arrow .next-step-item-disabled:before{border:16px solid #fafafa;border-left-color:transparent}.next-step-arrow .next-step-item-disabled:after{border-left-color:#fafafa}.next-step-arrow .next-step-item-disabled .next-step-item-container{cursor:not-allowed}.next-step-arrow .next-step-item-read-only,.next-step-arrow .next-step-item-read-only .next-step-item-container{cursor:default}.next-step-arrow .next-step-item-first{margin-left:0}.next-step-arrow .next-step-item-first:before{border:16px solid transparent}.next-step-arrow .next-step-item-last{margin-right:0}.next-step-arrow .next-step-item-last:after{border:16px solid transparent}.next-step-circle .next-step-item-container{display:inline-block;vertical-align:middle;position:relative;padding:0 8px}.next-step-circle .next-step-item-container .next-step-item-progress .next-progress-circle-text{color:#209bfa;font-size:14px}.next-step-circle .next-step-item-container .next-step-item-progress .next-progress-circle-underlay{stroke:#ccc;stroke-width:3px}.next-step-circle .next-step-item-container .next-step-item-progress .next-progress-circle-overlay-normal{stroke:#209bfa;stroke-width:3px}.next-step-circle .next-step-item-container .next-step-item-node-placeholder{display:inline-block}.next-step-circle>.next-step-item-wait .next-step-item-tail-overlay{background:#ddd}.next-step-circle>.next-step-item-wait .next-step-item-tail-underlay{background:#eee}.next-step-circle>.next-step-item-wait>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-circle>.next-step-item-wait>.next-step-item-container .next-step-item-node{color:#666}.next-step-circle>.next-step-item-wait>.next-step-item-container .next-step-item-node-circle,.next-step-circle>.next-step-item-wait>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#ccc}.next-step-circle>.next-step-item-wait .next-step-item-title{color:#666;word-break:break-word}.next-step-circle>.next-step-item-wait .next-step-item-content{color:#666;font-size:12px;line-height:1.5;word-break:break-word}.next-step-circle>.next-step-item-wait .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-circle>.next-step-item-wait .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-circle>.next-step-item-wait .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-circle>.next-step-item-wait .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-circle>.next-step-item-wait .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-circle>.next-step-item-wait .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-circle>.next-step-item-process .next-step-item-tail-overlay{background:#ddd}.next-step-circle>.next-step-item-process .next-step-item-tail-underlay{background:#eee}.next-step-circle>.next-step-item-process>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-circle>.next-step-item-process>.next-step-item-container .next-step-item-node{color:#fff}.next-step-circle>.next-step-item-process>.next-step-item-container .next-step-item-node-circle,.next-step-circle>.next-step-item-process>.next-step-item-container .next-step-item-node-dot{background:#209bfa;border-color:#209bfa}.next-step-circle>.next-step-item-process .next-step-item-title{color:#333;word-break:break-word}.next-step-circle>.next-step-item-process .next-step-item-content{color:#333;font-size:12px;line-height:1.5;word-break:break-word}.next-step-circle>.next-step-item-process .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-circle>.next-step-item-process .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-circle>.next-step-item-process .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-circle>.next-step-item-process .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-circle>.next-step-item-process .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-circle>.next-step-item-process .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-circle>.next-step-item-finish .next-step-item-tail-overlay{background:#209bfa}.next-step-circle>.next-step-item-finish .next-step-item-tail-underlay{background:#eee}.next-step-circle>.next-step-item-finish>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-circle>.next-step-item-finish>.next-step-item-container .next-step-item-node{color:#209bfa}.next-step-circle>.next-step-item-finish>.next-step-item-container .next-step-item-node-circle,.next-step-circle>.next-step-item-finish>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#209bfa}.next-step-circle>.next-step-item-finish .next-step-item-title{color:#666;word-break:break-word}.next-step-circle>.next-step-item-finish .next-step-item-content{color:#666;font-size:12px;line-height:1.5;word-break:break-word}.next-step-circle>.next-step-item-finish .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-circle>.next-step-item-finish .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-circle>.next-step-item-finish .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-circle>.next-step-item-finish .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-circle>.next-step-item-finish .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-circle>.next-step-item-finish .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-circle .next-step-item-disabled .next-step-item-tail-overlay,.next-step-circle .next-step-item-disabled .next-step-item-tail-underlay{background:#eee}.next-step-circle .next-step-item-disabled>.next-step-item-container .next-step-item-progress{width:32px;height:32px}.next-step-circle .next-step-item-disabled>.next-step-item-container .next-step-item-node{color:#ccc}.next-step-circle .next-step-item-disabled>.next-step-item-container .next-step-item-node-circle,.next-step-circle .next-step-item-disabled>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#eee}.next-step-circle .next-step-item-disabled .next-step-item-title{color:#ccc;word-break:break-word}.next-step-circle .next-step-item-disabled .next-step-item-content{color:#ccc;font-size:12px;line-height:1.5;word-break:break-word}.next-step-circle .next-step-item-disabled .next-step-item-node-placeholder{width:32px;height:32px;position:relative}.next-step-circle .next-step-item-disabled .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-circle .next-step-item-disabled .next-step-item-node-circle{display:block;width:32px;height:32px;font-size:12px;font-weight:400;line-height:30px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-circle .next-step-item-disabled .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-circle .next-step-item-disabled .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-circle .next-step-item-disabled .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-circle .next-step-item-disabled .next-step-item-node,.next-step-circle .next-step-item-disabled .next-step-item-node-placeholder{cursor:not-allowed}.next-step-circle .next-step-item-read-only .next-step-item-node,.next-step-circle .next-step-item-read-only .next-step-item-node-placeholder{cursor:default}.next-step-circle .next-step-item-last .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal{text-align:center;white-space:nowrap}.next-step-circle.next-step-horizontal>.next-step-item .next-step-item-content,.next-step-circle.next-step-horizontal>.next-step-item .next-step-item-title{white-space:normal}.next-step-circle.next-step-horizontal>.next-step-item-wait .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 48px);vertical-align:middle}.next-step-circle.next-step-horizontal>.next-step-item-wait .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-circle.next-step-horizontal>.next-step-item-wait .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-circle.next-step-horizontal>.next-step-item-wait>.next-step-item-body{width:100px;left:-26px;text-align:center;position:absolute}.next-step-circle.next-step-horizontal>.next-step-item-wait>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-circle.next-step-horizontal>.next-step-item-wait>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-circle.next-step-horizontal>.next-step-item-process .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 48px);vertical-align:middle}.next-step-circle.next-step-horizontal>.next-step-item-process .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-circle.next-step-horizontal>.next-step-item-process .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-circle.next-step-horizontal>.next-step-item-process>.next-step-item-body{width:100px;left:-26px;text-align:center;position:absolute}.next-step-circle.next-step-horizontal>.next-step-item-process>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-circle.next-step-horizontal>.next-step-item-process>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-circle.next-step-horizontal>.next-step-item-finish .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 48px);vertical-align:middle}.next-step-circle.next-step-horizontal>.next-step-item-finish .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-circle.next-step-horizontal>.next-step-item-finish .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-circle.next-step-horizontal>.next-step-item-finish>.next-step-item-body{width:100px;left:-26px;text-align:center;position:absolute}.next-step-circle.next-step-horizontal>.next-step-item-finish>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-circle.next-step-horizontal>.next-step-item-finish>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-circle.next-step-horizontal>.next-step-item-disabled .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 48px);vertical-align:middle}.next-step-circle.next-step-horizontal>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-circle.next-step-horizontal>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-circle.next-step-horizontal>.next-step-item-disabled>.next-step-item-body{width:100px;left:-26px;text-align:center;position:absolute}.next-step-circle.next-step-horizontal>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-circle.next-step-horizontal>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item{vertical-align:unset}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item:last-child .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-body{position:relative;display:inline-block;top:0;left:0;max-width:100px;overflow:hidden;vertical-align:top;text-align:left}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-body .next-step-item-title{display:inline-block;padding-right:8px;margin-top:9px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-tail{width:calc(100% - 148px);position:absolute;right:0;margin-top:-1px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item:last-child .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-body{position:relative;display:inline-block;top:0;left:0;max-width:100px;overflow:hidden;vertical-align:top;text-align:left}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-body .next-step-item-title{display:inline-block;padding-right:8px;margin-top:9px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-tail{width:calc(100% - 148px);position:absolute;right:0;margin-top:-1px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item:last-child .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-body{position:relative;display:inline-block;top:0;left:0;max-width:100px;overflow:hidden;vertical-align:top;text-align:left}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-body .next-step-item-title{display:inline-block;padding-right:8px;margin-top:9px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-tail{width:calc(100% - 148px);position:absolute;right:0;margin-top:-1px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item:last-child .next-step-item-tail{display:none}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-body{position:relative;display:inline-block;top:0;left:0;max-width:100px;overflow:hidden;vertical-align:top;text-align:left}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-body .next-step-item-title{display:inline-block;padding-right:8px;margin-top:9px}.next-step-circle.next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-tail{width:calc(100% - 148px);position:absolute;right:0;margin-top:-1px}.next-step-circle.next-step-vertical{font-size:0;display:table-cell;vertical-align:middle;position:relative}.next-step-circle.next-step-vertical .next-step-item-container{padding:0}.next-step-circle.next-step-vertical>.next-step-item:last-child .next-step-item-tail{display:block;visibility:hidden}.next-step-circle.next-step-vertical>.next-step-item-wait .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-circle.next-step-vertical>.next-step-item-wait .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-circle.next-step-vertical>.next-step-item-wait .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-circle.next-step-vertical>.next-step-item-wait>.next-step-item-body{position:absolute;top:0;left:16px;margin-left:8px}.next-step-circle.next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-title{margin-top:8px;text-align:left;font-weight:700;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle.next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-content{margin-top:4px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-circle.next-step-vertical>.next-step-item-process .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-circle.next-step-vertical>.next-step-item-process .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-circle.next-step-vertical>.next-step-item-process .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-circle.next-step-vertical>.next-step-item-process>.next-step-item-body{position:absolute;top:0;left:16px;margin-left:8px}.next-step-circle.next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-title{margin-top:8px;text-align:left;font-weight:700;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle.next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-content{margin-top:4px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-circle.next-step-vertical>.next-step-item-finish .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-circle.next-step-vertical>.next-step-item-finish .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-circle.next-step-vertical>.next-step-item-finish .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-circle.next-step-vertical>.next-step-item-finish>.next-step-item-body{position:absolute;top:0;left:16px;margin-left:8px}.next-step-circle.next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-title{margin-top:8px;text-align:left;font-weight:700;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle.next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-content{margin-top:4px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-circle.next-step-vertical>.next-step-item-disabled .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-circle.next-step-vertical>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-circle.next-step-vertical>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-circle.next-step-vertical>.next-step-item-disabled>.next-step-item-body{position:absolute;top:0;left:16px;margin-left:8px}.next-step-circle.next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{margin-top:8px;text-align:left;font-weight:700;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle.next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{margin-top:4px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-dot .next-step-item-container{display:inline-block;vertical-align:middle;position:relative;padding:0 8px;margin-top:-1px;margin-bottom:-1px}.next-step-dot .next-step-item-container .next-step-item-node-placeholder{display:inline-block}.next-step-dot .next-step-item-container .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot .next-step-item-container .next-step-item-node .next-icon .next-icon-remote,.next-step-dot .next-step-item-container .next-step-item-node .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot>.next-step-item-wait .next-step-item-tail-overlay{background:#ddd}.next-step-dot>.next-step-item-wait .next-step-item-tail-underlay{background:#eee}.next-step-dot>.next-step-item-wait>.next-step-item-container .next-step-item-progress{width:12px;height:12px}.next-step-dot>.next-step-item-wait>.next-step-item-container .next-step-item-node{color:#999}.next-step-dot>.next-step-item-wait>.next-step-item-container .next-step-item-node-circle,.next-step-dot>.next-step-item-wait>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#ccc}.next-step-dot>.next-step-item-wait .next-step-item-title{color:#666;word-break:break-word}.next-step-dot>.next-step-item-wait .next-step-item-content{color:#666;line-height:1.5;word-break:break-word}.next-step-dot>.next-step-item-wait .next-step-item-node-placeholder{width:12px;height:12px;position:relative}.next-step-dot>.next-step-item-wait .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot>.next-step-item-wait .next-step-item-node-circle{display:block;width:12px;height:12px;font-size:12px;font-weight:400;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-dot>.next-step-item-wait .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-dot>.next-step-item-wait .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-dot>.next-step-item-wait .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot>.next-step-item-wait .next-step-item-content{font-size:12px}.next-step-dot>.next-step-item-wait .next-step-item-node-dot{display:block;width:12px;height:12px;font-size:12px;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .3s ease,border-color .3s ease}.next-step-dot>.next-step-item-process .next-step-item-tail-overlay{background:#ddd}.next-step-dot>.next-step-item-process .next-step-item-tail-underlay{background:#eee}.next-step-dot>.next-step-item-process>.next-step-item-container .next-step-item-progress{width:12px;height:12px}.next-step-dot>.next-step-item-process>.next-step-item-container .next-step-item-node{color:#209bfa}.next-step-dot>.next-step-item-process>.next-step-item-container .next-step-item-node-circle,.next-step-dot>.next-step-item-process>.next-step-item-container .next-step-item-node-dot{background:#209bfa;border-color:#209bfa}.next-step-dot>.next-step-item-process .next-step-item-title{color:#333;word-break:break-word}.next-step-dot>.next-step-item-process .next-step-item-content{color:#333;line-height:1.5;word-break:break-word}.next-step-dot>.next-step-item-process .next-step-item-node-placeholder{width:12px;height:12px;position:relative}.next-step-dot>.next-step-item-process .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot>.next-step-item-process .next-step-item-node-circle{display:block;width:12px;height:12px;font-size:12px;font-weight:400;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-dot>.next-step-item-process .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-dot>.next-step-item-process .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-dot>.next-step-item-process .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot>.next-step-item-process .next-step-item-content{font-size:12px}.next-step-dot>.next-step-item-process .next-step-item-node-dot{display:block;width:12px;height:12px;font-size:12px;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .3s ease,border-color .3s ease}.next-step-dot>.next-step-item-finish .next-step-item-tail-overlay{background:#209bfa}.next-step-dot>.next-step-item-finish .next-step-item-tail-underlay{background:#eee}.next-step-dot>.next-step-item-finish>.next-step-item-container .next-step-item-progress{width:12px;height:12px}.next-step-dot>.next-step-item-finish>.next-step-item-container .next-step-item-node{color:#209bfa}.next-step-dot>.next-step-item-finish>.next-step-item-container .next-step-item-node-circle,.next-step-dot>.next-step-item-finish>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#209bfa}.next-step-dot>.next-step-item-finish .next-step-item-title{color:#666;word-break:break-word}.next-step-dot>.next-step-item-finish .next-step-item-content{color:#666;line-height:1.5;word-break:break-word}.next-step-dot>.next-step-item-finish .next-step-item-node-placeholder{width:12px;height:12px;position:relative}.next-step-dot>.next-step-item-finish .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot>.next-step-item-finish .next-step-item-node-circle{display:block;width:12px;height:12px;font-size:12px;font-weight:400;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-dot>.next-step-item-finish .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-dot>.next-step-item-finish .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-dot>.next-step-item-finish .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot>.next-step-item-finish .next-step-item-content{font-size:12px}.next-step-dot>.next-step-item-finish .next-step-item-node-dot{display:block;width:12px;height:12px;font-size:12px;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .3s ease,border-color .3s ease}.next-step-dot .next-step-item-disabled .next-step-item-tail-overlay,.next-step-dot .next-step-item-disabled .next-step-item-tail-underlay{background:#eee}.next-step-dot .next-step-item-disabled>.next-step-item-container .next-step-item-progress{width:12px;height:12px}.next-step-dot .next-step-item-disabled>.next-step-item-container .next-step-item-node{color:#eee}.next-step-dot .next-step-item-disabled>.next-step-item-container .next-step-item-node-circle,.next-step-dot .next-step-item-disabled>.next-step-item-container .next-step-item-node-dot{background:#fff;border-color:#e6e6e6}.next-step-dot .next-step-item-disabled .next-step-item-title{color:#ccc;word-break:break-word}.next-step-dot .next-step-item-disabled .next-step-item-content{color:#ccc;line-height:1.5;word-break:break-word}.next-step-dot .next-step-item-disabled .next-step-item-node-placeholder{width:12px;height:12px;position:relative}.next-step-dot .next-step-item-disabled .next-step-item-node{position:relative;display:inline-block;text-align:center;cursor:pointer}.next-step-dot .next-step-item-disabled .next-step-item-node-circle{display:block;width:12px;height:12px;font-size:12px;font-weight:400;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .1s linear}.next-step-dot .next-step-item-disabled .next-step-item-node-circle .next-icon{animation:zoomIn .3s linear}.next-step-dot .next-step-item-disabled .next-step-item-node-circle .next-icon .next-icon-remote,.next-step-dot .next-step-item-disabled .next-step-item-node-circle .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-step-dot .next-step-item-disabled .next-step-item-content{font-size:12px}.next-step-dot .next-step-item-disabled .next-step-item-node-dot{display:block;width:12px;height:12px;font-size:12px;line-height:10px;text-align:center;border:1px solid;border-radius:50%;transition:background-color .3s ease,border-color .3s ease}.next-step-dot .next-step-item-disabled .next-step-item-node,.next-step-dot .next-step-item-disabled .next-step-item-node-placeholder{cursor:not-allowed}.next-step-dot .next-step-item-read-only .next-step-item-node,.next-step-dot .next-step-item-read-only .next-step-item-node-placeholder{cursor:default}.next-step-dot .next-step-item-last .next-step-item-tail{display:none}.next-step-dot.next-step-horizontal{text-align:center;white-space:nowrap}.next-step-dot.next-step-horizontal>.next-step-item .next-step-item-content,.next-step-dot.next-step-horizontal>.next-step-item .next-step-item-title{white-space:normal}.next-step-dot.next-step-horizontal .next-step-item-node .next-icon{vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-wait .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 28px);vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-wait .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-dot.next-step-horizontal>.next-step-item-wait .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-dot.next-step-horizontal>.next-step-item-wait>.next-step-item-body{width:100px;left:-36px;text-align:center;position:absolute}.next-step-dot.next-step-horizontal>.next-step-item-wait>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-dot.next-step-horizontal>.next-step-item-wait>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-dot.next-step-horizontal>.next-step-item-process .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 28px);vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-process .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-dot.next-step-horizontal>.next-step-item-process .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-dot.next-step-horizontal>.next-step-item-process>.next-step-item-body{width:100px;left:-36px;text-align:center;position:absolute}.next-step-dot.next-step-horizontal>.next-step-item-process>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-dot.next-step-horizontal>.next-step-item-process>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-dot.next-step-horizontal>.next-step-item-finish .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 28px);vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-finish .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-dot.next-step-horizontal>.next-step-item-finish .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-dot.next-step-horizontal>.next-step-item-finish>.next-step-item-body{width:100px;left:-36px;text-align:center;position:absolute}.next-step-dot.next-step-horizontal>.next-step-item-finish>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-dot.next-step-horizontal>.next-step-item-finish>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-dot.next-step-horizontal>.next-step-item-disabled .next-step-item-tail{display:inline-block;clear:both;width:calc(100% - 28px);vertical-align:middle}.next-step-dot.next-step-horizontal>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-underlay{display:block;height:1px;position:relative}.next-step-dot.next-step-horizontal>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:1px;transition:all .1s linear;width:100%}.next-step-dot.next-step-horizontal>.next-step-item-disabled>.next-step-item-body{width:100px;left:-36px;text-align:center;position:absolute}.next-step-dot.next-step-horizontal>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{font-size:14px;line-height:18px;margin-top:8px;font-weight:700}.next-step-dot.next-step-horizontal>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{margin-top:4px}.next-step-dot.next-step-vertical{padding:0 0 0 4px;font-size:0;display:table-cell;position:relative}.next-step-dot.next-step-vertical .next-step-item-container{padding:0}.next-step-dot.next-step-vertical>.next-step-item:last-child .next-step-item-tail{display:block;visibility:hidden}.next-step-dot.next-step-vertical>.next-step-item-wait .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-dot.next-step-vertical>.next-step-item-wait .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-dot.next-step-vertical>.next-step-item-wait .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-dot.next-step-vertical>.next-step-item-wait>.next-step-item-body{position:absolute;top:0;left:6px;margin-left:8px}.next-step-dot.next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-title{margin-top:0;font-weight:700;text-align:left;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot.next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-content{margin-top:8px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-dot.next-step-vertical>.next-step-item-process .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-dot.next-step-vertical>.next-step-item-process .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-dot.next-step-vertical>.next-step-item-process .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-dot.next-step-vertical>.next-step-item-process>.next-step-item-body{position:absolute;top:0;left:6px;margin-left:8px}.next-step-dot.next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-title{margin-top:0;font-weight:700;text-align:left;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot.next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-content{margin-top:8px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-dot.next-step-vertical>.next-step-item-finish .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-dot.next-step-vertical>.next-step-item-finish .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-dot.next-step-vertical>.next-step-item-finish .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-dot.next-step-vertical>.next-step-item-finish>.next-step-item-body{position:absolute;top:0;left:6px;margin-left:8px}.next-step-dot.next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-title{margin-top:0;font-weight:700;text-align:left;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot.next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-content{margin-top:8px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-dot.next-step-vertical>.next-step-item-disabled .next-step-item-tail{width:1px;height:0;margin:8px auto}.next-step-dot.next-step-vertical>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-underlay{height:100%;width:1px;position:relative}.next-step-dot.next-step-vertical>.next-step-item-disabled .next-step-item-tail .next-step-item-tail-overlay{position:absolute;top:0;height:100%;width:1px}.next-step-dot.next-step-vertical>.next-step-item-disabled>.next-step-item-body{position:absolute;top:0;left:6px;margin-left:8px}.next-step-dot.next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{margin-top:0;font-weight:700;text-align:left;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot.next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{margin-top:8px;min-height:8px;text-align:left;font-size:12px;line-height:1.5}.next-step-horizontal[dir=rtl]>.next-step-item{text-align:right}.next-step-arrow[dir=rtl] .next-step-item{height:32px;line-height:32px;margin-left:4px;margin-right:16px}.next-step-arrow[dir=rtl] .next-step-item:before{right:-16px;left:auto;border:16px solid transparent}.next-step-arrow[dir=rtl] .next-step-item:after{left:-32px;right:auto;border-top:16px solid transparent;border-bottom:16px solid transparent;border-right:16px solid transparent}.next-step-arrow[dir=rtl]>.next-step-item-wait{background:#f5f5f5}.next-step-arrow[dir=rtl]>.next-step-item-wait .next-step-item-node-dot{right:50%;left:auto}.next-step-arrow[dir=rtl]>.next-step-item-wait:before{border:16px solid #f5f5f5;border-right-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-wait:after{border-right-color:#f5f5f5;border-left-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-process{background:#209bfa}.next-step-arrow[dir=rtl]>.next-step-item-process .next-step-item-node-dot{right:50%;left:auto}.next-step-arrow[dir=rtl]>.next-step-item-process:before{border:16px solid #209bfa;border-right-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-process:after{border-right-color:#209bfa;border-left-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-finish{background:#add9ff}.next-step-arrow[dir=rtl]>.next-step-item-finish .next-step-item-node-dot{right:50%;left:auto}.next-step-arrow[dir=rtl]>.next-step-item-finish:before{border:16px solid #add9ff;border-right-color:transparent}.next-step-arrow[dir=rtl]>.next-step-item-finish:after{border-right-color:#add9ff;border-left-color:transparent}.next-step-arrow[dir=rtl] .next-step-item-disabled{background:#fafafa}.next-step-arrow[dir=rtl] .next-step-item-disabled .next-step-item-node-dot{right:50%;left:auto}.next-step-arrow[dir=rtl] .next-step-item-disabled:before{border:16px solid #fafafa;border-right-color:transparent}.next-step-arrow[dir=rtl] .next-step-item-disabled:after{border-right-color:#fafafa;border-left-color:transparent}.next-step-arrow[dir=rtl] .next-step-item-first{margin-right:0}.next-step-arrow[dir=rtl] .next-step-item-last{margin-left:0}.next-step-circle[dir=rtl] .next-step-item-disabled .next-step-item-node-dot,.next-step-circle[dir=rtl]>.next-step-item-finish .next-step-item-node-dot,.next-step-circle[dir=rtl]>.next-step-item-process .next-step-item-node-dot,.next-step-circle[dir=rtl]>.next-step-item-wait .next-step-item-node-dot{right:50%;left:auto}.next-step-circle[dir=rtl].next-step-horizontal>.next-step-item-disabled>.next-step-item-body,.next-step-circle[dir=rtl].next-step-horizontal>.next-step-item-finish>.next-step-item-body,.next-step-circle[dir=rtl].next-step-horizontal>.next-step-item-process>.next-step-item-body,.next-step-circle[dir=rtl].next-step-horizontal>.next-step-item-wait>.next-step-item-body{right:-26px;left:auto}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-body{left:auto;right:0;text-align:right}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-body .next-step-item-title{padding-left:8px;padding-right:0}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-wait .next-step-item-tail{left:0;right:auto}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-body{left:auto;right:0;text-align:right}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-body .next-step-item-title{padding-left:8px;padding-right:0}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-process .next-step-item-tail{left:0;right:auto}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-body{left:auto;right:0;text-align:right}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-body .next-step-item-title{padding-left:8px;padding-right:0}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-finish .next-step-item-tail{left:0;right:auto}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-body{left:auto;right:0;text-align:right}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-body .next-step-item-title{padding-left:8px;padding-right:0}.next-step-circle[dir=rtl].next-step-horizontal.next-step-label-horizontal>.next-step-item-disabled .next-step-item-tail{left:0;right:auto}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body{right:16px;left:auto;margin-right:8px;margin-left:0}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body{right:16px;left:auto;margin-right:8px;margin-left:0}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body{right:16px;left:auto;margin-right:8px;margin-left:0}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body{right:16px;left:auto;margin-right:8px;margin-left:0}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-circle[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-dot[dir=rtl] .next-step-item-disabled .next-step-item-node-dot,.next-step-dot[dir=rtl]>.next-step-item-finish .next-step-item-node-dot,.next-step-dot[dir=rtl]>.next-step-item-process .next-step-item-node-dot,.next-step-dot[dir=rtl]>.next-step-item-wait .next-step-item-node-dot{right:50%;left:auto}.next-step-dot[dir=rtl].next-step-horizontal>.next-step-item-disabled>.next-step-item-body,.next-step-dot[dir=rtl].next-step-horizontal>.next-step-item-finish>.next-step-item-body,.next-step-dot[dir=rtl].next-step-horizontal>.next-step-item-process>.next-step-item-body,.next-step-dot[dir=rtl].next-step-horizontal>.next-step-item-wait>.next-step-item-body{right:-36px;left:auto}.next-step-dot[dir=rtl].next-step-vertical{padding:0 4px 0 0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body{right:6px;left:auto;margin-right:8px;margin-left:0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-wait>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body{right:6px;left:auto;margin-right:8px;margin-left:0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-process>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body{right:6px;left:auto;margin-right:8px;margin-left:0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-finish>.next-step-item-body>.next-step-item-content{text-align:right}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body{right:6px;left:auto;margin-right:8px;margin-left:0}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-title{text-align:right;font-family:Roboto,Helvetica Neue,Helvetica,Tahoma,Arial,PingFang SC,Microsoft YaHei;font-size:14px;line-height:1.2857142}.next-step-dot[dir=rtl].next-step-vertical>.next-step-item-disabled>.next-step-item-body>.next-step-item-content{text-align:right}.next-switch:after[dir=rtl]{content:" ";transition:all .1s linear;transform-origin:right center}.next-switch-medium[dir=rtl]:after,.next-switch-small[dir=rtl]:after{right:100%;transform:translateX(100%)}.next-switch-on[dir=rtl]>.next-switch-children{color:#fff}.next-switch-on[disabled][dir=rtl]:after{left:0;right:100%;box-shadow:1px 1px 3px 0 rgba(0,0,0,.12)}.next-switch-off[dir=rtl]:after{right:0;transform:translateX(0);box-shadow:-1px 0 3px 0 rgba(0,0,0,.12)}.next-switch-off.next-switch-small[dir=rtl]>.next-switch-children,.next-switch-off[dir=rtl]>.next-switch-children{right:auto}.next-switch{outline:none;text-align:left;cursor:pointer;vertical-align:middle;user-select:none;overflow:hidden;transition:background .1s cubic-bezier(.4,0,.2,1),border-color .1s cubic-bezier(.4,0,.2,1)}.next-switch,.next-switch *,.next-switch :after,.next-switch :before{box-sizing:border-box}.next-switch-btn{transition:all .15s cubic-bezier(.4,0,.2,1);transform-origin:left center}.next-switch:after{content:""}.next-switch-loading{pointer-events:none}.next-switch-loading .next-icon-loading{color:#209bfa;text-align:center;transform:translate(-1px,-1px)}.next-switch-loading .next-icon-loading.next-switch-inner-icon:before{vertical-align:top}.next-switch-medium{position:relative;display:inline-block;border:2px solid transparent;width:48px;height:28px;border-radius:12px}.next-switch-medium:not([disabled]):active .next-switch-btn{width:31.2px}.next-switch-medium.next-switch-on:not([disabled]):active .next-switch-btn{left:calc(100% - 31.2px)}.next-switch-medium.next-switch-auto-width{min-width:48px;width:auto;overflow:initial}.next-switch-medium:after{content:""}.next-switch-medium>.next-switch-btn{border:1px solid transparent;position:absolute;left:calc(100% - 24px);width:24px;height:24px;border-radius:12px;box-sizing:border-box}.next-switch-medium>.next-switch-children{height:24px;line-height:24px;font-size:14px}.next-switch-medium.next-switch.next-switch-on>.next-switch-children{margin:0 32px 0 8px}.next-switch-medium.next-switch.next-switch-off>.next-switch-children{margin:0 8px 0 32px}.next-switch-medium.next-switch-loading .next-icon-loading{line-height:24px;height:24px;width:24px}.next-switch-medium.next-switch-loading .next-icon-loading .next-icon-remote,.next-switch-medium.next-switch-loading .next-icon-loading:before{width:16px;font-size:16px;line-height:inherit}.next-switch-small{position:relative;display:inline-block;border:2px solid transparent;width:44px;height:24px;border-radius:12px}.next-switch-small:not([disabled]):active .next-switch-btn{width:26px}.next-switch-small.next-switch-on:not([disabled]):active .next-switch-btn{left:calc(100% - 26px)}.next-switch-small.next-switch-auto-width{min-width:44px;width:auto;overflow:initial}.next-switch-small:after{content:""}.next-switch-small>.next-switch-btn{border:1px solid transparent;position:absolute;left:calc(100% - 20px);width:20px;height:20px;border-radius:12px;box-sizing:border-box}.next-switch-small>.next-switch-children{height:20px;line-height:20px;font-size:12px}.next-switch-small.next-switch.next-switch-on>.next-switch-children{margin:0 28px 0 8px}.next-switch-small.next-switch.next-switch-off>.next-switch-children{margin:0 8px 0 28px}.next-switch-small.next-switch-loading .next-icon-loading{line-height:20px;height:20px;width:20px}.next-switch-small.next-switch-loading .next-icon-loading .next-icon-remote,.next-switch-small.next-switch-loading .next-icon-loading:before{width:12px;font-size:12px;line-height:inherit}.next-switch-on{background-color:#209bfa}.next-switch-on .next-switch-btn{box-shadow:1px 1px 3px 0 rgba(0,0,0,.12);background-color:#fff;border-color:transparent}.next-switch-on>.next-switch-children{color:#fff}.next-switch-on.hover,.next-switch-on:focus,.next-switch-on:hover{background-color:#1274e7}.next-switch-on.hover .next-switch-btn,.next-switch-on:focus .next-switch-btn,.next-switch-on:hover .next-switch-btn{background-color:#fff}.next-switch-on[disabled]{background-color:#f5f5f5;cursor:not-allowed}.next-switch-on[disabled] .next-switch-btn{right:0;box-shadow:1px 1px 3px 0 rgba(0,0,0,.12);background-color:#fafafa;border-color:transparent}.next-switch-on[disabled]>.next-switch-children{color:#ccc}.next-switch-off,.next-switch-off.hover,.next-switch-off:focus,.next-switch-off:hover{background-color:#f5f5f5;border-color:#f5f5f5}.next-switch-off .next-switch-btn{left:0;box-shadow:1px 1px 3px 0 rgba(0,0,0,.12);background-color:#fff;border-color:transparent}.next-switch-off.hover .next-switch-btn,.next-switch-off:focus .next-switch-btn,.next-switch-off:hover .next-switch-btn{background-color:#fff}.next-switch-off>.next-switch-children{color:#999}.next-switch-off[disabled]{background-color:#f5f5f5;cursor:not-allowed}.next-switch-off[disabled] .next-switch-btn{box-shadow:1px 1px 3px 0 rgba(0,0,0,.12);background-color:#fafafa;border-color:transparent}.next-switch-off[disabled]>.next-switch-children{color:#ddd}.next-tabs{width:100%}.next-tabs,.next-tabs *,.next-tabs :after,.next-tabs :before{box-sizing:border-box}.next-tabs-bar{outline:none}.next-tabs-bar-popup{overflow-y:auto;max-height:480px}.next-tabs-nav-container{position:relative}.next-tabs-nav-container:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-tabs-nav-wrap{overflow:hidden}.next-tabs-nav-scroll{overflow:hidden;white-space:nowrap}.next-tabs-scrollable .next-tabs-nav-scroll{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.next-tabs-scrollable .next-tabs-nav-scroll::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;-webkit-appearance:none;opacity:0!important}.next-tabs-nav{display:inline-block;position:relative;transition:all .3s ease;list-style:none;padding:0;margin:0}.next-tabs-nav-appear,.next-tabs-nav-enter{animation:fadeInLeft .4s cubic-bezier(.78,.14,.15,.86);animation-fill-mode:both}.next-tabs-nav-leave{animation:fadeOutLeft .2s cubic-bezier(.78,.14,.15,.86);animation-fill-mode:both}.next-tabs-nav.next-disable-animation .next-tabs-tab:before{transition:none}.next-tabs-tab{display:inline-block;position:relative;transition:all .1s linear}.next-tabs-tab-inner{position:relative;cursor:pointer;text-decoration:none}.next-tabs-tab:before{content:"";position:absolute;transition:all .3s ease}.next-tabs-tab.active{font-weight:400}.next-tabs-tab .next-tabs-tab-close{color:#666}.next-tabs-tab .next-tabs-tab-close:hover{color:#333}.next-tabs-tab .next-tabs-tab-close:focus{outline:none}.next-tabs-tab.active .next-tabs-tab-close{color:#209bfa}.next-tabs-tab.disabled .next-tabs-tab-close{color:#e6e6e6}.next-tabs-tab:focus{outline:none}.next-tabs-tabpane{visibility:hidden;opacity:0}.next-tabs-tabpane.active{visibility:visible;opacity:1;height:auto}.next-tabs-tabpane.hidden{overflow:hidden;height:0!important;margin:0!important;padding:0!important;border:0!important}.next-tabs-btn-down,.next-tabs-btn-next,.next-tabs-btn-prev{position:absolute;top:0;cursor:pointer;padding:0;border:0;outline:none;height:100%;background:transparent;border-color:transparent}.next-tabs-btn-down,.next-tabs-btn-down.visited,.next-tabs-btn-down:link,.next-tabs-btn-down:visited,.next-tabs-btn-next,.next-tabs-btn-next.visited,.next-tabs-btn-next:link,.next-tabs-btn-next:visited,.next-tabs-btn-prev,.next-tabs-btn-prev.visited,.next-tabs-btn-prev:link,.next-tabs-btn-prev:visited{color:#666}.next-tabs-btn-down.active,.next-tabs-btn-down.hover,.next-tabs-btn-down:active,.next-tabs-btn-down:focus,.next-tabs-btn-down:hover,.next-tabs-btn-next.active,.next-tabs-btn-next.hover,.next-tabs-btn-next:active,.next-tabs-btn-next:focus,.next-tabs-btn-next:hover,.next-tabs-btn-prev.active,.next-tabs-btn-prev.hover,.next-tabs-btn-prev:active,.next-tabs-btn-prev:focus,.next-tabs-btn-prev:hover{color:#333;background:transparent;border-color:transparent;text-decoration:none}.next-tabs-btn-down.disabled,.next-tabs-btn-next.disabled,.next-tabs-btn-prev.disabled{cursor:not-allowed;color:#e6e6e6}.next-tabs-btn-next{right:8px}.next-tabs-btn-prev{right:32px}.next-tabs-btn-down{right:8px}.next-tabs .next-tab-icon-dropdown:before{content:""}.next-tabs .next-tab-icon-prev:before{content:""}.next-tabs .next-tab-icon-next:before{content:""}.next-tabs-content{overflow:hidden}.next-tabs-vertical>.next-tabs-bar .next-tabs-nav{width:100%}.next-tabs-vertical>.next-tabs-bar .next-tabs-tab{display:block}.next-tabs.next-medium .next-tabs-nav-container-scrolling{padding-right:60px}.next-tabs.next-medium .next-tabs-tab-inner{font-size:14px;padding:20px 16px}.next-tabs.next-medium .next-tabs-tab-inner .next-icon{line-height:1}.next-tabs.next-medium .next-tabs-tab-inner .next-icon .next-icon-remote,.next-tabs.next-medium .next-tabs-tab-inner .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-tabs.next-medium .next-tabs-tab-inner .next-tabs-tab-close .next-icon-remote,.next-tabs.next-medium .next-tabs-tab-inner .next-tabs-tab-close:before{width:12px;font-size:12px;line-height:inherit}.next-tabs.next-medium .next-tabs-tab-inner .next-tabs-tab-close.next-icon{margin-left:8px}.next-tabs.next-medium .next-tabs-tab-inner .next-icon-add .next-icon-remote,.next-tabs.next-medium .next-tabs-tab-inner .next-icon-add:before{width:12px;font-size:12px;line-height:inherit}.next-tabs.next-medium .next-tabs-btn-down .next-icon .next-icon-remote,.next-tabs.next-medium .next-tabs-btn-down .next-icon:before,.next-tabs.next-medium .next-tabs-btn-next .next-icon .next-icon-remote,.next-tabs.next-medium .next-tabs-btn-next .next-icon:before,.next-tabs.next-medium .next-tabs-btn-prev .next-icon .next-icon-remote,.next-tabs.next-medium .next-tabs-btn-prev .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-tabs.next-small .next-tabs-nav-container-scrolling{padding-right:56px}.next-tabs.next-small .next-tabs-tab-inner{font-size:12px;padding:8px 12px}.next-tabs.next-small .next-tabs-tab-inner .next-icon{line-height:1}.next-tabs.next-small .next-tabs-tab-inner .next-icon .next-icon-remote,.next-tabs.next-small .next-tabs-tab-inner .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close .next-icon-remote,.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close:before{width:16px;font-size:16px}}.next-tabs.next-small .next-tabs-tab-inner .next-tabs-tab-close.next-icon{margin-left:8px}.next-tabs.next-small .next-tabs-tab-inner .next-icon-add .next-icon-remote,.next-tabs.next-small .next-tabs-tab-inner .next-icon-add:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tabs.next-small .next-tabs-tab-inner .next-icon-add{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-tabs.next-small .next-tabs-tab-inner .next-icon-add:before{width:16px;font-size:16px}}.next-tabs.next-small .next-tabs-btn-down .next-icon .next-icon-remote,.next-tabs.next-small .next-tabs-btn-down .next-icon:before,.next-tabs.next-small .next-tabs-btn-next .next-icon .next-icon-remote,.next-tabs.next-small .next-tabs-btn-next .next-icon:before,.next-tabs.next-small .next-tabs-btn-prev .next-icon .next-icon-remote,.next-tabs.next-small .next-tabs-btn-prev .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-tabs-show-add{position:relative;display:flex;flex:none;align-items:center;padding-right:0!important}.next-tabs-show-add .next-tabs-nav-wrap{position:relative;display:flex;flex:auto;align-self:stretch;overflow:hidden;white-space:nowrap}.next-tabs-show-add .next-tabs-nav-wrap:after{position:absolute;height:100%;width:1px;right:0;content:"";pointer-events:none;box-shadow:-2px 0 3px 0 rgba(0,0,0,.12);z-index:1}.next-tabs-show-add .next-tabs-nav-operations{display:flex;align-self:stretch}.next-tabs-show-add .next-tabs-nav-operations .next-tabs-btn-prev{position:static;right:auto}.next-tabs-show-add .next-tabs-nav-operations .next-tabs-btn-down,.next-tabs-show-add .next-tabs-nav-operations .next-tabs-btn-next{position:static;margin-left:8px;right:auto}.next-tabs.next-small .next-tabs-nav-operations .next-tabs-btn-prev{margin-left:8px}.next-tabs.next-small .next-tabs-nav-operations .next-tabs-btn-next{margin-right:8px}.next-tabs.next-medium .next-tabs-nav-operations .next-tabs-btn-prev{margin-left:12px}.next-tabs.next-medium .next-tabs-nav-operations .next-tabs-btn-next{margin-right:12px}.next-tabs-pure>.next-tabs-bar{border-bottom:1px solid #e6e6e6;background-color:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container{margin-bottom:-1px;box-shadow:none}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab{color:#666;background-color:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab:hover{cursor:pointer;color:#333;background-color:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab.active{z-index:1;color:#209bfa;background-color:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab.disabled{pointer-events:none;cursor:default;color:#e6e6e6;background:transparent}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab:before{border-radius:0;width:0;border-bottom:2px solid #209bfa;left:50%;bottom:0}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-container .next-tabs-tab.active:before{width:100%;left:0}.next-tabs-wrapped>.next-tabs-bar{background:transparent}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab{color:#666;background-color:#f9f9f9}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab:hover{cursor:pointer;color:#333;background-color:#f5f5f5}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab.active{z-index:1;color:#209bfa;background-color:#fff}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab.disabled{pointer-events:none;cursor:default;color:#ccc;background:#fafafa}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab .next-tabs-tab-close{color:#666}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab .next-tabs-tab-close:hover{color:#333}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab .next-tabs-tab-close:focus{outline:none}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab.active .next-tabs-tab-close{color:#209bfa}.next-tabs-wrapped>.next-tabs-bar .next-tabs-tab.disabled .next-tabs-tab-close{color:#e6e6e6}.next-tabs-wrapped:after,.next-tabs-wrapped:before{content:"";display:table}.next-tabs-wrapped:after{clear:both}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar,.next-tabs-wrapped>.next-tabs-content{position:relative}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab{border-radius:3px 3px 0 0;border:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab+.next-tabs-tab{margin-left:4px}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab:hover{border-color:#ddd}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab.active{border-color:#e6e6e6 #e6e6e6 #fff}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab:before{border-radius:3px;width:0;border-top:2px solid #209bfa;left:50%;top:-1px}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab.active:before{width:calc(100% - 6px);left:3px}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-tab.active{border-width:1px}.next-tabs-wrapped.next-tabs-top>.next-tabs-bar:before{content:"";position:absolute;top:100%;width:100%;height:0;border-bottom:1px solid #e6e6e6;transform:translateY(-1px);display:block}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar{position:relative}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab{margin-right:4px;border:1px solid #e6e6e6;border-radius:0 0 3px 3px}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab:hover{border-color:#ddd}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab.active{border-color:#fff #e6e6e6 #e6e6e6}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab:before{border-radius:3px;width:0;border-bottom:2px solid #209bfa;left:50%;bottom:-1px}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-tab.active:before{width:calc(100% - 6px);left:3px}.next-tabs-wrapped.next-tabs-bottom>.next-tabs-content{top:1px;border-bottom:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar{float:left}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab{float:none;margin-bottom:4px;border-radius:3px 0 0 3px;border:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab:hover{border-color:#ddd}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab.active{border-color:#e6e6e6 #fff #e6e6e6 #e6e6e6}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab:before{border-radius:3px;height:0;border-left:2px solid #209bfa;top:50%;left:-1px}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab.active:before{height:calc(100% - 6px);top:3px}.next-tabs-wrapped.next-tabs-left>.next-tabs-bar .next-tabs-tab.active{border-width:1px}.next-tabs-wrapped.next-tabs-left>.next-tabs-content{right:1px;border-left:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar{float:right}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab{float:none;margin-bottom:4px;border-radius:0 3px 3px 0;border:1px solid #e6e6e6}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab:hover{border-color:#ddd}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab.active{border-color:#e6e6e6 #e6e6e6 #e6e6e6 #fff}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab:before{border-radius:3px;height:0;border-right:2px solid #209bfa;top:50%;right:-1px}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab.active:before{height:calc(100% - 6px);top:3px}.next-tabs-wrapped.next-tabs-right>.next-tabs-bar .next-tabs-tab.active{border-width:1px}.next-tabs-wrapped.next-tabs-right>.next-tabs-content{right:-1px;border-right:1px solid #e6e6e6}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab{transition:background-color .1s linear;border:1px solid #ddd;border-right-color:transparent;margin-right:-1px;color:#333;background-color:#f9f9f9}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab:first-child{border-radius:3px 0 0 3px}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab:last-child{border-radius:0 3px 3px 0;border-right:1px solid #ddd;margin-right:0}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab.active{border-right:1px solid;border-color:#209bfa}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab.disabled{border-color:#eee}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab:hover{z-index:2;border-right:1px solid;border-color:#ddd;cursor:pointer;color:#333;background-color:#f5f5f5}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab.active{z-index:1;color:#fff;background-color:#209bfa}.next-tabs-capsule>.next-tabs-bar .next-tabs-tab.disabled{pointer-events:none;cursor:default;color:#ccc;background:#fafafa}.next-tabs-text>.next-tabs-bar .next-tabs-tab{color:#666;background-color:transparent}.next-tabs-text>.next-tabs-bar .next-tabs-tab:hover{cursor:pointer;color:#333;background-color:transparent}.next-tabs-text>.next-tabs-bar .next-tabs-tab.active{z-index:1;color:#209bfa;background-color:transparent}.next-tabs-text>.next-tabs-bar .next-tabs-tab.disabled{pointer-events:none;cursor:default;color:#ccc;background:transparent}.next-tabs-text>.next-tabs-bar .next-tabs-tab:not(:last-child):after{content:"";position:absolute;right:0;top:calc(50% - 4px);width:1px;height:8px;background-color:#e6e6e6}.next-tabs-pure>.next-tabs-bar{position:relative}.next-tabs-pure>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs-capsule>.next-tabs-bar{position:relative}.next-tabs-capsule>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs-text>.next-tabs-bar{position:relative}.next-tabs-text>.next-tabs-bar .next-tabs-nav-extra{position:absolute;top:50%;right:0;transform:translateY(-50%)}.next-tabs[dir=rtl].next-medium .next-tabs-nav-container-scrolling{padding-left:60px;padding-right:0}.next-tabs[dir=rtl].next-medium .next-tabs-tab-close{padding-right:8px;padding-left:0}.next-tabs[dir=rtl].next-small .next-tabs-nav-container-scrolling{padding-left:56px;padding-right:0}.next-tabs[dir=rtl].next-small .next-tabs-tab-close{padding-right:8px;padding-left:0}.next-tabs[dir=rtl].next-tabs-wrapped.next-tabs-bottom>.next-tabs-bar .next-tabs-nav-extra,.next-tabs[dir=rtl].next-tabs-wrapped.next-tabs-top>.next-tabs-bar .next-tabs-nav-extra,.next-tabs[dir=rtl]>.next-tabs-bar .next-tabs-nav-extra{right:auto;left:0}.next-tabs[dir=rtl].next-tabs-capsule>.next-tabs-bar .next-tabs-tab{border:1px solid #ddd;border-left:0}.next-tabs[dir=rtl].next-tabs-capsule>.next-tabs-bar .next-tabs-tab:first-child{border-left:0;border-radius:0 3px 3px 0}.next-tabs[dir=rtl].next-tabs-capsule>.next-tabs-bar .next-tabs-tab:last-child{border-radius:3px 0 0 3px;border-left:1px solid #ddd}.next-tabs[dir=rtl].next-tabs-capsule>.next-tabs-bar .next-tabs-tab.active{margin-left:-1px;margin-right:auto;border-left:1px solid;border-color:#209bfa}.next-tabs[dir=rtl] .next-tabs-btn-next{left:8px;right:auto}.next-tabs[dir=rtl] .next-tabs-btn-prev{left:32px;right:auto}.next-tabs[dir=rtl] .next-tabs-btn-down{left:8px;right:auto}.next-tabs-text[dir=rtl]>.next-tabs-bar .next-tabs-tab:not(:last-child):after{content:"";position:absolute;left:0;right:auto}@keyframes fadeInRightForTag{0%{opacity:0;transform:rotate(45deg) translateX(20px)}to{opacity:1;transform:rotate(45deg) translateX(0)}}.next-tag>.next-tag-body{overflow:hidden;text-overflow:ellipsis}.next-tag-checkable.next-tag-level-secondary{color:#333;border-color:transparent;background-color:transparent}.next-tag-checkable.next-tag-level-secondary:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-secondary:not(.disabled):not([disabled]):hover{color:#209bfa}.next-tag-default.next-tag-level-primary{color:#666;border-color:#f5f5f5;background-color:#f5f5f5}.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]):hover{color:#333;border-color:#f2f2f2;background-color:#f2f2f2}.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-default.next-tag-level-primary:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-default.next-tag-level-primary,[disabled].next-tag-default.next-tag-level-primary{color:#ccc;border-color:#fafafa;background-color:#fafafa}.disabled.next-tag-default.next-tag-level-primary>.next-tag-close-btn,[disabled].next-tag-default.next-tag-level-primary>.next-tag-close-btn{color:#ccc}.next-tag-default.next-tag-level-primary>.next-tag-close-btn{color:#666}.next-tag-closable.next-tag-level-primary{color:#666;border-color:#f5f5f5;background-color:#f5f5f5}.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]):hover{color:#333;border-color:#f2f2f2;background-color:#f2f2f2}.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-closable.next-tag-level-primary:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-closable.next-tag-level-primary,[disabled].next-tag-closable.next-tag-level-primary{color:#ccc;border-color:#fafafa;background-color:#fafafa}.disabled.next-tag-closable.next-tag-level-primary>.next-tag-close-btn,[disabled].next-tag-closable.next-tag-level-primary>.next-tag-close-btn{color:#ccc}.next-tag-closable.next-tag-level-primary>.next-tag-close-btn{color:#666}.next-tag-checkable.next-tag-level-primary{color:#666;border-color:#f5f5f5;background-color:#f5f5f5}.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]):hover{color:#333;border-color:#f2f2f2;background-color:#f2f2f2}.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-checkable.next-tag-level-primary:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-checkable.next-tag-level-primary,[disabled].next-tag-checkable.next-tag-level-primary{color:#ccc;border-color:#fafafa;background-color:#fafafa}.disabled.next-tag-checkable.next-tag-level-primary>.next-tag-close-btn,[disabled].next-tag-checkable.next-tag-level-primary>.next-tag-close-btn{color:#ccc}.next-tag-checkable.next-tag-level-primary>.next-tag-close-btn{color:#666}.next-tag-checkable.next-tag-level-primary.checked{color:#fff;border-color:#209bfa;background-color:#209bfa}.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]):hover{color:#fff;border-color:#1274e7;background-color:#1274e7}.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-checkable.next-tag-level-primary.checked:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#fff}.disabled.next-tag-checkable.next-tag-level-primary.checked,[disabled].next-tag-checkable.next-tag-level-primary.checked{color:#ccc;border-color:#fafafa;background-color:#fafafa}.disabled.next-tag-checkable.next-tag-level-primary.checked>.next-tag-close-btn,.next-tag-checkable.next-tag-level-primary.checked>.next-tag-close-btn,[disabled].next-tag-checkable.next-tag-level-primary.checked>.next-tag-close-btn{color:#fff}.next-tag-default.next-tag-level-normal{color:#666;border-color:#ddd;background-color:transparent}.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]):hover{color:#333;border-color:#ccc;background-color:transparent}.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-default.next-tag-level-normal:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-default.next-tag-level-normal,[disabled].next-tag-default.next-tag-level-normal{color:#ccc;border-color:#eee;background-color:#fafafa}.disabled.next-tag-default.next-tag-level-normal>.next-tag-close-btn,[disabled].next-tag-default.next-tag-level-normal>.next-tag-close-btn{color:#ccc}.next-tag-default.next-tag-level-normal>.next-tag-close-btn{color:#666}.next-tag-closable.next-tag-level-normal{color:#666;border-color:#ddd;background-color:transparent}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover{color:#333;border-color:#ccc;background-color:transparent}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover>.next-tag-close-btn,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover>.next-tag-close-btn{color:#333}.disabled.next-tag-closable.next-tag-level-normal,[disabled].next-tag-closable.next-tag-level-normal{color:#ccc;border-color:#eee;background-color:transparent}.disabled.next-tag-closable.next-tag-level-normal>.next-tag-close-btn,[disabled].next-tag-closable.next-tag-level-normal>.next-tag-close-btn{color:#ccc}.next-tag-closable.next-tag-level-normal>.next-tag-close-btn{color:#666}.next-tag-checkable.next-tag-level-normal.checked{color:#209bfa;border-color:#209bfa;background-color:transparent}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover{color:#1274e7;border-color:#1274e7;background-color:transparent}.next-tag-checkable.next-tag-level-secondary.checked{color:#209bfa;border-color:#209bfa;background-color:transparent}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover{color:#1274e7;border-color:#1274e7;background-color:transparent}.next-tag-checkable.next-tag-level-secondary.checked:before{position:absolute;content:"";-webkit-font-smoothing:antialiased;background-color:#209bfa;transform:rotate(45deg)}.next-tag-checkable.next-tag-level-secondary.checked:after{position:absolute;font-family:NextIcon;-webkit-font-smoothing:antialiased;content:"";transform:scale(.6);color:#fff}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover:before,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover:before{background-color:#1274e7}.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]).hover:after,.next-tag-checkable.next-tag-level-secondary.checked:not(.disabled):not([disabled]):hover:after{color:#fff}.next-tag-checkable.next-tag-level-secondary.checked:disabled:before,[disabled].next-tag-checkable.next-tag-level-secondary.checked:before{background-color:#eee}.next-tag-checkable.next-tag-level-secondary.checked:disabled:after,[disabled].next-tag-checkable.next-tag-level-secondary.checked:after{color:#fff}.next-tag-checkable.next-tag-level-normal{color:#666;border-color:#ddd;background-color:transparent}.next-tag-checkable.next-tag-level-normal:not(.disabled):not([disabled]).hover,.next-tag-checkable.next-tag-level-normal:not(.disabled):not([disabled]):hover{color:#333;border-color:#ddd;background-color:transparent}.disabled.next-tag-checkable.next-tag-level-normal,[disabled].next-tag-checkable.next-tag-level-normal{color:#ccc;border-color:#eee;background-color:#fafafa}.next-tag-checkable.next-tag-level-normal.checked:before{position:absolute;content:"";-webkit-font-smoothing:antialiased;background-color:#209bfa;transform:rotate(45deg)}.next-tag-checkable.next-tag-level-normal.checked:after{position:absolute;font-family:NextIcon;-webkit-font-smoothing:antialiased;content:"";transform:scale(.6);color:#fff}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover:before,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover:before{background-color:#1274e7}.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]).hover:after,.next-tag-checkable.next-tag-level-normal.checked:not(.disabled):not([disabled]):hover:after{color:#fff}.next-tag-checkable.next-tag-level-normal.checked:disabled:before,[disabled].next-tag-checkable.next-tag-level-normal.checked:before{background-color:#eee}.next-tag-checkable.next-tag-level-normal.checked:disabled:after,[disabled].next-tag-checkable.next-tag-level-normal.checked:after{color:#fff}.next-tag-closable.next-tag-level-normal:before{position:absolute;content:"";-webkit-font-smoothing:antialiased;background-color:#ddd;transform:rotate(45deg)}.next-tag-closable.next-tag-level-normal:after{position:absolute;font-family:NextIcon;-webkit-font-smoothing:antialiased;content:"";transform:scale(.6);color:#fff}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover:before,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover:before{background-color:#ccc}.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]).hover:after,.next-tag-closable.next-tag-level-normal:not(.disabled):not([disabled]):hover:after{color:#fff}.next-tag-closable.next-tag-level-normal:disabled:before,[disabled].next-tag-closable.next-tag-level-normal:before{background-color:#eee}.next-tag-closable.next-tag-level-normal:disabled:after,[disabled].next-tag-closable.next-tag-level-normal:after{color:#fff}.next-tag-group .next-tag-large,.next-tag-group .next-tag-medium{margin-right:8px;margin-bottom:8px}.next-tag-group .next-tag-small{margin-right:4px;margin-bottom:4px}.next-tag{display:inline-block;max-width:100%;vertical-align:middle;border-width:1px;border-radius:3px;box-shadow:none;border-style:solid;overflow:hidden;white-space:nowrap;transition:all .1s linear;font-size:0;outline:0}.next-tag,.next-tag *,.next-tag :after,.next-tag :before{box-sizing:border-box}.next-tag>.next-tag-body{position:relative;display:inline-block;height:100%;text-align:center;vertical-align:middle;max-width:100%;cursor:default}.next-tag>.next-tag-body>a{text-decoration:none;color:inherit}.next-tag>.next-tag-body>a:before{content:" ";position:absolute;display:block;top:0;left:0;right:0;bottom:0}.next-tag>.next-tag-body .next-icon{line-height:1;vertical-align:baseline}.next-tag>.next-tag-body .next-icon:before{font-size:inherit}.next-tag.next-tag-body-pointer{cursor:pointer}.next-tag.disabled,.next-tag[disabled]{cursor:not-allowed;pointer-events:none}.next-tag-blue{background-color:#4494f9;border-color:#4494f9;color:#fff}.next-tag-blue-inverse{background-color:rgba(68,148,249,.25);border-color:#4494f9;color:#4494f9}.next-tag-green{background-color:#46bc15;border-color:#46bc15;color:#fff}.next-tag-green-inverse{background-color:rgba(70,188,21,.25);border-color:#46bc15;color:#46bc15}.next-tag-orange{background-color:#ff9300;border-color:#ff9300;color:#fff}.next-tag-orange-inverse{background-color:rgba(255,147,0,.25);border-color:#ff9300;color:#ff9300}.next-tag-red{background-color:#ff3000;border-color:#ff3000;color:#fff}.next-tag-red-inverse{background-color:rgba(255,48,0,.25);border-color:#ff3000;color:#ff3000}.next-tag-turquoise{background-color:#01c1b2;border-color:#01c1b2;color:#fff}.next-tag-turquoise-inverse{background-color:rgba(1,193,178,.25);border-color:#01c1b2;color:#01c1b2}.next-tag-yellow{background-color:#fccc12;border-color:#fccc12;color:#fff}.next-tag-yellow-inverse{background-color:rgba(252,204,18,.25);border-color:#fccc12;color:#fccc12}.next-tag-large{height:40px;padding:0;line-height:38px;font-size:0}.next-tag-large>.next-tag-body{font-size:16px;padding:0 16px;min-width:48px}.next-tag-large.next-tag-closable>.next-tag-body{padding:0 0 0 16px;max-width:calc(100% - 48px)}.next-tag-large[dir=rtl].next-tag-closable>.next-tag-body{padding:0 16px 0 0}.next-tag-large.next-tag-closable>.next-tag-close-btn{margin-left:16px;padding-right:16px}.next-tag-large.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-large.next-tag-closable>.next-tag-close-btn .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-tag-large[dir=rtl]>.next-tag-close-btn{margin-right:16px;margin-left:0;padding-right:0;padding-left:16px}.next-tag-medium{height:32px;padding:0;line-height:30px;font-size:0}.next-tag-medium>.next-tag-body{font-size:14px;padding:0 12px;min-width:40px}.next-tag-medium.next-tag-closable>.next-tag-body{padding:0 0 0 12px;max-width:calc(100% - 36px)}.next-tag-medium[dir=rtl].next-tag-closable>.next-tag-body{padding:0 12px 0 0}.next-tag-medium.next-tag-closable>.next-tag-close-btn{margin-left:12px;padding-right:12px}.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-medium.next-tag-closable>.next-tag-close-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-tag-medium[dir=rtl]>.next-tag-close-btn{margin-right:12px;margin-left:0;padding-right:0;padding-left:12px}.next-tag-small{height:24px;padding:0;line-height:22px;font-size:0}.next-tag-small>.next-tag-body{font-size:12px;padding:0 8px;min-width:28px}.next-tag-small.next-tag-closable>.next-tag-body{padding:0 0 0 8px;max-width:calc(100% - 24px)}.next-tag-small[dir=rtl].next-tag-closable>.next-tag-body{padding:0 8px 0 0}.next-tag-small.next-tag-closable>.next-tag-close-btn{margin-left:8px;padding-right:8px}.next-tag-small.next-tag-closable>.next-tag-close-btn .next-icon .next-icon-remote,.next-tag-small.next-tag-closable>.next-tag-close-btn .next-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tag-small.next-tag-closable>.next-tag-close-btn .next-icon{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-tag-small.next-tag-closable>.next-tag-close-btn .next-icon:before{width:16px;font-size:16px}}.next-tag-small[dir=rtl]>.next-tag-close-btn{margin-right:8px;margin-left:0;padding-right:0;padding-left:8px}.next-tag-default{cursor:default}.next-tag-closable{position:relative}.next-tag-closable>.next-tag-close-btn{display:inline-block;vertical-align:middle;height:100%;text-align:center;cursor:pointer}.next-tag-checkable{cursor:pointer;position:relative;border-radius:3px}.next-tag-checkable.checked:before{animation:fadeInRightForTag .4s cubic-bezier(.78,.14,.15,.86)}.next-tag-checkable.checked:after{animation:zoomIn .4s cubic-bezier(.78,.14,.15,.86)}.next-tag-checkable.next-tag-small:not(.next-tag-level-primary):before{right:-10px;bottom:-10px;width:20px;height:20px}.next-tag-checkable.next-tag-small:not(.next-tag-level-primary):after{font-size:8px;line-height:8px;right:0;bottom:0}.next-tag-checkable.next-tag-medium:not(.next-tag-level-primary):before{right:-14px;bottom:-14px;width:28px;height:28px}.next-tag-checkable.next-tag-medium:not(.next-tag-level-primary):after{font-size:12px;line-height:12px;right:0;bottom:0}.next-tag-checkable.next-tag-large:not(.next-tag-level-primary):before{right:-18px;bottom:-18px;width:36px;height:36px}.next-tag-checkable.next-tag-large:not(.next-tag-level-primary):after{font-size:16px;line-height:16px;right:0;bottom:0}.next-tag-checkable.next-tag-level-secondary.disabled,.next-tag-checkable.next-tag-level-secondary[disabled]{color:#ccc;border-color:#eee;background-color:#fafafa}.next-tag-zoom-appear,.next-tag-zoom-enter{animation:fadeInLeft .4s cubic-bezier(.78,.14,.15,.86);animation-fill-mode:both}.next-tag-zoom-leave{animation:zoomOut .3s ease-in;animation-fill-mode:both}.next-timeline,.next-timeline *,.next-timeline:after,.next-timeline :after,.next-timeline:before,.next-timeline :before{box-sizing:border-box}.next-timeline ul{margin:0;padding:0;list-style:none}.next-timeline p{margin:0}.next-timeline-hide{display:none}.next-timeline[dir=rtl] .next-timeline-item-folder{padding-left:0;padding-right:28px}.next-timeline[dir=rtl] .next-timeline-item-dot-tail{left:auto;right:8px;border-left:none;border-right:1px dotted #e6e6e6}.next-timeline[dir=rtl] .next-timeline-item-has-left-content.next-timeline-item-folder{margin-left:0;margin-right:80px}.next-timeline[dir=rtl] .next-timeline-item-done{position:relative}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline{position:absolute;left:auto;right:0;top:0;height:100%}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:right}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-right:-12px;margin-left:0;line-height:1}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:auto;right:8px}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-content{display:inline-block;margin-right:28px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:left;padding-left:12px;padding-right:0}.next-timeline[dir=rtl] .next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline[dir=rtl] .next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-right:80px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-content{margin-right:108px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-dot{background:#ddd}.next-timeline[dir=rtl] .next-timeline-item-done .next-timeline-item-icon{background:#ddd;color:#fff}.next-timeline[dir=rtl] .next-timeline-item-process{position:relative}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline{position:absolute;left:auto;right:0;top:0;height:100%}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:right}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-right:-12px;margin-left:0;line-height:1}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:auto;right:8px}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-content{display:inline-block;margin-right:28px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:left;padding-left:12px;padding-right:0}.next-timeline[dir=rtl] .next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline[dir=rtl] .next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-right:80px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-content{margin-right:108px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-dot{background:#209bfa}.next-timeline[dir=rtl] .next-timeline-item-process .next-timeline-item-icon{background:#209bfa;color:#fff}.next-timeline[dir=rtl] .next-timeline-item-success{position:relative}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline{position:absolute;left:auto;right:0;top:0;height:100%}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:right}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-right:-12px;margin-left:0;line-height:1}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:auto;right:8px}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-content{display:inline-block;margin-right:28px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:left;padding-left:12px;padding-right:0}.next-timeline[dir=rtl] .next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline[dir=rtl] .next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-right:80px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-content{margin-right:108px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-dot{background:#1ad78c}.next-timeline[dir=rtl] .next-timeline-item-success .next-timeline-item-icon{background:#1ad78c;color:#fff}.next-timeline[dir=rtl] .next-timeline-item-error{position:relative}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline{position:absolute;left:auto;right:0;top:0;height:100%}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:right}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-right:-12px;margin-left:0;line-height:1}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:auto;right:8px}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-content{display:inline-block;margin-right:28px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline[dir=rtl] .next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:left;padding-left:12px;padding-right:0}.next-timeline[dir=rtl] .next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline[dir=rtl] .next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-right:80px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-content{margin-right:108px;margin-left:0}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-dot{background:#d23c26}.next-timeline[dir=rtl] .next-timeline-item-error .next-timeline-item-icon{background:#d23c26;color:#fff}.next-timeline{margin:0;padding:0;list-style:none}.next-timeline>li{outline:0}.next-timeline-item-folder{padding-left:28px;padding-top:4px;padding-bottom:4px;font-size:12px;line-height:1.5;position:relative}.next-timeline-item-dot-tail{position:absolute;top:0;left:8px;height:100%;border:0;border-left:1px dotted #e6e6e6}.next-timeline-item-dot-tail-solid{border-style:solid}.next-timeline-item-has-left-content.next-timeline-item-folder{margin-left:80px}.next-timeline-item-done{position:relative}.next-timeline-item-done .next-timeline-item-timeline{position:absolute;left:0;top:0;height:100%}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:left}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-left:-12px;line-height:1}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:8px}.next-timeline-item-done .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline-item-done .next-timeline-item-content{display:inline-block;margin-left:28px}.next-timeline-item-done .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline-item-done .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline-item-done .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:right;padding-right:12px}.next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-left:80px}.next-timeline-item-done.next-timeline-item-has-left-content>.next-timeline-item-content{margin-left:108px}.next-timeline-item-done .next-timeline-item-dot{background:#ddd}.next-timeline-item-done .next-timeline-item-icon{background:#ddd;color:#fff}.next-timeline-item-process{position:relative}.next-timeline-item-process .next-timeline-item-timeline{position:absolute;left:0;top:0;height:100%}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:left}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-left:-12px;line-height:1}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:8px}.next-timeline-item-process .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline-item-process .next-timeline-item-content{display:inline-block;margin-left:28px}.next-timeline-item-process .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline-item-process .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline-item-process .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:right;padding-right:12px}.next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-left:80px}.next-timeline-item-process.next-timeline-item-has-left-content>.next-timeline-item-content{margin-left:108px}.next-timeline-item-process .next-timeline-item-dot{background:#209bfa}.next-timeline-item-process .next-timeline-item-icon{background:#209bfa;color:#fff}.next-timeline-item-success{position:relative}.next-timeline-item-success .next-timeline-item-timeline{position:absolute;left:0;top:0;height:100%}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:left}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-left:-12px;line-height:1}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:8px}.next-timeline-item-success .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline-item-success .next-timeline-item-content{display:inline-block;margin-left:28px}.next-timeline-item-success .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline-item-success .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline-item-success .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:right;padding-right:12px}.next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-left:80px}.next-timeline-item-success.next-timeline-item-has-left-content>.next-timeline-item-content{margin-left:108px}.next-timeline-item-success .next-timeline-item-dot{background:#1ad78c}.next-timeline-item-success .next-timeline-item-icon{background:#1ad78c;color:#fff}.next-timeline-item-error{position:relative}.next-timeline-item-error .next-timeline-item-timeline{position:absolute;left:0;top:0;height:100%}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-node{position:relative;width:16px;height:24px;padding:4px 0;text-align:center;float:left}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-node.next-timeline-item-node-custom{width:40px;height:auto;font-size:12px;word-break:break-all;margin-left:-12px;line-height:1}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-dot{display:block;position:absolute;width:8px;height:8px;border-radius:100%;top:50%;margin-top:-4px;left:50%;margin-left:-4px}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon{display:block;position:absolute;width:16px;height:16px;line-height:16px;border-radius:100%;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon .next-icon .next-icon-remote,.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-icon .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-tail{position:absolute;width:auto;height:calc(100% - 24px);top:24px;left:8px}.next-timeline-item-error .next-timeline-item-timeline .next-timeline-item-tail i{display:inline-block;vertical-align:top;height:100%;width:1px;position:relative;background:#e6e6e6;-webkit-transition:all .1s linear;transition:all .1s linear}.next-timeline-item-error .next-timeline-item-content{display:inline-block;margin-left:28px}.next-timeline-item-error .next-timeline-item-content .next-timeline-item-title{font-size:14px;font-weight:700;line-height:1.5;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline-item-error .next-timeline-item-content .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline-item-error .next-timeline-item-content .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-left-content{position:absolute;width:80px;display:inline-block;font-size:12px;color:#999;line-height:1.5;margin-top:4px;text-align:right;padding-right:12px}.next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-left-content p{word-break:break-word}.next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-timeline{margin-left:80px}.next-timeline-item-error.next-timeline-item-has-left-content>.next-timeline-item-content{margin-left:108px}.next-timeline-item-error .next-timeline-item-dot{background:#d23c26}.next-timeline-item-error .next-timeline-item-icon{background:#d23c26;color:#fff}.next-timeline.next-alternate .next-timeline-item-left .next-timeline-item-left-content,.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-left-content{width:50%;padding-right:12px}.next-timeline.next-alternate .next-timeline-item-left .next-timeline-item-timeline,.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-timeline{margin-left:50%}.next-timeline.next-alternate .next-timeline-item-left .next-timeline-item-content,.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-content{margin-left:calc(50% + 28px)}.next-timeline.next-alternate .next-timeline-item-folder{margin-left:50%}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-title{margin:4px 0 0;font-size:14px;font-weight:700;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:right}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-body{margin:4px 0 0;font-size:12px;line-height:1.5;color:#666;text-align:right}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:right}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-left-content{display:inline-block;position:relative}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-left-content .next-timeline-item-title{margin-top:0}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-content{margin-left:28px;position:absolute}.next-timeline.next-alternate .next-timeline-item-right .next-timeline-item-content .next-timeline-item-body{margin-top:4px;color:#999}.next-timeline[dir=rtl].next-alternate .next-timeline-item-left .next-timeline-item-left-content,.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-left-content{width:50%;padding-left:12px}.next-timeline[dir=rtl].next-alternate .next-timeline-item-left .next-timeline-item-timeline,.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-timeline{margin-right:50%}.next-timeline[dir=rtl].next-alternate .next-timeline-item-left .next-timeline-item-content,.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-content{width:50%;margin-right:calc(50% + 28px)}.next-timeline[dir=rtl].next-alternate .next-timeline-item-folder{margin-right:50%}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-title{margin:0;font-size:14px;font-weight:700;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;text-align:left}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-body{margin:0;font-size:12px;line-height:1.5;color:#666;text-align:left}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-time{margin:4px 0 12px;font-size:12px;color:#999;text-align:left}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-left-content{display:inline-block;position:relative}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-content{margin-right:28px;position:absolute}.next-timeline[dir=rtl].next-alternate .next-timeline-item-right .next-timeline-item-content .next-timeline-item-body{text-align:right}.next-timeline-item-last .next-timeline-item-tail{display:none}.next-timeline-item-has-left-content{min-height:48px}.next-timeline-item-folder.next-timeline-item-has-left-content{min-height:auto}.next-transfer{display:inline-block}.next-transfer,.next-transfer *,.next-transfer :after,.next-transfer :before{box-sizing:border-box}.next-transfer-panel{display:inline-block;border:1px solid #e6e6e6;border-radius:3px;background-color:#fff;vertical-align:middle}.next-transfer-panel-header{padding:8px 20px;border-bottom:1px solid #e6e6e6;background-color:#fafafa;color:#333;font-size:14px}.next-transfer-panel-search{padding:0 4px;margin-top:8px;margin-bottom:0;width:180px}.next-transfer .next-transfer-panel-list{width:180px;height:160px;padding:0;border:none;box-shadow:none;border-radius:0;overflow-y:auto}.next-transfer-panel-not-found-container{display:table;width:100%;height:100%}.next-transfer-panel-not-found{display:table-cell;vertical-align:middle;text-align:center;color:#999;font-size:14px}.next-transfer-panel-item.next-focused{transition:background-color .1s linear}.next-transfer-panel-item:not(.next-disabled).next-simple:hover{color:#209bfa}.next-transfer-panel-item.next-insert-before:before{position:absolute;top:0;left:0;content:"";width:100%;border-top:1px solid #209bfa}.next-transfer-panel-item.next-insert-after:after{position:absolute;left:0;bottom:0;content:"";width:100%;border-bottom:1px solid #209bfa}.next-transfer-panel-footer{position:relative;padding:8px 20px;border-top:1px solid #e6e6e6;background-color:#fff;font-size:0;box-shadow:none}.next-transfer-panel-count{margin-left:4px;font-size:14px;vertical-align:middle;color:#333}.next-transfer-panel-move-all{font-size:14px;color:#209bfa;cursor:pointer}.next-transfer-panel-move-all.next-disabled{color:#ccc;cursor:not-allowed}.next-transfer-operations{display:inline-block;vertical-align:middle;margin:0 20px}.next-transfer-move.next-icon{color:#ddd}.next-transfer-move.next-icon:before{content:""}.next-transfer-operation.next-btn{display:block}.next-transfer-operation.next-btn+.next-transfer-operation.next-btn{margin-top:8px}.next-transfer-operation.next-btn .next-icon .next-icon-remote,.next-transfer-operation.next-btn .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-tree,.next-tree *,.next-tree :after,.next-tree :before{box-sizing:border-box}.next-tree,.next-tree-child-tree{margin:0;padding:0;list-style:none}.next-tree-node{white-space:nowrap}.next-tree-node-inner{font-size:0;outline:none}.next-tree-node-label-wrapper{font-size:0;outline:none;display:inline-block;margin:0 4px;vertical-align:middle}.next-tree-node-label{height:20px;line-height:20px;padding:0 4px;border-radius:3px;font-size:14px}.next-tree-node-label .next-icon{font-size:16px}.next-tree-node-label .next-icon:before{font-size:14px;width:14px;margin-right:.5em}.next-tree-node-input.next-input{margin:0 4px}.next-tree-node-indent-unit{display:inline-block;width:24px;vertical-align:middle;position:relative}.next-tree-node-indent-unit.next-line:before{content:"";position:absolute;display:inline-block;border-left:1px solid #ddd;height:28px;left:7.5px}.next-tree-switcher{position:relative;display:inline-block;vertical-align:middle;margin-right:8px}.next-tree .next-tree-unfold-icon:before{content:""}.next-tree-switcher.next-noline{width:20px;height:20px;line-height:20px;cursor:pointer}.next-tree-switcher.next-noline .next-tree-switcher-icon{transition:transform .1s linear;color:#999}.next-tree-switcher.next-noline .next-tree-switcher-icon .next-icon-remote,.next-tree-switcher.next-noline .next-tree-switcher-icon:before{width:20px;font-size:20px;line-height:inherit}.next-tree-switcher.next-noline .next-tree-fold-icon:before{content:""}.next-tree-switcher.next-noline.next-close .next-tree-switcher-icon{transform:rotate(-90deg)}.next-tree-switcher.next-noline.next-close .next-tree-switcher-icon .next-icon-remote,.next-tree-switcher.next-noline.next-close .next-tree-switcher-icon:before{width:20px;font-size:20px;line-height:inherit}.next-tree-switcher.next-noline:not(.next-disabled):hover .next-tree-switcher-icon{color:#333}.next-tree-switcher.next-noline.next-disabled{cursor:not-allowed}.next-tree-switcher.next-noline.next-disabled .next-tree-switcher-icon{color:#ccc}.next-tree-switcher.next-noop-noline{flex:none;width:20px;height:20px}.next-tree-switcher.next-line{width:16px;height:16px;line-height:14px;border:1px solid #ddd;border-radius:3px;background-color:#fff;cursor:pointer}.next-tree-switcher.next-line .next-tree-switcher-icon{margin-left:3px;color:#666}.next-tree-switcher.next-line .next-tree-switcher-icon .next-icon-remote,.next-tree-switcher.next-line .next-tree-switcher-icon:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0)and (min-resolution:0.001dpcm){.next-tree-switcher.next-line .next-tree-switcher-icon{transform:scale(.5);margin-left:-1px;margin-right:-4px}.next-tree-switcher.next-line .next-tree-switcher-icon:before{width:16px;font-size:16px}}.next-tree-switcher.next-line .next-tree-switcher-fold-icon:before{content:""}.next-tree-switcher.next-line .next-tree-switcher-unfold-icon:before{content:""}.next-tree-switcher.next-line:not(.next-disabled):hover{border-color:#ccc;background-color:#f9f9f9}.next-tree-switcher.next-line:not(.next-disabled):hover .next-tree-switcher-icon{color:#333}.next-tree-switcher.next-line.next-disabled{border-color:#eee;background-color:#fff;cursor:not-allowed}.next-tree-switcher.next-line.next-disabled .next-tree-switcher-icon{color:#ccc}.next-tree-switcher.next-noop-line{width:16px;height:16px}.next-tree-switcher.next-noop-line-noroot{height:0;border-left:1px solid #ddd;border-bottom:1px solid #ddd}.next-tree-switcher.next-noop-line-noroot .next-tree-right-angle{bottom:-1px}.next-tree-switcher.next-loading.next-loading-noline{width:20px;height:20px;line-height:20px}.next-tree-switcher.next-loading.next-loading-line{width:16px;height:16px;line-height:14px;border:1px solid transparent}.next-tree-switcher.next-loading .next-tree-switcher-icon{color:#209bfa}.next-tree-switcher.next-loading .next-tree-switcher-icon .next-icon-remote,.next-tree-switcher.next-loading .next-tree-switcher-icon:before{width:20px;font-size:20px;line-height:inherit}.next-tree-right-angle{position:absolute;bottom:6.5px;left:-17.5px;display:block;width:16.5px;height:22px;border-left:1px solid #ddd;border-bottom:1px solid #ddd}.next-tree.next-label-block .next-tree-node-inner{display:flex;align-items:center}.next-tree.next-label-block .next-tree-node-label-wrapper{flex:1 1 auto;outline:none}.next-tree.next-node-indent .next-tree-node .next-tree-node{margin-left:24px}.next-tree.next-node-indent .next-tree-node-inner{padding-top:2px;padding-bottom:2px}.next-tree.next-node-indent .next-tree-node-label-wrapper{border-top:2px solid transparent;border-bottom:2px solid transparent}.next-tree.next-node-indent .next-tree-node-label-wrapper:focus .next-tree-node-label{color:#333;background-color:#f9f9f9}.next-tree.next-node-indent .next-tree-node-label{transition:color .1s linear,background-color .1s linear;cursor:default;color:#333;background-color:#fff}.next-tree.next-node-indent .next-tree-node-label-selectable{cursor:pointer}.next-tree.next-node-indent .next-tree-node-label:hover{color:#333;background-color:#f9f9f9}.next-tree.next-node-indent .next-tree-node-inner.next-selected .next-tree-node-label{color:#333;background-color:#add9ff}.next-tree.next-node-indent .next-tree-node-inner.next-disabled .next-tree-node-label,.next-tree.next-node-indent .next-tree-node-inner.next-disabled .next-tree-node-label:hover{color:#ccc;background-color:#fff;cursor:not-allowed}.next-tree.next-node-indent .next-tree-node-inner.next-drag-over .next-tree-node-label{background-color:#209bfa;color:#fff;opacity:.8}.next-tree.next-node-indent .next-tree-node-inner.next-drag-over-gap-top .next-tree-node-label-wrapper{border-top-color:#209bfa}.next-tree.next-node-indent .next-tree-node-inner.next-drag-over-gap-bottom .next-tree-node-label-wrapper{border-bottom-color:#209bfa}.next-tree.next-node-block .next-tree-node-inner{padding-top:4px;padding-bottom:4px;transition:color .1s linear,background-color .1s linear;display:flex;align-items:center}.next-tree.next-node-block .next-tree-node-inner .next-tree-node-label-wrapper{cursor:pointer;flex-grow:1;color:#333;background-color:#fff}.next-tree.next-node-block .next-tree-node-inner .next-tree-node-label-wrapper:focus,.next-tree.next-node-block .next-tree-node-inner .next-tree-node-label-wrapper:hover{color:#333;background-color:#f9f9f9}.next-tree.next-node-block .next-tree-node-inner.next-selected .next-tree-node-label{color:#333;background-color:#add9ff}.next-tree.next-node-block .next-tree-node-inner.next-disabled .next-tree-node-label,.next-tree.next-node-block .next-tree-node-inner.next-disabled:hover .next-tree-node-label{color:#ccc;background-color:#fff;cursor:not-allowed}.next-tree.next-show-line .next-tree-node .next-tree-node:not(:last-child){margin-left:7.5px;border-left:1px solid #ddd;padding-left:15.5px}.next-tree-node.next-filtered>.next-tree-node-inner .next-tree-node-label,.next-tree-node.next-filtered>.next-tree-node-inner .next-tree-node-label:hover{color:#209bfa}.next-tree[dir=rtl] .next-tree-switcher{margin-left:8px;margin-right:0}.next-tree[dir=rtl] .next-tree-right-angle,.next-tree[dir=rtl] .next-tree-switcher.next-noop-line-noroot{border-left:none;border-right:1px solid #ddd}.next-tree[dir=rtl] .next-tree-right-angle{left:auto;right:-17.5px}.next-tree[dir=rtl].next-show-line .next-tree-node .next-tree-node:not(:last-child){margin-left:0;margin-right:7.5px;border-left:none;border-right:1px solid #ddd;padding-left:0;padding-right:15.5px}.next-tree[dir=rtl].next-node-indent .next-tree-node .next-tree-node{margin-left:0;margin-right:24px}.next-tree-select,.next-tree-select *,.next-tree-select :after,.next-tree-select :before{box-sizing:border-box}.next-tree-select-dropdown{background:#fff;border:1px solid #e6e6e6;border-radius:3px;box-shadow:none;max-height:260px;overflow:auto}.next-tree-select-dropdown>.next-tree,.next-tree-select-dropdown>.next-tree-select-not-found,.next-tree-select-dropdown>.next-virtual-tree-container{padding:8px 20px}.next-tree-select-not-found{font-size:14px;color:#999}.next-upload-list[dir=rtl].next-upload-list-text .next-upload-list-item{padding:4px 8px 4px 40px}.next-upload-list[dir=rtl].next-upload-list-text .next-icon{left:12px;right:auto}.next-upload-list[dir=rtl].next-upload-list-image .next-icon-close{float:left;margin-left:4px;margin-right:0}.next-upload-list[dir=rtl].next-upload-list-image .next-upload-list-item-thumbnail{float:right;margin-left:8px;margin-right:0}.next-upload-list[dir=rtl].next-upload-list-image .next-upload-list-item-progress{margin-right:56px;margin-left:24px}.next-upload,.next-upload *,.next-upload :after,.next-upload :before{box-sizing:border-box}.next-upload-inner{outline:0;display:inline-block}.next-upload-inner.next-hidden{display:none}.next-upload-list{overflow:hidden}.next-upload-list,.next-upload-list *,.next-upload-list :after,.next-upload-list :before{box-sizing:border-box}.next-upload-list-item{position:relative}.next-upload-list-item.next-hidden{display:none}.next-upload-list-item-name{text-decoration:none}.next-upload.next-disabled{border-color:#eee!important;color:#ccc!important}.next-upload.next-disabled .next-icon-close{cursor:not-allowed!important}.next-upload.next-disabled .next-upload-inner *{color:#ccc!important;border-color:#eee!important;cursor:not-allowed!important}.next-upload-list-text .next-upload-list-item{background-color:#f9f9f9;padding:4px 40px 4px 8px;height:40px;line-height:32px;font-size:14px;overflow:hidden;transition:all .1s linear;border-radius:0}.next-upload-list-text .next-upload-list-item:not(:last-child){margin-bottom:4px}.next-upload-list-text .next-upload-list-item-op{position:absolute;top:0;right:12px}.next-upload-list-text .next-upload-list-item .next-icon-close{color:#999;cursor:pointer;text-align:center;transition:all .1s linear;line-height:40px}.next-upload-list-text .next-upload-list-item .next-icon-close .next-icon-remote,.next-upload-list-text .next-upload-list-item .next-icon-close:before{width:16px;font-size:16px;line-height:inherit}.next-upload-list-text .next-upload-list-item:hover{background-color:#f9f9f9}.next-upload-list-text .next-upload-list-item:hover .next-icon{color:#666}.next-upload-list-text .next-upload-list-item-name-wrap{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin-right:4px}.next-upload-list-text .next-upload-list-item-name{color:#333;transition:all .1s linear}.next-upload-list-text .next-upload-list-item-size{color:#999;margin-left:8px}.next-upload-list-text .next-upload-list-item-uploading{line-height:16px}.next-upload-list-text .next-upload-list-item-uploading .next-upload-list-item-progress{line-height:0;padding-top:4px;padding-bottom:4px}.next-upload-list-text .next-upload-list-item-uploading .next-upload-list-item-progress .next-progress-line-underlay{height:8px}.next-upload-list-text .next-upload-list-item-uploading .next-upload-list-item-progress .next-progress-line-overlay{height:8px;margin-top:-4px}.next-upload-list-text .next-upload-list-item-done{line-height:32px}.next-upload-list-text .next-upload-list-item-done:hover .next-upload-list-item-name,.next-upload-list-text .next-upload-list-item-done:hover .next-upload-list-item-size{color:#209bfa}.next-upload-list-text .next-upload-list-item-error{background-color:#ffece4!important}.next-upload-list-text .next-upload-list-item-error.next-upload-list-item-error-with-msg{line-height:16px}.next-upload-list-text .next-upload-list-item-error-msg{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:#d23c26}.next-upload-list-image .next-upload-list-item{box-sizing:content-box;border:1px solid #e6e6e6;background-color:#fff;padding:8px;height:48px;line-height:48px;font-size:14px;transition:all .1s linear;overflow:hidden;border-radius:0}.next-upload-list-image .next-upload-list-item:not(:last-child){margin-bottom:4px}.next-upload-list-image .next-upload-list-item:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-upload-list-image .next-upload-list-item-op{float:right;margin-right:4px}.next-upload-list-image .next-upload-list-item .next-icon-close{cursor:pointer;color:#999;text-align:center}.next-upload-list-image .next-upload-list-item .next-icon-close .next-icon-remote,.next-upload-list-image .next-upload-list-item .next-icon-close:before{width:16px;font-size:16px;line-height:inherit}.next-upload-list-image .next-upload-list-item:hover{border-color:#209bfa}.next-upload-list-image .next-upload-list-item:hover .next-icon-close{color:#666}.next-upload-list-image .next-upload-list-item-name{display:block;color:#333;margin-left:56px;margin-right:24px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;transition:all .1s linear}.next-upload-list-image .next-upload-list-item-size{color:#999;margin-left:8px}.next-upload-list-image .next-upload-list-item-done:hover .next-upload-list-item-name,.next-upload-list-image .next-upload-list-item-done:hover .next-upload-list-item-size{color:#209bfa}.next-upload-list-image .next-upload-list-item-thumbnail{float:left;width:48px;height:48px;color:#ccc;border:1px solid #e6e6e6;border-radius:0;background-color:#f9f9f9;margin-right:8px;vertical-align:middle;text-align:center;overflow:hidden;box-sizing:border-box}.next-upload-list-image .next-upload-list-item-thumbnail img{width:100%;height:100%}.next-upload-list-image .next-upload-list-item-thumbnail .next-icon{display:block;margin:0;line-height:48px}.next-upload-list-image .next-upload-list-item-thumbnail .next-icon .next-icon-remote,.next-upload-list-image .next-upload-list-item-thumbnail .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-upload-list-image .next-upload-list-item-error{border-color:#d23c26!important;background-color:#fff}.next-upload-list-image .next-upload-list-item-uploading{background-color:#fff}.next-upload-list-image .next-upload-list-item-uploading .next-upload-list-item-name{height:24px;line-height:24px}.next-upload-list-image .next-upload-list-item-uploading .next-upload-list-item-progress{margin-left:56px;margin-right:24px;line-height:0;padding-top:8px;padding-bottom:8px}.next-upload-list-image .next-upload-list-item-uploading .next-upload-list-item-progress .next-progress-line-underlay{height:8px}.next-upload-list-image .next-upload-list-item-uploading .next-upload-list-item-progress .next-progress-line-overlay{height:8px;margin-top:-4px}.next-upload-list-image .next-upload-list-item-error-with-msg .next-upload-list-item-error-msg,.next-upload-list-image .next-upload-list-item-error-with-msg .next-upload-list-item-name{height:24px;line-height:24px}.next-upload-list-image .next-upload-list-item-error-with-msg .next-upload-list-item-error-msg{margin-left:56px;margin-right:24px;color:#d23c26;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.next-upload-list-card{display:inline-block}.next-upload-list-card .next-upload-list-item{vertical-align:middle;float:left}.next-upload-list-card .next-upload-list-item:not(:last-child){margin-right:12px}.next-upload-list-card .next-upload-list-item-wrapper{position:relative;border:1px solid #ddd;width:100px;height:100px;padding:0;background-color:transparent;border-radius:0;overflow:hidden}.next-upload-list-card .next-upload-list-item-thumbnail{text-align:center;width:100%;height:100%;color:#ccc;font-size:12px}.next-upload-list-card .next-upload-list-item-thumbnail img{max-width:100%;max-height:100%;position:absolute;top:0;right:0;bottom:0;left:0;margin:auto}.next-upload-list-card .next-upload-list-item-thumbnail img:focus{outline:0}.next-upload-list-card .next-upload-list-item-thumbnail .next-icon{width:100%}.next-upload-list-card .next-upload-list-item-thumbnail .next-icon .next-icon-remote,.next-upload-list-card .next-upload-list-item-thumbnail .next-icon:before{width:48px;font-size:48px;line-height:inherit}.next-upload-list-card .next-upload-list-item-handler{margin-top:13px}.next-upload-list-card .next-upload-list-item-handler .next-icon-cry{margin-top:10px}.next-upload-list-card .next-upload-list-item-name{display:block;width:100px;text-align:center;margin-top:4px;font-size:12px;color:#666;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.next-upload-list-card .next-upload-list-item-progress{position:absolute;font-size:0;bottom:0;left:0;width:100%}.next-upload-list-card .next-upload-list-item-progress .next-progress-line-underlay{border-radius:0;height:8px}.next-upload-list-card .next-upload-list-item-progress .next-progress-line-overlay{border-radius:0;height:8px;margin-top:-4px}.next-upload-list-card .next-upload-list-item-uploading .next-upload-list-item-wrapper{background-color:#fafafa}.next-upload-list-card .next-upload-list-item:hover .next-upload-tool{opacity:.8}.next-upload-list-card .next-upload-list-item .next-upload-tool{position:absolute;z-index:1;background-color:rgba(0,0,0,.7);transition:all .1s linear;opacity:0;width:100%;height:28px;left:0;bottom:0;display:flex}.next-upload-list-card .next-upload-list-item .next-upload-tool .next-icon{line-height:28px;color:#fff;cursor:pointer}.next-upload-list-card .next-upload-list-item .next-upload-tool .next-icon .next-icon-remote,.next-upload-list-card .next-upload-list-item .next-upload-tool .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-upload-list-card .next-upload-list-item .next-upload-tool-item{width:100%;text-align:center}.next-upload-list-card .next-upload-list-item .next-upload-tool-item:not(:last-child){border-right:1px solid #fff}.next-upload-list-card .next-upload-list-item .next-upload-tool-reupload{display:inline-block}.next-upload-list-card .next-upload-list-item .next-upload-card{display:flex;flex-direction:column;justify-content:center}.next-upload-list-card .next-upload-list-item-error .next-upload-list-item-wrapper{border-color:#d23c26}.next-upload-list-card.next-upload-ie9 .next-upload-tool{display:table}.next-upload-list-card.next-upload-ie9 .next-upload-tool-item{display:table-cell;width:1%}.next-upload-card,.next-upload-list-card.next-upload-ie9 .next-upload-card{display:table-cell}.next-upload-card{border:1px dashed #ddd;width:100px;height:100px;background-color:#fff;text-align:center;cursor:pointer;transition:border-color .1s linear;vertical-align:middle;border-radius:0}.next-upload-card .next-icon{color:#ddd}.next-upload-card .next-icon .next-icon-remote,.next-upload-card .next-icon:before{width:24px;font-size:24px;line-height:inherit}.next-upload-card .next-upload-add-icon:before{content:""}.next-upload-card .next-upload-text{font-size:14px;margin-top:12px;color:#666;outline:none}.next-upload-card:hover{border-color:#209bfa}.next-upload-card:hover .next-icon,.next-upload-card:hover .next-upload-text{color:#209bfa}.next-upload-dragable .next-upload-inner{display:block}.next-upload-dragable .next-upload-inner.next-hidden{display:none}.next-upload-dragable .next-upload-drag{border:1px dashed #ddd;transition:border-color .1s linear;cursor:pointer;border-radius:3px;background-color:transparent;text-align:center;margin-bottom:4px}.next-upload-dragable .next-upload-drag-icon{margin:20px 0 0;color:#666}.next-upload-dragable .next-upload-drag-icon .next-upload-drag-upload-icon:before{content:"";font-size:24px}.next-upload-dragable .next-upload-drag-text{margin:12px 0 0;font-size:14px;color:#666}.next-upload-dragable .next-upload-drag-hint{margin:4px 0 20px;font-size:12px;color:#999}.next-upload-dragable .next-upload-drag-over{border-color:#209bfa}.next-shell{position:relative;display:flex;flex-direction:column;transition:all .2s ease}.next-shell,.next-shell *,.next-shell :after,.next-shell :before{box-sizing:border-box}.next-shell-content-wrapper{overflow:auto}.next-shell-header{display:flex;width:100%;justify-content:space-between;align-items:center;z-index:9}.next-shell-header .dock-trigger,.next-shell-header .nav-trigger{outline:0;display:flex;justify-content:center;align-items:center;cursor:pointer;width:32px;height:32px}.next-shell-header .nav-trigger{margin-right:10px}.next-shell-header .dock-trigger{margin-left:10px}.next-shell-header.next-shell-fixed-header{position:sticky;top:0}.next-shell-header .next-shell-navigation{flex:1 1;display:flex;align-items:center;flex-direction:row}.next-shell-header .next-shell-action,.next-shell-header .next-shell-branding{display:flex;align-items:center}.next-shell-sub-main{flex:1 1;flex-direction:column;outline:0}.next-shell-main,.next-shell-sub-main{display:flex;height:100%;overflow:auto}.next-shell-main{flex:1 1 auto;flex-direction:row;position:relative;box-sizing:content-box;transition:all .2s ease}.next-shell-main .next-shell-content{flex:1 1 auto}.next-shell-main .next-shell-content-inner{margin:0 auto}.next-shell-main .next-shell-footer{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.next-shell .next-aside-navigation,.next-shell .next-aside-tooldock{display:flex}.next-shell .next-aside-navigation.fixed,.next-shell .next-aside-tooldock.fixed{position:fixed;top:0;bottom:0;z-index:1}.next-shell .next-aside-navigation.fixed{left:0}.next-shell .next-aside-tooldock.fixed{right:0}.next-shell-aside{transition:all .2s ease}.next-shell-aside .aside-trigger{cursor:pointer;outline:0;position:absolute;right:0;top:50%;width:20px;height:48px;display:flex;border:1px solid #ddd;align-items:center;justify-content:center}.next-shell-aside .local-nav-trigger{outline:0;border-left:none;transform:translate(100%,-50%);right:0}.next-shell-aside .ancillary-trigger{outline:0;transform:translate(-100%,-50%);border-right:0;left:1px}.next-shell-aside.next-aside-ancillary,.next-shell-aside.next-aside-localnavigation{position:relative}.next-shell-aside.next-shell-navigation{display:flex;flex-direction:column;justify-self:flex-start;transition:all .2s ease}.next-shell-aside.next-shell-tooldock{display:flex;flex-direction:column;align-items:center}.next-shell-aside .next-shell-tooldockitem{width:100%;text-align:center}.next-shell-aside .next-shell-localnavigation{position:relative}.next-shell-aside .next-shell-ancillary,.next-shell-aside .next-shell-localnavigation{height:100%;display:flex;flex-direction:column;justify-self:flex-start;transition:all .2s ease}.next-shell-light .next-shell-header .dock-trigger,.next-shell-light .next-shell-header .nav-trigger{background:#fff}.next-shell-light .next-shell-aside .local-nav-trigger{background:#f2f2f2}.next-shell-light .next-shell-aside .ancillary-trigger{background:#fff}.next-shell-light .next-shell-header{color:#000;height:52px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0 16px}.next-shell-light .next-shell-header .next-shell-navigation{justify-content:flex-end;height:52px;line-height:52px;margin:0 48px}.next-shell-light .next-shell-task-header{width:100%;min-height:40px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0;overflow:auto}.next-shell-light .next-shell-main{background:#f5f5f5}.next-shell-light .next-shell-main .next-shell-appbar{min-height:48px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0 24px}.next-shell-light .next-shell-main .next-shell-content{padding:20px}.next-shell-light .next-shell-main .next-shell-footer{background:transparent;min-height:56px;color:#ccc;font-size:14px}.next-shell-light .next-shell-aside.next-shell-navigation{width:200px;background:#fff;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-light .next-shell-aside.next-shell-navigation.next-shell-collapse.next-shell-mini{width:60px}.next-shell-light .next-shell-aside.next-shell-navigation.next-shell-collapse{width:0}.next-shell-light .next-shell-aside.next-shell-tooldock{width:52px;background:#f2f2f2;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-light .next-shell-aside .next-shell-tooldockitem{padding:8px 0;color:#666;background:transparent}.next-shell-light .next-shell-aside .next-shell-tooldockitem:hover{color:#333;background:#f5f5f5}.next-shell-light .next-shell-aside .next-shell-localnavigation{width:168px;background:#f2f2f2;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-light .next-shell-aside .next-shell-localnavigation.next-shell-collapse{width:0}.next-shell-light .next-shell-aside .next-shell-ancillary{width:168px;background:#fff;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-light .next-shell-aside .next-shell-ancillary.next-shell-collapse{width:0}.next-shell-dark .next-shell-header .dock-trigger,.next-shell-dark .next-shell-header .nav-trigger{background:#222}.next-shell-dark .next-shell-aside .local-nav-trigger{background:#f2f2f2}.next-shell-dark .next-shell-aside .ancillary-trigger{background:#fff}.next-shell-dark .next-shell-header{color:#fff;height:52px;background:#222;border-bottom:1px solid #1f1f1f;box-shadow:0 1px 3px 0 rgba(0,0,0,.12);padding:0 16px}.next-shell-dark .next-shell-header .next-shell-navigation{justify-content:flex-end;height:52px;line-height:52px;margin:0 48px}.next-shell-dark .next-shell-task-header{width:100%;min-height:40px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0;overflow:auto}.next-shell-dark .next-shell-main{background:#f5f5f5}.next-shell-dark .next-shell-main .next-shell-appbar{min-height:48px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0 24px}.next-shell-dark .next-shell-main .next-shell-content{padding:20px}.next-shell-dark .next-shell-main .next-shell-footer{background:transparent;min-height:56px;color:#ccc;font-size:14px}.next-shell-dark .next-shell-aside.next-shell-navigation{width:200px;background:#222;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-dark .next-shell-aside.next-shell-navigation.next-shell-collapse.next-shell-mini{width:60px}.next-shell-dark .next-shell-aside.next-shell-navigation.next-shell-collapse{width:0}.next-shell-dark .next-shell-aside.next-shell-tooldock{width:52px;background:#f2f2f2;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-dark .next-shell-aside .next-shell-tooldockitem{padding:8px 0;color:#666;background:transparent}.next-shell-dark .next-shell-aside .next-shell-tooldockitem:hover{color:#333;background:#f5f5f5}.next-shell-dark .next-shell-aside .next-shell-localnavigation{width:168px;background:#f2f2f2;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-dark .next-shell-aside .next-shell-localnavigation.next-shell-collapse{width:0}.next-shell-dark .next-shell-aside .next-shell-ancillary{width:168px;background:#fff;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-dark .next-shell-aside .next-shell-ancillary.next-shell-collapse{width:0}.next-shell-brand .next-shell-header .dock-trigger,.next-shell-brand .next-shell-header .nav-trigger{background:#18263c}.next-shell-brand .next-shell-aside .local-nav-trigger{background:#f2f2f2}.next-shell-brand .next-shell-aside .ancillary-trigger{background:#fff}.next-shell-brand .next-shell-header{color:#fff;height:52px;background:#18263c;border-bottom:1px solid #eee;box-shadow:0 1px 3px 0 rgba(0,0,0,.12);padding:0 16px}.next-shell-brand .next-shell-header .next-shell-navigation{justify-content:flex-end;height:52px;line-height:52px;margin:0 48px}.next-shell-brand .next-shell-task-header{width:100%;min-height:40px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0;overflow:auto}.next-shell-brand .next-shell-main{background:#f5f5f5}.next-shell-brand .next-shell-main .next-shell-appbar{min-height:48px;background:#fff;border-bottom:1px solid #eee;box-shadow:none;padding:0 24px}.next-shell-brand .next-shell-main .next-shell-content{padding:20px}.next-shell-brand .next-shell-main .next-shell-footer{background:transparent;min-height:56px;color:#ccc;font-size:14px}.next-shell-brand .next-shell-aside.next-shell-navigation{width:200px;background:#fff;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-brand .next-shell-aside.next-shell-navigation.next-shell-collapse.next-shell-mini{width:60px}.next-shell-brand .next-shell-aside.next-shell-navigation.next-shell-collapse{width:0}.next-shell-brand .next-shell-aside.next-shell-tooldock{width:52px;background:#f2f2f2;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-brand .next-shell-aside .next-shell-tooldockitem{padding:8px 0;color:#666;background:transparent}.next-shell-brand .next-shell-aside .next-shell-tooldockitem:hover{color:#333;background:#f5f5f5}.next-shell-brand .next-shell-aside .next-shell-localnavigation{width:168px;background:#f2f2f2;border-right:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-brand .next-shell-aside .next-shell-localnavigation.next-shell-collapse{width:0}.next-shell-brand .next-shell-aside .next-shell-ancillary{width:168px;background:#fff;border-left:1px solid #eee;box-shadow:none;padding:8px 0}.next-shell-brand .next-shell-aside .next-shell-ancillary.next-shell-collapse{width:0}.next-shell-header .next-shell-navigation.next-shell-nav-left{justify-content:flex-start}.next-shell-header .next-shell-navigation.next-shell-nav-right{justify-content:flex-end}.next-shell-header .next-shell-navigation.next-shell-nav-center{justify-content:center}.next-shell.next-shell-phone .next-aside-navigation{width:100%}.next-shell.next-shell-phone .next-aside-navigation.next-shell-collapse{width:0;overflow:hidden}.next-shell.next-shell-phone .next-shell-header .next-shell-navigation{display:none}.next-shell.next-shell-phone .next-shell-navigation{width:100%;height:100%;transition:height .2s ease}.next-shell.next-shell-phone .next-shell-navigation.next-shell-collapse{padding:0;height:0;transition:height .2s ease}.next-shell.next-shell-phone .next-shell-tooldock{height:52px;left:0;right:0;position:absolute;width:100%;flex-direction:row;justify-content:center}.next-shell.next-shell-phone .next-shell-tooldock.next-shell-collapse{display:none;height:0;padding:0;transition:all .2s ease}.next-shell.next-shell-phone .next-shell-aside.next-aside-ancillary,.next-shell.next-shell-tablet .next-shell-aside.next-aside-ancillary{width:0}.next-shell.next-shell-phone .next-shell-ancillary,.next-shell.next-shell-tablet .next-shell-ancillary{transform:translateX(-100%)}.next-shell.next-shell-phone .next-shell-aside.next-aside-localnavigation,.next-shell.next-shell-tablet .next-shell-aside.next-aside-localnavigation{width:0}.next-notification{width:384px;position:fixed;z-index:1010;padding:0;margin:0}.next-notification .next-message{margin-bottom:16px;overflow:hidden}.next-notification-fade-leave{animation-duration:.3s;animation-play-state:paused;animation-fill-mode:both;animation-timing-function:ease}.next-notification-fade-leave.next-notification-fade-leave-active{animation-name:NotificationFadeOut;animation-play-state:running}@keyframes NotificationFadeOut{0%{max-height:150px;margin-bottom:16px;opacity:1}to{max-height:0;margin-bottom:0;padding-top:0;padding-bottom:0;opacity:0}}.next-typography{color:#333}.next-typography-title{font-weight:600;margin-bottom:.5em}.next-typography+.next-typography-title{margin-top:1.2em}.next-typography-paragraph{color:#333;margin-bottom:1em;font-size:14px;line-height:1.5}.next-typography mark{padding:0;background:#ffe98f;color:#333}.next-typography strong{font-weight:600}.next-typography code{background-color:#f9f9f9;color:#333;border:1px solid #eee;margin:0 .2em;padding:.2em .4em .1em;font-size:85%;border-radius:3px}.next-typography ol,.next-typography ul{margin:0 0 1em;padding:0}.next-typography li{list-style-type:circle;margin:0 0 0 20px;padding:0 0 0 4px}.next-typography a{text-decoration:none}.next-typography a:link{color:#298dff}.next-typography a:visited{color:#4a83c5}.next-typography a:hover{color:#2580e7}.next-typography a:active{text-decoration:underline;color:#2580e7}h1.next-typography-title{font-size:24px}h2.next-typography-title{font-size:20px}h3.next-typography-title,h4.next-typography-title{font-size:16px}.next-divider,h5.next-typography-title,h6.next-typography-title{font-size:14px}.next-divider{margin:0;padding:0;line-height:1.5;list-style:none;font-variant:tabular-nums;font-feature-settings:"tnum";background:#e6e6e6;border-collapse:separate}.next-divider,.next-divider *,.next-divider :after,.next-divider :before{box-sizing:border-box}.next-divider-hoz{display:block;clear:both;width:100%;min-width:100%;height:1px;margin:16px 0}.next-divider-ver{position:relative;top:-.06em;display:inline-block;width:1px;background:#e6e6e6;height:.9em;margin:0 8px;vertical-align:middle}.next-divider-hoz.next-divider-with-text-center,.next-divider-hoz.next-divider-with-text-left,.next-divider-hoz.next-divider-with-text-right{display:table;margin:16px 0;color:#333;font-weight:400;font-size:16px;white-space:nowrap;text-align:center;background:transparent}.next-divider-hoz.next-divider-with-text-center:after,.next-divider-hoz.next-divider-with-text-center:before,.next-divider-hoz.next-divider-with-text-left:after,.next-divider-hoz.next-divider-with-text-left:before,.next-divider-hoz.next-divider-with-text-right:after,.next-divider-hoz.next-divider-with-text-right:before{top:50%;display:table-cell;width:50%;border-top:1px solid #e6e6e6;transform:translateY(50%);content:""}.next-divider-hoz.next-divider-with-text-center.next-divider-dashed,.next-divider-hoz.next-divider-with-text-left.next-divider-dashed,.next-divider-hoz.next-divider-with-text-right.next-divider-dashed{border-top:0}.next-divider-hoz.next-divider-with-text-center.next-divider-dashed:after,.next-divider-hoz.next-divider-with-text-center.next-divider-dashed:before,.next-divider-hoz.next-divider-with-text-left.next-divider-dashed:after,.next-divider-hoz.next-divider-with-text-left.next-divider-dashed:before,.next-divider-hoz.next-divider-with-text-right.next-divider-dashed:after,.next-divider-hoz.next-divider-with-text-right.next-divider-dashed:before{border-style:dashed none none}.next-divider-hoz.next-divider-with-text-left .next-divider-inner-text,.next-divider-hoz.next-divider-with-text-right .next-divider-inner-text{display:inline-block;padding:0 16px}.next-divider-hoz.next-divider-with-text-left:before{top:50%;width:5%}.next-divider-hoz.next-divider-with-text-left:after,.next-divider-hoz.next-divider-with-text-right:before{top:50%;width:95%}.next-divider-hoz.next-divider-with-text-right:after{top:50%;width:5%}.next-divider-inner-text{display:inline-block;padding:0 16px}.next-divider-dashed{background:none;border:dashed #e6e6e6;border-width:1px 0 0}.next-divider-dashed.next-divider-ver{border-width:0 0 0 1px}.next-box{display:flex}.next-box,.next-box *,.next-box :after,.next-box :before,.next-table{box-sizing:border-box}.next-table{position:relative;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e6e6e6;border-left:1px solid #e6e6e6}.next-table *,.next-table :after,.next-table :before{box-sizing:border-box}.next-table .next-table-header tr:first-child th:first-child{border-top-left-radius:0}.next-table .next-table-header tr:first-child th:last-child{border-top-right-radius:0}.next-table .next-table-header tr:last-child th:first-child{border-bottom-left-radius:0}.next-table .next-table-header tr:last-child th:last-child{border-bottom-right-radius:0}.next-table.next-table-layout-fixed{overflow:auto}.next-table.next-table-layout-fixed table{table-layout:fixed}.next-table.next-table-layout-auto table{table-layout:auto}.next-table.next-table-small .next-table-prerow .next-table-cell-wrapper,.next-table.next-table-small td .next-table-cell-wrapper,.next-table.next-table-small th .next-table-cell-wrapper{padding:8px}.next-table table{border-collapse:separate;border-spacing:0;width:100%;background:#fff;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.next-table table tr:first-child td{border-top-width:0}.next-table th{padding:0;background:#f5f5f5;color:#333;text-align:left;font-weight:400;border-right:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6}.next-table th .next-table-cell-wrapper{padding:12px 16px;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.next-table th.next-table-prerow .next-table-cell-wrapper{padding:12px 16px}.next-table th.next-table-word-break-word .next-table-cell-wrapper{word-break:break-word}.next-table th.next-table-fix-left,.next-table th.next-table-fix-right{z-index:1}.next-table-affix{z-index:1;overflow:hidden}.next-table-stickylock .next-table-affix{z-index:9}.next-table-header-resizable{position:relative}.next-table-header-resizable .next-table-resize-handler{position:absolute;right:-5px;top:0;bottom:0;width:10px;background:transparent;cursor:ew-resize}.next-table-header-resizable .next-table-resize-handler:after{position:absolute;display:block;content:" ";width:2px;height:100%;right:50%}.next-table-header-resizable .next-table-resize-handler:hover:after{z-index:1;background:#209bfa}.next-table.next-table-lock-left .next-table-header-resizable .next-table-resize-handler,.next-table.next-table-lock-right .next-table-header-resizable .next-table-resize-handler{cursor:auto}.next-table.next-table-lock-left .next-table-header-resizable .next-table-resize-handler:hover:after,.next-table.next-table-lock-right .next-table-header-resizable .next-table-resize-handler:hover:after{z-index:-1}.next-table td{padding:0;border-right:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6}.next-table td .next-table-cell-wrapper{padding:12px 16px;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.next-table td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow,.next-table td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow,.next-table td .next-table-cell-wrapper .next-table-tree-placeholder{margin-right:8px;outline:0;cursor:pointer}.next-table td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow .next-icon-remote,.next-table td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow:before{width:12px;font-size:12px;line-height:inherit}.next-table td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow:before{content:""}.next-table td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow .next-icon-remote,.next-table td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow:before{width:12px;font-size:12px;line-height:inherit}.next-table td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow:before{content:""}.next-table td.next-table-prerow .next-table-cell-wrapper{padding:12px 16px}.next-table td.next-table-word-break-word .next-table-cell-wrapper{word-break:break-word}.next-table .next-table-expanded .next-table-cell-wrapper,.next-table .next-table-selection .next-table-cell-wrapper{overflow:visible}.next-table.no-header table tr:first-child td{border-top-width:1px}.next-table.only-bottom-border{border-width:0}.next-table.only-bottom-border td,.next-table.only-bottom-border th{border-width:0 0 1px}.next-table.only-bottom-border table tr td:first-child,.next-table.only-bottom-border table tr th:first-child{border-left-width:0}.next-table.only-bottom-border .next-table-body tr td:last-child,.next-table.only-bottom-border .next-table-header tr th:last-child{border-right-width:0}.next-table-loading{display:block;pointer-events:none;opacity:.7;-webkit-filter:blur(1px);filter:blur(1px);filter:"progid:DXImageTransform.Microsoft.Blur(PixelRadius=1, MakeShadow=false)"}.next-table-loading .next-table-loading-content{position:absolute;top:0;right:0;bottom:0;left:0}.next-table.zebra tr:nth-child(odd) td{background:#fff}.next-table.zebra tr:nth-child(2n) td{background:#fafafa}.next-table.zebra .next-table-cell.hovered,.next-table.zebra .next-table-row.hovered td{background:#fafafa;color:#333}.next-table.zebra .next-table-row.selected td{background:#f9f9f9;color:#333}.next-table-empty{color:#ccc;padding:32px 0;text-align:center}.next-table-expanded-row>td{border-width:0 0 1px}.next-table-expanded-row>td:first-child{border-left-width:1px}.next-table-expanded-row>td:last-child{border-right-width:1px}.next-table-expanded-row:last-child>td{border-bottom-width:1px}.next-table-expanded-row .next-table{border-top:0;border-left:0}.next-table-expanded-row .next-table td,.next-table-expanded-row .next-table th{border-right:1px solid #e6e6e6}.next-table-expanded-row .next-table.only-bottom-border td,.next-table-expanded-row .next-table.only-bottom-border th{border-right:0}.next-table-expanded-row .next-table .last td{border-bottom:0}.next-table-expanded-row .next-table td.last,.next-table-expanded-row .next-table th:last-child{border-right:0}.next-table-filter-footer{margin:10px 10px 0}.next-table-filter-footer button{margin-right:5px}.next-table-row{transition:all .1s linear;background:#fff;color:#333}.next-table-row.hidden{display:none}.next-table-row.hovered{background:#fafafa;color:#333}.next-table-row.selected{background:#f9f9f9;color:#333}.next-table-cell.hovered{background:#fafafa;color:#333}.next-table-tree-placeholder{visibility:hidden}.next-table-tree-placeholder .next-icon-remote,.next-table-tree-placeholder:before{width:12px;font-size:12px;line-height:inherit}.last .next-table-expanded-row td{border-bottom-width:1px}.next-table-body,.next-table-header{overflow:auto;font-size:14px}.next-table-column-resize-proxy{position:absolute;top:0;bottom:0;width:0;border-left:2px solid #209bfa;z-index:10;display:none}.next-table-header{margin-bottom:-20px;padding-bottom:20px;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none}.next-table-header::-webkit-scrollbar{display:none}.next-table-body{font-size:14px;position:relative}.next-table-fixed{border-right:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6}.next-table-fixed table{table-layout:fixed}.next-table-fixed .next-table-header{background:#f5f5f5}.next-table-fixed table tr td:first-child,.next-table-fixed table tr th:first-child{border-left-width:0}.next-table-fixed .next-table-header th{border-top-width:0}.next-table-fixed .next-table-header tr th:last-child{border-right-width:0}.next-table-fixed .next-table-body td{border-top-width:0}.next-table-fixed .next-table-body tr:last-child td{border-bottom-width:0}.next-table-fixed .next-table-body tr td:last-child{border-right-width:0}.next-table-fixed.only-bottom-border .next-table-body tr:last-child td{border-bottom-width:1px}.next-table-fixed.next-table-group table tr td:first-child,.next-table-fixed.next-table-group table tr th:first-child{border-left-width:1px}.next-table-fixed.next-table-group .next-table-header th{border-top-width:1px}.next-table-fixed.next-table-group .next-table-header tr th:last-child{border-right-width:1px}.next-table-fixed.next-table-group .next-table-body td{border-top-width:1px}.next-table-fixed.next-table-group .next-table-body tr:last-child td{border-bottom-width:1px}.next-table-fixed.next-table-group .next-table-body tr td:last-child,.next-table-fixed.next-table-lock-left .next-table-body tr td:last-child,.next-table-fixed.next-table-lock-left .next-table-header tr th:last-child{border-right-width:1px}.next-table-lock .next-table-body{overflow-x:auto;overflow-y:visible}.next-table-group{border-width:0}.next-table-group.only-bottom-border .next-table-body table,.next-table-group.only-bottom-border .next-table-header table{border-left:0}.next-table-group.only-bottom-border .next-table-body table,.next-table-group.only-bottom-border .next-table-body table.next-table-row,.next-table-group.only-bottom-border .next-table-header table{border-top:0}.next-table-group.only-bottom-border .next-table-body .next-table-group-footer td{border-bottom:0}.next-table-group .next-table-body{margin-top:8px}.next-table-group .next-table-body table{border-top:1px solid #e6e6e6;border-left:1px solid #e6e6e6;margin-bottom:8px}.next-table-group .next-table-body table tr:first-child td{border-top-width:1px}.next-table-group .next-table-body table:last-of-type{margin-bottom:0}.next-table-group .next-table-header table{border-top:1px solid #e6e6e6;border-left:1px solid #e6e6e6}.next-table-group .next-table-group-header td{background:#f5f5f5;color:#333}.next-table-group .next-table-group-header td:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.next-table-group .next-table-group-header td:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.next-table-group .next-table-group-footer td{background:#f5f5f5;color:#333}.next-table-group .next-table-group-footer td:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.next-table-group .next-table-group-footer td:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.next-table-group .next-table-row.hovered,.next-table-group .next-table-row.selected{background:#fff;color:#333}.next-table-lock{position:relative}.next-table-lock table{table-layout:fixed}.next-table-header-inner{overflow:unset}.next-table-header-fixer{content:" ";border-top-right-radius:0;border-bottom-right-radius:0;width:15px;background:inherit;position:absolute;right:0;height:100%;top:0}.next-table-wrap-empty .next-table-lock-left td,.next-table-wrap-empty .next-table-lock-right td{border:none}.next-table-wrap-empty .next-table-lock-left .next-table-empty,.next-table-wrap-empty .next-table-lock-right .next-table-empty{display:none}.next-table-wrap-empty>.next-table-inner>.next-table-body>table{table-layout:fixed}.next-table-lock-left,.next-table-lock-right{position:absolute;left:0;top:0;z-index:1;border:0;transition:box-shadow .3s ease;overflow:hidden}.next-table-lock-left table,.next-table-lock-right table{width:auto}.next-table-lock-left .next-table-body,.next-table-lock-right .next-table-body{overflow-y:scroll;overflow-x:hidden;margin-right:-20px;padding-right:0}.next-table-lock-left.shadow .next-table-body tr td:last-child,.next-table-lock-left.shadow .next-table-header tr th:last-child,.next-table-lock-right.shadow .next-table-body tr td:last-child,.next-table-lock-right.shadow .next-table-header tr th:last-child{border-right-width:0}.next-table-lock-right{right:0;left:auto}.next-table-lock-right table tr td:first-child,.next-table-lock-right table tr th:first-child{border-left-width:1px}.next-table-lock-right.shadow{box-shadow:-2px 0 3px rgba(0,0,0,.12)}.next-table-lock-left.shadow{box-shadow:2px 0 3px rgba(0,0,0,.12)}.next-table-filter{line-height:1}.next-table-sort{cursor:pointer;position:relative;width:16px;display:inline-block;line-height:1}.next-table-sort:focus{outline:0}.next-table-sort>a:before{content:" ";display:inline-block;vertical-align:middle}.next-table-sort .next-icon{position:absolute;left:-2px;color:#333}.next-table-sort .next-icon .next-icon-remote,.next-table-sort .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-table-sort .current .next-icon{color:#209bfa}.next-table-sort .next-icon-ascending{left:2px}.next-table-filter{cursor:pointer;width:20px;display:inline-block}.next-table-filter:focus{outline:0}.next-table-filter .next-icon{color:#333}.next-table-filter .next-icon .next-icon-remote,.next-table-filter .next-icon:before{width:12px;font-size:12px;line-height:inherit}.next-table-filter .next-table-filter-active{color:#209bfa}.next-table-filter-menu .next-menu-content{max-height:220px;overflow:auto}.next-table-header-icon{margin-left:8px}.next-table-expanded-ctrl{cursor:pointer}.next-table-expanded-ctrl:focus{outline:0}.next-table-expanded-ctrl.disabled{color:#999}.next-table-expanded-ctrl .next-table-expand-unfold .next-icon-remote,.next-table-expanded-ctrl .next-table-expand-unfold:before{width:12px;font-size:12px;line-height:inherit}.next-table-expanded-ctrl .next-table-expand-unfold:before{content:""}.next-table-expanded-ctrl .next-table-expand-fold .next-icon-remote,.next-table-expanded-ctrl .next-table-expand-fold:before{width:12px;font-size:12px;line-height:inherit}.next-table-expanded-ctrl .next-table-expand-fold:before{content:""}.next-table-fix-left,.next-table-fix-right{background:inherit;position:sticky;z-index:1;background-clip:padding-box}.next-table-ping-left .next-table-expanded-area .next-table-fix-left-last:after{content:none}.next-table-ping-left .next-table-expanded-area .next-table-ping-left .next-table-fix-left-last,.next-table-ping-left .next-table-fix-left-last{border-right-width:0}.next-table-ping-left .next-table-expanded-area .next-table-ping-left .next-table-fix-left-last:after,.next-table-ping-left .next-table-fix-left-last:after{box-shadow:inset 10px 0 8px -8px rgba(0,0,0,.15);position:absolute;top:0;right:0;bottom:0;width:30px;content:"";pointer-events:none;transition:box-shadow .3s,-webkit-box-shadow .3s;transform:translateX(100%)}.next-table-ping-right .next-table-expanded-area .next-table-fix-right-first:after{content:none}.next-table-ping-right .next-table-expanded-area .next-table-ping-right .next-table-fix-right-first:after,.next-table-ping-right .next-table-fix-right-first:after{box-shadow:inset -10px 0 8px -8px rgba(0,0,0,.15);position:absolute;top:0;left:0;bottom:0;width:30px;content:"";pointer-events:none;transition:box-shadow .3s,-webkit-box-shadow .3s;transform:translateX(-100%)}.next-table-fixed.next-table-scrolling-to-right:after,.next-table-lock.next-table-scrolling-to-right:after{box-shadow:inset -10px 0 8px -8px rgba(0,0,0,.15);position:absolute;top:0;right:-30px;bottom:0;width:30px;content:"";pointer-events:none;transition:box-shadow .3s,-webkit-box-shadow .3s;transform:translateX(-100%)}.next-table-fixed.only-bottom-border,.next-table-lock.only-bottom-border{border-right:0}.next-table[dir=rtl] th{text-align:right}.next-table[dir=rtl] .next-table-header-resizable .next-table-resize-handler{right:auto;left:0}.next-table[dir=rtl] td .next-table-cell-wrapper .next-icon-arrow-down.next-table-tree-arrow,.next-table[dir=rtl] td .next-table-cell-wrapper .next-icon-arrow-right.next-table-tree-arrow,.next-table[dir=rtl] td .next-table-cell-wrapper .next-table-tree-placeholder{margin-left:3px;margin-right:0;float:right}.next-table[dir=rtl] .next-table-expanded-row td:first-child{border-left-width:0;border-right-width:1px}.next-table[dir=rtl] .next-table-expanded-row td:last-child{border-left-width:1px;border-right-width:0}.next-table[dir=rtl].only-bottom-border .next-table-expanded-row td,.next-table[dir=rtl].only-bottom-border .next-table-expanded-row th{border-width:0 0 1px}.next-table[dir=rtl] .next-table-filter-footer button{margin-left:5px;margin-right:0}.next-table[dir=rtl] .next-table-lock-left,.next-table[dir=rtl] .next-table-lock-right{left:auto;right:0}.next-table[dir=rtl] .next-table-lock-right{right:auto;left:0}.next-table[dir=rtl] .next-table-lock-right table tr td:first-child,.next-table[dir=rtl] .next-table-lock-right table tr th:first-child{border-right-width:1px}.next-table[dir=rtl] .next-table-lock-right.shadow{box-shadow:2px 0 3px rgba(0,0,0,.12)}.next-table[dir=rtl] .next-table-lock-left.shadow{box-shadow:-2px 0 3px rgba(0,0,0,.12)}.next-table[dir=rtl] .next-table-sort .next-icon{right:0;left:auto}.next-table[dir=rtl] .next-table-sort .next-icon-ascending{right:4px;left:auto}.next-table[dir=rtl] .next-table-filter{margin-right:5px;margin-left:0}.next-table-fixed[dir=rtl] table tr td:first-child,.next-table-fixed[dir=rtl] table tr th:first-child{border-left-width:1px;border-right-width:0}.next-table-fixed[dir=rtl] .next-table-body tr td:last-child,.next-table-fixed[dir=rtl] .next-table-header tr th:last-child{border-left-width:1px}.next-calendar2,.next-calendar2 *,.next-calendar2 :after,.next-calendar2 :before{box-sizing:border-box}.next-calendar2 table{border-collapse:collapse;border-spacing:0}.next-calendar2 td,.next-calendar2 th{padding:0}div[dir=rtl].next-calendar2-card .next-calendar2-header-actions,div[dir=rtl].next-calendar2-fullscreen .next-calendar2-header-actions,div[dir=rtl].next-calendar2-panel .next-calendar2-header-actions{margin-right:auto;margin-left:0}div[dir=rtl].next-calendar2-card .next-calendar2-header-actions>:not(:first-child),div[dir=rtl].next-calendar2-card .next-calendar2-header-ranges>:not(:first-child),div[dir=rtl].next-calendar2-fullscreen .next-calendar2-header-actions>:not(:first-child),div[dir=rtl].next-calendar2-fullscreen .next-calendar2-header-ranges>:not(:first-child),div[dir=rtl].next-calendar2-panel .next-calendar2-header-actions>:not(:first-child),div[dir=rtl].next-calendar2-panel .next-calendar2-header-ranges>:not(:first-child){margin-right:8px;margin-left:0}div[dir=rtl].next-calendar2-fullscreen .next-calendar2-cell-value,div[dir=rtl].next-calendar2-fullscreen .next-calendar2-table th{text-align:left}div[dir=rtl].next-calendar2-fullscreen .next-calendar2-table th{padding:0 0 5px 12px}.next-calendar2{font-size:12px;user-select:none;background:#fff}.next-calendar2-header{display:flex}.next-calendar2-table{width:100%;table-layout:fixed}.next-calendar2-cell{cursor:pointer;position:relative;transition:background-color .2s,border .2s}.next-calendar2 .next-calendar2-cell-inner{color:#ccc;outline:none;min-width:24px;position:relative;border:1px solid transparent}.next-calendar2-cell-disabled:before{color:#ccc;background:#fafafa}.next-calendar2-card .next-calendar2-header-actions,.next-calendar2-fullscreen .next-calendar2-header-actions,.next-calendar2-panel .next-calendar2-header-actions{margin-left:auto}.next-calendar2-card .next-calendar2-header-actions>:not(:first-child),.next-calendar2-card .next-calendar2-header-ranges>:not(:first-child),.next-calendar2-fullscreen .next-calendar2-header-actions>:not(:first-child),.next-calendar2-fullscreen .next-calendar2-header-ranges>:not(:first-child),.next-calendar2-panel .next-calendar2-header-actions>:not(:first-child),.next-calendar2-panel .next-calendar2-header-ranges>:not(:first-child){margin-left:8px}.next-calendar2-card .next-calendar2-header-select-month,.next-calendar2-card .next-calendar2-header-select-year,.next-calendar2-fullscreen .next-calendar2-header-select-month,.next-calendar2-fullscreen .next-calendar2-header-select-year,.next-calendar2-panel .next-calendar2-header-select-month,.next-calendar2-panel .next-calendar2-header-select-year{min-width:88px}.next-calendar2-card .next-calendar2-header-select-month .next-input,.next-calendar2-card .next-calendar2-header-select-year .next-input,.next-calendar2-fullscreen .next-calendar2-header-select-month .next-input,.next-calendar2-fullscreen .next-calendar2-header-select-year .next-input,.next-calendar2-panel .next-calendar2-header-select-month .next-input,.next-calendar2-panel .next-calendar2-header-select-year .next-input{min-width:auto}.next-calendar2-card .next-calendar2-body,.next-calendar2-fullscreen .next-calendar2-body,.next-calendar2-panel .next-calendar2-body{padding:8px 0}.next-calendar2-card .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-inner{z-index:2;height:24px;line-height:22px;border-radius:2px;display:inline-block}.next-calendar2-card .next-calendar2,.next-calendar2-panel .next-calendar2{min-height:150px}.next-calendar2-card .next-calendar2-table thead>tr,.next-calendar2-panel .next-calendar2-table thead>tr{height:24px;color:#999}.next-calendar2-card .next-calendar2-table td,.next-calendar2-card .next-calendar2-table th,.next-calendar2-panel .next-calendar2-table td,.next-calendar2-panel .next-calendar2-table th{font-weight:400;text-align:center;padding:4px 0}.next-calendar2-card .next-calendar2-table th,.next-calendar2-panel .next-calendar2-table th{height:32px}.next-calendar2-card .next-calendar2-table-decade,.next-calendar2-card .next-calendar2-table-month,.next-calendar2-card .next-calendar2-table-year,.next-calendar2-panel .next-calendar2-table-decade,.next-calendar2-panel .next-calendar2-table-month,.next-calendar2-panel .next-calendar2-table-year{height:145px}.next-calendar2-card .next-calendar2-table-decade .next-calendar2-cell-inner,.next-calendar2-card .next-calendar2-table-month .next-calendar2-cell-inner,.next-calendar2-card .next-calendar2-table-year .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-decade .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-month .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-year .next-calendar2-cell-inner{min-width:56px}.next-calendar2-card .next-calendar2-table-quarter,.next-calendar2-panel .next-calendar2-table-quarter{height:50px}.next-calendar2-card .next-calendar2-table-quarter .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-quarter .next-calendar2-cell-inner{min-width:56px}.next-calendar2-card .next-calendar2-table-decade .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-table-decade .next-calendar2-cell-inner{min-width:80px}.next-calendar2-card .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today) .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today) .next-calendar2-cell-inner{color:#666}.next-calendar2-card .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today):hover:not(.next-calendar2-cell-hover) .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today):hover:not(.next-calendar2-cell-hover) .next-calendar2-cell-inner{background:#f9f9f9}.next-calendar2-card .next-calendar2-cell-current.next-calendar2-cell-today:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-current.next-calendar2-cell-today:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner{color:#209bfa}.next-calendar2-card .next-calendar2-cell-current.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner,.next-calendar2-panel .next-calendar2-cell-current.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner{color:#fff;background:#209bfa}.next-calendar2-fullscreen .next-calendar2-cell-value,.next-calendar2-fullscreen .next-calendar2-table th{text-align:right}.next-calendar2-fullscreen .next-calendar2-table th{padding:0 12px 5px 0}.next-calendar2-fullscreen .next-calendar2-cell-inner{height:80px;border-top:2px solid #eee;margin:0 4px;padding:4px 8px 0}.next-calendar2-fullscreen td .next-calendar2-cell-inner{height:80px;border-top:2px solid #eee}.next-calendar2-fullscreen .next-calendar2-cell-disabled .next-calendar2-cell-inner{color:#ccc;background:#fafafa}.next-calendar2-fullscreen .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today) .next-calendar2-cell-inner{color:#666}.next-calendar2-fullscreen .next-calendar2-cell-current:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):not(.next-calendar2-cell-today):hover .next-calendar2-cell-inner{background-color:#f9f9f9}.next-calendar2-fullscreen .next-calendar2-cell-current.next-calendar2-cell-today .next-calendar2-cell-inner{color:#209bfa}.next-calendar2-fullscreen .next-calendar2-cell-current .next-calendar2-cell-inner{background-color:#fff}.next-calendar2-fullscreen .next-calendar2-cell-current.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner{border-top-color:#209bfa;font-weight:700;color:#209bfa;background:#add9ff}.next-calendar2-card .next-calendar2-header{padding:8px;border-bottom:1px solid #eee}.next-calendar2-panel .next-calendar2-header{padding:0 8px;display:flex;align-items:center;border-bottom:1px solid #eee}.next-calendar2-panel .next-calendar2-header-btn{min-width:20px;line-height:20px;color:#666;font-family:inherit;vertical-align:initial;border-radius:2px}.next-calendar2-panel .next-calendar2-header-btn>span,.next-calendar2-panel .next-calendar2-header-text-field{text-align:center;font-size:14px;color:#333;font-weight:bolder;vertical-align:initial}.next-calendar2-panel .next-calendar2-header-btn:hover,.next-calendar2-panel .next-calendar2-header-btn:hover>span{color:#209bfa}.next-calendar2-panel .next-calendar2-header-left-btn:hover,.next-calendar2-panel .next-calendar2-header-right-btn:hover{background:#f9f9f9}.next-calendar2-panel .next-calendar2-header-text-field{flex:1;height:38px;line-height:38px}.next-calendar2-panel .next-calendar2-header-text-field .next-calendar2-header-btn:not(:first-child){margin-left:6px}.next-calendar2-header-select-month-popup,.next-calendar2-header-select-year-popup{min-width:auto}.next-time-picker2-menu{float:left;text-align:center;padding:8px 0}.next-time-picker2-menu:not(:last-child){border-right:1px solid #e6e6e6}.next-time-picker2-menu-title{cursor:default;height:28px;line-height:28px;font-size:12px;font-weight:400;color:#999;background:#fff}.next-time-picker2-menu ul{position:relative;overflow-y:hidden;overflow-x:auto;list-style:none;margin:0;width:54px;padding:0;font-size:12px;height:224px;scrollbar-width:none;-ms-overflow-style:none}.next-time-picker2-menu ul::-webkit-scrollbar{width:0}.next-time-picker2-menu ul:hover{overflow-y:auto}.next-time-picker2-menu ul:after{display:block;height:192px;content:""}.next-time-picker2-menu-item{cursor:pointer;height:32px;line-height:32px;transition:background .1s linear;color:#666;background:#fff;outline:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.next-time-picker2-menu-item:hover{color:#333;background:#f9f9f9}.next-time-picker2-menu-item.next-selected{color:#666;background:#add9ff}.next-time-picker2-menu-item.next-disabled{cursor:not-allowed;color:#ccc;background:#fafafa}.next-time-picker2-panel{box-sizing:border-box;display:flex}.next-time-picker2-panel *,.next-time-picker2-panel :after,.next-time-picker2-panel :before{box-sizing:border-box}.next-time-picker2-panel:after{visibility:hidden;display:block;height:0;font-size:0;content:" ";clear:both}.next-time-picker2-panel-header{border-bottom:1px solid #e6e6e6}.next-time-picker2-panel-input.next-input{width:100%;padding:6px;border-color:transparent;vertical-align:middle}.next-time-picker2-panel .next-time-picker2-menu{flex:1}.next-time-picker2-panel-range .next-time-picker2-panel-list:last-of-type{margin-left:20px}.next-time-picker2-footer{width:min-content;min-width:100%;box-sizing:border-box;text-align:center;border-top:1px solid #f0f0f0;padding:4px 12px;display:flex;min-height:40px;align-items:center;flex-wrap:wrap}.next-time-picker2-footer-actions{margin-left:auto}.next-time-picker2-wrapper[dir=rtl] .next-time-picker2-menu{float:right}.next-time-picker2-wrapper[dir=rtl] .next-time-picker2-menu:not(:last-child){border-right:none;border-left:1px solid #e6e6e6}.next-time-picker2{display:inline-block}.next-time-picker2,.next-time-picker2 *,.next-time-picker2 :after,.next-time-picker2 :before{box-sizing:border-box}.next-time-picker2-trigger .next-input{width:100%}.next-time-picker2-wrapper{padding:4px 0}.next-time-picker2-body{display:block;overflow:hidden;border:1px solid #e6e6e6;border-radius:3px;background:#fff;box-shadow:none}.next-time-picker2-symbol-clock-icon:before{content:""}.next-time-picker2-input{display:inline-flex;align-items:center;outline:none;box-sizing:border-box;border:1px solid #ddd;vertical-align:middle;width:inherit;background-color:#fff}.next-time-picker2-input .next-input{border:none;width:100%;height:100%}.next-time-picker2-input .next-input input{height:100%}.next-time-picker2-input.next-time-picker2-input-small{height:24px;border-radius:3px}.next-time-picker2-input.next-time-picker2-input-small .next-input-label{padding-left:8px;font-size:12px}.next-time-picker2-input.next-time-picker2-input-small .next-input-inner{font-size:12px}.next-time-picker2-input.next-time-picker2-input-small .next-input-control,.next-time-picker2-input.next-time-picker2-input-small .next-input-inner-text{padding-right:4px}.next-time-picker2-input.next-time-picker2-input-small input{height:22px;line-height:22px \0 ;padding:0 4px;font-size:12px}.next-time-picker2-input.next-time-picker2-input-small input::placeholder{font-size:12px}.next-time-picker2-input.next-time-picker2-input-small .next-input-text-field{padding:0 4px;font-size:12px;height:22px;line-height:22px}.next-time-picker2-input.next-time-picker2-input-small .next-icon .next-icon-remote,.next-time-picker2-input.next-time-picker2-input-small .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-time-picker2-input.next-time-picker2-input-small .next-input-control{border-radius:0 3px 3px 0}.next-time-picker2-input.next-time-picker2-input-medium{height:32px;border-radius:3px}.next-time-picker2-input.next-time-picker2-input-medium .next-input-label{padding-left:8px;font-size:14px}.next-time-picker2-input.next-time-picker2-input-medium .next-input-inner{font-size:14px}.next-time-picker2-input.next-time-picker2-input-medium .next-input-control,.next-time-picker2-input.next-time-picker2-input-medium .next-input-inner-text{padding-right:8px}.next-time-picker2-input.next-time-picker2-input-medium input{height:30px;line-height:30px \0 ;padding:0 8px;font-size:14px}.next-time-picker2-input.next-time-picker2-input-medium input::placeholder{font-size:14px}.next-time-picker2-input.next-time-picker2-input-medium .next-input-text-field{padding:0 8px;font-size:14px;height:30px;line-height:30px}.next-time-picker2-input.next-time-picker2-input-medium .next-icon .next-icon-remote,.next-time-picker2-input.next-time-picker2-input-medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-time-picker2-input.next-time-picker2-input-medium .next-input-control{border-radius:0 3px 3px 0}.next-time-picker2-input.next-time-picker2-input-large{height:40px;border-radius:3px}.next-time-picker2-input.next-time-picker2-input-large .next-input-label{padding-left:12px;font-size:16px}.next-time-picker2-input.next-time-picker2-input-large .next-input-inner{font-size:16px}.next-time-picker2-input.next-time-picker2-input-large .next-input-control,.next-time-picker2-input.next-time-picker2-input-large .next-input-inner-text{padding-right:8px}.next-time-picker2-input.next-time-picker2-input-large input{height:38px;line-height:38px \0 ;padding:0 12px;font-size:16px}.next-time-picker2-input.next-time-picker2-input-large input::placeholder{font-size:16px}.next-time-picker2-input.next-time-picker2-input-large .next-input-text-field{padding:0 12px;font-size:16px;height:38px;line-height:38px}.next-time-picker2-input.next-time-picker2-input-large .next-icon .next-icon-remote,.next-time-picker2-input.next-time-picker2-input-large .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-time-picker2-input.next-time-picker2-input-large .next-input-control{border-radius:0 3px 3px 0}.next-time-picker2-input:hover{border-color:#ccc;background-color:#fff}.next-time-picker2-input.next-time-picker2-input-focus{border-color:#209bfa;background-color:#fff;box-shadow:0 0 0 2px rgba(32,155,250,.2)}.next-time-picker2-input.next-time-picker2-input-noborder{border-color:transparent!important;box-shadow:none!important}.next-time-picker2-input.next-time-picker2-input-disabled{color:#ccc;border-color:#eee;background-color:#fafafa;cursor:not-allowed}.next-time-picker2-input.next-time-picker2-input-disabled:hover{border-color:#eee;background-color:#fafafa}.next-time-picker2-input.next-time-picker2-input-error{border-color:#d23c26}.next-time-picker2-input-separator{color:#ddd;font-size:12px;display:inline-block;min-width:16px;text-align:center}.next-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;top:0;margin:-1px}.next-date-picker2-footer{width:min-content;min-width:100%;box-sizing:border-box;text-align:center;border-top:1px solid #eee;padding:4px 12px;display:flex;min-height:40px;align-items:center;flex-wrap:wrap;position:relative}.next-date-picker2-footer-preset>.next-btn{margin-right:8px}.next-date-picker2-footer-actions{margin-left:auto}.next-date-picker2-footer-preset-only{width:100%}div[dir=rtl] .next-date-picker2-footer-preset>.next-btn{margin-left:8px;margin-right:0}div[dir=rtl] .next-date-picker2-footer-actions{margin-left:0;margin-right:auto}div[dir=rtl] .next-date-picker2-wrapper .next-calendar2-cell:last-child:before{border-top-right-radius:0;border-bottom-right-radius:0;right:0;border-top-left-radius:2px;border-bottom-left-radius:2px;left:8px}div[dir=rtl] .next-date-picker2-wrapper .next-calendar2-cell:first-child:before{border-top-left-radius:0;border-bottom-left-radius:0;left:0;border-top-right-radius:2px;border-bottom-right-radius:2px;right:8px}div[dir=rtl] .next-date-time-picker-wrapper{border-right:1px solid #eee;border-left:none}div[dir=rtl] .next-date-time-picker-wrapper .next-time-picker2-menu:not(:last-child){border-left:1px solid #dcdee3;border-right:none}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-selected.next-calendar2-cell-range-begin:before{right:50%;left:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-selected.next-calendar2-cell-range-end:before{left:50%;right:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-hover-begin:after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:first-child:after{right:8px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-hover-begin:not(:last-child):after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:first-child:not(.next-calendar2-cell-hover-end):after{left:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-hover-end:after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:last-child:after{left:8px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-hover-end:not(:first-child):after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:last-child:not(.next-calendar2-cell-hover-begin):after{right:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-selected.next-calendar2-cell-hover-begin:after{left:0;right:7px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover.next-calendar2-cell-selected.next-calendar2-cell-hover-end:after{right:0;left:7px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:first-of-type:after{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none;border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:1px dashed #1274e7}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:last-of-type:after{border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:1px dashed #1274e7}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-edge-end:after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-edge-end:before{right:0;left:8px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-edge-end.next-calendar2-cell-hover:after{border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:1px dashed #1274e7}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover-begin:after{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0;border-right:1px dashed #1274e7;border-top-right-radius:2px;border-bottom-right-radius:2px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover-end:after{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-left:1px dashed #1274e7;border-top-left-radius:2px;border-bottom-left-radius:2px}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled):after,div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled):before{right:8px;left:0}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:after{right:8px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:1px dashed #1274e7}div[dir=rtl] .next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:not(.next-calendar2-cell-hover-end):not(.next-calendar2-cell-hover-begin):after{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}div[dir=rtl] .next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:nth-child(2):before{right:50%;left:0}div[dir=rtl] .next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:last-child:before{left:50%;right:0}.next-date-picker2{outline:none;display:inline-table;position:relative;width:inherit}.next-date-picker2-overlay{vertical-align:top;padding:4px 0}.next-date-picker2-overlay-range{padding:12px 0}.next-date-picker2-wrapper{box-shadow:0 4px 16px 0 rgba(0,0,0,.12);background-color:#fff;border:1px solid #eee;border-radius:3px}.next-date-picker2-wrapper .next-calendar2-panel{border-radius:3px}.next-date-picker2-wrapper .next-calendar2-body{width:272px}.next-date-picker2-wrapper .next-calendar2-cell:before{content:"";position:absolute;top:50%;right:0;left:0;z-index:1;height:24px;transform:translateY(-50%)}.next-date-picker2-wrapper .next-calendar2-cell:last-child:before{border-top-right-radius:2px;border-bottom-right-radius:2px;right:8px}.next-date-picker2-wrapper .next-calendar2-cell:first-child:before{border-top-left-radius:2px;border-bottom-left-radius:2px;left:8px}.next-date-picker2-input{display:inline-flex;align-items:center;outline:none;box-sizing:border-box;border:1px solid #ddd;vertical-align:middle;width:inherit;background-color:#fff}.next-date-picker2-input .next-input{border:none;flex-basis:100%;height:100%;width:100%}.next-date-picker2-input .next-input input{height:100%;width:auto}.next-date-picker2-input.next-date-picker2-input-small{height:24px;border-radius:3px}.next-date-picker2-input.next-date-picker2-input-small .next-input-label{padding-left:8px;font-size:12px}.next-date-picker2-input.next-date-picker2-input-small .next-input-inner{font-size:12px}.next-date-picker2-input.next-date-picker2-input-small .next-input-control,.next-date-picker2-input.next-date-picker2-input-small .next-input-inner-text{padding-right:4px}.next-date-picker2-input.next-date-picker2-input-small input{height:22px;line-height:22px \0 ;padding:0 4px;font-size:12px}.next-date-picker2-input.next-date-picker2-input-small input::placeholder{font-size:12px}.next-date-picker2-input.next-date-picker2-input-small .next-input-text-field{padding:0 4px;font-size:12px;height:22px;line-height:22px}.next-date-picker2-input.next-date-picker2-input-small .next-icon .next-icon-remote,.next-date-picker2-input.next-date-picker2-input-small .next-icon:before{width:16px;font-size:16px;line-height:inherit}.next-date-picker2-input.next-date-picker2-input-small .next-input-control{border-radius:0 3px 3px 0}.next-date-picker2-input.next-date-picker2-input-medium{height:32px;border-radius:3px}.next-date-picker2-input.next-date-picker2-input-medium .next-input-label{padding-left:8px;font-size:14px}.next-date-picker2-input.next-date-picker2-input-medium .next-input-inner{font-size:14px}.next-date-picker2-input.next-date-picker2-input-medium .next-input-control,.next-date-picker2-input.next-date-picker2-input-medium .next-input-inner-text{padding-right:8px}.next-date-picker2-input.next-date-picker2-input-medium input{height:30px;line-height:30px \0 ;padding:0 8px;font-size:14px}.next-date-picker2-input.next-date-picker2-input-medium input::placeholder{font-size:14px}.next-date-picker2-input.next-date-picker2-input-medium .next-input-text-field{padding:0 8px;font-size:14px;height:30px;line-height:30px}.next-date-picker2-input.next-date-picker2-input-medium .next-icon .next-icon-remote,.next-date-picker2-input.next-date-picker2-input-medium .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-date-picker2-input.next-date-picker2-input-medium .next-input-control{border-radius:0 3px 3px 0}.next-date-picker2-input.next-date-picker2-input-large{height:40px;border-radius:3px}.next-date-picker2-input.next-date-picker2-input-large .next-input-label{padding-left:12px;font-size:16px}.next-date-picker2-input.next-date-picker2-input-large .next-input-inner{font-size:16px}.next-date-picker2-input.next-date-picker2-input-large .next-input-control,.next-date-picker2-input.next-date-picker2-input-large .next-input-inner-text{padding-right:8px}.next-date-picker2-input.next-date-picker2-input-large input{height:38px;line-height:38px \0 ;padding:0 12px;font-size:16px}.next-date-picker2-input.next-date-picker2-input-large input::placeholder{font-size:16px}.next-date-picker2-input.next-date-picker2-input-large .next-input-text-field{padding:0 12px;font-size:16px;height:38px;line-height:38px}.next-date-picker2-input.next-date-picker2-input-large .next-icon .next-icon-remote,.next-date-picker2-input.next-date-picker2-input-large .next-icon:before{width:20px;font-size:20px;line-height:inherit}.next-date-picker2-input.next-date-picker2-input-large .next-input-control{border-radius:0 3px 3px 0}.next-date-picker2-input:hover{border-color:#ccc;background-color:#fff}.next-date-picker2-input.next-date-picker2-input-focus{border-color:#209bfa;background-color:#fff;box-shadow:0 0 0 2px rgba(32,155,250,.2)}.next-date-picker2-input.next-date-picker2-input-noborder{border-color:transparent!important;box-shadow:none!important}.next-date-picker2-input.next-date-picker2-input-disabled{color:#ccc;border-color:#eee;background-color:#fafafa;cursor:not-allowed}.next-date-picker2-input.next-date-picker2-input-disabled:hover{border-color:#eee;background-color:#fafafa}.next-date-picker2-input.next-date-picker2-input-error{border-color:#d23c26}.next-date-picker2-input-separator{color:#ddd;font-size:12px;line-height:12px;display:inline-block;min-width:16px;text-align:center}.next-date-picker2-panel,.next-range-picker2-panel{display:inline-flex}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-range-picker-left .next-calendar2-header-right-btn,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-range-picker-right .next-calendar2-header-left-btn{visibility:hidden}.next-range-picker2-arrow{display:block;transform:translateY(-50%) rotate(-45deg);position:absolute;z-index:1;width:10px;height:10px;margin-left:16.5px;border-color:#eee #eee transparent transparent;border-style:solid;border-width:1px;transition:left .3s ease-out;background:#fff}.next-date-picker2-tl-bl .next-range-picker2-arrow{top:12.5px}.next-date-picker2-bl-tl .next-range-picker2-arrow{bottom:13px;transform:translateY(50%) rotate(135deg)}.next-date-time-picker-wrapper{border-left:1px solid #eee}.next-date-time-picker-wrapper .next-calendar2-body{padding-right:0;padding-left:0}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-disabled .next-calendar2-cell-inner{color:#ccc;background:#fafafa}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected:before{color:#666;background:#add9ff}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected .next-calendar2-cell-inner{color:#666;background:transparent}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-begin .next-calendar2-cell-inner,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-end .next-calendar2-cell-inner{z-index:10;color:#fff;background:#209bfa}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-begin:before{left:50%}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-end:before{right:50%}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-begin-single:before,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-selected.next-calendar2-cell-range-end-single:before{display:none}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:after{content:"";position:absolute;top:50%;right:0;left:0;z-index:2;height:24px;transform:translateY(-50%);border-color:#1274e7 transparent;border-style:dashed;border-width:1px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover.next-calendar2-cell-hover-begin:after,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:first-child:after{left:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover.next-calendar2-cell-hover-end:after,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:last-child:after{right:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover.next-calendar2-cell-selected.next-calendar2-cell-hover-begin:after{left:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover.next-calendar2-cell-selected.next-calendar2-cell-hover-end:after{right:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:1px dashed #1274e7}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:1px dashed #1274e7}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-edge-end:after,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-edge-end:before{right:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-edge-end.next-calendar2-cell-hover:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:1px dashed #1274e7}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover-begin:after{border-top:1px dashed #1274e7;border-left:1px dashed #1274e7;border-top-left-radius:2px;border-bottom-left-radius:2px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-current.next-calendar2-cell-hover-end:after{border-top:1px dashed #1274e7;border-right:1px dashed #1274e7;border-top-right-radius:2px;border-bottom-right-radius:2px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled):after,.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled):before{left:8px}.next-range-picker2-panel:not(.next-range-picker2-panel-single) .next-calendar2-cell-edge-end+.next-calendar2-cell-current:not(.next-calendar2-cell-disabled).next-calendar2-cell-hover:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:1px dashed #1274e7}.next-calendar2-table-week .next-calendar2-cell-hover:after{display:none}.next-calendar2-table-week tr:hover .next-calendar2-cell:not(.next-calendar2-cell-disabled):not(.next-calendar2-cell-selected):before{background:#f9f9f9}.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected .next-calendar2-cell-inner,.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:before{color:#666;background-color:#add9ff}.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:last-child .next-calendar2-cell-inner,.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:nth-child(2) .next-calendar2-cell-inner{color:#fff;background:#209bfa}.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:nth-child(2):before{left:50%}.next-calendar2-table-week .next-calendar2-week-current .next-calendar2-cell.next-calendar2-cell-selected:last-child:before{right:50%}.next-calendar2-table-week tr:not(.next-calendar2-week-current) td.next-calendar2-cell.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled) .next-calendar2-cell-inner,.next-calendar2-table-week tr:not(.next-calendar2-week-current) td.next-calendar2-cell.next-calendar2-cell-selected:not(.next-calendar2-cell-disabled):before{background-color:transparent;color:#ccc}.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled):last-child .next-calendar2-cell-inner,.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled):nth-child(2) .next-calendar2-cell-inner{background-color:#add9ff;color:#666}.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled).next-calendar2-cell-week-range-begin:last-child .next-calendar2-cell-inner,.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled).next-calendar2-cell-week-range-begin:nth-child(2) .next-calendar2-cell-inner,.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled).next-calendar2-cell-week-range-end:last-child .next-calendar2-cell-inner,.next-range-picker2-panel .next-calendar2-week-current .next-calendar2-cell-selected:not(.next-calendar2-cell-disabled).next-calendar2-cell-week-range-end:nth-child(2) .next-calendar2-cell-inner{color:#fff;background:#209bfa}.next-icon-alibaba:before{content:""}.next-icon-ic_dashboard:before{content:""}.next-icon-ic_form:before{content:""}.next-icon-ic_formbeifen:before{content:""}.next-icon-ic_language:before{content:""}.next-icon-ic_logo:before{content:""}.next-icon-ic_tongzhi:before{content:""}.next-icon-ic_yusuanguanli:before{content:""}.next-icon-taobao:before{content:""} \ No newline at end of file diff --git a/console/src/main/resources/static/index.html b/console/src/main/resources/static/index.html index b4010f33b7a..94563a4ff96 100644 --- a/console/src/main/resources/static/index.html +++ b/console/src/main/resources/static/index.html @@ -35,7 +35,7 @@ - +
    @@ -56,6 +56,6 @@ - + diff --git a/console/src/main/resources/static/js/main.js b/console/src/main/resources/static/js/main.js index 2c74db18142..5df08b930e9 100644 --- a/console/src/main/resources/static/js/main.js +++ b/console/src/main/resources/static/js/main.js @@ -1,301 +1,305 @@ -!function(n){var a={};function r(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,r),t.l=!0,t)).exports}r.m=n,r.c=a,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=459)}([function(e,t,n){"use strict";e.exports=n(466)},function(e,t,n){"use strict";n.d(t,"a",function(){return x}),n.d(t,"d",function(){return C}),n.d(t,"b",function(){return m}),n.d(t,"c",function(){return T});n(48);var t=n(25),u=n.n(t),l=n(75),r=n(93),d=n(62),c=n(34),t=n(110),f=n.n(t),t=n(68),p=n.n(t),h=n(23);function m(){var e=window.location.href,e=(localStorage.removeItem("token"),e.split("#")[0]);console.log("base_url",e),window.location="".concat(e,"#/login")}var s,g,a,o,i,y,v,_,b,w,M,k,t=window,S=(s={},{once:function(e,t){this.listen.call(this,e,t,!0)},listen:function(e,t){var n=2>>0,a;for(a=0;a0)for(n=0;n=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+a}var ie=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,se=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,le={},ue={};function a(e,t,n,a){var r=a;if(typeof a==="string")r=function(){return this[a]()};if(e)ue[e]=r;if(t)ue[t[0]]=function(){return o(r.apply(this,arguments),t[1],t[2])};if(n)ue[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)}}function de(e){if(e.match(/\[[\s\S]/))return e.replace(/^\[|\]$/g,"");return e.replace(/\\/g,"")}function ce(a){var r=a.match(ie),e,o;for(e=0,o=r.length;e=0&&se.test(e)){e=e.replace(se,a);se.lastIndex=0;n-=1}return e}var he={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function me(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];if(t||!n)return t;this._longDateFormat[e]=n.match(ie).map(function(e){if(e==="MMMM"||e==="MM"||e==="DD"||e==="dddd")return e.slice(1);return e}).join("");return this._longDateFormat[e]}var ge="Invalid date";function ye(){return this._invalidDate}var ve="%d",_e=/\d{1,2}/;function be(e){return this._ordinal.replace("%d",e)}var we={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Me(e,t,n,a){var r=this._relativeTime[n];return h(r)?r(e,t,n,a):r.replace(/%d/i,e)}function ke(e,t){var n=this._relativeTime[e>0?"future":"past"];return h(n)?n(t):n.replace(/%s/i,t)}var Se={};function t(e,t){var n=e.toLowerCase();Se[n]=Se[n+"s"]=Se[t]=e}function m(e){return typeof e==="string"?Se[e]||Se[e.toLowerCase()]:undefined}function Ee(e){var t={},n,a;for(a in e)if(l(e,a)){n=m(a);if(n)t[n]=e[a]}return t}var xe={};function n(e,t){xe[e]=t}function Ce(e){var t=[],n;for(n in e)if(l(e,n))t.push({unit:n,priority:xe[n]});t.sort(function(e,t){return e.priority-t.priority});return t}function Te(e){return e%4===0&&e%100!==0||e%400===0}function g(e){if(e<0)return Math.ceil(e)||0;else return Math.floor(e)}function y(e){var t=+e,n=0;if(t!==0&&isFinite(t))n=g(t);return n}function Le(t,n){return function(e){if(e!=null){De(this,t,e);c.updateOffset(this,n);return this}else return Oe(this,t)}}function Oe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function De(e,t,n){if(e.isValid()&&!isNaN(n))if(t==="FullYear"&&Te(e.year())&&e.month()===1&&e.date()===29){n=y(n);e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),ot(n,e.month()))}else e._d["set"+(e._isUTC?"UTC":"")+t](n)}function Ne(e){e=m(e);if(h(this[e]))return this[e]();return this}function Pe(e,t){if(typeof e==="object"){e=Ee(e);var n=Ce(e),a,r=n.length;for(a=0;a68?1900:2e3)};var Mt=Le("FullYear",true);function kt(){return Te(this.year())}function St(e,t,n,a,r,o,i){var s;if(e<100&&e>=0){s=new Date(e+400,t,n,a,r,o,i);if(isFinite(s.getFullYear()))s.setFullYear(e)}else s=new Date(e,t,n,a,r,o,i);return s}function Et(e){var t,n;if(e<100&&e>=0){n=Array.prototype.slice.call(arguments);n[0]=e+400;t=new Date(Date.UTC.apply(null,n));if(isFinite(t.getUTCFullYear()))t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function xt(e,t,n){var a=7+t-n,r=(7+Et(e,0,a).getUTCDay()-t)%7;return-r+a-1}function Ct(e,t,n,a,r){var o=(7+n-a)%7,i=xt(e,a,r),s=1+7*(t-1)+o+i,l,u;if(s<=0){l=e-1;u=wt(l)+s}else if(s>wt(e)){l=e+1;u=s-wt(e)}else{l=e;u=s}return{year:l,dayOfYear:u}}function Tt(e,t,n){var a=xt(e.year(),t,n),r=Math.floor((e.dayOfYear()-a-1)/7)+1,o,i;if(r<1){i=e.year()-1;o=r+L(i,t,n)}else if(r>L(e.year(),t,n)){o=r-L(e.year(),t,n);i=e.year()+1}else{i=e.year();o=r}return{week:o,year:i}}function L(e,t,n){var a=xt(e,t,n),r=xt(e+1,t,n);return(wt(e)-a+r)/7}function Lt(e){return Tt(e,this._week.dow,this._week.doy).week}a("w",["ww",2],"wo","week"),a("W",["WW",2],"Wo","isoWeek"),t("week","w"),t("isoWeek","W"),n("week",5),n("isoWeek",5),_("w",v),_("ww",v,r),_("W",v),_("WW",v,r),Ze(["w","ww","W","WW"],function(e,t,n,a){t[a.substr(0,1)]=y(e)});var Ot={dow:0,doy:6};function Dt(){return this._week.dow}function Nt(){return this._week.doy}function Pt(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function jt(e){var t=Tt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}function Yt(e,t){if(typeof e!=="string")return e;if(!isNaN(e))return parseInt(e,10);e=t.weekdaysParse(e);if(typeof e==="number")return e;return null}function It(e,t){if(typeof e==="string")return t.weekdaysParse(e)%7||7;return isNaN(e)?null:e}function At(e,t){return e.slice(t,7).concat(e.slice(0,t))}a("d",0,"do","day"),a("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),a("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),a("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),a("e",0,0,"weekday"),a("E",0,0,"isoWeekday"),t("day","d"),t("weekday","e"),t("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),_("d",v),_("e",v),_("E",v),_("dd",function(e,t){return t.weekdaysMinRegex(e)}),_("ddd",function(e,t){return t.weekdaysShortRegex(e)}),_("dddd",function(e,t){return t.weekdaysRegex(e)}),Ze(["dd","ddd","dddd"],function(e,t,n,a){var r=n._locale.weekdaysParse(e,a,n._strict);if(r!=null)t.d=r;else f(n).invalidWeekday=e}),Ze(["d","e","E"],function(e,t,n,a){t[a]=y(e)});var Rt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ht="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ft="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=Ge,Wt=Ge,Bt=Ge;function Ut(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&e!==true&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===true?At(n,this._week.dow):e?n[e.day()]:n}function Vt(e){return e===true?At(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Kt(e){return e===true?At(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function qt(e,t,n){var a,r,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(a=0;a<7;++a){o=d([2e3,1]).day(a);this._minWeekdaysParse[a]=this.weekdaysMin(o,"").toLocaleLowerCase();this._shortWeekdaysParse[a]=this.weekdaysShort(o,"").toLocaleLowerCase();this._weekdaysParse[a]=this.weekdays(o,"").toLocaleLowerCase()}}if(n)if(t==="dddd"){r=T.call(this._weekdaysParse,i);return r!==-1?r:null}else if(t==="ddd"){r=T.call(this._shortWeekdaysParse,i);return r!==-1?r:null}else{r=T.call(this._minWeekdaysParse,i);return r!==-1?r:null}else if(t==="dddd"){r=T.call(this._weekdaysParse,i);if(r!==-1)return r;r=T.call(this._shortWeekdaysParse,i);if(r!==-1)return r;r=T.call(this._minWeekdaysParse,i);return r!==-1?r:null}else if(t==="ddd"){r=T.call(this._shortWeekdaysParse,i);if(r!==-1)return r;r=T.call(this._weekdaysParse,i);if(r!==-1)return r;r=T.call(this._minWeekdaysParse,i);return r!==-1?r:null}else{r=T.call(this._minWeekdaysParse,i);if(r!==-1)return r;r=T.call(this._weekdaysParse,i);if(r!==-1)return r;r=T.call(this._shortWeekdaysParse,i);return r!==-1?r:null}}function Gt(e,t,n){var a,r,o;if(this._weekdaysParseExact)return qt.call(this,e,t,n);if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[]}for(a=0;a<7;a++){r=d([2e3,1]).day(a);if(n&&!this._fullWeekdaysParse[a]){this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i");this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i");this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")}if(!this._weekdaysParse[a]){o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,"");this._weekdaysParse[a]=new RegExp(o.replace(".",""),"i")}if(n&&t==="dddd"&&this._fullWeekdaysParse[a].test(e))return a;else if(n&&t==="ddd"&&this._shortWeekdaysParse[a].test(e))return a;else if(n&&t==="dd"&&this._minWeekdaysParse[a].test(e))return a;else if(!n&&this._weekdaysParse[a].test(e))return a}}function $t(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();if(e!=null){e=Yt(e,this.localeData());return this.add(e-t,"d")}else return t}function Jt(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Qt(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=It(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Xt(e){if(this._weekdaysParseExact){if(!l(this,"_weekdaysRegex"))tn.call(this);if(e)return this._weekdaysStrictRegex;else return this._weekdaysRegex}else{if(!l(this,"_weekdaysRegex"))this._weekdaysRegex=zt;return this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex}}function Zt(e){if(this._weekdaysParseExact){if(!l(this,"_weekdaysRegex"))tn.call(this);if(e)return this._weekdaysShortStrictRegex;else return this._weekdaysShortRegex}else{if(!l(this,"_weekdaysShortRegex"))this._weekdaysShortRegex=Wt;return this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}function en(e){if(this._weekdaysParseExact){if(!l(this,"_weekdaysRegex"))tn.call(this);if(e)return this._weekdaysMinStrictRegex;else return this._weekdaysMinRegex}else{if(!l(this,"_weekdaysMinRegex"))this._weekdaysMinRegex=Bt;return this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function tn(){function e(e,t){return t.length-e.length}var t=[],n=[],a=[],r=[],o,i,s,l,u;for(o=0;o<7;o++){i=d([2e3,1]).day(o);s=b(this.weekdaysMin(i,""));l=b(this.weekdaysShort(i,""));u=b(this.weekdays(i,""));t.push(s);n.push(l);a.push(u);r.push(s);r.push(l);r.push(u)}t.sort(e);n.sort(e);a.sort(e);r.sort(e);this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function nn(){return this.hours()%12||12}function an(){return this.hours()||24}function rn(e,t){a(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function on(e,t){return t._meridiemParse}function sn(e){return(e+"").toLowerCase().charAt(0)==="p"}a("H",["HH",2],0,"hour"),a("h",["hh",2],0,nn),a("k",["kk",2],0,an),a("hmm",0,0,function(){return""+nn.apply(this)+o(this.minutes(),2)}),a("hmmss",0,0,function(){return""+nn.apply(this)+o(this.minutes(),2)+o(this.seconds(),2)}),a("Hmm",0,0,function(){return""+this.hours()+o(this.minutes(),2)}),a("Hmmss",0,0,function(){return""+this.hours()+o(this.minutes(),2)+o(this.seconds(),2)}),rn("a",true),rn("A",false),t("hour","h"),n("hour",13),_("a",on),_("A",on),_("H",v),_("h",v),_("k",v),_("HH",v,r),_("hh",v,r),_("kk",v,r),_("hmm",Re),_("hmmss",He),_("Hmm",Re),_("Hmmss",He),w(["H","HH"],E),w(["k","kk"],function(e,t,n){var a=y(e);t[E]=a===24?0:a}),w(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e);n._meridiem=e}),w(["h","hh"],function(e,t,n){t[E]=y(e);f(n).bigHour=true}),w("hmm",function(e,t,n){var a=e.length-2;t[E]=y(e.substr(0,a));t[x]=y(e.substr(a));f(n).bigHour=true}),w("hmmss",function(e,t,n){var a=e.length-4,r=e.length-2;t[E]=y(e.substr(0,a));t[x]=y(e.substr(a,2));t[C]=y(e.substr(r));f(n).bigHour=true}),w("Hmm",function(e,t,n){var a=e.length-2;t[E]=y(e.substr(0,a));t[x]=y(e.substr(a))}),w("Hmmss",function(e,t,n){var a=e.length-4,r=e.length-2;t[E]=y(e.substr(0,a));t[x]=y(e.substr(a,2));t[C]=y(e.substr(r))});var ln,un=Le("Hours",true);function dn(e,t,n){if(e>11)return n?"pm":"PM";else return n?"am":"AM"}var cn={calendar:re,longDateFormat:he,invalidDate:ge,ordinal:ve,dayOfMonthOrdinalParse:_e,relativeTime:we,months:it,monthsShort:st,week:Ot,weekdays:Rt,weekdaysMin:Ft,weekdaysShort:Ht,meridiemParse:/[ap]\.?m?\.?/i},O={},fn={},pn;function hn(e,t){var n,a=Math.min(e.length,t.length);for(n=0;n0){r=vn(o.slice(0,n).join("-"));if(r)return r;if(a&&a.length>=n&&hn(o,a)>=n-1)break;n--}t++}return pn}function yn(e){return e.match("^[^/\\\\]*$")!=null}function vn(t){var e=null,n;if(O[t]===undefined&&typeof di!=="undefined"&&di&&di.exports&&yn(t))try{e=pn._abbr;n=ci;fi(533)("./"+t);_n(e)}catch(e){O[t]=null}return O[t]}function _n(e,t){var n;if(e){if(s(t))n=Mn(e);else n=bn(e,t);if(n)pn=n;else if(typeof console!=="undefined"&&console.warn)console.warn("Locale "+e+" not found. Did you forget to load it?")}return pn._abbr}function bn(e,t){if(t!==null){var n,a=cn;t.abbr=e;if(O[e]!=null){ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change "+"an existing locale. moment.defineLocale(localeName, "+"config) should only be used for creating a new locale "+"See http://momentjs.com/guides/#/warnings/define-locale/ for more info.");a=O[e]._config}else if(t.parentLocale!=null)if(O[t.parentLocale]!=null)a=O[t.parentLocale]._config;else{n=vn(t.parentLocale);if(n!=null)a=n._config;else{if(!fn[t.parentLocale])fn[t.parentLocale]=[];fn[t.parentLocale].push({name:e,config:t});return null}}O[e]=new ae(ne(a,t));if(fn[e])fn[e].forEach(function(e){bn(e.name,e.config)});_n(e);return O[e]}else{delete O[e];return null}}function wn(e,t){if(t!=null){var n,a,r=cn;if(O[e]!=null&&O[e].parentLocale!=null)O[e].set(ne(O[e]._config,t));else{a=vn(e);if(a!=null)r=a._config;t=ne(r,t);if(a==null)t.abbr=e;n=new ae(t);n.parentLocale=O[e];O[e]=n}_n(e)}else if(O[e]!=null)if(O[e].parentLocale!=null){O[e]=O[e].parentLocale;if(e===_n())_n(e)}else if(O[e]!=null)delete O[e];return O[e]}function Mn(e){var t;if(e&&e._locale&&e._locale._abbr)e=e._locale._abbr;if(!e)return pn;if(!i(e)){t=vn(e);if(t)return t;e=[e]}return gn(e)}function kn(){return Z(O)}function Sn(e){var t,n=e._a;if(n&&f(e).overflow===-2){t=n[k]<0||n[k]>11?k:n[S]<1||n[S]>ot(n[M],n[k])?S:n[E]<0||n[E]>24||n[E]===24&&(n[x]!==0||n[C]!==0||n[tt]!==0)?E:n[x]<0||n[x]>59?x:n[C]<0||n[C]>59?C:n[tt]<0||n[tt]>999?tt:-1;if(f(e)._overflowDayOfYear&&(tS))t=S;if(f(e)._overflowWeeks&&t===-1)t=nt;if(f(e)._overflowWeekday&&t===-1)t=at;f(e).overflow=t}return e}var En=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/Z|[+-]\d\d(?::?\d\d)?/,Tn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,false],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,false],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,false],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,false],["YYYY",/\d{4}/,false]],Ln=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],On=/^\/?Date\((-?\d+)/i,Dn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Nn={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Pn(e){var t,n,a=e._i,r=En.exec(a)||xn.exec(a),o,i,s,l,u=Tn.length,d=Ln.length;if(r){f(e).iso=true;for(t=0,n=u;twt(i)||e._dayOfYear===0)f(e)._overflowDayOfYear=true;n=Et(i,0,e._dayOfYear);e._a[k]=n.getUTCMonth();e._a[S]=n.getUTCDate()}for(t=0;t<3&&e._a[t]==null;++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=e._a[t]==null?t===2?1:0:e._a[t];if(e._a[E]===24&&e._a[x]===0&&e._a[C]===0&&e._a[tt]===0){e._nextDay=true;e._a[E]=0}e._d=(e._useUTC?Et:St).apply(null,a);o=e._useUTC?e._d.getUTCDay():e._d.getDay();if(e._tzm!=null)e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm);if(e._nextDay)e._a[E]=24;if(e._w&&typeof e._w.d!=="undefined"&&e._w.d!==o)f(e).weekdayMismatch=true}function Un(e){var t,n,a,r,o,i,s,l,u;t=e._w;if(t.GG!=null||t.W!=null||t.E!=null){o=1;i=4;n=zn(t.GG,e._a[M],Tt(D(),1,4).year);a=zn(t.W,1);r=zn(t.E,1);if(r<1||r>7)l=true}else{o=e._locale._week.dow;i=e._locale._week.doy;u=Tt(D(),o,i);n=zn(t.gg,e._a[M],u.year);a=zn(t.w,u.week);if(t.d!=null){r=t.d;if(r<0||r>6)l=true}else if(t.e!=null){r=t.e+o;if(t.e<0||t.e>6)l=true}else r=o}if(a<1||a>L(n,o,i))f(e)._overflowWeeks=true;else if(l!=null)f(e)._overflowWeekday=true;else{s=Ct(n,a,r,o,i);e._a[M]=s.year;e._dayOfYear=s.dayOfYear}}function Vn(e){if(e._f===c.ISO_8601){Pn(e);return}if(e._f===c.RFC_2822){Hn(e);return}e._a=[];f(e).empty=true;var t=""+e._i,n,a,r,o,i,s=t.length,l=0,u,d;r=pe(e._f,e._locale).match(ie)||[];d=r.length;for(n=0;n0)f(e).unusedInput.push(i);t=t.slice(t.indexOf(a)+a.length);l+=a.length}if(ue[o]){if(a)f(e).empty=false;else f(e).unusedTokens.push(o);et(o,a,e)}else if(e._strict&&!a)f(e).unusedTokens.push(o)}f(e).charsLeftOver=s-l;if(t.length>0)f(e).unusedInput.push(t);if(e._a[E]<=12&&f(e).bigHour===true&&e._a[E]>0)f(e).bigHour=undefined;f(e).parsedDateParts=e._a.slice(0);f(e).meridiem=e._meridiem;e._a[E]=Kn(e._locale,e._a[E],e._meridiem);u=f(e).era;if(u!==null)e._a[M]=e._locale.erasConvertYear(u,e._a[M]);Bn(e);Sn(e)}function Kn(e,t,n){var a;if(n==null)return t;if(e.meridiemHour!=null)return e.meridiemHour(t,n);else if(e.isPM!=null){a=e.isPM(n);if(a&&t<12)t+=12;if(!a&&t===12)t=0;return t}else return t}function qn(e){var t,n,a,r,o,i,s=false,l=e._f.length;if(l===0){f(e).invalidFormat=true;e._d=new Date(NaN);return}for(r=0;rthis?this:e;else return K()});function ta(e,t){var n,a;if(t.length===1&&i(t[0]))t=t[0];if(!t.length)return D();n=t[0];for(a=1;athis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ea(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={},t;$(e,this);e=Jn(e);if(e._a){t=e._isUTC?d(e._a):D(e._a);this._isDSTShifted=this.isValid()&&fa(e._a,t.toArray())>0}else this._isDSTShifted=false;return this._isDSTShifted}function xa(){return this.isValid()?!this._isUTC:false}function Ca(){return this.isValid()?this._isUTC:false}function Ta(){return this.isValid()?this._isUTC&&this._offset===0:false}c.updateOffset=function(){};var La=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Oa=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function N(e,t){var n=e,a=null,r,o,i;if(da(e))n={ms:e._milliseconds,d:e._days,M:e._months};else if(u(e)||!isNaN(+e)){n={};if(t)n[t]=+e;else n.milliseconds=+e}else if(a=La.exec(e)){r=a[1]==="-"?-1:1;n={y:0,d:y(a[S])*r,h:y(a[E])*r,m:y(a[x])*r,s:y(a[C])*r,ms:y(ca(a[tt]*1e3))*r}}else if(a=Oa.exec(e)){r=a[1]==="-"?-1:1;n={y:Da(a[2],r),M:Da(a[3],r),w:Da(a[4],r),d:Da(a[5],r),h:Da(a[6],r),m:Da(a[7],r),s:Da(a[8],r)}}else if(n==null)n={};else if(typeof n==="object"&&("from"in n||"to"in n)){i=Pa(D(n.from),D(n.to));n={};n.ms=i.milliseconds;n.M=i.months}o=new ua(n);if(da(e)&&l(e,"_locale"))o._locale=e._locale;if(da(e)&&l(e,"_isValid"))o._isValid=e._isValid;return o}function Da(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Na(e,t){var n={};n.months=t.month()-e.month()+(t.year()-e.year())*12;if(e.clone().add(n.months,"M").isAfter(t))--n.months;n.milliseconds=+t-+e.clone().add(n.months,"M");return n}function Pa(e,t){var n;if(!(e.isValid()&&t.isValid()))return{milliseconds:0,months:0};t=ga(t,e);if(e.isBefore(t))n=Na(e,t);else{n=Na(t,e);n.milliseconds=-n.milliseconds;n.months=-n.months}return n}function ja(r,o){return function(e,t){var n,a;if(t!==null&&!isNaN(+t)){ee(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). "+"See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.");a=e;e=t;t=a}n=N(e,t);Ya(this,n,r);return this}}function Ya(e,t,n,a){var r=t._milliseconds,o=ca(t._days),i=ca(t._months);if(!e.isValid())return;a=a==null?true:a;if(i)mt(e,Oe(e,"Month")+i*n);if(o)De(e,"Date",Oe(e,"Date")+o*n);if(r)e._d.setTime(e._d.valueOf()+r*n);if(a)c.updateOffset(e,o||i)}N.fn=ua.prototype,N.invalid=la;var Ia=ja(1,"add"),Aa=ja(-1,"subtract");function Ra(e){return typeof e==="string"||e instanceof String}function Ha(e){return p(e)||z(e)||Ra(e)||u(e)||za(e)||Fa(e)||e===null||e===undefined}function Fa(e){var t=H(e)&&!F(e),n=false,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,o,i=a.length;for(r=0;rn.valueOf();else return n.valueOf()9999)return fe(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(h(Date.prototype.toISOString))if(t)return this.toDate().toISOString();else return new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",fe(n,"Z"));return fe(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function nr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,a,r,o;if(!this.isLocal()){e=this.utcOffset()===0?"moment.utc":"moment.parseZone";t="Z"}n="["+e+'("]';a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY";r="-MM-DD[T]HH:mm:ss.SSS";o=t+'[")]';return this.format(n+a+r+o)}function ar(e){if(!e)e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat;var t=fe(this,e);return this.localeData().postformat(t)}function rr(e,t){if(this.isValid()&&(p(e)&&e.isValid()||D(e).isValid()))return N({to:this,from:e}).locale(this.locale()).humanize(!t);else return this.localeData().invalidDate()}function or(e){return this.from(D(),e)}function ir(e,t){if(this.isValid()&&(p(e)&&e.isValid()||D(e).isValid()))return N({from:this,to:e}).locale(this.locale()).humanize(!t);else return this.localeData().invalidDate()}function sr(e){return this.to(D(),e)}function lr(e){var t;if(e===undefined)return this._locale._abbr;else{t=Mn(e);if(t!=null)this._locale=t;return this}}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ur=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){if(e===undefined)return this.localeData();else return this.locale(e)});function dr(){return this._locale}var cr=1e3,fr=60*cr,pr=60*fr,hr=(365*400+97)*24*pr;function mr(e,t){return(e%t+t)%t}function gr(e,t,n){if(e<100&&e>=0)return new Date(e+400,t,n)-hr;else return new Date(e,t,n).valueOf()}function yr(e,t,n){if(e<100&&e>=0)return Date.UTC(e+400,t,n)-hr;else return Date.UTC(e,t,n)}function vr(e){var t,n;e=m(e);if(e===undefined||e==="millisecond"||!this.isValid())return this;n=this._isUTC?yr:gr;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf();t-=mr(t+(this._isUTC?0:this.utcOffset()*fr),pr);break;case"minute":t=this._d.valueOf();t-=mr(t,fr);break;case"second":t=this._d.valueOf();t-=mr(t,cr);break}this._d.setTime(t);c.updateOffset(this,true);return this}function _r(e){var t,n;e=m(e);if(e===undefined||e==="millisecond"||!this.isValid())return this;n=this._isUTC?yr:gr;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf();t+=pr-mr(t+(this._isUTC?0:this.utcOffset()*fr),pr)-1;break;case"minute":t=this._d.valueOf();t+=fr-mr(t,fr)-1;break;case"second":t=this._d.valueOf();t+=cr-mr(t,cr)-1;break}this._d.setTime(t);c.updateOffset(this,true);return this}function br(){return this._d.valueOf()-(this._offset||0)*6e4}function wr(){return Math.floor(this.valueOf()/1e3)}function Mr(){return new Date(this.valueOf())}function kr(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Sr(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Er(){return this.isValid()?this.toISOString():null}function xr(){return V(this)}function Cr(){return B({},f(this))}function Tr(){return f(this).overflow}function Lr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Or(e,t){var n,a,r,o=this._eras||Mn("en")._eras;for(n=0,a=o.length;n=0)return o[a]}}function Nr(e,t){var n=e.since<=e.until?+1:-1;if(t===undefined)return c(e.since).year();else return c(e.since).year()+(t-e.offset)*n}function Pr(){var e,t,n,a=this.localeData().eras();for(e=0,t=a.length;eo)t=o;return Zr.call(this,e,t,n,a,r)}}function Zr(e,t,n,a,r){var o=Ct(e,t,n,a,r),i=Et(o.year,0,o.dayOfYear);this.year(i.getUTCFullYear());this.month(i.getUTCMonth());this.date(i.getUTCDate());return this}function eo(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}a("N",0,0,"eraAbbr"),a("NN",0,0,"eraAbbr"),a("NNN",0,0,"eraAbbr"),a("NNNN",0,0,"eraName"),a("NNNNN",0,0,"eraNarrow"),a("y",["y",1],"yo","eraYear"),a("y",["yy",2],0,"eraYear"),a("y",["yyy",3],0,"eraYear"),a("y",["yyyy",4],0,"eraYear"),_("N",Fr),_("NN",Fr),_("NNN",Fr),_("NNNN",zr),_("NNNNN",Wr),w(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,a){var r=n._locale.erasParse(e,a,n._strict);if(r)f(n).era=r;else f(n).invalidEra=e}),_("y",Be),_("yy",Be),_("yyy",Be),_("yyyy",Be),_("yo",Br),w(["y","yy","yyy","yyyy"],M),w(["yo"],function(e,t,n,a){var r;if(n._locale._eraYearOrdinalRegex)r=e.match(n._locale._eraYearOrdinalRegex);if(n._locale.eraYearOrdinalParse)t[M]=n._locale.eraYearOrdinalParse(e,r);else t[M]=parseInt(e,10)}),a(0,["gg",2],0,function(){return this.weekYear()%100}),a(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Vr("gggg","weekYear"),Vr("ggggg","weekYear"),Vr("GGGG","isoWeekYear"),Vr("GGGGG","isoWeekYear"),t("weekYear","gg"),t("isoWeekYear","GG"),n("weekYear",1),n("isoWeekYear",1),_("G",Ue),_("g",Ue),_("GG",v,r),_("gg",v,r),_("GGGG",ze,Ie),_("gggg",ze,Ie),_("GGGGG",We,Ae),_("ggggg",We,Ae),Ze(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,a){t[a.substr(0,2)]=y(e)}),Ze(["gg","GG"],function(e,t,n,a){t[a]=c.parseTwoDigitYear(e)}),a("Q",0,"Qo","quarter"),t("quarter","Q"),n("quarter",7),_("Q",je),w("Q",function(e,t){t[k]=(y(e)-1)*3}),a("D",["DD",2],"Do","date"),t("date","D"),n("date",9),_("D",v),_("DD",v,r),_("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),w(["D","DD"],S),w("Do",function(e,t){t[S]=y(e.match(v)[0])});var to=Le("Date",true);function no(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}a("DDD",["DDDD",3],"DDDo","dayOfYear"),t("dayOfYear","DDD"),n("dayOfYear",4),_("DDD",Fe),_("DDDD",Ye),w(["DDD","DDDD"],function(e,t,n){n._dayOfYear=y(e)}),a("m",["mm",2],0,"minute"),t("minute","m"),n("minute",14),_("m",v),_("mm",v,r),w(["m","mm"],x);var ao=Le("Minutes",false),ro=(a("s",["ss",2],0,"second"),t("second","s"),n("second",15),_("s",v),_("ss",v,r),w(["s","ss"],C),Le("Seconds",false)),oo,io;for(a("S",0,0,function(){return~~(this.millisecond()/100)}),a(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),a(0,["SSS",3],0,"millisecond"),a(0,["SSSS",4],0,function(){return this.millisecond()*10}),a(0,["SSSSS",5],0,function(){return this.millisecond()*100}),a(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),a(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),a(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),a(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),t("millisecond","ms"),n("millisecond",16),_("S",Fe,je),_("SS",Fe,r),_("SSS",Fe,Ye),oo="SSSS";oo.length<=9;oo+="S")_(oo,Be);function so(e,t){t[tt]=y(("0."+e)*1e3)}for(oo="S";oo.length<=9;oo+="S")w(oo,so);function lo(){return this._isUTC?"UTC":""}function uo(){return this._isUTC?"Coordinated Universal Time":""}io=Le("Milliseconds",false),a("z",0,0,"zoneAbbr"),a("zz",0,0,"zoneName");var P=J.prototype;if(P.add=Ia,P.calendar=Ua,P.clone=Va,P.diff=Xa,P.endOf=_r,P.format=ar,P.from=rr,P.fromNow=or,P.to=ir,P.toNow=sr,P.get=Ne,P.invalidAt=Tr,P.isAfter=Ka,P.isBefore=qa,P.isBetween=Ga,P.isSame=$a,P.isSameOrAfter=Ja,P.isSameOrBefore=Qa,P.isValid=xr,P.lang=ur,P.locale=lr,P.localeData=dr,P.max=ea,P.min=Zn,P.parsingFlags=Cr,P.set=Pe,P.startOf=vr,P.subtract=Aa,P.toArray=kr,P.toObject=Sr,P.toDate=Mr,P.toISOString=tr,P.inspect=nr,typeof Symbol!=="undefined"&&Symbol.for!=null)P[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"};function co(e){return D(e*1e3)}function fo(){return D.apply(null,arguments).parseZone()}function po(e){return e}P.toJSON=Er,P.toString=er,P.unix=wr,P.valueOf=br,P.creationData=Lr,P.eraName=Pr,P.eraNarrow=jr,P.eraAbbr=Yr,P.eraYear=Ir,P.year=Mt,P.isLeapYear=kt,P.weekYear=Kr,P.isoWeekYear=qr,P.quarter=P.quarters=eo,P.month=gt,P.daysInMonth=yt,P.week=P.weeks=Pt,P.isoWeek=P.isoWeeks=jt,P.weeksInYear=Jr,P.weeksInWeekYear=Qr,P.isoWeeksInYear=Gr,P.isoWeeksInISOWeekYear=$r,P.date=to,P.day=P.days=$t,P.weekday=Jt,P.isoWeekday=Qt,P.dayOfYear=no,P.hour=P.hours=un,P.minute=P.minutes=ao,P.second=P.seconds=ro,P.millisecond=P.milliseconds=io,P.utcOffset=va,P.utc=ba,P.local=wa,P.parseZone=Ma,P.hasAlignedHourOffset=ka,P.isDST=Sa,P.isLocal=xa,P.isUtcOffset=Ca,P.isUtc=Ta,P.isUTC=Ta,P.zoneAbbr=lo,P.zoneName=uo,P.dates=e("dates accessor is deprecated. Use date instead.",to),P.months=e("months accessor is deprecated. Use month instead",gt),P.years=e("years accessor is deprecated. Use year instead",Mt),P.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",_a),P.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ea);var j=ae.prototype;function ho(e,t,n,a){var r=Mn(),o=d().set(a,t);return r[n](o,e)}function mo(e,t,n){if(u(e)){t=e;e=undefined}e=e||"";if(t!=null)return ho(e,t,n,"month");var a,r=[];for(a=0;a<12;a++)r[a]=ho(e,a,n,"month");return r}function go(e,t,n,a){if(typeof e==="boolean"){if(u(t)){n=t;t=undefined}t=t||""}else{t=e;n=t;e=false;if(u(t)){n=t;t=undefined}t=t||""}var r=Mn(),o=e?r._week.dow:0,i,s=[];if(n!=null)return ho(t,(n+o)%7,a,"day");for(i=0;i<7;i++)s[i]=ho(t,(i+o)%7,a,"day");return s}function yo(e,t){return mo(e,t,"months")}function vo(e,t){return mo(e,t,"monthsShort")}function _o(e,t,n){return go(e,t,n,"weekdays")}function bo(e,t,n){return go(e,t,n,"weekdaysShort")}function wo(e,t,n){return go(e,t,n,"weekdaysMin")}j.calendar=oe,j.longDateFormat=me,j.invalidDate=ye,j.ordinal=be,j.preparse=po,j.postformat=po,j.relativeTime=Me,j.pastFuture=ke,j.set=te,j.eras=Or,j.erasParse=Dr,j.erasConvertYear=Nr,j.erasAbbrRegex=Rr,j.erasNameRegex=Ar,j.erasNarrowRegex=Hr,j.months=ct,j.monthsShort=ft,j.monthsParse=ht,j.monthsRegex=_t,j.monthsShortRegex=vt,j.week=Lt,j.firstDayOfYear=Nt,j.firstDayOfWeek=Dt,j.weekdays=Ut,j.weekdaysMin=Kt,j.weekdaysShort=Vt,j.weekdaysParse=Gt,j.weekdaysRegex=Xt,j.weekdaysShortRegex=Zt,j.weekdaysMinRegex=en,j.isPM=sn,j.meridiem=dn,_n("en",{eras:[{since:"0001-01-01",until:+Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=y(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),c.lang=e("moment.lang is deprecated. Use moment.locale instead.",_n),c.langData=e("moment.langData is deprecated. Use moment.localeData instead.",Mn);var Mo=Math.abs;function ko(){var e=this._data;this._milliseconds=Mo(this._milliseconds);this._days=Mo(this._days);this._months=Mo(this._months);e.milliseconds=Mo(e.milliseconds);e.seconds=Mo(e.seconds);e.minutes=Mo(e.minutes);e.hours=Mo(e.hours);e.months=Mo(e.months);e.years=Mo(e.years);return this}function So(e,t,n,a){var r=N(t,n);e._milliseconds+=a*r._milliseconds;e._days+=a*r._days;e._months+=a*r._months;return e._bubble()}function Eo(e,t){return So(this,e,t,1)}function xo(e,t){return So(this,e,t,-1)}function Co(e){if(e<0)return Math.floor(e);else return Math.ceil(e)}function To(){var e=this._milliseconds,t=this._days,n=this._months,a=this._data,r,o,i,s,l;if(!(e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0)){e+=Co(Oo(n)+t)*864e5;t=0;n=0}a.milliseconds=e%1e3;r=g(e/1e3);a.seconds=r%60;o=g(r/60);a.minutes=o%60;i=g(o/60);a.hours=i%24;t+=g(i/24);l=g(Lo(t));n+=l;t-=Co(Oo(l));s=g(n/12);n%=12;a.days=t;a.months=n;a.years=s;return this}function Lo(e){return e*4800/146097}function Oo(e){return e*146097/4800}function Do(e){if(!this.isValid())return NaN;var t,n,a=this._milliseconds;e=m(e);if(e==="month"||e==="quarter"||e==="year"){t=this._days+a/864e5;n=this._months+Lo(t);switch(e){case"month":return n;case"quarter":return n/3;case"year":return n/12}}else{t=this._days+Math.round(Oo(this._months));switch(e){case"week":return t/7+a/6048e5;case"day":return t+a/864e5;case"hour":return t*24+a/36e5;case"minute":return t*1440+a/6e4;case"second":return t*86400+a/1e3;case"millisecond":return Math.floor(t*864e5)+a;default:throw new Error("Unknown unit "+e)}}}function No(){if(!this.isValid())return NaN;return this._milliseconds+this._days*864e5+this._months%12*2592e6+y(this._months/12)*31536e6}function Po(e){return function(){return this.as(e)}}var jo=Po("ms"),Yo=Po("s"),Io=Po("m"),Ao=Po("h"),Ro=Po("d"),Ho=Po("w"),Fo=Po("M"),zo=Po("Q"),Wo=Po("y");function Bo(){return N(this)}function Uo(e){e=m(e);return this.isValid()?this[e+"s"]():NaN}function Vo(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ko=Vo("milliseconds"),qo=Vo("seconds"),Go=Vo("minutes"),$o=Vo("hours"),Jo=Vo("days"),Qo=Vo("months"),Xo=Vo("years");function Zo(){return g(this.days()/7)}var ei=Math.round,ti={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,t,n,a,r){return r.relativeTime(t||1,!!n,e,a)}function ai(e,t,n,a){var r=N(e).abs(),o=ei(r.as("s")),i=ei(r.as("m")),s=ei(r.as("h")),l=ei(r.as("d")),u=ei(r.as("M")),d=ei(r.as("w")),c=ei(r.as("y")),f=o<=n.ss&&["s",o]||o0;f[4]=a;return ni.apply(null,f)}function ri(e){if(e===undefined)return ei;if(typeof e==="function"){ei=e;return true}return false}function oi(e,t){if(ti[e]===undefined)return false;if(t===undefined)return ti[e];ti[e]=t;if(e==="s")ti.ss=t-1;return true}function ii(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=false,a=ti,r,o;if(typeof e==="object"){t=e;e=false}if(typeof e==="boolean")n=e;if(typeof t==="object"){a=Object.assign({},ti,t);if(t.s!=null&&t.ss==null)a.ss=t.s-1}r=this.localeData();o=ai(this,!n,a,r);if(n)o=r.pastFuture(+this,o);return r.postformat(o)}var si=Math.abs;function li(e){return(e>0)-(e<0)||+e}function ui(){if(!this.isValid())return this.localeData().invalidDate();var e=si(this._milliseconds)/1e3,t=si(this._days),n=si(this._months),a,r,o,i,s=this.asSeconds(),l,u,d,c;if(!s)return"P0D";a=g(e/60);r=g(a/60);e%=60;a%=60;o=g(n/12);n%=12;i=e?e.toFixed(3).replace(/\.?0+$/,""):"";l=s<0?"-":"";u=li(this._months)!==li(s)?"-":"";d=li(this._days)!==li(s)?"-":"";c=li(this._milliseconds)!==li(s)?"-":"";return l+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(r||a||e?"T":"")+(r?c+r+"H":"")+(a?c+a+"M":"")+(e?c+i+"S":"")}var Y=ua.prototype;return Y.isValid=sa,Y.abs=ko,Y.add=Eo,Y.subtract=xo,Y.as=Do,Y.asMilliseconds=jo,Y.asSeconds=Yo,Y.asMinutes=Io,Y.asHours=Ao,Y.asDays=Ro,Y.asWeeks=Ho,Y.asMonths=Fo,Y.asQuarters=zo,Y.asYears=Wo,Y.valueOf=No,Y._bubble=To,Y.clone=Bo,Y.get=Uo,Y.milliseconds=Ko,Y.seconds=qo,Y.minutes=Go,Y.hours=$o,Y.days=Jo,Y.weeks=Zo,Y.months=Qo,Y.years=Xo,Y.humanize=ii,Y.toISOString=ui,Y.toString=ui,Y.toJSON=ui,Y.locale=lr,Y.localeData=dr,Y.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ui),Y.lang=ur,a("X",0,0,"unix"),a("x",0,0,"valueOf"),_("x",Ue),_("X",qe),w("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),w("x",function(e,t,n){n._d=new Date(y(e))}), +ci.exports=function(){"use strict";var I,A;function d(){return I.apply(null,arguments)}function R(e){I=e}function i(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function H(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function F(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;else{var t;for(t in e)if(l(e,t))return false;return true}}function s(e){return e===void 0}function u(e){return typeof e==="number"||Object.prototype.toString.call(e)==="[object Number]"}function z(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function W(e,t){var n=[],a,r=e.length;for(a=0;a>>0,a;for(a=0;a0)for(n=0;n=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+a}var ie=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,se=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,le={},ue={};function a(e,t,n,a){var r=a;if(typeof a==="string")r=function(){return this[a]()};if(e)ue[e]=r;if(t)ue[t[0]]=function(){return o(r.apply(this,arguments),t[1],t[2])};if(n)ue[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)}}function ce(e){if(e.match(/\[[\s\S]/))return e.replace(/^\[|\]$/g,"");return e.replace(/\\/g,"")}function de(a){var r=a.match(ie),e,o;for(e=0,o=r.length;e=0&&se.test(e)){e=e.replace(se,a);se.lastIndex=0;n-=1}return e}var he={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function me(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];if(t||!n)return t;this._longDateFormat[e]=n.match(ie).map(function(e){if(e==="MMMM"||e==="MM"||e==="DD"||e==="dddd")return e.slice(1);return e}).join("");return this._longDateFormat[e]}var ge="Invalid date";function ye(){return this._invalidDate}var ve="%d",_e=/\d{1,2}/;function be(e){return this._ordinal.replace("%d",e)}var we={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Me(e,t,n,a){var r=this._relativeTime[n];return h(r)?r(e,t,n,a):r.replace(/%d/i,e)}function Se(e,t){var n=this._relativeTime[e>0?"future":"past"];return h(n)?n(t):n.replace(/%s/i,t)}var ke={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function m(e){return typeof e==="string"?ke[e]||ke[e.toLowerCase()]:undefined}function Ee(e){var t={},n,a;for(a in e)if(l(e,a)){n=m(a);if(n)t[n]=e[a]}return t}var xe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ce(e){var t=[],n;for(n in e)if(l(e,n))t.push({unit:n,priority:xe[n]});t.sort(function(e,t){return e.priority-t.priority});return t}var Te=/\d/,t=/\d\d/,Le=/\d{3}/,Oe=/\d{4}/,De=/[+-]?\d{6}/,n=/\d\d?/,Ne=/\d\d\d\d?/,je=/\d\d\d\d\d\d?/,Pe=/\d{1,3}/,Ye=/\d{1,4}/,Ie=/[+-]?\d{1,6}/,Ae=/\d+/,Re=/[+-]?\d+/,He=/Z|[+-]\d\d:?\d\d/gi,Fe=/Z|[+-]\d\d(?::?\d\d)?/gi,ze=/[+-]?\d+(\.\d{1,3})?/,We=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Be=/^[1-9]\d?/,Ue=/^([1-9]\d|\d)/,Ve;function r(e,n,a){Ve[e]=h(n)?n:function(e,t){return e&&a?a:n}}function Ke(e,t){if(!l(Ve,e))return new RegExp(qe(e));return Ve[e](t._strict,t._locale)}function qe(e){return g(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,a,r){return t||n||a||r}))}function g(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function y(e){if(e<0)return Math.ceil(e)||0;else return Math.floor(e)}function v(e){var t=+e,n=0;if(t!==0&&isFinite(t))n=y(t);return n}var Ve={},Ge={};function _(e,n){var t,a=n,r;if(typeof e==="string")e=[e];if(u(n))a=function(e,t){t[n]=v(e)};r=e.length;for(t=0;t68?1900:2e3)};var nt=rt("FullYear",true),x;function at(){return Qe(this.year())}function rt(t,n){return function(e){if(e!=null){it(this,t,e);d.updateOffset(this,n);return this}else return ot(this,t)}}function ot(e,t){if(!e.isValid())return NaN;var n=e._d,a=e._isUTC;switch(t){case"Milliseconds":return a?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return a?n.getUTCSeconds():n.getSeconds();case"Minutes":return a?n.getUTCMinutes():n.getMinutes();case"Hours":return a?n.getUTCHours():n.getHours();case"Date":return a?n.getUTCDate():n.getDate();case"Day":return a?n.getUTCDay():n.getDay();case"Month":return a?n.getUTCMonth():n.getMonth();case"FullYear":return a?n.getUTCFullYear():n.getFullYear();default:return NaN}}function it(e,t,n){var a,r,o,i,s;if(!e.isValid()||isNaN(n))return;a=e._d;r=e._isUTC;switch(t){case"Milliseconds":return void(r?a.setUTCMilliseconds(n):a.setMilliseconds(n));case"Seconds":return void(r?a.setUTCSeconds(n):a.setSeconds(n));case"Minutes":return void(r?a.setUTCMinutes(n):a.setMinutes(n));case"Hours":return void(r?a.setUTCHours(n):a.setHours(n));case"Date":return void(r?a.setUTCDate(n):a.setDate(n));case"FullYear":break;default:return}o=n;i=e.month();s=e.date();s=s===29&&i===1&&!Qe(o)?28:s;void(r?a.setUTCFullYear(o,i,s):a.setFullYear(o,i,s))}function st(e){e=m(e);if(h(this[e]))return this[e]();return this}function lt(e,t){if(typeof e==="object"){e=Ee(e);var n=Ce(e),a,r=n.length;for(a=0;a=0){s=new Date(e+400,t,n,a,r,o,i);if(isFinite(s.getFullYear()))s.setFullYear(e)}else s=new Date(e,t,n,a,r,o,i);return s}function Ct(e){var t,n;if(e<100&&e>=0){n=Array.prototype.slice.call(arguments);n[0]=e+400;t=new Date(Date.UTC.apply(null,n));if(isFinite(t.getUTCFullYear()))t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Tt(e,t,n){var a=7+t-n,r=(7+Ct(e,0,a).getUTCDay()-t)%7;return-r+a-1}function Lt(e,t,n,a,r){var o=(7+n-a)%7,i=Tt(e,a,r),s=1+7*(t-1)+o+i,l,u;if(s<=0){l=e-1;u=tt(l)+s}else if(s>tt(e)){l=e+1;u=s-tt(e)}else{l=e;u=s}return{year:l,dayOfYear:u}}function Ot(e,t,n){var a=Tt(e.year(),t,n),r=Math.floor((e.dayOfYear()-a-1)/7)+1,o,i;if(r<1){i=e.year()-1;o=r+C(i,t,n)}else if(r>C(e.year(),t,n)){o=r-C(e.year(),t,n);i=e.year()+1}else{i=e.year();o=r}return{week:o,year:i}}function C(e,t,n){var a=Tt(e,t,n),r=Tt(e+1,t,n);return(tt(e)-a+r)/7}function Dt(e){return Ot(e,this._week.dow,this._week.doy).week}a("w",["ww",2],"wo","week"),a("W",["WW",2],"Wo","isoWeek"),r("w",n,Be),r("ww",n,t),r("W",n,Be),r("WW",n,t),$e(["w","ww","W","WW"],function(e,t,n,a){t[a.substr(0,1)]=v(e)});var Nt={dow:0,doy:6};function jt(){return this._week.dow}function Pt(){return this._week.doy}function Yt(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function It(e){var t=Ot(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}function At(e,t){if(typeof e!=="string")return e;if(!isNaN(e))return parseInt(e,10);e=t.weekdaysParse(e);if(typeof e==="number")return e;return null}function Rt(e,t){if(typeof e==="string")return t.weekdaysParse(e)%7||7;return isNaN(e)?null:e}function Ht(e,t){return e.slice(t,7).concat(e.slice(0,t))}a("d",0,"do","day"),a("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),a("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),a("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),a("e",0,0,"weekday"),a("E",0,0,"isoWeekday"),r("d",n),r("e",n),r("E",n),r("dd",function(e,t){return t.weekdaysMinRegex(e)}),r("ddd",function(e,t){return t.weekdaysShortRegex(e)}),r("dddd",function(e,t){return t.weekdaysRegex(e)}),$e(["dd","ddd","dddd"],function(e,t,n,a){var r=n._locale.weekdaysParse(e,a,n._strict);if(r!=null)t.d=r;else f(n).invalidWeekday=e}),$e(["d","e","E"],function(e,t,n,a){t[a]=v(e)});var Ft="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),zt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Wt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Bt=We,Ut=We,Vt=We;function Kt(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&e!==true&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===true?Ht(n,this._week.dow):e?n[e.day()]:n}function qt(e){return e===true?Ht(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Gt(e){return e===true?Ht(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function $t(e,t,n){var a,r,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(a=0;a<7;++a){o=c([2e3,1]).day(a);this._minWeekdaysParse[a]=this.weekdaysMin(o,"").toLocaleLowerCase();this._shortWeekdaysParse[a]=this.weekdaysShort(o,"").toLocaleLowerCase();this._weekdaysParse[a]=this.weekdays(o,"").toLocaleLowerCase()}}if(n)if(t==="dddd"){r=x.call(this._weekdaysParse,i);return r!==-1?r:null}else if(t==="ddd"){r=x.call(this._shortWeekdaysParse,i);return r!==-1?r:null}else{r=x.call(this._minWeekdaysParse,i);return r!==-1?r:null}else if(t==="dddd"){r=x.call(this._weekdaysParse,i);if(r!==-1)return r;r=x.call(this._shortWeekdaysParse,i);if(r!==-1)return r;r=x.call(this._minWeekdaysParse,i);return r!==-1?r:null}else if(t==="ddd"){r=x.call(this._shortWeekdaysParse,i);if(r!==-1)return r;r=x.call(this._weekdaysParse,i);if(r!==-1)return r;r=x.call(this._minWeekdaysParse,i);return r!==-1?r:null}else{r=x.call(this._minWeekdaysParse,i);if(r!==-1)return r;r=x.call(this._weekdaysParse,i);if(r!==-1)return r;r=x.call(this._shortWeekdaysParse,i);return r!==-1?r:null}}function Jt(e,t,n){var a,r,o;if(this._weekdaysParseExact)return $t.call(this,e,t,n);if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[]}for(a=0;a<7;a++){r=c([2e3,1]).day(a);if(n&&!this._fullWeekdaysParse[a]){this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i");this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i");this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")}if(!this._weekdaysParse[a]){o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,"");this._weekdaysParse[a]=new RegExp(o.replace(".",""),"i")}if(n&&t==="dddd"&&this._fullWeekdaysParse[a].test(e))return a;else if(n&&t==="ddd"&&this._shortWeekdaysParse[a].test(e))return a;else if(n&&t==="dd"&&this._minWeekdaysParse[a].test(e))return a;else if(!n&&this._weekdaysParse[a].test(e))return a}}function Qt(e){if(!this.isValid())return e!=null?this:NaN;var t=ot(this,"Day");if(e!=null){e=At(e,this.localeData());return this.add(e-t,"d")}else return t}function Xt(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Zt(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Rt(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function en(e){if(this._weekdaysParseExact){if(!l(this,"_weekdaysRegex"))an.call(this);if(e)return this._weekdaysStrictRegex;else return this._weekdaysRegex}else{if(!l(this,"_weekdaysRegex"))this._weekdaysRegex=Bt;return this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex}}function tn(e){if(this._weekdaysParseExact){if(!l(this,"_weekdaysRegex"))an.call(this);if(e)return this._weekdaysShortStrictRegex;else return this._weekdaysShortRegex}else{if(!l(this,"_weekdaysShortRegex"))this._weekdaysShortRegex=Ut;return this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}function nn(e){if(this._weekdaysParseExact){if(!l(this,"_weekdaysRegex"))an.call(this);if(e)return this._weekdaysMinStrictRegex;else return this._weekdaysMinRegex}else{if(!l(this,"_weekdaysMinRegex"))this._weekdaysMinRegex=Vt;return this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function an(){function e(e,t){return t.length-e.length}var t=[],n=[],a=[],r=[],o,i,s,l,u;for(o=0;o<7;o++){i=c([2e3,1]).day(o);s=g(this.weekdaysMin(i,""));l=g(this.weekdaysShort(i,""));u=g(this.weekdays(i,""));t.push(s);n.push(l);a.push(u);r.push(s);r.push(l);r.push(u)}t.sort(e);n.sort(e);a.sort(e);r.sort(e);this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function rn(){return this.hours()%12||12}function on(){return this.hours()||24}function sn(e,t){a(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function ln(e,t){return t._meridiemParse}function un(e){return(e+"").toLowerCase().charAt(0)==="p"}a("H",["HH",2],0,"hour"),a("h",["hh",2],0,rn),a("k",["kk",2],0,on),a("hmm",0,0,function(){return""+rn.apply(this)+o(this.minutes(),2)}),a("hmmss",0,0,function(){return""+rn.apply(this)+o(this.minutes(),2)+o(this.seconds(),2)}),a("Hmm",0,0,function(){return""+this.hours()+o(this.minutes(),2)}),a("Hmmss",0,0,function(){return""+this.hours()+o(this.minutes(),2)+o(this.seconds(),2)}),sn("a",true),sn("A",false),r("a",ln),r("A",ln),r("H",n,Ue),r("h",n,Be),r("k",n,Be),r("HH",n,t),r("hh",n,t),r("kk",n,t),r("hmm",Ne),r("hmmss",je),r("Hmm",Ne),r("Hmmss",je),_(["H","HH"],S),_(["k","kk"],function(e,t,n){var a=v(e);t[S]=a===24?0:a}),_(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e);n._meridiem=e}),_(["h","hh"],function(e,t,n){t[S]=v(e);f(n).bigHour=true}),_("hmm",function(e,t,n){var a=e.length-2;t[S]=v(e.substr(0,a));t[k]=v(e.substr(a));f(n).bigHour=true}),_("hmmss",function(e,t,n){var a=e.length-4,r=e.length-2;t[S]=v(e.substr(0,a));t[k]=v(e.substr(a,2));t[E]=v(e.substr(r));f(n).bigHour=true}),_("Hmm",function(e,t,n){var a=e.length-2;t[S]=v(e.substr(0,a));t[k]=v(e.substr(a))}),_("Hmmss",function(e,t,n){var a=e.length-4,r=e.length-2;t[S]=v(e.substr(0,a));t[k]=v(e.substr(a,2));t[E]=v(e.substr(r))});var cn,dn=rt("Hours",true);function fn(e,t,n){if(e>11)return n?"pm":"PM";else return n?"am":"AM"}var pn={calendar:re,longDateFormat:he,invalidDate:ge,ordinal:ve,dayOfMonthOrdinalParse:_e,relativeTime:we,months:dt,monthsShort:ft,week:Nt,weekdays:Ft,weekdaysMin:Wt,weekdaysShort:zt,meridiemParse:/[ap]\.?m?\.?/i},T={},hn={},mn;function gn(e,t){var n,a=Math.min(e.length,t.length);for(n=0;n0){r=bn(o.slice(0,n).join("-"));if(r)return r;if(a&&a.length>=n&&gn(o,a)>=n-1)break;n--}t++}return mn}function _n(e){return!!(e&&e.match("^[^/\\\\]*$"))}function bn(t){var e=null,n;if(T[t]===undefined&&typeof ci!=="undefined"&&ci&&ci.exports&&_n(t))try{e=mn._abbr;n=di;fi(502)("./"+t);wn(e)}catch(e){T[t]=null}return T[t]}function wn(e,t){var n;if(e){if(s(t))n=L(e);else n=Mn(e,t);if(n)mn=n;else if(typeof console!=="undefined"&&console.warn)console.warn("Locale "+e+" not found. Did you forget to load it?")}return mn._abbr}function Mn(e,t){if(t!==null){var n,a=pn;t.abbr=e;if(T[e]!=null){ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change "+"an existing locale. moment.defineLocale(localeName, "+"config) should only be used for creating a new locale "+"See http://momentjs.com/guides/#/warnings/define-locale/ for more info.");a=T[e]._config}else if(t.parentLocale!=null)if(T[t.parentLocale]!=null)a=T[t.parentLocale]._config;else{n=bn(t.parentLocale);if(n!=null)a=n._config;else{if(!hn[t.parentLocale])hn[t.parentLocale]=[];hn[t.parentLocale].push({name:e,config:t});return null}}T[e]=new ae(ne(a,t));if(hn[e])hn[e].forEach(function(e){Mn(e.name,e.config)});wn(e);return T[e]}else{delete T[e];return null}}function Sn(e,t){if(t!=null){var n,a,r=pn;if(T[e]!=null&&T[e].parentLocale!=null)T[e].set(ne(T[e]._config,t));else{a=bn(e);if(a!=null)r=a._config;t=ne(r,t);if(a==null)t.abbr=e;n=new ae(t);n.parentLocale=T[e];T[e]=n}wn(e)}else if(T[e]!=null)if(T[e].parentLocale!=null){T[e]=T[e].parentLocale;if(e===wn())wn(e)}else if(T[e]!=null)delete T[e];return T[e]}function L(e){var t;if(e&&e._locale&&e._locale._abbr)e=e._locale._abbr;if(!e)return mn;if(!i(e)){t=bn(e);if(t)return t;e=[e]}return vn(e)}function kn(){return Z(T)}function En(e){var t,n=e._a;if(n&&f(e).overflow===-2){t=n[w]<0||n[w]>11?w:n[M]<1||n[M]>ct(n[b],n[w])?M:n[S]<0||n[S]>24||n[S]===24&&(n[k]!==0||n[E]!==0||n[Xe]!==0)?S:n[k]<0||n[k]>59?k:n[E]<0||n[E]>59?E:n[Xe]<0||n[Xe]>999?Xe:-1;if(f(e)._overflowDayOfYear&&(tM))t=M;if(f(e)._overflowWeeks&&t===-1)t=Ze;if(f(e)._overflowWeekday&&t===-1)t=et;f(e).overflow=t}return e}var xn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tn=/Z|[+-]\d\d(?::?\d\d)?/,Ln=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,false],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,false],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,false],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,false],["YYYY",/\d{4}/,false]],On=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Dn=/^\/?Date\((-?\d+)/i,Nn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,jn={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Pn(e){var t,n,a=e._i,r=xn.exec(a)||Cn.exec(a),o,i,s,l,u=Ln.length,c=On.length;if(r){f(e).iso=true;for(t=0,n=u;ttt(i)||e._dayOfYear===0)f(e)._overflowDayOfYear=true;n=Ct(i,0,e._dayOfYear);e._a[w]=n.getUTCMonth();e._a[M]=n.getUTCDate()}for(t=0;t<3&&e._a[t]==null;++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=e._a[t]==null?t===2?1:0:e._a[t];if(e._a[S]===24&&e._a[k]===0&&e._a[E]===0&&e._a[Xe]===0){e._nextDay=true;e._a[S]=0}e._d=(e._useUTC?Ct:xt).apply(null,a);o=e._useUTC?e._d.getUTCDay():e._d.getDay();if(e._tzm!=null)e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm);if(e._nextDay)e._a[S]=24;if(e._w&&typeof e._w.d!=="undefined"&&e._w.d!==o)f(e).weekdayMismatch=true}function Vn(e){var t,n,a,r,o,i,s,l,u;t=e._w;if(t.GG!=null||t.W!=null||t.E!=null){o=1;i=4;n=Wn(t.GG,e._a[b],Ot(O(),1,4).year);a=Wn(t.W,1);r=Wn(t.E,1);if(r<1||r>7)l=true}else{o=e._locale._week.dow;i=e._locale._week.doy;u=Ot(O(),o,i);n=Wn(t.gg,e._a[b],u.year);a=Wn(t.w,u.week);if(t.d!=null){r=t.d;if(r<0||r>6)l=true}else if(t.e!=null){r=t.e+o;if(t.e<0||t.e>6)l=true}else r=o}if(a<1||a>C(n,o,i))f(e)._overflowWeeks=true;else if(l!=null)f(e)._overflowWeekday=true;else{s=Lt(n,a,r,o,i);e._a[b]=s.year;e._dayOfYear=s.dayOfYear}}function Kn(e){if(e._f===d.ISO_8601){Pn(e);return}if(e._f===d.RFC_2822){Fn(e);return}e._a=[];f(e).empty=true;var t=""+e._i,n,a,r,o,i,s=t.length,l=0,u,c;r=pe(e._f,e._locale).match(ie)||[];c=r.length;for(n=0;n0)f(e).unusedInput.push(i);t=t.slice(t.indexOf(a)+a.length);l+=a.length}if(ue[o]){if(a)f(e).empty=false;else f(e).unusedTokens.push(o);Je(o,a,e)}else if(e._strict&&!a)f(e).unusedTokens.push(o)}f(e).charsLeftOver=s-l;if(t.length>0)f(e).unusedInput.push(t);if(e._a[S]<=12&&f(e).bigHour===true&&e._a[S]>0)f(e).bigHour=undefined;f(e).parsedDateParts=e._a.slice(0);f(e).meridiem=e._meridiem;e._a[S]=qn(e._locale,e._a[S],e._meridiem);u=f(e).era;if(u!==null)e._a[b]=e._locale.erasConvertYear(u,e._a[b]);Un(e);En(e)}function qn(e,t,n){var a;if(n==null)return t;if(e.meridiemHour!=null)return e.meridiemHour(t,n);else if(e.isPM!=null){a=e.isPM(n);if(a&&t<12)t+=12;if(!a&&t===12)t=0;return t}else return t}function Gn(e){var t,n,a,r,o,i,s=false,l=e._f.length;if(l===0){f(e).invalidFormat=true;e._d=new Date(NaN);return}for(r=0;rthis?this:e;else return K()});function na(e,t){var n,a;if(t.length===1&&i(t[0]))t=t[0];if(!t.length)return O();n=t[0];for(a=1;athis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function xa(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={},t;$(e,this);e=Qn(e);if(e._a){t=e._isUTC?c(e._a):O(e._a);this._isDSTShifted=this.isValid()&&pa(e._a,t.toArray())>0}else this._isDSTShifted=false;return this._isDSTShifted}function Ca(){return this.isValid()?!this._isUTC:false}function Ta(){return this.isValid()?this._isUTC:false}function La(){return this.isValid()?this._isUTC&&this._offset===0:false}d.updateOffset=function(){};var Oa=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Da=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function D(e,t){var n=e,a=null,r,o,i;if(da(e))n={ms:e._milliseconds,d:e._days,M:e._months};else if(u(e)||!isNaN(+e)){n={};if(t)n[t]=+e;else n.milliseconds=+e}else if(a=Oa.exec(e)){r=a[1]==="-"?-1:1;n={y:0,d:v(a[M])*r,h:v(a[S])*r,m:v(a[k])*r,s:v(a[E])*r,ms:v(fa(a[Xe]*1e3))*r}}else if(a=Da.exec(e)){r=a[1]==="-"?-1:1;n={y:Na(a[2],r),M:Na(a[3],r),w:Na(a[4],r),d:Na(a[5],r),h:Na(a[6],r),m:Na(a[7],r),s:Na(a[8],r)}}else if(n==null)n={};else if(typeof n==="object"&&("from"in n||"to"in n)){i=Pa(O(n.from),O(n.to));n={};n.ms=i.milliseconds;n.M=i.months}o=new ca(n);if(da(e)&&l(e,"_locale"))o._locale=e._locale;if(da(e)&&l(e,"_isValid"))o._isValid=e._isValid;return o}function Na(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function ja(e,t){var n={};n.months=t.month()-e.month()+(t.year()-e.year())*12;if(e.clone().add(n.months,"M").isAfter(t))--n.months;n.milliseconds=+t-+e.clone().add(n.months,"M");return n}function Pa(e,t){var n;if(!(e.isValid()&&t.isValid()))return{milliseconds:0,months:0};t=ya(t,e);if(e.isBefore(t))n=ja(e,t);else{n=ja(t,e);n.milliseconds=-n.milliseconds;n.months=-n.months}return n}function Ya(r,o){return function(e,t){var n,a;if(t!==null&&!isNaN(+t)){ee(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). "+"See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.");a=e;e=t;t=a}n=D(e,t);Ia(this,n,r);return this}}function Ia(e,t,n,a){var r=t._milliseconds,o=fa(t._days),i=fa(t._months);if(!e.isValid())return;a=a==null?true:a;if(i)bt(e,ot(e,"Month")+i*n);if(o)it(e,"Date",ot(e,"Date")+o*n);if(r)e._d.setTime(e._d.valueOf()+r*n);if(a)d.updateOffset(e,o||i)}D.fn=ca.prototype,D.invalid=ua;var Aa=Ya(1,"add"),Ra=Ya(-1,"subtract");function Ha(e){return typeof e==="string"||e instanceof String}function Fa(e){return p(e)||z(e)||Ha(e)||u(e)||Wa(e)||za(e)||e===null||e===undefined}function za(e){var t=H(e)&&!F(e),n=false,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,o,i=a.length;for(r=0;rn.valueOf();else return n.valueOf()9999)return fe(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(h(Date.prototype.toISOString))if(t)return this.toDate().toISOString();else return new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",fe(n,"Z"));return fe(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ar(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,a,r,o;if(!this.isLocal()){e=this.utcOffset()===0?"moment.utc":"moment.parseZone";t="Z"}n="["+e+'("]';a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY";r="-MM-DD[T]HH:mm:ss.SSS";o=t+'[")]';return this.format(n+a+r+o)}function rr(e){if(!e)e=this.isUtc()?d.defaultFormatUtc:d.defaultFormat;var t=fe(this,e);return this.localeData().postformat(t)}function or(e,t){if(this.isValid()&&(p(e)&&e.isValid()||O(e).isValid()))return D({to:this,from:e}).locale(this.locale()).humanize(!t);else return this.localeData().invalidDate()}function ir(e){return this.from(O(),e)}function sr(e,t){if(this.isValid()&&(p(e)&&e.isValid()||O(e).isValid()))return D({from:this,to:e}).locale(this.locale()).humanize(!t);else return this.localeData().invalidDate()}function lr(e){return this.to(O(),e)}function ur(e){var t;if(e===undefined)return this._locale._abbr;else{t=L(e);if(t!=null)this._locale=t;return this}}d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var cr=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){if(e===undefined)return this.localeData();else return this.locale(e)});function dr(){return this._locale}var fr=1e3,pr=60*fr,hr=60*pr,mr=(365*400+97)*24*hr;function gr(e,t){return(e%t+t)%t}function yr(e,t,n){if(e<100&&e>=0)return new Date(e+400,t,n)-mr;else return new Date(e,t,n).valueOf()}function vr(e,t,n){if(e<100&&e>=0)return Date.UTC(e+400,t,n)-mr;else return Date.UTC(e,t,n)}function _r(e){var t,n;e=m(e);if(e===undefined||e==="millisecond"||!this.isValid())return this;n=this._isUTC?vr:yr;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf();t-=gr(t+(this._isUTC?0:this.utcOffset()*pr),hr);break;case"minute":t=this._d.valueOf();t-=gr(t,pr);break;case"second":t=this._d.valueOf();t-=gr(t,fr);break}this._d.setTime(t);d.updateOffset(this,true);return this}function br(e){var t,n;e=m(e);if(e===undefined||e==="millisecond"||!this.isValid())return this;n=this._isUTC?vr:yr;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf();t+=hr-gr(t+(this._isUTC?0:this.utcOffset()*pr),hr)-1;break;case"minute":t=this._d.valueOf();t+=pr-gr(t,pr)-1;break;case"second":t=this._d.valueOf();t+=fr-gr(t,fr)-1;break}this._d.setTime(t);d.updateOffset(this,true);return this}function wr(){return this._d.valueOf()-(this._offset||0)*6e4}function Mr(){return Math.floor(this.valueOf()/1e3)}function Sr(){return new Date(this.valueOf())}function kr(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Er(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function xr(){return this.isValid()?this.toISOString():null}function Cr(){return V(this)}function Tr(){return B({},f(this))}function Lr(){return f(this).overflow}function Or(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Dr(e,t){var n,a,r,o=this._eras||L("en")._eras;for(n=0,a=o.length;n=0)return o[a]}}function jr(e,t){var n=e.since<=e.until?+1:-1;if(t===undefined)return d(e.since).year();else return d(e.since).year()+(t-e.offset)*n}function Pr(){var e,t,n,a=this.localeData().eras();for(e=0,t=a.length;eo)t=o;return eo.call(this,e,t,n,a,r)}}function eo(e,t,n,a,r){var o=Lt(e,t,n,a,r),i=Ct(o.year,0,o.dayOfYear);this.year(i.getUTCFullYear());this.month(i.getUTCMonth());this.date(i.getUTCDate());return this}function to(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}a("N",0,0,"eraAbbr"),a("NN",0,0,"eraAbbr"),a("NNN",0,0,"eraAbbr"),a("NNNN",0,0,"eraName"),a("NNNNN",0,0,"eraNarrow"),a("y",["y",1],"yo","eraYear"),a("y",["yy",2],0,"eraYear"),a("y",["yyy",3],0,"eraYear"),a("y",["yyyy",4],0,"eraYear"),r("N",zr),r("NN",zr),r("NNN",zr),r("NNNN",Wr),r("NNNNN",Br),_(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,a){var r=n._locale.erasParse(e,a,n._strict);if(r)f(n).era=r;else f(n).invalidEra=e}),r("y",Ae),r("yy",Ae),r("yyy",Ae),r("yyyy",Ae),r("yo",Ur),_(["y","yy","yyy","yyyy"],b),_(["yo"],function(e,t,n,a){var r;if(n._locale._eraYearOrdinalRegex)r=e.match(n._locale._eraYearOrdinalRegex);if(n._locale.eraYearOrdinalParse)t[b]=n._locale.eraYearOrdinalParse(e,r);else t[b]=parseInt(e,10)}),a(0,["gg",2],0,function(){return this.weekYear()%100}),a(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Kr("gggg","weekYear"),Kr("ggggg","weekYear"),Kr("GGGG","isoWeekYear"),Kr("GGGGG","isoWeekYear"),r("G",Re),r("g",Re),r("GG",n,t),r("gg",n,t),r("GGGG",Ye,Oe),r("gggg",Ye,Oe),r("GGGGG",Ie,De),r("ggggg",Ie,De),$e(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,a){t[a.substr(0,2)]=v(e)}),$e(["gg","GG"],function(e,t,n,a){t[a]=d.parseTwoDigitYear(e)}),a("Q",0,"Qo","quarter"),r("Q",Te),_("Q",function(e,t){t[w]=(v(e)-1)*3}),a("D",["DD",2],"Do","date"),r("D",n,Be),r("DD",n,t),r("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),_(["D","DD"],M),_("Do",function(e,t){t[M]=v(e.match(n)[0])});var no=rt("Date",true);function ao(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}a("DDD",["DDDD",3],"DDDo","dayOfYear"),r("DDD",Pe),r("DDDD",Le),_(["DDD","DDDD"],function(e,t,n){n._dayOfYear=v(e)}),a("m",["mm",2],0,"minute"),r("m",n,Ue),r("mm",n,t),_(["m","mm"],k);var ro=rt("Minutes",false),oo=(a("s",["ss",2],0,"second"),r("s",n,Ue),r("ss",n,t),_(["s","ss"],E),rt("Seconds",false)),io,so;for(a("S",0,0,function(){return~~(this.millisecond()/100)}),a(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),a(0,["SSS",3],0,"millisecond"),a(0,["SSSS",4],0,function(){return this.millisecond()*10}),a(0,["SSSSS",5],0,function(){return this.millisecond()*100}),a(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),a(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),a(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),a(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),r("S",Pe,Te),r("SS",Pe,t),r("SSS",Pe,Le),io="SSSS";io.length<=9;io+="S")r(io,Ae);function lo(e,t){t[Xe]=v(("0."+e)*1e3)}for(io="S";io.length<=9;io+="S")_(io,lo);function uo(){return this._isUTC?"UTC":""}function co(){return this._isUTC?"Coordinated Universal Time":""}so=rt("Milliseconds",false),a("z",0,0,"zoneAbbr"),a("zz",0,0,"zoneName");var N=J.prototype;if(N.add=Aa,N.calendar=Va,N.clone=Ka,N.diff=Za,N.endOf=br,N.format=rr,N.from=or,N.fromNow=ir,N.to=sr,N.toNow=lr,N.get=st,N.invalidAt=Lr,N.isAfter=qa,N.isBefore=Ga,N.isBetween=$a,N.isSame=Ja,N.isSameOrAfter=Qa,N.isSameOrBefore=Xa,N.isValid=Cr,N.lang=cr,N.locale=ur,N.localeData=dr,N.max=ta,N.min=ea,N.parsingFlags=Tr,N.set=lt,N.startOf=_r,N.subtract=Ra,N.toArray=kr,N.toObject=Er,N.toDate=Sr,N.toISOString=nr,N.inspect=ar,typeof Symbol!=="undefined"&&Symbol.for!=null)N[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"};function fo(e){return O(e*1e3)}function po(){return O.apply(null,arguments).parseZone()}function ho(e){return e}N.toJSON=xr,N.toString=tr,N.unix=Mr,N.valueOf=wr,N.creationData=Or,N.eraName=Pr,N.eraNarrow=Yr,N.eraAbbr=Ir,N.eraYear=Ar,N.year=nt,N.isLeapYear=at,N.weekYear=qr,N.isoWeekYear=Gr,N.quarter=N.quarters=to,N.month=wt,N.daysInMonth=Mt,N.week=N.weeks=Yt,N.isoWeek=N.isoWeeks=It,N.weeksInYear=Qr,N.weeksInWeekYear=Xr,N.isoWeeksInYear=$r,N.isoWeeksInISOWeekYear=Jr,N.date=no,N.day=N.days=Qt,N.weekday=Xt,N.isoWeekday=Zt,N.dayOfYear=ao,N.hour=N.hours=dn,N.minute=N.minutes=ro,N.second=N.seconds=oo,N.millisecond=N.milliseconds=so,N.utcOffset=_a,N.utc=wa,N.local=Ma,N.parseZone=Sa,N.hasAlignedHourOffset=ka,N.isDST=Ea,N.isLocal=Ca,N.isUtcOffset=Ta,N.isUtc=La,N.isUTC=La,N.zoneAbbr=uo,N.zoneName=co,N.dates=e("dates accessor is deprecated. Use date instead.",no),N.months=e("months accessor is deprecated. Use month instead",wt),N.years=e("years accessor is deprecated. Use year instead",nt),N.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",ba),N.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",xa);var j=ae.prototype;function mo(e,t,n,a){var r=L(),o=c().set(a,t);return r[n](o,e)}function go(e,t,n){if(u(e)){t=e;e=undefined}e=e||"";if(t!=null)return mo(e,t,n,"month");var a,r=[];for(a=0;a<12;a++)r[a]=mo(e,a,n,"month");return r}function yo(e,t,n,a){if(typeof e==="boolean"){if(u(t)){n=t;t=undefined}t=t||""}else{t=e;n=t;e=false;if(u(t)){n=t;t=undefined}t=t||""}var r=L(),o=e?r._week.dow:0,i,s=[];if(n!=null)return mo(t,(n+o)%7,a,"day");for(i=0;i<7;i++)s[i]=mo(t,(i+o)%7,a,"day");return s}function vo(e,t){return go(e,t,"months")}function _o(e,t){return go(e,t,"monthsShort")}function bo(e,t,n){return yo(e,t,n,"weekdays")}function wo(e,t,n){return yo(e,t,n,"weekdaysShort")}function Mo(e,t,n){return yo(e,t,n,"weekdaysMin")}j.calendar=oe,j.longDateFormat=me,j.invalidDate=ye,j.ordinal=be,j.preparse=ho,j.postformat=ho,j.relativeTime=Me,j.pastFuture=Se,j.set=te,j.eras=Dr,j.erasParse=Nr,j.erasConvertYear=jr,j.erasAbbrRegex=Hr,j.erasNameRegex=Rr,j.erasNarrowRegex=Fr,j.months=gt,j.monthsShort=yt,j.monthsParse=_t,j.monthsRegex=kt,j.monthsShortRegex=St,j.week=Dt,j.firstDayOfYear=Pt,j.firstDayOfWeek=jt,j.weekdays=Kt,j.weekdaysMin=Gt,j.weekdaysShort=qt,j.weekdaysParse=Jt,j.weekdaysRegex=en,j.weekdaysShortRegex=tn,j.weekdaysMinRegex=nn,j.isPM=un,j.meridiem=fn,wn("en",{eras:[{since:"0001-01-01",until:+Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=v(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),d.lang=e("moment.lang is deprecated. Use moment.locale instead.",wn),d.langData=e("moment.langData is deprecated. Use moment.localeData instead.",L);var P=Math.abs;function So(){var e=this._data;this._milliseconds=P(this._milliseconds);this._days=P(this._days);this._months=P(this._months);e.milliseconds=P(e.milliseconds);e.seconds=P(e.seconds);e.minutes=P(e.minutes);e.hours=P(e.hours);e.months=P(e.months);e.years=P(e.years);return this}function ko(e,t,n,a){var r=D(t,n);e._milliseconds+=a*r._milliseconds;e._days+=a*r._days;e._months+=a*r._months;return e._bubble()}function Eo(e,t){return ko(this,e,t,1)}function xo(e,t){return ko(this,e,t,-1)}function Co(e){if(e<0)return Math.floor(e);else return Math.ceil(e)}function To(){var e=this._milliseconds,t=this._days,n=this._months,a=this._data,r,o,i,s,l;if(!(e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0)){e+=Co(Oo(n)+t)*864e5;t=0;n=0}a.milliseconds=e%1e3;r=y(e/1e3);a.seconds=r%60;o=y(r/60);a.minutes=o%60;i=y(o/60);a.hours=i%24;t+=y(i/24);l=y(Lo(t));n+=l;t-=Co(Oo(l));s=y(n/12);n%=12;a.days=t;a.months=n;a.years=s;return this}function Lo(e){return e*4800/146097}function Oo(e){return e*146097/4800}function Do(e){if(!this.isValid())return NaN;var t,n,a=this._milliseconds;e=m(e);if(e==="month"||e==="quarter"||e==="year"){t=this._days+a/864e5;n=this._months+Lo(t);switch(e){case"month":return n;case"quarter":return n/3;case"year":return n/12}}else{t=this._days+Math.round(Oo(this._months));switch(e){case"week":return t/7+a/6048e5;case"day":return t+a/864e5;case"hour":return t*24+a/36e5;case"minute":return t*1440+a/6e4;case"second":return t*86400+a/1e3;case"millisecond":return Math.floor(t*864e5)+a;default:throw new Error("Unknown unit "+e)}}}function No(e){return function(){return this.as(e)}}var jo=No("ms"),Po=No("s"),Yo=No("m"),Io=No("h"),Ao=No("d"),Ro=No("w"),Ho=No("M"),Fo=No("Q"),zo=No("y"),Wo=jo;function Bo(){return D(this)}function Uo(e){e=m(e);return this.isValid()?this[e+"s"]():NaN}function Vo(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ko=Vo("milliseconds"),qo=Vo("seconds"),Go=Vo("minutes"),$o=Vo("hours"),Jo=Vo("days"),Qo=Vo("months"),Xo=Vo("years");function Zo(){return y(this.days()/7)}var ei=Math.round,ti={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,t,n,a,r){return r.relativeTime(t||1,!!n,e,a)}function ai(e,t,n,a){var r=D(e).abs(),o=ei(r.as("s")),i=ei(r.as("m")),s=ei(r.as("h")),l=ei(r.as("d")),u=ei(r.as("M")),c=ei(r.as("w")),d=ei(r.as("y")),f=o<=n.ss&&["s",o]||o0;f[4]=a;return ni.apply(null,f)}function ri(e){if(e===undefined)return ei;if(typeof e==="function"){ei=e;return true}return false}function oi(e,t){if(ti[e]===undefined)return false;if(t===undefined)return ti[e];ti[e]=t;if(e==="s")ti.ss=t-1;return true}function ii(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=false,a=ti,r,o;if(typeof e==="object"){t=e;e=false}if(typeof e==="boolean")n=e;if(typeof t==="object"){a=Object.assign({},ti,t);if(t.s!=null&&t.ss==null)a.ss=t.s-1}r=this.localeData();o=ai(this,!n,a,r);if(n)o=r.pastFuture(+this,o);return r.postformat(o)}var si=Math.abs;function li(e){return(e>0)-(e<0)||+e}function ui(){if(!this.isValid())return this.localeData().invalidDate();var e=si(this._milliseconds)/1e3,t=si(this._days),n=si(this._months),a,r,o,i,s=this.asSeconds(),l,u,c,d;if(!s)return"P0D";a=y(e/60);r=y(a/60);e%=60;a%=60;o=y(n/12);n%=12;i=e?e.toFixed(3).replace(/\.?0+$/,""):"";l=s<0?"-":"";u=li(this._months)!==li(s)?"-":"";c=li(this._days)!==li(s)?"-":"";d=li(this._milliseconds)!==li(s)?"-":"";return l+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?c+t+"D":"")+(r||a||e?"T":"")+(r?d+r+"H":"")+(a?d+a+"M":"")+(e?d+i+"S":"")}var Y=ca.prototype;return Y.isValid=la,Y.abs=So,Y.add=Eo,Y.subtract=xo,Y.as=Do,Y.asMilliseconds=jo,Y.asSeconds=Po,Y.asMinutes=Yo,Y.asHours=Io,Y.asDays=Ao,Y.asWeeks=Ro,Y.asMonths=Ho,Y.asQuarters=Fo,Y.asYears=zo,Y.valueOf=Wo,Y._bubble=To,Y.clone=Bo,Y.get=Uo,Y.milliseconds=Ko,Y.seconds=qo,Y.minutes=Go,Y.hours=$o,Y.days=Jo,Y.weeks=Zo,Y.months=Qo,Y.years=Xo,Y.humanize=ii,Y.toISOString=ui,Y.toString=ui,Y.toJSON=ui,Y.locale=ur,Y.localeData=dr,Y.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ui),Y.lang=cr,a("X",0,0,"unix"),a("x",0,0,"valueOf"),r("x",Re),r("X",ze),_("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),_("x",function(e,t,n){n._d=new Date(v(e))}), //! moment.js -c.version="2.29.4",R(D),c.fn=P,c.min=na,c.max=aa,c.now=ra,c.utc=d,c.unix=co,c.months=yo,c.isDate=z,c.locale=_n,c.invalid=K,c.duration=N,c.isMoment=p,c.weekdays=_o,c.parseZone=fo,c.localeData=Mn,c.isDuration=da,c.monthsShort=vo,c.weekdaysMin=wo,c.defineLocale=bn,c.updateLocale=wn,c.locales=kn,c.weekdaysShort=bo,c.normalizeUnits=m,c.relativeTimeRounding=ri,c.relativeTimeThreshold=oi,c.calendarFormat=Ba,c.prototype=P,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},c}()}.call(this,fi(532)(e))},function(e,t,n){"use strict";t.__esModule=!0;var a=u(n(2)),r=u(n(12)),o=u(n(8)),i=u(n(371)),s=u(n(598)),l=u(n(599)),n=u(n(373));function u(e){return e&&e.__esModule?e:{default:e}}i.default.Password=o.default.config(s.default,{exportNames:["getInputNode","focus"],transform:function(e,t){var n;return"hasLimitHint"in e&&(t("hasLimitHint","showLimitHint","Input"),n=(t=e).hasLimitHint,t=(0,r.default)(t,["hasLimitHint"]),e=(0,a.default)({showLimitHint:n},t)),e}}),i.default.TextArea=o.default.config(l.default,{exportNames:["getInputNode","focus"],transform:function(e,t){var n;return"hasLimitHint"in e&&(t("hasLimitHint","showLimitHint","Input"),n=(t=e).hasLimitHint,t=(0,r.default)(t,["hasLimitHint"]),e=(0,a.default)({showLimitHint:n},t)),e}}),i.default.Group=n.default,t.default=o.default.config(i.default,{exportNames:["getInputNode","focus"],transform:function(e,t){var n;return"hasLimitHint"in e&&(t("hasLimitHint","showLimitHint","Input"),n=(t=e).hasLimitHint,t=(0,r.default)(t,["hasLimitHint"]),e=(0,a.default)({showLimitHint:n},t)),e}}),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.pickAttrs=t.datejs=t.htmlId=t.KEYCODE=t.guid=t.focus=t.support=t.str=t.obj=t.log=t.func=t.events=t.env=t.dom=void 0;var a=y(n(213)),r=y(n(216)),o=y(n(515)),i=y(n(516)),s=y(n(215)),l=y(n(100)),u=y(n(214)),d=y(n(524)),c=y(n(525)),f=y(n(526)),p=g(n(527)),h=g(n(218)),m=g(n(161)),n=g(n(528));function g(e){return e&&e.__esModule?e:{default:e}}function y(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}t.dom=a,t.env=r,t.events=o,t.func=i,t.log=s,t.obj=l,t.str=u,t.support=d,t.focus=c,t.guid=p.default,t.KEYCODE=h.default,t.htmlId=f,t.datejs=m.default,t.pickAttrs=n.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n,a={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return a})},function(e,t,n){"use strict";function a(e,t){for(var n=0;ns[0]&&t[1]=e.length?void 0:e)&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,r,o=n.call(e),i=[];try{for(;(void 0===t||0")),"shouldUpdatePosition"in r&&(delete t.shouldUpdatePosition,d.log.warning("Warning: [ shouldUpdatePosition ] is deprecated at [ ]")),"minMargin"in r&&o("minMargin","top/bottom",""),"isFullScreen"in r&&(r.overFlowScroll=!r.isFullScreen,delete t.isFullScreen,o("isFullScreen","overFlowScroll","")),t):(["target","offset","beforeOpen","onOpen","afterOpen","beforePosition","onPosition","cache","safeNode","wrapperClassName","container"].forEach(function(e){var t,n,a;e in r&&(o(e,"overlayProps."+e,"Dialog"),t=(n=r).overlayProps,n=(0,s.default)(n,["overlayProps"]),a=(0,i.default)(((a={})[e]=r[e],a),t||{}),delete n[e],r=(0,i.default)({overlayProps:a},n))}),r)}n.displayName="Dialog",n.Inner=p.default,n.show=function(e){return!1!==u.default.getContextProps(e,"Dialog").warning&&(e=v(e,d.log.deprecated)),(0,h.show)(e)},n.alert=function(e){return!1!==u.default.getContextProps(e,"Dialog").warning&&(e=v(e,d.log.deprecated)),(0,h.alert)(e)},n.confirm=function(e){return!1!==u.default.getContextProps(e,"Dialog").warning&&(e=v(e,d.log.deprecated)),(0,h.confirm)(e)},n.success=function(e){return(0,h.success)(e)},n.error=function(e){return(0,h.error)(e)},n.notice=function(e){return(0,h.notice)(e)},n.warning=function(e){return(0,h.warning)(e)},n.help=function(e){return(0,h.help)(e)},n.withContext=h.withContext,t.default=u.default.config(n,{transform:v}),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var o=r(n(2)),i=r(n(12)),a=r(n(8)),s=r(n(593)),n=r(n(594));function r(e){return e&&e.__esModule?e:{default:e}}s.default.Group=n.default,t.default=a.default.config(s.default,{transform:function(e,t){var n,a,r;return"shape"in e&&(t("shape","text | warning | ghost","Button"),n=(t=e).shape,a=t.type,t=(0,i.default)(t,["shape","type"]),r=void 0,"ghost"===n&&(r={primary:"dark",secondary:"dark",normal:"light",dark:"dark",light:"light"}[a||s.default.defaultProps.type]),e=(0,o.default)({type:"light"===a||"dark"===a||"secondary"===a&&"warning"===n?"normal":a,ghost:r,text:"text"===n,warning:"warning"===n},t)),e}}),e.exports=t.default},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(93);function r(t,e){var n,a=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,n)),a}function o(t){for(var e=1;e 16.8.0")},p.prototype.validate=function(e,t){this.validateCallback(e,t)},p.prototype.reset=function(e){var t=1","Select");t=l(e,t);return e.onInputUpdate&&(t.onSearch=e.onInputUpdate,t.showSearch=!0),t}}),t.default=a.default.config(r.default,{transform:l,exportNames:["focusInput","handleSearchClear"]}),e.exports=t.default},function(e,t,n){"use strict";function l(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function u(t){this.setState(function(e){return null!=(e=this.constructor.getDerivedStateFromProps(t,e))?e:null}.bind(this))}function d(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"==typeof e.getDerivedStateFromProps||"function"==typeof t.getSnapshotBeforeUpdate){var n,a,r=null,o=null,i=null;if("function"==typeof t.componentWillMount?r="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(r="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?i="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==r||null!==o||null!==i)throw n=e.displayName||e.name,a="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()",Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+n+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+(null!==i?"\n "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks");if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=l,t.componentWillReceiveProps=u),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=d;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,n)}}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),d.__suppressDeprecationWarning=u.__suppressDeprecationWarning=l.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";n(48);var a=n(25),r=n.n(a),o=n(75),a=n(143),a=n.n(a),i=n(431),s=n.n(i),l=n(47),u="Request error, please try again later!";function d(){var e=window.location.href,e=(localStorage.removeItem("token"),e.split("#")[0]);window.location.href="".concat(e,"#/login")}t.a=((i=a.a.create()).interceptors.request.use(function(e){var t=e.url,n=e.params,a=e.data,r=e.method,o=e.headers;if(n||(e.params={}),!t.includes("auth/users/login")&&localStorage.token){n={};try{n=JSON.parse(localStorage.token)}catch(e){console.log(e),d()}var i=n.accessToken,i=void 0===i?"":i,n=n.username,n=void 0===n?"":n;e.params.accessToken=i,t.includes("auth")||(e.params.username=n),e.headers=Object.assign({},o,{accessToken:i})}return a&&Object(l.d)(a)&&["post","put"].includes(r)&&(e.data=s.a.stringify(a),o||(e.headers={}),e.headers["Content-Type"]="application/x-www-form-urlencoded"),e},function(e){return Promise.reject(e)}),i.interceptors.response.use(function(e){var t=e.data;t.success,t.resultCode,t.resultMessage;return e.data},function(e){var t,n,a;return e.response?(t=void 0===(t=(n=e.response).data)?{}:t,n=n.status,a="HTTP ERROR: ".concat(n),"string"==typeof t?a=t:"object"===Object(o.a)(t)&&(a=t.message),r.a.error(a),[401,403].includes(n)&&["unknown user!","token invalid!","token expired!","session expired!"].includes(a)&&d(),Promise.reject(e.response)):(r.a.error(u),Promise.reject(e))}),i)},function(e,t,n){"use strict";n(43),n(552)},function(M,e,t){"use strict";t.d(e,"a",function(){return a}),t.d(e,"b",function(){return U});var x=t(0),C=t.n(x),d=C.a.createContext(null);function l(){return n}var n=function(e){e()};var r={notify:function(){},get:function(){return[]}};function T(t,n){var o,i=r;function s(){e.onStateChange&&e.onStateChange()}function a(){var e,a,r;o||(o=n?n.addNestedSub(s):t.subscribe(s),e=l(),r=a=null,i={clear:function(){r=a=null},notify:function(){e(function(){for(var e=a;e;)e.callback(),e=e.next})},get:function(){for(var e=[],t=a;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,n=r={callback:e,next:null,prev:r};return n.prev?n.prev.next=n:a=n,function(){t&&null!==a&&(t=!1,n.next?n.next.prev=n.prev:r=n.prev,n.prev?n.prev.next=n.next:a=n.next)}}})}var e={addNestedSub:function(e){return a(),i.subscribe(e)},notifyNestedSubs:function(){i.notify()},handleChangeWrapper:s,isSubscribed:function(){return Boolean(o)},trySubscribe:a,tryUnsubscribe:function(){o&&(o(),o=void 0,i.clear(),i=r)},getListeners:function(){return i}};return e}var o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?x.useLayoutEffect:x.useEffect;var a=function(e){var t=e.store,n=e.context,e=e.children,a=Object(x.useMemo)(function(){var e=T(t);return{store:t,subscription:e}},[t]),r=Object(x.useMemo)(function(){return t.getState()},[t]),n=(o(function(){var e=a.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),r!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[a,r]),n||d);return C.a.createElement(n.Provider,{value:a},e)},L=t(41),O=t(55),e=t(106),c=t.n(e),D=t(428),f=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],N=["reactReduxForwardedRef"],P=[],j=[null,null];function Y(e,t){e=e[1];return[t.payload,e+1]}function I(e,t,n){o(function(){return e.apply(void 0,t)},n)}function A(e,t,n,a,r,o,i){e.current=a,t.current=r,n.current=!1,o.current&&(o.current=null,i())}function R(e,a,t,r,o,i,s,l,u,d){var c,f;if(e)return c=!1,f=null,t.onStateChange=e=function(){if(!c){var e,t,n=a.getState();try{e=r(n,o.current)}catch(e){f=t=e}t||(f=null),e===i.current?s.current||u():(i.current=e,l.current=e,s.current=!0,d({type:"STORE_UPDATED",payload:{error:t}}))}},t.trySubscribe(),e(),function(){if(c=!0,t.tryUnsubscribe(),t.onStateChange=null,f)throw f}}var H=function(){return[null,0]};function i(k,e){var e=e=void 0===e?{}:e,t=e.getDisplayName,r=void 0===t?function(e){return"ConnectAdvanced("+e+")"}:t,t=e.methodName,o=void 0===t?"connectAdvanced":t,t=e.renderCountProp,i=void 0===t?void 0:t,t=e.shouldHandleStateChanges,S=void 0===t||t,t=e.storeKey,s=void 0===t?"store":t,t=(e.withRef,e.forwardRef),l=void 0!==t&&t,t=e.context,t=void 0===t?d:t,u=Object(O.a)(e,f),E=t;return function(b){var e=b.displayName||b.name||"Component",t=r(e),w=Object(L.a)({},u,{getDisplayName:r,methodName:o,renderCountProp:i,shouldHandleStateChanges:S,storeKey:s,displayName:t,wrappedComponentName:e,WrappedComponent:b}),e=u.pure;var M=e?x.useMemo:function(e){return e()};function n(n){var e=Object(x.useMemo)(function(){var e=n.reactReduxForwardedRef,t=Object(O.a)(n,N);return[n.context,e,t]},[n]),t=e[0],a=e[1],r=e[2],o=Object(x.useMemo)(function(){return t&&t.Consumer&&Object(D.isContextConsumer)(C.a.createElement(t.Consumer,null))?t:E},[t,E]),i=Object(x.useContext)(o),s=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),l=(Boolean(i)&&Boolean(i.store),(s?n:i).store),u=Object(x.useMemo)(function(){return k(l.dispatch,w)},[l]),e=Object(x.useMemo)(function(){var e,t;return S?(t=(e=T(l,s?null:i.subscription)).notifyNestedSubs.bind(e),[e,t]):j},[l,s,i]),d=e[0],e=e[1],c=Object(x.useMemo)(function(){return s?i:Object(L.a)({},i,{subscription:d})},[s,i,d]),f=Object(x.useReducer)(Y,P,H),p=f[0][0],f=f[1];if(p&&p.error)throw p.error;var h=Object(x.useRef)(),m=Object(x.useRef)(r),g=Object(x.useRef)(),y=Object(x.useRef)(!1),v=M(function(){return g.current&&r===m.current?g.current:u(l.getState(),r)},[l,p,r]),_=(I(A,[m,h,y,r,v,g,e]),I(R,[S,l,d,u,m,h,y,g,e,f],[l,d,u]),Object(x.useMemo)(function(){return C.a.createElement(b,Object(L.a)({},v,{ref:a}))},[a,b,v]));return Object(x.useMemo)(function(){return S?C.a.createElement(o.Provider,{value:c},_):_},[o,_,c])}var a=e?C.a.memo(n):n;return a.WrappedComponent=b,a.displayName=n.displayName=t,l?((e=C.a.forwardRef(function(e,t){return C.a.createElement(a,Object(L.a)({},e,{reactReduxForwardedRef:t}))})).displayName=t,e.WrappedComponent=b,c()(e,b)):c()(a,b)}}function s(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function m(e,t){if(!s(e,t)){if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var r=0;re?t.splice(e,t.length-e,n):t.push(n),i({action:"PUSH",location:n,index:e,entries:t}))})},replace:function(e,t){var n=D(e,t,s(),u.location);o.confirmTransitionTo(n,"REPLACE",a,function(e){e&&i({action:"REPLACE",location:u.entries[u.index]=n})})},go:l,goBack:function(){l(-1)},goForward:function(){l(1)},canGo:function(e){return 0<=(e=u.index+e)&&ex',"Tag"),"readonly"!==n&&"interactive"!==n||r.log.warning("Warning: [ shape="+n+" ] is deprecated at [ Tag ]"),"secondary"===a&&r.log.warning("Warning: [ type=secondary ] is deprecated at [ Tag ]"),["count","marked","value","onChange"].forEach(function(e){e in t&&r.log.warning("Warning: [ "+e+" ] is deprecated at [ Tag ]")}),("selected"in t||"defaultSelected"in t)&&r.log.warning("Warning: [ selected|defaultSelected ] is deprecated at [ Tag ], use [ checked|defaultChecked ] at [ Tag.Selectable ] instead of it"),"closed"in t&&r.log.warning("Warning: [ closed ] is deprecated at [ Tag ], use [ onClose ] at [ Tag.Closeable ] instead of it"),"onSelect"in t&&e("onSelect","","Tag"),"afterClose"in t&&r.log.warning("Warning: [ afterClose ] is deprecated at [ Tag ], use [ afterClose ] at [ Tag.Closeable ] instead of it"),t}});o.Group=a.default.config(i.default),o.Selectable=a.default.config(s.default),o.Closable=a.default.config(n.default),o.Closeable=o.Closable,t.default=o,e.exports=t.default},function(e,t,n){"use strict";n(72),n(463)},function(e,t){e=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(e,t){e=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},function(e,t,n){e.exports=!n(112)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";t.__esModule=!0;var a=o(n(356)),r=o(n(542)),n=o(n(543));function o(e){return e&&e.__esModule?e:{default:e}}a.default.Expand=r.default,a.default.OverlayAnimate=n.default,t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";n(43),n(72),n(113),n(114),n(556)},function(e,t,n){"use strict";n.d(t,"a",function(){return r});function v(e,t){return"function"==typeof e?e(t):e}function _(e,t){return"string"==typeof e?Object(d.c)(e,null,null,t):e}function u(e){return e}var b=n(39),a=n(63),t=n(0),w=n.n(t),d=n(56),M=n(41),k=n(55),S=n(58),r=(w.a.Component,function(r){function e(){for(var e,t=arguments.length,n=new Array(t),a=0;athis.menuNode.clientHeight&&(this.menuNode.clientHeight+this.menuNode.scrollTop<(e=this.itemNode.offsetTop+this.itemNode.offsetHeight)?this.menuNode.scrollTop=e-this.menuNode.clientHeight:this.itemNode.offsetTope.length)&&(t=e.length);for(var n=0,a=new Array(t);n>16&255),o.push(r>>8&255),o.push(255&r)),r=r<<6|a.indexOf(t.charAt(i));return 0==(e=n%4*6)?(o.push(r>>16&255),o.push(r>>8&255),o.push(255&r)):18==e?(o.push(r>>10&255),o.push(r>>2&255)):12==e&&o.push(r>>4&255),new Uint8Array(o)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){for(var t,n="",a=0,r=e.length,o=g,i=0;i>18&63]+o[a>>12&63])+o[a>>6&63]+o[63&a]),a=(a<<8)+e[i];return 0==(t=r%3)?n=(n=n+o[a>>18&63]+o[a>>12&63])+o[a>>6&63]+o[63&a]:2==t?n=(n=n+o[a>>10&63]+o[a>>4&63])+o[a<<2&63]+o[64]:1==t&&(n=(n=n+o[a>>2&63]+o[a<<4&63])+o[64]+o[64]),n}}),V=Object.prototype.hasOwnProperty,K=Object.prototype.toString;var s=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null!==e)for(var t,n,a,r=[],o=e,i=0,s=o.length;i>10),56320+(l-65536&1023)),e.position++}else x(e,"unknown escape sequence");n=a=e.position}else w(u)?(T(e,n,a,!0),P(e,D(e,!1,t)),n=a=e.position):e.position===e.lineStart&&N(e)?x(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}x(e,"unexpected end of the stream within a double quoted scalar")}}function ge(e,t){var n,a,r=e.tag,o=e.anchor,i=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),a=e.input.charCodeAt(e.position);0!==a&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,x(e,"tab characters must not be used in indentation")),45===a)&&k(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,D(e,!0,-1)&&e.lineIndent<=t)i.push(null),a=e.input.charCodeAt(e.position);else if(n=e.line,j(e,t,Z,!1,!0),i.push(e.result),D(e,!0,-1),a=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==a)x(e,"bad indentation of a sequence entry");else if(e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt)&&(y&&(i=e.line,s=e.lineStart,l=e.position),j(e,t,_,!0,r)&&(y?m=e.result:g=e.result),y||(L(e,f,p,h,m,g,i,s,l),h=m=g=null),D(e,!0,-1),u=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==u)x(e,"bad indentation of a mapping entry");else if(e.lineIndentl&&(l=e.lineIndent),w(c))u++;else{if(e.lineIndent=t){i=!0,f=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=u;break}}i&&(T(e,r,o,!1),P(e,e.line-s),r=o=e.position,i=!1),M(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}if(T(e,r,o,!1),e.result)return 1;e.kind=d,e.result=c}}(e,a,v===n)&&(h=!0,null===e.tag)&&(e.tag="?"):(h=!0,null===e.tag&&null===e.anchor||x(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===f&&(h=s&&ge(e,r))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&x(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),l=0,u=e.implicitTypes.length;l"),null!==e.result&&c.kind!==e.kind&&x(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result,e.tag)?(e.result=c.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):x(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||h}function ye(e,t){t=t||{};var n=new ce(e=0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0))?e.slice(1):e,t),t=e.indexOf("\0");for(-1!==t&&(n.position=t,x(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.positiondocument.F=Object<\/script>"),e.close(),u=e.F;t--;)delete u[l][i[t]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[l]=r(e),n=new a,a[l]=null,n[s]=e):n=u(),void 0===t?n:o(n,t)}},function(e,t,n){var a=n(88).f,r=n(89),o=n(99)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&a(e,o,{configurable:!0,value:t})}},function(e,t,n){t.f=n(99)},function(e,t,n){var a=n(79),r=n(80),o=n(127),i=n(159),s=n(88).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=!o&&a.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:i.f(e)})}},function(e,t,n){"use strict";t.__esModule=!0;var a=d(n(217)),r=d(n(517)),o=d(n(518)),i=d(n(519)),s=d(n(520)),l=d(n(521)),u=d(n(522));function d(e){return e&&e.__esModule?e:{default:e}}n(523),a.default.extend(l.default),a.default.extend(s.default),a.default.extend(r.default),a.default.extend(o.default),a.default.extend(i.default),a.default.extend(u.default),a.default.locale("zh-cn");n=a.default;n.isSelf=a.default.isDayjs,a.default.localeData(),t.default=n,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var v=c(n(2)),o=c(n(4)),i=c(n(6)),a=c(n(7)),r=n(0),_=c(r),s=c(n(5)),l=n(30),b=c(n(17)),u=c(n(44)),w=c(n(26)),M=c(n(82)),d=c(n(8)),k=n(11);function c(e){return e&&e.__esModule?e:{default:e}}function f(){}p=r.Component,(0,a.default)(S,p),S.getDerivedStateFromProps=function(e){return"visible"in e?{visible:e.visible}:{}},S.prototype.render=function(){var e,t=this.props,n=t.prefix,a=(t.pure,t.className),r=t.style,o=t.type,i=t.shape,s=t.size,l=t.title,u=t.children,d=(t.defaultVisible,t.visible,t.iconType),c=t.closeable,f=(t.onClose,t.afterClose),p=t.animation,h=t.rtl,t=t.locale,m=(0,v.default)({},k.obj.pickOthers(Object.keys(S.propTypes),this.props)),g=this.state.visible,y=n+"message",o=(0,b.default)(((e={})[y]=!0,e[n+"message-"+o]=o,e[""+n+i]=i,e[""+n+s]=s,e[n+"title-content"]=!!l,e[n+"only-content"]=!l&&!!u,e[a]=a,e)),i=g?_.default.createElement("div",(0,v.default)({role:"alert",style:r},m,{className:o,dir:h?"rtl":void 0}),c?_.default.createElement("a",{role:"button","aria-label":t.closeAriaLabel,className:y+"-close",onClick:this.onClose},_.default.createElement(w.default,{type:"close"})):null,!1!==d?_.default.createElement(w.default,{className:y+"-symbol "+(!d&&y+"-symbol-icon"),type:d}):null,l?_.default.createElement("div",{className:y+"-title"},l):null,u?_.default.createElement("div",{className:y+"-content"},u):null):null;return p?_.default.createElement(M.default.Expand,{animationAppear:!1,afterLeave:f},i):i},r=n=S,n.propTypes={prefix:s.default.string,pure:s.default.bool,className:s.default.string,style:s.default.object,type:s.default.oneOf(["success","warning","error","notice","help","loading"]),shape:s.default.oneOf(["inline","addon","toast"]),size:s.default.oneOf(["medium","large"]),title:s.default.node,children:s.default.node,defaultVisible:s.default.bool,visible:s.default.bool,iconType:s.default.oneOfType([s.default.string,s.default.bool]),closeable:s.default.bool,onClose:s.default.func,afterClose:s.default.func,animation:s.default.bool,locale:s.default.object,rtl:s.default.bool},n.defaultProps={prefix:"next-",pure:!1,type:"success",shape:"inline",size:"medium",defaultVisible:!0,closeable:!1,onClose:f,afterClose:f,animation:!0,locale:u.default.Message};var p,a=r;function S(){var e,t;(0,o.default)(this,S);for(var n=arguments.length,a=Array(n),r=0;r=n.length?(l=!!(c=h(o,u)))&&"get"in c&&!("originalValue"in c.get)?c.get:o[u]:(l=_(o,u),o[u]),l&&!i&&(g[d]=o)}}return o}},function(e,t,n){"use strict";n=n(622);e.exports=Function.prototype.bind||n},function(e,t,n){"use strict";var a=String.prototype.replace,r=/%20/g,o="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return a.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:i}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var d=l(n(2)),a=l(n(4)),r=l(n(6)),o=l(n(7)),c=n(0),f=l(c),i=l(n(5)),p=l(n(17)),h=l(n(26)),s=n(11),m=l(n(103));function l(e){return e&&e.__esModule?e:{default:e}}var u,g=s.func.bindCtx,y=s.obj.pickOthers,i=(u=c.Component,(0,o.default)(v,u),v.prototype.getSelected=function(){var e=this.props,t=e._key,n=e.root,e=e.selected,a=n.props.selectMode,n=n.state.selectedKeys;return e||!!a&&-1e.length&&e.every(function(e,t){return e===n[t]})},t.isAvailablePos=function(e,t,n){var n=n[t],a=n.type,n=n.disabled;return r(e,t)&&("item"===a&&!n||"submenu"===a)});t.getFirstAvaliablelChildKey=function(t,n){var e=Object.keys(n).find(function(e){return a(t+"-0",e,n)});return e?n[e].key:null},t.getChildSelected=function(e){var t,n=e.selectMode,a=e.selectedKeys,r=e._k2n,e=e._key;return!!r&&(t=(r[e]&&r[e].pos)+"-",!!n)&&a.some(function(e){return r[e]&&0===r[e].pos.indexOf(t)})}},function(e,t,n){"use strict";n(43),n(32),n(643)},function(e,t,n){var o=n(656),i=Object.prototype.hasOwnProperty;function s(e){return Array.isArray(e)?"array":typeof e}function l(e,t){var n,a=0,r=0;for(n in e)if(i.call(e,n)){if("style"===n){if(!o(e[n],t[n]))return!1}else if("children"!==n&&e[n]!==t[n])return!1;a++}for(n in t)i.call(t,n)&&r++;return a===r&&function e(t,n){var a=s(t);if(a!==s(n))return!1;switch(a){case"array":if(t.length!==n.length)return!1;for(var r=0;r{var t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;const createDateTime=__webpack_require__(684),createDateTimeFloat=__webpack_require__(685),createDate=__webpack_require__(686),createTime=__webpack_require__(687),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}const _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){if(hasOwnProperty.call(e,t))return 1;"__proto__"===t&&defineProperty(e,"__proto__",descriptor)}const INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}const TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}const _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}const LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(_){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch(e){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}const INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}const FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType(e){var t=typeof e;if("object"==t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx;var n,a=e.key.pop();for(n of e.key){if(hasKey(t,n)&&!isTable(t[n]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,a))throw this.error(new TomlError("Can't redefine existing key"));return t[_declared]=!0,isInteger(e.value)||isFloat(e.value)?t[a]=e.value.valueOf():t[a]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return();if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("comments")}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(!hasKey(this.ctx,e)||isTable(this.ctx[e])&&!this.ctx[e][_declared])return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Can't redefine existing key"))}if(this.char!==CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));var t;if(isList(this.ctx[e]))return t=Table(),this.ctx[e].push(t),this.ctx=t,this.next(this.parseListEnd);throw this.error(new TomlError("Can't redefine an existing key"))}if(this.char!==CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.consume(),this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd3):(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd3(){return this.char===CHAR_APOS?(this.state.buf+="'",this.next(this.parseLiteralMultiEnd4)):this.returnNow()}parseLiteralMultiEnd4(){return this.char===CHAR_APOS?(this.state.buf+="'",this.return()):this.returnNow()}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}errorControlCharIn(e){let t="\\u00";return this.char<16&&(t+="0"),t+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in ${e}, use ${t} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd3):(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEnd3(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.next(this.parseMultiEnd4)):this.returnNow()}parseMultiEnd4(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.return()):this.returnNow()}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{var t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),4<=this.state.buf.length)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),8<=this.state.buf.length)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);var e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(4{for(t=String(t);t.length "+o[t]+"\n")+(n+" ");for(let e=0;er&&!o.warned&&(o.warned=!0,(a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=o.length,n=a,console)&&console.warn&&console.warn(n)),e}function f(e,t,n){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},t=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(e);return t.listener=n,e.wrapFn=t}function p(e,t,n){e=e._events;if(void 0===e)return[];e=e[t];if(void 0===e)return[];if("function"==typeof e)return n?[e.listener||e]:[e];if(n){for(var a=e,r=new Array(a.length),o=0;o=u,u=(0,D.default)(((u={})[n+"upload-inner"]=!0,u[n+"hidden"]=x,u)),C=this.props.children;return"card"===r&&(r=(0,D.default)(((r={})[n+"upload-card"]=!0,r[n+"disabled"]=l,r)),C=O.default.createElement("div",{className:r},O.default.createElement(P.default,{size:"large",type:"add",className:n+"upload-add-icon"}),O.default.createElement("div",{tabIndex:"0",role:"button",className:n+"upload-text"},C))),b?"function"==typeof w?(b=(0,D.default)(((r={})[n+"form-preview"]=!0,r[o]=!!o,r)),O.default.createElement("div",{style:i,className:b},w(this.state.value,this.props))):t?O.default.createElement(Y.default,{isPreview:!0,listType:t,style:i,className:o,value:this.state.value,onPreview:m}):null:(n=l?N.func.prevent:p,r=N.obj.pickAttrsWith(this.props,"data-"),O.default.createElement("div",(0,T.default)({className:f,style:i},r),O.default.createElement(j.default,(0,T.default)({},e,{name:M,beforeUpload:c,dragable:a,disabled:l||x,className:u,onSelect:this.onSelect,onDrop:this.onDrop,onProgress:this.onProgress,onSuccess:this.onSuccess,onError:this.onError,ref:this.saveUploaderRef}),C),t||g?O.default.createElement(Y.default,{useDataURL:s,fileNameRender:k,actionRender:S,uploader:this,listType:t,value:this.state.value,closable:d,onRemove:n,progressProps:v,onCancel:h,onPreview:m,extraRender:y,rtl:_,previewOnFileName:E}):null))},i=u=h,u.displayName="Upload",u.propTypes=(0,T.default)({},d.default.propTypes,Y.default.propTypes,{prefix:s.default.string.isRequired,action:s.default.string,value:s.default.array,defaultValue:s.default.array,shape:s.default.oneOf(["card"]),listType:s.default.oneOf(["text","image","card"]),list:s.default.any,name:s.default.string,data:s.default.oneOfType([s.default.object,s.default.func]),formatter:s.default.func,limit:s.default.number,timeout:s.default.number,dragable:s.default.bool,closable:s.default.bool,useDataURL:s.default.bool,disabled:s.default.bool,onSelect:s.default.func,onProgress:s.default.func,onChange:s.default.func,onSuccess:s.default.func,afterSelect:s.default.func,onRemove:s.default.func,onError:s.default.func,beforeUpload:s.default.func,onDrop:s.default.func,className:s.default.string,style:s.default.object,children:s.default.node,autoUpload:s.default.bool,request:s.default.func,progressProps:s.default.object,rtl:s.default.bool,isPreview:s.default.bool,renderPreview:s.default.func,fileKeyName:s.default.string,fileNameRender:s.default.func,actionRender:s.default.func,previewOnFileName:s.default.bool}),u.defaultProps=(0,T.default)({},d.default.defaultProps,{prefix:"next-",limit:1/0,autoUpload:!0,closable:!0,onSelect:n,onProgress:n,onChange:n,onSuccess:n,onRemove:n,onError:n,onDrop:n,beforeUpload:n,afterSelect:n,previewOnFileName:!1}),a=function(){var u=this;this.onSelect=function(e){var t,n,a=u.props,r=a.autoUpload,o=a.afterSelect,i=a.onSelect,a=a.limit,s=u.state.value.length+e.length,l=a-u.state.value.length;l<=0||(t=e=e.map(function(e){e=(0,c.fileToObject)(e);return e.state="selected",e}),n=[],ai||s+a.width>o):t<0||e<0||t+a.height>u.height||e+a.width>u.width}function L(e,t,n,a){var r=a.overlayInfo,a=a.containerInfo,n=n.split("");return 1===n.length&&n.push(""),t<0&&(n=[n[0].replace("t","b"),n[1].replace("b","t")]),e<0&&(n=[n[0].replace("l","r"),n[1].replace("r","l")]),t+r.height>a.height&&(n=[n[0].replace("b","t"),n[1].replace("t","b")]),(n=e+r.width>a.width?[n[0].replace("r","l"),n[1].replace("l","r")]:n).join("")}function O(e,t,n){var a=n.overlayInfo,n=n.containerInfo;return(t=t<0?0:t)+a.height>n.height&&(t=n.height-a.height),{left:e=(e=e<0?0:e)+a.width>n.width?n.width-a.width:e,top:t}}function be(e){var r,o,i,s,t,n,a,l,u,d,c,f=e.target,p=e.overlay,h=e.container,m=e.scrollNode,g=e.placement,y=e.placementOffset,y=void 0===y?0:y,v=e.points,v=void 0===v?["tl","bl"]:v,_=e.offset,_=void 0===_?[0,0]:_,b=e.position,b=void 0===b?"absolute":b,w=e.beforePosition,M=e.autoAdjust,M=void 0===M||M,k=e.autoHideScrollOverflow,k=void 0===k||k,e=e.rtl,S="offsetWidth"in(S=p)&&"offsetHeight"in S?{width:S.offsetWidth,height:S.offsetHeight}:{width:(S=S.getBoundingClientRect()).width,height:S.height},E=S.width,S=S.height;return"fixed"===b?(l={config:{placement:void 0,points:void 0},style:{position:b,left:_[0],top:_[1]}},w?w(l,{overlay:{node:p,width:E,height:S}}):l):(l=f.getBoundingClientRect(),r=l.width,o=l.height,i=l.left,s=l.top,t=(l=x(h)).left,l=l.top,u=h.scrollWidth,d=h.scrollHeight,n=h.scrollTop,a=h.scrollLeft,u=(l=C(g,t={targetInfo:{width:r,height:o,left:i,top:s},containerInfo:{left:t,top:l,width:u,height:d,scrollTop:n,scrollLeft:a},overlayInfo:{width:E,height:S},points:v,placementOffset:y,offset:_,container:h,rtl:e})).left,d=l.top,n=l.points,a=function(e){for(var t=e;t;){var n=he(t,"overflow");if(null!=n&&n.match(/auto|scroll|hidden/))return t;t=t.parentNode}return document.documentElement}(h),M&&g&&T(u,d,a,t)&&(g!==(v=L(u,d,g,t))&&(d=T(_=(y=C(v,t)).left,e=y.top,a,t)&&v!==(l=L(_,e,v,t))?(u=(M=O((h=C(g=l,t)).left,h.top,t)).left,M.top):(g=v,u=_,e)),u=(y=O(u,d,t)).left,d=y.top),c={config:{placement:g,points:n},style:{position:b,left:Math.round(u),top:Math.round(d)}},k&&g&&null!=m&&m.length&&m.forEach(function(e){var e=e.getBoundingClientRect(),t=e.top,n=e.left,a=e.width,e=e.height;c.style.display=s+o=e.length?{done:!0}:{done:!1,value:e[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nn.clientHeight&&0")),"shouldUpdatePosition"in r&&(delete t.shouldUpdatePosition,s.log.warning("Warning: [ shouldUpdatePosition ] is deprecated at [ ]")),"minMargin"in r&&o("minMargin","top/bottom",""),"isFullScreen"in r&&(r.overFlowScroll=!r.isFullScreen,delete t.isFullScreen,o("isFullScreen","overFlowScroll","")),t):(["target","offset","beforeOpen","onOpen","afterOpen","beforePosition","onPosition","cache","safeNode","wrapperClassName","container"].forEach(function(e){var t,n,a;e in r&&(o(e,"overlayProps.".concat(e),"Dialog"),t=r.overlayProps,n=i.__rest(r,["overlayProps"]),a=i.__assign(((a={})[e]=r[e],a),t||{}),delete n[e],r=i.__assign({overlayProps:a},n))}),r)}f=a.default.Component,i.__extends(p,f),p.prototype.render=function(){var e=this.props,t=e.v2,e=i.__rest(e,["v2"]);return t?a.default.createElement(l.default,i.__assign({},e)):a.default.createElement(o.default,i.__assign({},e))},p.Inner=u.default,p.withContext=c.withContext,p.show=function(e){return!1!==r.default.getContextProps(e,"Dialog").warning&&(e=d(e,s.log.deprecated)),(0,c.show)(e)},p.alert=function(e){return!1!==r.default.getContextProps(e,"Dialog").warning&&(e=d(e,s.log.deprecated)),(0,c.alert)(e)},p.confirm=function(e){return!1!==r.default.getContextProps(e,"Dialog").warning&&(e=d(e,s.log.deprecated)),(0,c.confirm)(e)},p.success=function(e){return(0,c.success)(e)},p.error=function(e){return(0,c.error)(e)},p.notice=function(e){return(0,c.notice)(e)},p.warning=function(e){return(0,c.warning)(e)},p.help=function(e){return(0,c.help)(e)};var f,n=p;function p(){return null!==f&&f.apply(this,arguments)||this}t.default=r.default.config(n,{transform:d})},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(95);function r(t,e){var n,a=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,n)),a}function o(t){for(var e=1;e 16.8.0")},u.useWatch=function(e,t,n){var a=(0,i.useRef)(n),r=(a.current=n,(0,i.useMemo)(function(){return e.watch(t,function(){for(var e=[],t=0;t","Select");t=l(e,t);return e.onInputUpdate&&(t.onSearch=e.onInputUpdate,t.showSearch=!0),t}}),t.default=a.default.config(r.default,{transform:l,exportNames:["focusInput","handleSearchClear"]}),e.exports=t.default,e.exports.default=t.default},function(e,t,n){"use strict";function l(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function u(t){this.setState(function(e){return null!=(e=this.constructor.getDerivedStateFromProps(t,e))?e:null}.bind(this))}function c(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"==typeof e.getDerivedStateFromProps||"function"==typeof t.getSnapshotBeforeUpdate){var n,a,r=null,o=null,i=null;if("function"==typeof t.componentWillMount?r="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(r="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?i="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==r||null!==o||null!==i)throw n=e.displayName||e.name,a="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()",Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+n+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+(null!==i?"\n "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks");if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=l,t.componentWillReceiveProps=u),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=c;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,n)}}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),c.__suppressDeprecationWarning=u.__suppressDeprecationWarning=l.__suppressDeprecationWarning=!0},function(M,e,t){"use strict";t.d(e,"a",function(){return a}),t.d(e,"b",function(){return U});var x=t(0),C=t.n(x),c=C.a.createContext(null);function l(){return n}var n=function(e){e()};var r={notify:function(){},get:function(){return[]}};function T(t,n){var o,i=r;function s(){e.onStateChange&&e.onStateChange()}function a(){var e,a,r;o||(o=n?n.addNestedSub(s):t.subscribe(s),e=l(),r=a=null,i={clear:function(){r=a=null},notify:function(){e(function(){for(var e=a;e;)e.callback(),e=e.next})},get:function(){for(var e=[],t=a;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,n=r={callback:e,next:null,prev:r};return n.prev?n.prev.next=n:a=n,function(){t&&null!==a&&(t=!1,n.next?n.next.prev=n.prev:r=n.prev,n.prev?n.prev.next=n.next:a=n.next)}}})}var e={addNestedSub:function(e){return a(),i.subscribe(e)},notifyNestedSubs:function(){i.notify()},handleChangeWrapper:s,isSubscribed:function(){return Boolean(o)},trySubscribe:a,tryUnsubscribe:function(){o&&(o(),o=void 0,i.clear(),i=r)},getListeners:function(){return i}};return e}var o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?x.useLayoutEffect:x.useEffect;var a=function(e){var t=e.store,n=e.context,e=e.children,a=Object(x.useMemo)(function(){var e=T(t);return{store:t,subscription:e}},[t]),r=Object(x.useMemo)(function(){return t.getState()},[t]),n=(o(function(){var e=a.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),r!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[a,r]),n||c);return C.a.createElement(n.Provider,{value:a},e)},L=t(43),O=t(60),e=t(110),d=t.n(e),D=t(431),f=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],N=["reactReduxForwardedRef"],j=[],P=[null,null];function Y(e,t){e=e[1];return[t.payload,e+1]}function I(e,t,n){o(function(){return e.apply(void 0,t)},n)}function A(e,t,n,a,r,o,i){e.current=a,t.current=r,n.current=!1,o.current&&(o.current=null,i())}function R(e,a,t,r,o,i,s,l,u,c){var d,f;if(e)return d=!1,f=null,t.onStateChange=e=function(){if(!d){var e,t,n=a.getState();try{e=r(n,o.current)}catch(e){f=t=e}t||(f=null),e===i.current?s.current||u():(i.current=e,l.current=e,s.current=!0,c({type:"STORE_UPDATED",payload:{error:t}}))}},t.trySubscribe(),e(),function(){if(d=!0,t.tryUnsubscribe(),t.onStateChange=null,f)throw f}}var H=function(){return[null,0]};function i(S,e){var e=e=void 0===e?{}:e,t=e.getDisplayName,r=void 0===t?function(e){return"ConnectAdvanced("+e+")"}:t,t=e.methodName,o=void 0===t?"connectAdvanced":t,t=e.renderCountProp,i=void 0===t?void 0:t,t=e.shouldHandleStateChanges,k=void 0===t||t,t=e.storeKey,s=void 0===t?"store":t,t=(e.withRef,e.forwardRef),l=void 0!==t&&t,t=e.context,t=void 0===t?c:t,u=Object(O.a)(e,f),E=t;return function(b){var e=b.displayName||b.name||"Component",t=r(e),w=Object(L.a)({},u,{getDisplayName:r,methodName:o,renderCountProp:i,shouldHandleStateChanges:k,storeKey:s,displayName:t,wrappedComponentName:e,WrappedComponent:b}),e=u.pure;var M=e?x.useMemo:function(e){return e()};function n(n){var e=Object(x.useMemo)(function(){var e=n.reactReduxForwardedRef,t=Object(O.a)(n,N);return[n.context,e,t]},[n]),t=e[0],a=e[1],r=e[2],o=Object(x.useMemo)(function(){return t&&t.Consumer&&Object(D.isContextConsumer)(C.a.createElement(t.Consumer,null))?t:E},[t,E]),i=Object(x.useContext)(o),s=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),l=(Boolean(i)&&Boolean(i.store),(s?n:i).store),u=Object(x.useMemo)(function(){return S(l.dispatch,w)},[l]),e=Object(x.useMemo)(function(){var e,t;return k?(t=(e=T(l,s?null:i.subscription)).notifyNestedSubs.bind(e),[e,t]):P},[l,s,i]),c=e[0],e=e[1],d=Object(x.useMemo)(function(){return s?i:Object(L.a)({},i,{subscription:c})},[s,i,c]),f=Object(x.useReducer)(Y,j,H),p=f[0][0],f=f[1];if(p&&p.error)throw p.error;var h=Object(x.useRef)(),m=Object(x.useRef)(r),g=Object(x.useRef)(),y=Object(x.useRef)(!1),v=M(function(){return g.current&&r===m.current?g.current:u(l.getState(),r)},[l,p,r]),_=(I(A,[m,h,y,r,v,g,e]),I(R,[k,l,c,u,m,h,y,g,e,f],[l,c,u]),Object(x.useMemo)(function(){return C.a.createElement(b,Object(L.a)({},v,{ref:a}))},[a,b,v]));return Object(x.useMemo)(function(){return k?C.a.createElement(o.Provider,{value:d},_):_},[o,_,d])}var a=e?C.a.memo(n):n;return a.WrappedComponent=b,a.displayName=n.displayName=t,l?((e=C.a.forwardRef(function(e,t){return C.a.createElement(a,Object(L.a)({},e,{reactReduxForwardedRef:t}))})).displayName=t,e.WrappedComponent=b,d()(e,b)):d()(a,b)}}function s(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function m(e,t){if(!s(e,t)){if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var r=0;r=a.length?n:(o=a[r],n=e(t&&t[o],n,a,r+1),t?Array.isArray(t)?((a=Object(u.__spreadArray)([],Object(u.__read)(t),!1))[o]=n,a):Object.assign({},t,((r={})[o]=n,r)):((a=isNaN(o)?{}:[])[o]=n,a))}(e,n,"string"==typeof t?t.replace(/\[/,".").replace(/\]/,"").split("."):"",0)}function r(e,t){if(e){var n="string"==typeof t?t.replace(/\[/,".").replace(/\]/,"").split("."):"",a=n.length;if(a)for(var r=e,o=0;oe?t.splice(e,t.length-e,n):t.push(n),i({action:"PUSH",location:n,index:e,entries:t}))})},replace:function(e,t){var n=D(e,t,s(),u.location);o.confirmTransitionTo(n,"REPLACE",a,function(e){e&&i({action:"REPLACE",location:u.entries[u.index]=n})})},go:l,goBack:function(){l(-1)},goForward:function(){l(1)},canGo:function(e){return 0<=(e=u.index+e)&&ex',"Tag"),"readonly"!==n&&"interactive"!==n||o.log.warning("Warning: [ shape=".concat(n," ] is deprecated at [ Tag ]")),"secondary"===a&&o.log.warning("Warning: [ type=secondary ] is deprecated at [ Tag ]"),["count","marked","value","onChange"].forEach(function(e){e in t&&o.log.warning("Warning: [ ".concat(e," ] is deprecated at [ Tag ]"))}),("selected"in t||"defaultSelected"in t)&&o.log.warning("Warning: [ selected|defaultSelected ] is deprecated at [ Tag ], use [ checked|defaultChecked ] at [ Tag.Selectable ] instead of it"),"closed"in t&&o.log.warning("Warning: [ closed ] is deprecated at [ Tag ], use [ onClose ] at [ Tag.Closeable ] instead of it"),"onSelect"in t&&e("onSelect","","Tag"),"afterClose"in t&&o.log.warning("Warning: [ afterClose ] is deprecated at [ Tag ], use [ afterClose ] at [ Tag.Closeable ] instead of it"),t}}),a=r.default.config(a.default),n=(0,n.assignSubComponent)(i,{Group:r.default.config(s.default),Selectable:r.default.config(l.default),Closable:a,Closeable:a});t.default=n},function(e,t,n){"use strict";n(76),n(467)},function(e,t){e=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(e,t){e=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},function(e,t,n){e.exports=!n(116)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(13),r=n(104),o=a.__importDefault(n(360)),i=a.__importDefault(n(549)),a=a.__importDefault(n(550)),n=(0,r.assignSubComponent)(o.default,{Expand:i.default,OverlayAnimate:a.default});t.default=n},function(e,t,n){"use strict";n(44),n(76),n(117),n(118),n(563)},function(e,t,n){"use strict";t.__esModule=!0;var r=p(n(7)),o=p(n(24)),a=p(n(3)),i=p(n(639)),s=p(n(640)),l=p(n(395)),u=p(n(397)),c=p(n(641)),d=p(n(642)),f=p(n(396)),n=p(n(398));function p(e){return e&&e.__esModule?e:{default:e}}i.default.Header=s.default,i.default.Media=u.default,i.default.Divider=c.default,i.default.Content=d.default,i.default.Actions=n.default,i.default.BulletHeader=l.default,i.default.CollaspeContent=f.default,i.default.CollapseContent=f.default,t.default=a.default.config(i.default,{transform:function(e,t){var n,a;return"titlePrefixLine"in e&&(t("titlePrefixLine","showTitleBullet","Card"),a=(n=e).titlePrefixLine,n=(0,o.default)(n,["titlePrefixLine"]),e=(0,r.default)({showTitleBullet:a},n)),"titleBottomLine"in e&&(t("titleBottomLine","showHeadDivider","Card"),n=(a=e).titleBottomLine,a=(0,o.default)(a,["titleBottomLine"]),e=(0,r.default)({showHeadDivider:n},a)),"bodyHeight"in e&&(t("bodyHeight","contentHeight","Card"),a=(n=e).bodyHeight,t=(0,o.default)(n,["bodyHeight"]),e=(0,r.default)({contentHeight:a},t)),e}}),e.exports=t.default,e.exports.default=t.default},function(e,t,n){"use strict";n.d(t,"b",function(){return s});var a=n(21),r=n(35),o=n(25),i={namespaces:[]},s=function(e){return function(n){return r.a.get("v1/console/namespaces",{params:e}).then(function(e){var t=e.code,e=e.data;n({type:o.b,data:200===t?e:[]})})}};t.a=function(){var e=0=n.length?(l=!!(d=h(o,u)))&&"get"in d&&!("originalValue"in d.get)?d.get:o[u]:(l=S(o,u),o[u]),l&&!i&&(b[c]=o)}}return o}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var v=c(n(7)),a=c(n(8)),r=c(n(10)),o=c(n(11)),i=n(0),_=c(i),s=n(26),l=c(n(4)),b=c(n(19)),u=n(12);function c(e){return e&&e.__esModule?e:{default:e}}var d,f=u.func.bindCtx,w=u.obj.pickOthers,o=(d=i.Component,(0,o.default)(M,d),M.prototype.componentDidMount=function(){this.itemNode=(0,s.findDOMNode)(this);var e=this.props,t=e.parentMode,n=e.root,e=e.menu;e?this.menuNode=(0,s.findDOMNode)(e):"popup"===t?this.menuNode=this.itemNode.parentNode:(this.menuNode=(0,s.findDOMNode)(n),t=(e=n.props).prefix,n=e.header,e=e.footer,(n||e)&&(this.menuNode=this.menuNode.querySelector("."+t+"menu-content"))),this.setFocus()},M.prototype.componentDidUpdate=function(){var e=this.props.root;e.props.focusable&&e.state.focusedKey!==this.lastFocusedKey&&this.setFocus()},M.prototype.focusable=function(){var e=this.props,t=e.root,n=e.type,e=e.disabled;return t.props.focusable&&("submenu"===n||!e)},M.prototype.getFocused=function(){var e=this.props,t=e._key;return e.root.state.focusedKey===t},M.prototype.setFocus=function(){var e=this.getFocused();this.lastFocusedKey=this.props.root.state.focusedKey,e&&(this.focusable()&&this.itemNode.focus({preventScroll:!0}),this.menuNode)&&this.menuNode.scrollHeight>this.menuNode.clientHeight&&(this.menuNode.clientHeight+this.menuNode.scrollTop<(e=this.itemNode.offsetTop+this.itemNode.offsetHeight)?this.menuNode.scrollTop=e-this.menuNode.clientHeight:this.itemNode.offsetTope.length)&&(t=e.length);for(var n=0,a=Array(t);n>16&255),o.push(r>>8&255),o.push(255&r)),r=r<<6|a.indexOf(t.charAt(i));return 0==(e=n%4*6)?(o.push(r>>16&255),o.push(r>>8&255),o.push(255&r)):18==e?(o.push(r>>10&255),o.push(r>>2&255)):12==e&&o.push(r>>4&255),new Uint8Array(o)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){for(var t,n="",a=0,r=e.length,o=g,i=0;i>18&63]+o[a>>12&63])+o[a>>6&63]+o[63&a]),a=(a<<8)+e[i];return 0==(t=r%3)?n=(n=n+o[a>>18&63]+o[a>>12&63])+o[a>>6&63]+o[63&a]:2==t?n=(n=n+o[a>>10&63]+o[a>>4&63])+o[a<<2&63]+o[64]:1==t&&(n=(n=n+o[a>>2&63]+o[a<<4&63])+o[64]+o[64]),n}}),V=Object.prototype.hasOwnProperty,K=Object.prototype.toString;var s=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null!==e)for(var t,n,a,r=[],o=e,i=0,s=o.length;i>10),56320+(l-65536&1023)),e.position++}else x(e,"unknown escape sequence");n=a=e.position}else w(u)?(T(e,n,a,!0),j(e,D(e,!1,t)),n=a=e.position):e.position===e.lineStart&&N(e)?x(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}x(e,"unexpected end of the stream within a double quoted scalar")}}function ge(e,t){var n,a,r=e.tag,o=e.anchor,i=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),a=e.input.charCodeAt(e.position);0!==a&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,x(e,"tab characters must not be used in indentation")),45===a)&&S(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,D(e,!0,-1)&&e.lineIndent<=t)i.push(null),a=e.input.charCodeAt(e.position);else if(n=e.line,P(e,t,Z,!1,!0),i.push(e.result),D(e,!0,-1),a=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==a)x(e,"bad indentation of a sequence entry");else if(e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt)&&(y&&(i=e.line,s=e.lineStart,l=e.position),P(e,t,_,!0,r)&&(y?m=e.result:g=e.result),y||(L(e,f,p,h,m,g,i,s,l),h=m=g=null),D(e,!0,-1),u=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==u)x(e,"bad indentation of a mapping entry");else if(e.lineIndentl&&(l=e.lineIndent),w(d))u++;else{if(e.lineIndent=t){i=!0,f=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=u;break}}i&&(T(e,r,o,!1),j(e,e.line-s),r=o=e.position,i=!1),M(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}if(T(e,r,o,!1),e.result)return 1;e.kind=c,e.result=d}}(e,a,v===n)&&(h=!0,null===e.tag)&&(e.tag="?"):(h=!0,null===e.tag&&null===e.anchor||x(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===f&&(h=s&&ge(e,r))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&x(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),l=0,u=e.implicitTypes.length;l"),null!==e.result&&d.kind!==e.kind&&x(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):x(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||h}function ye(e,t){t=t||{};var n=new de(e=0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0))?e.slice(1):e,t),t=e.indexOf("\0");for(-1!==t&&(n.position=t,x(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.positiondocument.F=Object<\/script>"),e.close(),u=e.F;t--;)delete u[l][i[t]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[l]=r(e),n=new a,a[l]=null,n[s]=e):n=u(),void 0===t?n:o(n,t)}},function(e,t,n){var a=n(91).f,r=n(92),o=n(103)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&a(e,o,{configurable:!0,value:t})}},function(e,t,n){t.f=n(103)},function(e,t,n){var a=n(82),r=n(83),o=n(130),i=n(166),s=n(91).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=!o&&a.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:i.f(e)})}},function(e,t,n){"use strict";var a=i(n(541)),r=i(n(546)),o=i(n(363)),n=i(n(361));function i(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:n.default,TransitionGroup:o.default,ReplaceTransition:r.default,CSSTransition:a.default}},function(e,t,n){"use strict";n(81),n(564)},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function a(){}var r,u=n(13),c=u.__importStar(n(0)),o=u.__importDefault(n(4)),d=u.__importDefault(n(19)),l=u.__importDefault(n(22)),i=u.__importDefault(n(28)),s=u.__importDefault(n(45)),f=n(12),p=f.func.makeChain,h=f.obj.pickOthers,n=(r=c.Component,u.__extends(m,r),m.prototype.componentDidUpdate=function(){var e=this.props,t=e.height,n=e.style,e=e.v2,a=n.maxHeight,n=n.height,a=void 0===n?a||t:n;this.bodyNode&&e&&a&&"auto"!==a&&(t={},e=n=0,n=(n=this.headerNode?this.headerNode.getBoundingClientRect().height:n)+(e=this.footerNode?this.footerNode.getBoundingClientRect().height:e),(e=a)&&"string"==typeof a&&(e.match(/calc|vh/)?(t.maxHeight="calc(".concat(a," - ").concat(n,"px)"),t.overflowY="auto"):e=parseInt(a)),"number"==typeof e&&ne.length&&e.every(function(e,t){return e===n[t]})},t.isAvailablePos=function(e,t,n){var n=n[t],a=n.type,n=n.disabled;return r(e,t)&&("item"===a&&!n||"submenu"===a)});t.getFirstAvaliablelChildKey=function(t,n){var e=Object.keys(n).find(function(e){return a(t+"-0",e,n)});return e?n[e].key:null},t.getChildSelected=function(e){var t,n=e.selectMode,a=e.selectedKeys,r=e._k2n,e=e._key;return!!r&&(t=(r[e]&&r[e].pos)+"-",!!n)&&a.some(function(e){return r[e]&&0===r[e].pos.indexOf(t)})}},function(e,t,n){var o=n(651),i=Object.prototype.hasOwnProperty;function s(e){return Array.isArray(e)?"array":typeof e}function l(e,t){var n,a=0,r=0;for(n in e)if(i.call(e,n)){if("style"===n){if(!o(e[n],t[n]))return!1}else if("children"!==n&&e[n]!==t[n])return!1;a++}for(n in t)i.call(t,n)&&r++;return a===r&&function e(t,n){var a=s(t);if(a!==s(n))return!1;switch(a){case"array":if(t.length!==n.length)return!1;for(var r=0;r{var t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;const createDateTime=__webpack_require__(679),createDateTimeFloat=__webpack_require__(680),createDate=__webpack_require__(681),createTime=__webpack_require__(682),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}const _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){if(hasOwnProperty.call(e,t))return 1;"__proto__"===t&&defineProperty(e,"__proto__",descriptor)}const INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}const TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}const _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}const LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(_){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch(e){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}const INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}const FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType(e){var t=typeof e;if("object"==t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx;var n,a=e.key.pop();for(n of e.key){if(hasKey(t,n)&&!isTable(t[n]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,a))throw this.error(new TomlError("Can't redefine existing key"));return t[_declared]=!0,isInteger(e.value)||isFloat(e.value)?t[a]=e.value.valueOf():t[a]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return();if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("comments")}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(!hasKey(this.ctx,e)||isTable(this.ctx[e])&&!this.ctx[e][_declared])return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Can't redefine existing key"))}if(this.char!==CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));var t;if(isList(this.ctx[e]))return t=Table(),this.ctx[e].push(t),this.ctx=t,this.next(this.parseListEnd);throw this.error(new TomlError("Can't redefine an existing key"))}if(this.char!==CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.consume(),this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd3):(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd3(){return this.char===CHAR_APOS?(this.state.buf+="'",this.next(this.parseLiteralMultiEnd4)):this.returnNow()}parseLiteralMultiEnd4(){return this.char===CHAR_APOS?(this.state.buf+="'",this.return()):this.returnNow()}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}errorControlCharIn(e){let t="\\u00";return this.char<16&&(t+="0"),t+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in ${e}, use ${t} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd3):(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEnd3(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.next(this.parseMultiEnd4)):this.returnNow()}parseMultiEnd4(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.return()):this.returnNow()}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{var t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),4<=this.state.buf.length)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),8<=this.state.buf.length)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);var e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(4{for(t=String(t);t.length "+o[t]+"\n")+(n+" ");for(let e=0;er&&!o.warned&&(o.warned=!0,(a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=o.length,n=a,console)&&console.warn&&console.warn(n)),e}function f(e,t,n){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},t=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(e);return t.listener=n,e.wrapFn=t}function p(e,t,n){e=e._events;if(void 0===e)return[];e=e[t];if(void 0===e)return[];if("function"==typeof e)return n?[e.listener||e]:[e];if(n){for(var a=e,r=new Array(a.length),o=0;o + * @license MIT + */ +var k=j(687),o=j(688),s=j(412);function n(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function f(e,t){if(d.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var n=(e="string"!=typeof e?""+e:e).length;if(0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return O(e).length;default:if(a)return L(e).length;t=(""+t).toLowerCase(),a=!0}}function t(e,t,n){var a,r=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,i=t,s=n,l=o.length;(!s||s<0||l=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=d.from(t,a)),d.isBuffer(t))return 0===t.length?-1:m(e,t,n,a,r);if("number"==typeof t)return t&=255,d.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(r?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):m(e,[t],n,a,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,a,r){var o=1,i=e.length,s=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i/=o=2,s/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r)for(var u=-1,c=n;c>8,r.push(n%256),r.push(a);return r}(t,e.length-n),e,n,a)}function E(e,t,n){n=Math.min(e.length,n);for(var a=[],r=t;r>>10&1023|55296),c=56320|1023&c),a.push(c),r+=d}var f=a,p=f.length;if(p<=v)return String.fromCharCode.apply(String,f);for(var h="",m=0;mt)&&(e+=" ... "),""},d.prototype.compare=function(e,t,n,a,r){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),(t=void 0===t?0:t)<0||n>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(r<=a&&n<=t)return 0;if(r<=a)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(o,i),l=this.slice(a,r),u=e.slice(t,n),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");a=a||"utf8";for(var o,i,s,l=!1;;)switch(a){case"hex":var u=this,c=e,d=t,f=n,p=(d=Number(d)||0,u.length-d);if((!f||p<(f=Number(f)))&&(f=p),(p=c.length)%2!=0)throw new TypeError("Invalid hex string");p/2e.length)throw new RangeError("Index out of range")}function w(e,t,n,a){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(a?r:1-r)}function M(e,t,n,a){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(a?r:3-r)&255}function S(e,t,n,a){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,a,r){return r||S(e,0,n,4),o.write(e,t,n,a,23,4),n+4}function C(e,t,n,a,r){return r||S(e,0,n,8),o.write(e,t,n,a,52,8),n+8}d.prototype.slice=function(e,t){var n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n>>8):w(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=0,o=1,i=0;for(this[t]=255&e;++r>0)-i&255;return t+n},d.prototype.writeIntBE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=n-1,o=1,i=0;for(this[t+r]=255&e;0<=--r&&(o*=256);)e<0&&0===i&&0!==this[t+r+1]&&(i=1),this[t+r]=(e/o>>0)-i&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):w(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,a){if(n=n||0,a||0===a||(a=this.length),t>=e.length&&(t=e.length),(a=0=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length);var r,o=(a=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function O(e){return k.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}.call(this,j(64))},function(u,e,M){"use strict";!function(e,t,n){var p=M(140);function d(o){var i=this;this.next=null,this.entry=null,this.finish=function(){var e=i,t=o,n=void 0,a=e.entry;for(e.entry=null;a;){var r=a.callback;t.pendingcb--,r(n),a=a.next}t.corkedRequestsFree.next=e}}u.exports=s;var o,f=!e.browser&&-1<["v0.10","v0.9."].indexOf(e.version.slice(0,5))?t:p.nextTick,e=(s.WritableState=i,Object.create(M(120))),t=(e.inherits=M(108),{deprecate:M(692)}),a=M(413),h=M(187).Buffer,m=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var r,n=M(414);function g(){}function i(e,c){o=o||M(93),e=e||{};var t=c instanceof o,n=(this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),e.highWaterMark),a=e.writableHighWaterMark,r=this.objectMode?16:16384,n=(this.highWaterMark=n||0===n?n:t&&(a||0===a)?a:r,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,(this.destroyed=!1)===e.decodeStrings);this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){e=e,n=(t=c)._writableState,a=n.sync,r=n.writecb;var t,n,a,r,o=n;{var i,s,l,u;(o.writing=!1,o.writecb=null,o.length-=o.writelen,o.writelen=0,e)?(o=t,s=a,l=e,u=r,--(i=n).pendingcb,s?(p.nextTick(u,l),p.nextTick(w,o,i),o._writableState.errorEmitted=!0,o.emit("error",l)):(u(l),o._writableState.errorEmitted=!0,o.emit("error",l),w(o,i))):((e=b(n))||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),a?f(v,t,n,e,r):v(t,n,e,r))}},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new d(this)}e.inherits(s,a),i.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(i.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}function s(e){if(o=o||M(93),!(r.call(s,this)||this instanceof o))return new s(e);this._writableState=new i(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final)&&(this._final=e.final),a.call(this)}function y(e,t,n,a,r,o,i){t.writelen=a,t.writecb=i,t.writing=!0,t.sync=!0,n?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function v(e,t,n,a){var r;n||(n=e,0===(r=t).length&&r.needDrain&&(r.needDrain=!1,n.emit("drain"))),t.pendingcb--,a(),w(e,t)}function _(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){for(var a=t.bufferedRequestCount,r=new Array(a),a=t.corkedRequestsFree,o=(a.entry=n,0),i=!0;n;)(r[o]=n).isBuf||(i=!1),n=n.next,o+=1;r.allBuffers=i,y(e,t,!0,t.length,r,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new d(t),t.bufferedRequestCount=0}else{for(;n;){var s=n.chunk,l=n.encoding,u=n.callback;if(y(e,t,!1,t.objectMode?1:s.length,s,l,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function l(t,n){t._final(function(e){n.pendingcb--,e&&t.emit("error",e),n.prefinished=!0,t.emit("prefinish"),w(t,n)})}function w(e,t){var n,a,r=b(t);return r&&(n=e,(a=t).prefinished||a.finalCalled||("function"==typeof n._final?(a.pendingcb++,a.finalCalled=!0,p.nextTick(l,n,a)):(a.prefinished=!0,n.emit("prefinish"))),0===t.pendingcb)&&(t.finished=!0,e.emit("finish")),r}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(r=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(e){return!!r.call(this,e)||this===s&&e&&e._writableState instanceof i}})):r=function(e){return e instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(e,t,n){var a,r,o,i,s,l,u,c=this._writableState,d=!1,f=!c.objectMode&&(f=e,h.isBuffer(f)||f instanceof m);return f&&!h.isBuffer(e)&&(s=e,e=h.from(s)),"function"==typeof t&&(n=t,t=null),t=f?"buffer":t||c.defaultEncoding,"function"!=typeof n&&(n=g),c.ended?(s=this,l=n,u=new Error("write after end"),s.emit("error",u),p.nextTick(l,u)):(f||(l=this,u=c,r=n,i=!(o=!0),null===(a=e)?i=new TypeError("May not write null values to stream"):"string"==typeof a||void 0===a||u.objectMode||(i=new TypeError("Invalid non-string/buffer chunk")),i&&(l.emit("error",i),p.nextTick(r,i),o=!1),o))&&(c.pendingcb++,d=function(e,t,n,a,r,o){n||(i=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,a,r),a!==i&&(n=!0,r="buffer",a=i));var i=t.objectMode?1:a.length,s=(t.length+=i,t.length=u,u=(0,D.default)(((u={})[n+"upload-inner"]=!0,u[n+"hidden"]=x,u)),C=this.props.children;return"card"===r&&(r=(0,D.default)(((r={})[n+"upload-card"]=!0,r[n+"disabled"]=l,r)),C=O.default.createElement("div",{className:r},O.default.createElement(j.default,{size:"large",type:"add",className:n+"upload-add-icon"}),O.default.createElement("div",{tabIndex:"0",role:"button",className:n+"upload-text"},C))),b?"function"==typeof w?(b=(0,D.default)(((r={})[n+"form-preview"]=!0,r[o]=!!o,r)),O.default.createElement("div",{style:i,className:b},w(this.state.value,this.props))):t?O.default.createElement(Y.default,{isPreview:!0,listType:t,style:i,className:o,value:this.state.value,onPreview:m}):null:(n=l?N.func.prevent:p,r=N.obj.pickAttrsWith(this.props,"data-"),O.default.createElement("div",(0,T.default)({className:f,style:i},r),O.default.createElement(P.default,(0,T.default)({},e,{name:M,beforeUpload:d,dragable:a,disabled:l||x,className:u,onSelect:this.onSelect,onDrop:this.onDrop,onProgress:this.onProgress,onSuccess:this.onSuccess,onError:this.onError,ref:this.saveUploaderRef}),C),t&&"none"!==t||g?O.default.createElement(Y.default,{useDataURL:s,fileNameRender:S,actionRender:k,uploader:this,listType:t,value:this.state.value,closable:c,onRemove:n,progressProps:v,onCancel:h,onPreview:m,extraRender:y,rtl:_,previewOnFileName:E}):null))},i=u=h,u.displayName="Upload",u.propTypes=(0,T.default)({},c.default.propTypes,Y.default.propTypes,{prefix:s.default.string.isRequired,action:s.default.string,value:s.default.array,defaultValue:s.default.array,shape:s.default.oneOf(["card"]),listType:s.default.oneOf(["text","image","card","none"]),list:s.default.any,name:s.default.string,data:s.default.oneOfType([s.default.object,s.default.func]),formatter:s.default.func,limit:s.default.number,timeout:s.default.number,dragable:s.default.bool,closable:s.default.bool,useDataURL:s.default.bool,disabled:s.default.bool,onSelect:s.default.func,onProgress:s.default.func,onChange:s.default.func,onSuccess:s.default.func,afterSelect:s.default.func,onRemove:s.default.func,onError:s.default.func,beforeUpload:s.default.func,onDrop:s.default.func,className:s.default.string,style:s.default.object,children:s.default.node,autoUpload:s.default.bool,request:s.default.func,progressProps:s.default.object,rtl:s.default.bool,isPreview:s.default.bool,renderPreview:s.default.func,fileKeyName:s.default.string,fileNameRender:s.default.func,actionRender:s.default.func,previewOnFileName:s.default.bool}),u.defaultProps=(0,T.default)({},c.default.defaultProps,{prefix:"next-",limit:1/0,autoUpload:!0,closable:!0,onSelect:n,onProgress:n,onChange:n,onSuccess:n,onRemove:n,onError:n,onDrop:n,beforeUpload:n,afterSelect:n,previewOnFileName:!1}),a=function(){var u=this;this.onSelect=function(e){var t,n,a=u.props,r=a.autoUpload,o=a.afterSelect,i=a.onSelect,a=a.limit,s=u.state.value.length+e.length,l=a-u.state.value.length;l<=0||(t=e=e.map(function(e){e=(0,d.fileToObject)(e);return e.state="selected",e}),n=[],a=e.length?{done:!0}:{done:!1,value:e[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);ni||s+a.width>o):t<0||e<0||t+a.height>u.height||e+a.width>u.width}function h(e,t,n,a){function r(){for(var e=arguments.length,t=new Array(e),n=0;na.width,t=t+o.height>a.height,s=new Set;n&&r("t","tl","tr"),e&&r("r","rt","rb"),t&&r("b","bl","br"),i&&r("l","lt","lb");var c,d,f,o=Object.keys(p).filter(function(e){return!s.has(e)});return o.length?(c={l:"r",r:"l",t:"b",b:"t","":""},(d={t:10,b:6,l:10,r:6})[l]=12,d[c[l]]=11,(f={"":2,l:1,r:0,t:1,b:0})[u]=3,o.sort(function(e,t){var e=e.split(""),n=e[0],e=e[1],e=void 0===e?"":e,t=t.split(""),a=t[0],t=t[1],t=void 0===t?"":t,r=d[n],o=f[e],i=d[a],s=f[t];return n===a?sa.width,t=t+r.height>a.height;if(3===[n,i,e,t].filter(Boolean).length){a=null==(r=[{direction:"t",value:n},{direction:"r",value:e},{direction:"b",value:t},{direction:"l",value:i}].find(function(e){return!e.value}))?void 0:r.direction;if(a&&a!==o)return a}return null}(e,t,n,a);return o?{left:(s=W(o,a)).left,top:s.top,placement:o}:null}function U(e){var t=c(e),n=t.left,t=t.top,a=e.scrollWidth,r=e.scrollHeight,o=e.scrollTop;return{left:n,top:t,width:a,height:r,scrollLeft:e.scrollLeft,scrollTop:o}}function ke(e){var t=e.target,n=e.overlay,a=e.container,r=e.scrollNode,o=e.placement,i=e.placementOffset,i=void 0===i?0:i,s=e.points,s=void 0===s?["tl","bl"]:s,l=e.offset,l=void 0===l?[0,0]:l,u=e.position,u=void 0===u?"absolute":u,c=e.beforePosition,d=e.autoAdjust,d=void 0===d||d,f=e.autoHideScrollOverflow,f=void 0===f||f,e=e.rtl,p="offsetWidth"in(p=n)&&"offsetHeight"in p?{width:p.offsetWidth,height:p.offsetHeight}:{width:(p=p.getBoundingClientRect()).width,height:p.height},h=p.width,p=p.height;if("fixed"===u)return k={config:{placement:void 0,points:void 0},style:{position:u,left:l[0],top:l[1]}},c?c(k,{overlay:{node:n,width:h,height:p}}):k;var m,g,y,v,_,b,w,M,S,k=t.getBoundingClientRect(),E=k.width,x=k.height,C=k.left,T=k.top,k=U(a),L=function e(t){var n,a=document.documentElement;return t?["fixed","absolute"].includes(me(t,"position"))?H(t)?t:(n=F(t)||I(t))?e(n):a:H(t)?t:t.parentElement&&e(t.parentElement)||a:a}(a),O=k,k={targetInfo:{width:E,height:x,left:C,top:T},containerInfo:k,overlay:n,overlayInfo:{width:h,height:p},points:s,placementOffset:i,offset:l,container:a,rtl:e,viewport:L,viewportInfo:O=L!==a?U(L):O},s=W(o,k),i=s.left,l=s.top,e=s.points,D=(d&&o&&B(i,l,L,k)&&((a=K(i,l,o,k))&&(i=a.left,l=a.top,o=a.placement),O=i,s=l,d=o,a=(L=k).viewport,_=L.viewportInfo,b=L.container,w=L.containerInfo,M=L.overlayInfo,S=L.rtl,S=B(O,s,a,L)?(L=O,O=s,m=s=0,a!==b&&(a=w.left,b=w.top,L+=s=a-w.scrollLeft,O+=m=b-w.scrollTop),a=M.width,b=M.height,w=L<0,M=O<0,y=(g=_.width)=e.length?{done:!0}:{done:!1,value:e[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nn.clientHeight&&0r;)!i(a,n=t[r++])||~l(o,n)||o.push(n);return o}},function(e,t,n){var a=n(207);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==a(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";function y(){return this}var v=n(127),_=n(95),b=n(209),w=n(96),M=n(156),k=n(488),S=n(158),E=n(491),x=n(99)("iterator"),C=!([].keys&&"next"in[].keys()),T="values";e.exports=function(e,t,n,a,r,o,i){k(n,t,a);function s(e){if(!C&&e in f)return f[e];switch(e){case"keys":case T:return function(){return new n(this,e)}}return function(){return new n(this,e)}}var l,u,a=t+" Iterator",d=r==T,c=!1,f=e.prototype,p=f[x]||f["@@iterator"]||r&&f[r],h=p||s(r),m=r?d?s("entries"):h:void 0,g="Array"==t&&f.entries||p;if(g&&(g=E(g.call(new e)))!==Object.prototype&&g.next&&(S(g,a,!0),v||"function"==typeof g[x]||w(g,x,y)),d&&p&&p.name!==T&&(c=!0,h=function(){return p.call(this)}),v&&!i||!C&&!c&&f[x]||w(f,x,h),M[t]=h,M[a]=y,r)if(l={values:d?h:s(T),keys:o?h:s("keys"),entries:m},i)for(u in l)u in f||b(f,u,l[u]);else _(_.P+_.F*(C||c),t,l);return l}},function(e,t,n){e.exports=n(96)},function(e,t,n){var a=n(205),r=n(153).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,r)}},function(e,t,n){var a=n(129),r=n(125),o=n(98),i=n(148),s=n(89),l=n(203),u=Object.getOwnPropertyDescriptor;t.f=n(81)?u:function(e,t){if(e=o(e),t=i(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return r(!a.f.call(e,t),e[t])}},function(e,t,n){"use strict";t.__esModule=!0;var v=a(n(2));t.default=function(e,t,n){var a=e.prefix,r=e.locale,o=(e.defaultPropsConfig,e.pure),i=e.rtl,s=e.device,l=e.popupContainer,e=e.errorBoundary,u=t.nextPrefix,d=t.nextLocale,c=t.nextDefaultPropsConfig,f=t.nextPure,p=t.nextWarning,h=t.nextRtl,m=t.nextDevice,g=t.nextPopupContainer,t=t.nextErrorBoundary,a=a||u,u=void 0,y=n;switch(n){case"DatePicker2":y="DatePicker";break;case"Calendar2":y="Calendar";break;case"TimePicker2":y="TimePicker"}d&&(u=d[y])&&(u.momentLocale=d.momentLocale);n=void 0;r?n=b.obj.deepMerge({},_.default[y],u,r):u&&(n=b.obj.deepMerge({},_.default[y],u));d="boolean"==typeof o?o:f,r="boolean"==typeof i?i:h,u=(0,v.default)({},w(t),w(e));"open"in u||(u.open=!1);return{prefix:a,locale:n,pure:d,rtl:r,warning:p,defaultPropsConfig:c||{},device:s||m||void 0,popupContainer:l||g,errorBoundary:u}};var _=a(n(44)),b=n(11);function a(e){return e&&e.__esModule?e:{default:e}}var w=function(e){return null==e?{}:"boolean"==typeof e?{open:e}:(0,v.default)({open:!0},e)};e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.matches=t.hasDOM=void 0;var a=n(42),r=(a=a)&&a.__esModule?a:{default:a},o=(t.hasClass=l,t.addClass=u,t.removeClass=d,t.toggleClass=function(e,t){if(!s||!e)return!1;{var n;return e.classList?e.classList.toggle(t):(((n=l(e,t))?d:u)(e,t,!0),!n)}},t.getNodeHozWhitespace=function(e){var t=m(e,"paddingLeft"),n=m(e,"paddingRight"),a=m(e,"marginLeft"),e=m(e,"marginRight");return t+n+a+e},t.getStyle=m,t.setStyle=g,t.scrollbar=v,t.hasScroll=function(e){if("hidden"===m(e,"overflow"))return!1;var t=e.parentNode;return t&&t.scrollHeight>t.clientHeight&&0=t?e:""+Array(t+1-a.length).join(n)+e},t={s:o,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),a=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+o(a,2,"0")+":"+o(r,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var s=t.name;S[s]=t,r=s}return!a&&r&&(u=r),r||!a&&u},E=function(e,t){if(a(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new s(n)},x=t,s=(x.l=r,x.i=a,x.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},function(){function e(e){this.$L=r(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[n]=!0}var t=e.prototype;return t.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var a=t.match(i);if(a){var r=a[2]-1||0,o=(a[7]||"0").substring(0,3);return n?new Date(Date.UTC(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,o)):new Date(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,o)}}return new Date(t)}(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return x},t.isValid=function(){return!(this.$d.toString()===M)},t.isSame=function(e,t){var n=E(e);return this.startOf(t)<=n&&n<=this.endOf(t)},t.isAfter=function(e,t){return E(e)t.clientHeight&&0=t?e:""+Array(t+1-a.length).join(n)+e},t={s:o,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),a=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+o(a,2,"0")+":"+o(r,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var s=t.name;k[s]=t,r=s}return!a&&r&&(u=r),r||!a&&u},E=function(e,t){if(a(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new s(n)},x=t,s=(x.l=r,x.i=a,x.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},function(){function e(e){this.$L=r(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[n]=!0}var t=e.prototype;return t.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var a=t.match(i);if(a){var r=a[2]-1||0,o=(a[7]||"0").substring(0,3);return n?new Date(Date.UTC(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,o)):new Date(a[1],r,a[3]||1,a[4]||0,a[5]||0,a[6]||0,o)}}return new Date(t)}(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return x},t.isValid=function(){return!(this.$d.toString()===M)},t.isSame=function(e,t){var n=E(e);return this.startOf(t)<=n&&n<=this.endOf(t)},t.isAfter=function(e,t){return E(e)=20?"ste":"de")},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){if(e<12)return n?"vm":"VM";else return n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=function(e){return e===0?0:e===1?1:e===2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},l={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(i){return function(e,t,n,a){var r=s(e),o=l[i][s(e)];if(r===2)o=o[t?0:1];return o.replace(/%d/i,e)}},r=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],o;e.defineLocale("ar",{months:r,monthsShort:r,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){if(e<12)return"ص";else return"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=function(e){return e===0?0:e===1?1:e===2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},l={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(i){return function(e,t,n,a){var r=s(e),o=l[i][s(e)];if(r===2)o=o[t?0:1];return o.replace(/%d/i,e)}},r=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],o;e.defineLocale("ar",{months:r,monthsShort:r,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){if(e<12)return"ص";else return"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var s=function(e){return e===0?0:e===1?1:e===2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},l={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},t=function(i){return function(e,t,n,a){var r=s(e),o=l[i][s(e)];if(r===2)o=o[t?0:1];return o.replace(/%d/i,e)}},n=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],a;e.defineLocale("ar-dz",{months:n,monthsShort:n,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){if(e<12)return"ص";else return"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:t("s"),ss:t("s"),m:t("m"),mm:t("m"),h:t("h"),hh:t("h"),d:t("d"),dd:t("d"),M:t("M"),MM:t("M"),y:t("y"),yy:t("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var s=function(e){return e===0?0:e===1?1:e===2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},l={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},t=function(i){return function(e,t,n,a){var r=s(e),o=l[i][s(e)];if(r===2)o=o[t?0:1];return o.replace(/%d/i,e)}},n=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],a;e.defineLocale("ar-dz",{months:n,monthsShort:n,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){if(e<12)return"ص";else return"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:t("s"),ss:t("s"),m:t("m"),mm:t("m"),h:t("h"),hh:t("h"),d:t("d"),dd:t("d"),M:t("M"),MM:t("M"),y:t("y"),yy:t("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},s=function(e){return e===0?0:e===1?1:e===2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},l={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},n=function(i){return function(e,t,n,a){var r=s(e),o=l[i][s(e)];if(r===2)o=o[t?0:1];return o.replace(/%d/i,e)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],r;e.defineLocale("ar-ly",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){if(e<12)return"ص";else return"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:n("s"),ss:n("s"),m:n("m"),mm:n("m"),h:n("h"),hh:n("h"),d:n("d"),dd:n("d"),M:n("M"),MM:n("M"),y:n("y"),yy:n("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},s=function(e){return e===0?0:e===1?1:e===2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},l={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},n=function(i){return function(e,t,n,a){var r=s(e),o=l[i][s(e)];if(r===2)o=o[t?0:1];return o.replace(/%d/i,e)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],r;e.defineLocale("ar-ly",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){if(e<12)return"ص";else return"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:n("s"),ss:n("s"),m:n("m"),mm:n("m"),h:n("h"),hh:n("h"),d:n("d"),dd:n("d"),M:n("M"),MM:n("M"),y:n("y"),yy:n("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},a;e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){if(e<12)return"ص";else return"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},a;e.defineLocale("ar-ps",{months:"كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل".split("_"),monthsShort:"ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){if(e<12)return"ص";else return"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).split("").reverse().join("").replace(/[١٢](?![\u062a\u0643])/g,function(e){return n[e]}).split("").reverse().join("").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},a;e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){if(e<12)return"ص";else return"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var r={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},t;e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){if(e<4)return"gecə";else if(e<12)return"səhər";else if(e<17)return"gündüz";else return"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(e===0)return e+"-ıncı";var t=e%10,n=e%100-t,a=e>=100?100:null;return e+(r[t]||r[n]||r[a])},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function r(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function t(e,t,n){var a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};if(n==="m")return t?"хвіліна":"хвіліну";else if(n==="h")return t?"гадзіна":"гадзіну";else return e+" "+r(a[n],+e)}var n;e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){if(e<4)return"ночы";else if(e<12)return"раніцы";else if(e<17)return"дня";else return"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return(e%10===2||e%10===3)&&e%100!==12&&e%100!==13?e+"-і":e+"-ы";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var r={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},t;e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){if(e<4)return"gecə";else if(e<12)return"səhər";else if(e<17)return"gündüz";else return"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(e===0)return e+"-ıncı";var t=e%10,n=e%100-t,a=e>=100?100:null;return e+(r[t]||r[n]||r[a])},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;if(e===0)return e+"-ев";else if(n===0)return e+"-ен";else if(n>10&&n<20)return e+"-ти";else if(t===1)return e+"-ви";else if(t===2)return e+"-ри";else if(t===7||t===8)return e+"-ми";else return e+"-ти"},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function r(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function t(e,t,n){var a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};if(n==="m")return t?"хвіліна":"хвіліну";else if(n==="h")return t?"гадзіна":"гадзіну";else return e+" "+r(a[n],+e)}var n;e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){if(e<4)return"ночы";else if(e<12)return"раніцы";else if(e<17)return"дня";else return"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return(e%10===2||e%10===3)&&e%100!==12&&e%100!==13?e+"-і":e+"-ы";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;if(e===0)return e+"-ев";else if(n===0)return e+"-ен";else if(n>10&&n<20)return e+"-ти";else if(t===1)return e+"-ви";else if(t===2)return e+"-ри";else if(t===7||t===8)return e+"-ми";else return e+"-ти"},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},a;e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="রাত"&&e>=4||t==="দুপুর"&&e<5||t==="বিকাল")return e+12;else return e},meridiem:function(e,t,n){if(e<4)return"রাত";else if(e<10)return"সকাল";else if(e<17)return"দুপুর";else if(e<20)return"বিকাল";else return"রাত"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},a;e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="রাত")return e<4?e:e+12;else if(t==="ভোর")return e;else if(t==="সকাল")return e;else if(t==="দুপুর")return e>=3?e:e+12;else if(t==="বিকাল")return e+12;else if(t==="সন্ধ্যা")return e+12},meridiem:function(e,t,n){if(e<4)return"রাত";else if(e<6)return"ভোর";else if(e<12)return"সকাল";else if(e<15)return"দুপুর";else if(e<18)return"বিকাল";else if(e<20)return"সন্ধ্যা";else return"রাত"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},a;e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="রাত"&&e>=4||t==="দুপুর"&&e<5||t==="বিকাল")return e+12;else return e},meridiem:function(e,t,n){if(e<4)return"রাত";else if(e<10)return"সকাল";else if(e<17)return"দুপুর";else if(e<20)return"বিকাল";else return"রাত"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},a;e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:true,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="མཚན་མོ"&&e>=4||t==="ཉིན་གུང"&&e<5||t==="དགོང་དག")return e+12;else return e},meridiem:function(e,t,n){if(e<4)return"མཚན་མོ";else if(e<10)return"ཞོགས་ཀས";else if(e<17)return"ཉིན་གུང";else if(e<20)return"དགོང་དག";else return"མཚན་མོ"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},a;e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="রাত")return e<4?e:e+12;else if(t==="ভোর")return e;else if(t==="সকাল")return e;else if(t==="দুপুর")return e>=3?e:e+12;else if(t==="বিকাল")return e+12;else if(t==="সন্ধ্যা")return e+12},meridiem:function(e,t,n){if(e<4)return"রাত";else if(e<6)return"ভোর";else if(e<12)return"সকাল";else if(e<15)return"দুপুর";else if(e<18)return"বিকাল";else if(e<20)return"সন্ধ্যা";else return"রাত"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n){var a={mm:"munutenn",MM:"miz",dd:"devezh"};return e+" "+r(a[n],e)}function n(e){switch(a(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function a(e){if(e>9)return a(e%10);return e}function r(e,t){if(t===2)return o(e);return e}function o(e){var t={m:"v",b:"v",d:"z"};if(t[e.charAt(0)]===undefined)return e;return t[e.charAt(0)]+e.substring(1)}var i=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],s=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,l=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,u=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,d=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],c=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],f=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i],p;e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:f,fullWeekdaysParse:d,shortWeekdaysParse:c,minWeekdaysParse:f,monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:l,monthsShortStrictRegex:u,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:n},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){var t=e===1?"añ":"vet";return e+t},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return e==="g.m."},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},a;e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:true,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="མཚན་མོ"&&e>=4||t==="ཉིན་གུང"&&e<5||t==="དགོང་དག")return e+12;else return e},meridiem:function(e,t,n){if(e<4)return"མཚན་མོ";else if(e<10)return"ཞོགས་ཀས";else if(e<17)return"ཉིན་གུང";else if(e<20)return"དགོང་དག";else return"མཚན་མོ"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n){var a=e+" ";switch(n){case"ss":if(e===1)a+="sekunda";else if(e===2||e===3||e===4)a+="sekunde";else a+="sekundi";return a;case"m":return t?"jedna minuta":"jedne minute";case"mm":if(e===1)a+="minuta";else if(e===2||e===3||e===4)a+="minute";else a+="minuta";return a;case"h":return t?"jedan sat":"jednog sata";case"hh":if(e===1)a+="sat";else if(e===2||e===3||e===4)a+="sata";else a+="sati";return a;case"dd":if(e===1)a+="dan";else a+="dana";return a;case"MM":if(e===1)a+="mjesec";else if(e===2||e===3||e===4)a+="mjeseca";else a+="mjeseci";return a;case"yy":if(e===1)a+="godina";else if(e===2||e===3||e===4)a+="godine";else a+="godina";return a}}var n;e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n){var a={mm:"munutenn",MM:"miz",dd:"devezh"};return e+" "+r(a[n],e)}function n(e){switch(a(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function a(e){if(e>9)return a(e%10);return e}function r(e,t){if(t===2)return o(e);return e}function o(e){var t={m:"v",b:"v",d:"z"};if(t[e.charAt(0)]===undefined)return e;return t[e.charAt(0)]+e.substring(1)}var i=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],s=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,l=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,u=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,c=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],d=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],f=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i],p;e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:f,fullWeekdaysParse:c,shortWeekdaysParse:d,minWeekdaysParse:f,monthsRegex:s,monthsShortRegex:s,monthsStrictRegex:l,monthsShortStrictRegex:u,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:n},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){var t=e===1?"añ":"vet";return e+t},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return e==="g.m."},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:true,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=e===1?"r":e===2?"n":e===3?"r":e===4?"t":"è";if(t==="w"||t==="W")n="a";return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){switch(n){case"m":return t?"jedna minuta":a?"jednu minutu":"jedne minute"}}function n(e,t,n){var a=e+" ";switch(n){case"ss":if(e===1)a+="sekunda";else if(e===2||e===3||e===4)a+="sekunde";else a+="sekundi";return a;case"mm":if(e===1)a+="minuta";else if(e===2||e===3||e===4)a+="minute";else a+="minuta";return a;case"h":return t?"jedan sat":"jedan sat";case"hh":if(e===1)a+="sat";else if(e===2||e===3||e===4)a+="sata";else a+="sati";return a;case"dd":if(e===1)a+="dan";else a+="dana";return a;case"MM":if(e===1)a+="mjesec";else if(e===2||e===3||e===4)a+="mjeseca";else a+="mjeseci";return a;case"yy":if(e===1)a+="godina";else if(e===2||e===3||e===4)a+="godine";else a+="godina";return a}}var a;e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:n,m:t,mm:n,h:n,hh:n,d:"dan",dd:n,M:"mjesec",MM:n,y:"godinu",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={format:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),standalone:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_")},n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),a=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],r=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,o;function i(e){return e>1&&e<5&&~~(e/10)!==1}function s(e,t,n,a){var r=e+" ";switch(n){case"s":return t||a?"pár sekund":"pár sekundami";case"ss":if(t||a)return r+(i(e)?"sekundy":"sekund");else return r+"sekundami";case"m":return t?"minuta":a?"minutu":"minutou";case"mm":if(t||a)return r+(i(e)?"minuty":"minut");else return r+"minutami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":if(t||a)return r+(i(e)?"hodiny":"hodin");else return r+"hodinami";case"d":return t||a?"den":"dnem";case"dd":if(t||a)return r+(i(e)?"dny":"dní");else return r+"dny";case"M":return t||a?"měsíc":"měsícem";case"MM":if(t||a)return r+(i(e)?"měsíce":"měsíců");else return r+"měsíci";case"y":return t||a?"rok":"rokem";case"yy":if(t||a)return r+(i(e)?"roky":"let");else return r+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:true,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=e===1?"r":e===2?"n":e===3?"r":e===4?"t":"è";if(t==="w"||t==="W")n="a";return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){var t=/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран";return e+t},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={standalone:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),format:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_"),isFormat:/DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/},n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),a=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],r=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,o;function i(e){return e>1&&e<5&&~~(e/10)!==1}function s(e,t,n,a){var r=e+" ";switch(n){case"s":return t||a?"pár sekund":"pár sekundami";case"ss":if(t||a)return r+(i(e)?"sekundy":"sekund");else return r+"sekundami";case"m":return t?"minuta":a?"minutu":"minutou";case"mm":if(t||a)return r+(i(e)?"minuty":"minut");else return r+"minutami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":if(t||a)return r+(i(e)?"hodiny":"hodin");else return r+"hodinami";case"d":return t||a?"den":"dnem";case"dd":if(t||a)return r+(i(e)?"dny":"dní");else return r+"dny";case"M":return t||a?"měsíc":"měsícem";case"MM":if(t||a)return r+(i(e)?"měsíce":"měsíců");else return r+"měsíci";case"y":return t||a?"rok":"rokem";case"yy":if(t||a)return r+(i(e)?"roky":"let");else return r+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,n="",a=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];if(t>20)if(t===40||t===50||t===60||t===80||t===100)n="fed";else n="ain";else if(t>0)n=a[t];return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){var t=/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран";return e+t},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,n="",a=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];if(t>20)if(t===40||t===50||t===60||t===80||t===100)n="fed";else n="ain";else if(t>0)n=a[t];return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,a){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}var n;e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,a){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}var n;e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}var n;e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,a){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}var n;e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}var n;e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],a;e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){if(e<12)return"މކ";else return"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}var n;e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function r(e){return typeof Function!=="undefined"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}var t;e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){if(!e)return this._monthsNominativeEl;else if(typeof t==="string"&&/D/.test(t.substring(0,t.indexOf("MMMM"))))return this._monthsGenitiveEl[e.month()];else return this._monthsNominativeEl[e.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){if(e>11)return n?"μμ":"ΜΜ";else return n?"πμ":"ΠΜ"},isPM:function(e){return(e+"").toLowerCase()[0]==="μ"},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n=this._calendarEl[e],a=t&&t.hours();if(r(n))n=n.apply(t);return n.replace("{}",a%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],a;e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){if(e<12)return"މކ";else return"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:0,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function r(e){return typeof Function!=="undefined"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}var t;e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){if(!e)return this._monthsNominativeEl;else if(typeof t==="string"&&/D/.test(t.substring(0,t.indexOf("MMMM"))))return this._monthsGenitiveEl[e.month()];else return this._monthsNominativeEl[e.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){if(e>11)return n?"μμ":"ΜΜ";else return n?"πμ":"ΠΜ"},isPM:function(e){return(e+"").toLowerCase()[0]==="μ"},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n=this._calendarEl[e],a=t&&t.hours();if(r(n))n=n.apply(t);return n.replace("{}",a%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:0,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return e.charAt(0).toLowerCase()==="p"},meridiem:function(e,t,n){if(e>11)return n?"p.t.m.":"P.T.M.";else return n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),t=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,o;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return e.charAt(0).toLowerCase()==="p"},meridiem:function(e,t,n){if(e>11)return n?"p.t.m.":"P.T.M.";else return n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),t=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,o;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),t=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,o;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),t=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,o;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})}(n(9))},function(e,t,n){!function(e){"use strict"; +var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),t=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,o;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),t=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,o;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),t=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,o;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,a){var r={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};if(t)return r[n][2]?r[n][2]:r[n][1];return a?r[n][0]:r[n][1]}var n;e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),a="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),t=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,o;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:true,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){var r={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};if(t)return r[n][2]?r[n][2]:r[n][1];return a?r[n][0]:r[n][1]}var n;e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},a;e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){if(e<12)return"قبل از ظهر";else return"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:true,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var n="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),a=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",n[7],n[8],n[9]],t;function r(e,t,n,a){var r="";switch(n){case"s":return a?"muutaman sekunnin":"muutama sekunti";case"ss":r=a?"sekunnin":"sekuntia";break;case"m":return a?"minuutin":"minuutti";case"mm":r=a?"minuutin":"minuuttia";break;case"h":return a?"tunnin":"tunti";case"hh":r=a?"tunnin":"tuntia";break;case"d":return a?"päivän":"päivä";case"dd":r=a?"päivän":"päivää";break;case"M":return a?"kuukauden":"kuukausi";case"MM":r=a?"kuukauden":"kuukautta";break;case"y":return a?"vuoden":"vuosi";case"yy":r=a?"vuoden":"vuotta";break}r=o(e,a)+" "+r;return r}function o(e,t){return e<10?t?a[e]:n[e]:e}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},a;e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){if(e<12)return"قبل از ظهر";else return"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var n="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),a=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",n[7],n[8],n[9]],t;function r(e,t,n,a){var r="";switch(n){case"s":return a?"muutaman sekunnin":"muutama sekunti";case"ss":r=a?"sekunnin":"sekuntia";break;case"m":return a?"minuutin":"minuutti";case"mm":r=a?"minuutin":"minuuttia";break;case"h":return a?"tunnin":"tunti";case"hh":r=a?"tunnin":"tuntia";break;case"d":return a?"päivän":"päivä";case"dd":r=a?"päivän":"päivää";break;case"M":return a?"kuukauden":"kuukausi";case"MM":r=a?"kuukauden":"kuukautta";break;case"y":return a?"vuoden":"vuosi";case"yy":r=a?"vuoden":"vuotta";break}r=o(e,a)+" "+r;return r}function o(e,t){return e<10?t?a[e]:n[e]:e}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,a=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,r=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],o;e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:t,monthsShortStrictRegex:n,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(e===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(e===1?"er":"e");case"w":case"W":return e+(e===1?"re":"e")}},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:true,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(e===1?"er":"e");case"w":case"W":return e+(e===1?"re":"e")}}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,a=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,r=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],o;e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:t,monthsShortStrictRegex:n,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(e===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(e===1?"er":"e");case"w":case"W":return e+(e===1?"re":"e")}},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:true,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(e===1?"er":"e");case"w":case"W":return e+(e===1?"re":"e")}},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:true,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(e===1?"er":"e");case"w":case"W":return e+(e===1?"re":"e")}}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var n="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),a="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),t;e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsParseExact:true,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:true,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(e===1?"er":"e");case"w":case"W":return e+(e===1?"re":"e")}},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t,n,a,r,o,i;e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],monthsParseExact:true,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],weekdaysShort:["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],weekdaysMin:["Do","Lu","Má","Cé","Dé","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=e===1?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var n="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),a="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),t;e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsParseExact:true,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t,n,a,r,o,i;e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:true,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=e===1?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t,n,a,r,o,i;e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],monthsParseExact:true,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],weekdaysShort:["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],weekdaysMin:["Do","Lu","Má","Cé","Dé","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=e===1?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:true,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){if(e.indexOf("un")===0)return"n"+e;return"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t,n,a,r,o,i;e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:true,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=e===1?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,a){var r={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return a?r[n][0]:r[n][1]}var n;e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:true,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="राती")return e<4?e:e+12;else if(t==="सकाळीं")return e;else if(t==="दनपारां")return e>12?e:e+12;else if(t==="सांजे")return e+12},meridiem:function(e,t,n){if(e<4)return"राती";else if(e<12)return"सकाळीं";else if(e<16)return"दनपारां";else if(e<20)return"सांजे";else return"राती"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:true,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){if(e.indexOf("un")===0)return"n"+e;return"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,a){var r={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return a?r[n][0]:r[n][1]}var n;e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="rati")return e<4?e:e+12;else if(t==="sokallim")return e;else if(t==="donparam")return e>12?e:e+12;else if(t==="sanje")return e+12},meridiem:function(e,t,n){if(e<4)return"rati";else if(e<12)return"sokallim";else if(e<16)return"donparam";else if(e<20)return"sanje";else return"rati"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){var r={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return a?r[n][0]:r[n][1]}var n;e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:true,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="राती")return e<4?e:e+12;else if(t==="सकाळीं")return e;else if(t==="दनपारां")return e>12?e:e+12;else if(t==="सांजे")return e+12},meridiem:function(e,t,n){if(e<4)return"राती";else if(e<12)return"सकाळीं";else if(e<16)return"दनपारां";else if(e<20)return"सांजे";else return"राती"}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"},a;e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:true,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="રાત")return e<4?e:e+12;else if(t==="સવાર")return e;else if(t==="બપોર")return e>=10?e:e+12;else if(t==="સાંજ")return e+12},meridiem:function(e,t,n){if(e<4)return"રાત";else if(e<10)return"સવાર";else if(e<17)return"બપોર";else if(e<20)return"સાંજ";else return"રાત"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){var r={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return a?r[n][0]:r[n][1]}var n;e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="rati")return e<4?e:e+12;else if(t==="sokallim")return e;else if(t==="donparam")return e>12?e:e+12;else if(t==="sanje")return e+12},meridiem:function(e,t,n){if(e<4)return"rati";else if(e<12)return"sokallim";else if(e<16)return"donparam";else if(e<20)return"sanje";else return"rati"}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){if(e===2)return"שעתיים";return e+" שעות"},d:"יום",dd:function(e){if(e===2)return"יומיים";return e+" ימים"},M:"חודש",MM:function(e){if(e===2)return"חודשיים";return e+" חודשים"},y:"שנה",yy:function(e){if(e===2)return"שנתיים";else if(e%10===0&&e!==10)return e+" שנה";return e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){if(e<5)return"לפנות בוקר";else if(e<10)return"בבוקר";else if(e<12)return n?'לפנה"צ':"לפני הצהריים";else if(e<18)return n?'אחה"צ':"אחרי הצהריים";else return"בערב"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"},a;e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:true,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="રાત")return e<4?e:e+12;else if(t==="સવાર")return e;else if(t==="બપોર")return e>=10?e:e+12;else if(t==="સાંજ")return e+12},meridiem:function(e,t,n){if(e<4)return"રાત";else if(e<10)return"સવાર";else if(e<17)return"બપોર";else if(e<20)return"સાંજ";else return"રાત"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},a=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],r=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],o;e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:a,longMonthsParse:a,shortMonthsParse:r,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="रात")return e<4?e:e+12;else if(t==="सुबह")return e;else if(t==="दोपहर")return e>=10?e:e+12;else if(t==="शाम")return e+12},meridiem:function(e,t,n){if(e<4)return"रात";else if(e<10)return"सुबह";else if(e<17)return"दोपहर";else if(e<20)return"शाम";else return"रात"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){if(e===2)return"שעתיים";return e+" שעות"},d:"יום",dd:function(e){if(e===2)return"יומיים";return e+" ימים"},M:"חודש",MM:function(e){if(e===2)return"חודשיים";return e+" חודשים"},y:"שנה",yy:function(e){if(e===2)return"שנתיים";else if(e%10===0&&e!==10)return e+" שנה";return e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){if(e<5)return"לפנות בוקר";else if(e<10)return"בבוקר";else if(e<12)return n?'לפנה"צ':"לפני הצהריים";else if(e<18)return n?'אחה"צ':"אחרי הצהריים";else return"בערב"}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n){var a=e+" ";switch(n){case"ss":if(e===1)a+="sekunda";else if(e===2||e===3||e===4)a+="sekunde";else a+="sekundi";return a;case"m":return t?"jedna minuta":"jedne minute";case"mm":if(e===1)a+="minuta";else if(e===2||e===3||e===4)a+="minute";else a+="minuta";return a;case"h":return t?"jedan sat":"jednog sata";case"hh":if(e===1)a+="sat";else if(e===2||e===3||e===4)a+="sata";else a+="sati";return a;case"dd":if(e===1)a+="dan";else a+="dana";return a;case"MM":if(e===1)a+="mjesec";else if(e===2||e===3||e===4)a+="mjeseca";else a+="mjeseci";return a;case"yy":if(e===1)a+="godina";else if(e===2||e===3||e===4)a+="godine";else a+="godina";return a}}var n;e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:true,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},a=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],r=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],o;e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:a,longMonthsParse:a,shortMonthsParse:r,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="रात")return e<4?e:e+12;else if(t==="सुबह")return e;else if(t==="दोपहर")return e>=10?e:e+12;else if(t==="शाम")return e+12},meridiem:function(e,t,n){if(e<4)return"रात";else if(e<10)return"सुबह";else if(e<17)return"दोपहर";else if(e<20)return"शाम";else return"रात"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" "),n;function a(e,t,n,a){var r=e;switch(n){case"s":return a||t?"néhány másodperc":"néhány másodperce";case"ss":return r+(a||t)?" másodperc":" másodperce";case"m":return"egy"+(a||t?" perc":" perce");case"mm":return r+(a||t?" perc":" perce");case"h":return"egy"+(a||t?" óra":" órája");case"hh":return r+(a||t?" óra":" órája");case"d":return"egy"+(a||t?" nap":" napja");case"dd":return r+(a||t?" nap":" napja");case"M":return"egy"+(a||t?" hónap":" hónapja");case"MM":return r+(a||t?" hónap":" hónapja");case"y":return"egy"+(a||t?" év":" éve");case"yy":return r+(a||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return e.charAt(1).toLowerCase()==="u"},meridiem:function(e,t,n){if(e<12)return n===true?"de":"DE";else return n===true?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,true)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,false)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n){var a=e+" ";switch(n){case"ss":if(e===1)a+="sekunda";else if(e===2||e===3||e===4)a+="sekunde";else a+="sekundi";return a;case"m":return t?"jedna minuta":"jedne minute";case"mm":if(e===1)a+="minuta";else if(e===2||e===3||e===4)a+="minute";else a+="minuta";return a;case"h":return t?"jedan sat":"jednog sata";case"hh":if(e===1)a+="sat";else if(e===2||e===3||e===4)a+="sata";else a+="sati";return a;case"dd":if(e===1)a+="dan";else a+="dana";return a;case"MM":if(e===1)a+="mjesec";else if(e===2||e===3||e===4)a+="mjeseca";else a+="mjeseci";return a;case"yy":if(e===1)a+="godina";else if(e===2||e===3||e===4)a+="godine";else a+="godina";return a}}var n;e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:true,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){if(e<4)return"գիշերվա";else if(e<12)return"առավոտվա";else if(e<17)return"ցերեկվա";else return"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":if(e===1)return e+"-ին";return e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" "),n;function a(e,t,n,a){var r=e;switch(n){case"s":return a||t?"néhány másodperc":"néhány másodperce";case"ss":return r+(a||t)?" másodperc":" másodperce";case"m":return"egy"+(a||t?" perc":" perce");case"mm":return r+(a||t?" perc":" perce");case"h":return"egy"+(a||t?" óra":" órája");case"hh":return r+(a||t?" óra":" órája");case"d":return"egy"+(a||t?" nap":" napja");case"dd":return r+(a||t?" nap":" napja");case"M":return"egy"+(a||t?" hónap":" hónapja");case"MM":return r+(a||t?" hónap":" hónapja");case"y":return"egy"+(a||t?" év":" éve");case"yy":return r+(a||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return e.charAt(1).toLowerCase()==="u"},meridiem:function(e,t,n){if(e<12)return n===true?"de":"DE";else return n===true?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,true)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,false)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="pagi")return e;else if(t==="siang")return e>=11?e:e+12;else if(t==="sore"||t==="malam")return e+12},meridiem:function(e,t,n){if(e<11)return"pagi";else if(e<15)return"siang";else if(e<19)return"sore";else return"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){if(e<4)return"գիշերվա";else if(e<12)return"առավոտվա";else if(e<17)return"ցերեկվա";else return"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":if(e===1)return e+"-ին";return e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function o(e){if(e%100===11)return true;else if(e%10===1)return false;return true}function t(e,t,n,a){var r=e+" ";switch(n){case"s":return t||a?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":if(o(e))return r+(t||a?"sekúndur":"sekúndum");return r+"sekúnda";case"m":return t?"mínúta":"mínútu";case"mm":if(o(e))return r+(t||a?"mínútur":"mínútum");else if(t)return r+"mínúta";return r+"mínútu";case"hh":if(o(e))return r+(t||a?"klukkustundir":"klukkustundum");return r+"klukkustund";case"d":if(t)return"dagur";return a?"dag":"degi";case"dd":if(o(e)){if(t)return r+"dagar";return r+(a?"daga":"dögum")}else if(t)return r+"dagur";return r+(a?"dag":"degi");case"M":if(t)return"mánuður";return a?"mánuð":"mánuði";case"MM":if(o(e)){if(t)return r+"mánuðir";return r+(a?"mánuði":"mánuðum")}else if(t)return r+"mánuður";return r+(a?"mánuð":"mánuði");case"y":return t||a?"ár":"ári";case"yy":if(o(e))return r+(t||a?"ár":"árum");return r+(t||a?"ár":"ári")}}var n;e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:t,ss:t,m:t,mm:t,h:"klukkustund",hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="pagi")return e;else if(t==="siang")return e>=11?e:e+12;else if(t==="sore"||t==="malam")return e+12},meridiem:function(e,t,n){if(e<11)return"pagi";else if(e<15)return"siang";else if(e<19)return"sore";else return"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function o(e){if(e%100===11)return true;else if(e%10===1)return false;return true}function t(e,t,n,a){var r=e+" ";switch(n){case"s":return t||a?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":if(o(e))return r+(t||a?"sekúndur":"sekúndum");return r+"sekúnda";case"m":return t?"mínúta":"mínútu";case"mm":if(o(e))return r+(t||a?"mínútur":"mínútum");else if(t)return r+"mínúta";return r+"mínútu";case"hh":if(o(e))return r+(t||a?"klukkustundir":"klukkustundum");return r+"klukkustund";case"d":if(t)return"dagur";return a?"dag":"degi";case"dd":if(o(e)){if(t)return r+"dagar";return r+(a?"daga":"dögum")}else if(t)return r+"dagur";return r+(a?"dag":"degi");case"M":if(t)return"mánuður";return a?"mánuð":"mánuði";case"MM":if(o(e)){if(t)return r+"mánuðir";return r+(a?"mánuði":"mánuðum")}else if(t)return r+"mánuður";return r+(a?"mánuð":"mánuði");case"y":return t||a?"ár":"ári";case"yy":if(o(e))return r+(t||a?"ár":"árum");return r+(t||a?"ár":"ári")}}var n;e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:t,ss:t,m:t,mm:t,h:"klukkustund",hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return t[1]==="元"?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return e==="午後"},meridiem:function(e,t,n){if(e<12)return"午前";else return"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){if(e.week()!==this.week())return"[来週]dddd LT";else return"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){if(this.week()!==e.week())return"[先週]dddd LT";else return"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return e===1?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="enjing")return e;else if(t==="siyang")return e>=11?e:e+12;else if(t==="sonten"||t==="ndalu")return e+12},meridiem:function(e,t,n){if(e<11)return"enjing";else if(e<15)return"siyang";else if(e<19)return"sonten";else return"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return t[1]==="元"?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return e==="午後"},meridiem:function(e,t,n){if(e<12)return"午前";else return"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){if(e.week()!==this.week())return"[来週]dddd LT";else return"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){if(this.week()!==e.week())return"[先週]dddd LT";else return"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return e===1?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,function(e,t,n){return n==="ი"?t+"ში":t+n+"ში"})},past:function(e){if(/(წამი|წუთი|საათი|დღე|თვე)/.test(e))return e.replace(/(ი|ე)$/,"ის წინ");if(/წელი/.test(e))return e.replace(/წელი$/,"წლის წინ");return e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){if(e===0)return e;if(e===1)return e+"-ლი";if(e<20||e<=100&&e%20===0||e%100===0)return"მე-"+e;return e+"-ე"},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="enjing")return e;else if(t==="siyang")return e>=11?e:e+12;else if(t==="sonten"||t==="ndalu")return e+12},meridiem:function(e,t,n){if(e<11)return"enjing";else if(e<15)return"siyang";else if(e<19)return"sonten";else return"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var a={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},t;e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var t=e%10,n=e>=100?100:null;return e+(a[e]||a[t]||a[n])},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,function(e,t,n){return n==="ი"?t+"ში":t+n+"ში"})},past:function(e){if(/(წამი|წუთი|საათი|დღე|თვე)/.test(e))return e.replace(/(ი|ე)$/,"ის წინ");if(/წელი/.test(e))return e.replace(/წელი$/,"წლის წინ");return e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){if(e===0)return e;if(e===1)return e+"-ლი";if(e<20||e<=100&&e%20===0||e%100===0)return"მე-"+e;return e+"-ე"},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"},a;e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return e==="ល្ងាច"},meridiem:function(e,t,n){if(e<12)return"ព្រឹក";else return"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var a={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},t;e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var t=e%10,n=e>=100?100:null;return e+(a[e]||a[t]||a[n])},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},a;e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:true,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="ರಾತ್ರಿ")return e<4?e:e+12;else if(t==="ಬೆಳಿಗ್ಗೆ")return e;else if(t==="ಮಧ್ಯಾಹ್ನ")return e>=10?e:e+12;else if(t==="ಸಂಜೆ")return e+12},meridiem:function(e,t,n){if(e<4)return"ರಾತ್ರಿ";else if(e<10)return"ಬೆಳಿಗ್ಗೆ";else if(e<17)return"ಮಧ್ಯಾಹ್ನ";else if(e<20)return"ಸಂಜೆ";else return"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"},a;e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return e==="ល្ងាច"},meridiem:function(e,t,n){if(e<12)return"ព្រឹក";else return"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return e==="오후"},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},a;e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:true,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="ರಾತ್ರಿ")return e<4?e:e+12;else if(t==="ಬೆಳಿಗ್ಗೆ")return e;else if(t==="ಮಧ್ಯಾಹ್ನ")return e>=10?e:e+12;else if(t==="ಸಂಜೆ")return e+12},meridiem:function(e,t,n){if(e<4)return"ರಾತ್ರಿ";else if(e<10)return"ಬೆಳಿಗ್ಗೆ";else if(e<17)return"ಮಧ್ಯಾಹ್ನ";else if(e<20)return"ಸಂಜೆ";else return"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},a=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"],r;e.defineLocale("ku",{months:a,monthsShort:a,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){if(e<12)return"به‌یانی";else return"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return e==="오후"},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var a={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},t;e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var t=e%10,n=e>=100?100:null;return e+(a[e]||a[t]||a[n])},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},a=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"],r;e.defineLocale("ku",{months:a,monthsShort:a,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){if(e<12)return"به‌یانی";else return"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,a){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[n][0]:r[n][1]}function n(e){var t=e.substr(0,e.indexOf(" "));if(r(t))return"a "+e;return"an "+e}function a(e){var t=e.substr(0,e.indexOf(" "));if(r(t))return"viru "+e;return"virun "+e}function r(e){e=parseInt(e,10);if(isNaN(e))return false;if(e<0)return true;else if(e<10){if(4<=e&&e<=7)return true;return false}else if(e<100){var t=e%10,n=e/10;if(t===0)return r(n);return r(t)}else if(e<1e4){while(e>=10)e=e/10;return r(e)}else{e=e/1e3;return r(e)}}var o;e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:a,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){var r={s:["çend sanîye","çend sanîyeyan"],ss:[e+" sanîye",e+" sanîyeyan"],m:["deqîqeyek","deqîqeyekê"],mm:[e+" deqîqe",e+" deqîqeyan"],h:["saetek","saetekê"],hh:[e+" saet",e+" saetan"],d:["rojek","rojekê"],dd:[e+" roj",e+" rojan"],w:["hefteyek","hefteyekê"],ww:[e+" hefte",e+" hefteyan"],M:["mehek","mehekê"],MM:[e+" meh",e+" mehan"],y:["salek","salekê"],yy:[e+" sal",e+" salan"]};return t?r[n][0]:r[n][1]}function a(e){e=""+e;var t=e.substring(e.length-1),n=e.length>1?e.substring(e.length-2):"";if(!(n==12||n==13)&&(t=="2"||t=="3"||n=="50"||t=="70"||t=="80"))return"yê";return"ê"}var n;e.defineLocale("ku-kmr",{months:"Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar".split("_"),monthsShort:"Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber".split("_"),monthsParseExact:true,weekdays:"Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî".split("_"),weekdaysShort:"Yek_Du_Sê_Çar_Pên_În_Şem".split("_"),weekdaysMin:"Ye_Du_Sê_Ça_Pê_În_Şe".split("_"),meridiem:function(e,t,n){if(e<12)return n?"bn":"BN";else return n?"pn":"PN"},meridiemParse:/bn|BN|pn|PN/,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM[a] YYYY[an]",LLL:"Do MMMM[a] YYYY[an] HH:mm",LLLL:"dddd, Do MMMM[a] YYYY[an] HH:mm",ll:"Do MMM[.] YYYY[an]",lll:"Do MMM[.] YYYY[an] HH:mm",llll:"ddd[.], Do MMM[.] YYYY[an] HH:mm"},calendar:{sameDay:"[Îro di saet] LT [de]",nextDay:"[Sibê di saet] LT [de]",nextWeek:"dddd [di saet] LT [de]",lastDay:"[Duh di saet] LT [de]",lastWeek:"dddd[a borî di saet] LT [de]",sameElse:"L"},relativeTime:{future:"di %s de",past:"berî %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,w:t,ww:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(?:yê|ê|\.)/,ordinal:function(e,t){var n=t.toLowerCase();if(n.includes("w")||n.includes("m"))return e+".";return e+a(e)},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return e==="ຕອນແລງ"},meridiem:function(e,t,n){if(e<12)return"ຕອນເຊົ້າ";else return"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var a={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},t;e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var t=e%10,n=e>=100?100:null;return e+(a[e]||a[t]||a[n])},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},n;function a(e,t,n,a){if(t)return"kelios sekundės";else return a?"kelių sekundžių":"kelias sekundes"}function o(e,t,n,a){return t?s(n)[0]:a?s(n)[1]:s(n)[2]}function i(e){return e%10===0||e>10&&e<20}function s(e){return t[e].split("_")}function r(e,t,n,a){var r=e+" ";if(e===1)return r+o(e,t,n[0],a);else if(t)return r+(i(e)?s(n)[1]:s(n)[0]);else if(a)return r+s(n)[1];else return r+(i(e)?s(n)[1]:s(n)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:a,ss:r,m:o,mm:r,h:o,hh:r,d:o,dd:r,M:o,MM:r,y:o,yy:r},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[n][0]:r[n][1]}function n(e){var t=e.substr(0,e.indexOf(" "));if(r(t))return"a "+e;return"an "+e}function a(e){var t=e.substr(0,e.indexOf(" "));if(r(t))return"viru "+e;return"virun "+e}function r(e){e=parseInt(e,10);if(isNaN(e))return false;if(e<0)return true;else if(e<10){if(4<=e&&e<=7)return true;return false}else if(e<100){var t=e%10,n=e/10;if(t===0)return r(n);return r(t)}else if(e<1e4){while(e>=10)e=e/10;return r(e)}else{e=e/1e3;return r(e)}}var o;e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:true,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:a,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var a={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")},t;function r(e,t,n){if(n)return t%10===1&&t%100!==11?e[2]:e[3];else return t%10===1&&t%100!==11?e[0]:e[1]}function n(e,t,n){return e+" "+r(a[n],e,t)}function o(e,t,n){return r(a[n],e,t)}function i(e,t){return t?"dažas sekundes":"dažām sekundēm"}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:i,ss:n,m:o,mm:n,h:o,hh:n,d:o,dd:n,M:o,MM:n,y:o,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return e==="ຕອນແລງ"},meridiem:function(e,t,n){if(e<12)return"ຕອນເຊົ້າ";else return"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var r={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return e===1?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,n){var a=r.words[n];if(n.length===1)return t?a[0]:a[1];else return e+" "+r.correctGrammaticalCase(e,a)}},t;e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:r.translate,m:r.translate,mm:r.translate,h:r.translate,hh:r.translate,d:"dan",dd:r.translate,M:"mjesec",MM:r.translate,y:"godinu",yy:r.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},n;function a(e,t,n,a){if(t)return"kelios sekundės";else return a?"kelių sekundžių":"kelias sekundes"}function o(e,t,n,a){return t?s(n)[0]:a?s(n)[1]:s(n)[2]}function i(e){return e%10===0||e>10&&e<20}function s(e){return t[e].split("_")}function r(e,t,n,a){var r=e+" ";if(e===1)return r+o(e,t,n[0],a);else if(t)return r+(i(e)?s(n)[1]:s(n)[0]);else if(a)return r+s(n)[1];else return r+(i(e)?s(n)[1]:s(n)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:a,ss:r,m:o,mm:r,h:o,hh:r,d:o,dd:r,M:o,MM:r,y:o,yy:r},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var a={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")},t;function r(e,t,n){if(n)return t%10===1&&t%100!==11?e[2]:e[3];else return t%10===1&&t%100!==11?e[0]:e[1]}function n(e,t,n){return e+" "+r(a[n],e,t)}function o(e,t,n){return r(a[n],e,t)}function i(e,t){return t?"dažas sekundes":"dažām sekundēm"}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:i,ss:n,m:o,mm:n,h:o,hh:n,d:o,dd:n,M:o,MM:n,y:o,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;if(e===0)return e+"-ев";else if(n===0)return e+"-ен";else if(n>10&&n<20)return e+"-ти";else if(t===1)return e+"-ви";else if(t===2)return e+"-ри";else if(t===7||t===8)return e+"-ми";else return e+"-ти"},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var r={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return e===1?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,n){var a=r.words[n];if(n.length===1)return t?a[0]:a[1];else return e+" "+r.correctGrammaticalCase(e,a)}},t;e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:r.translate,m:r.translate,mm:r.translate,h:r.translate,hh:r.translate,d:"dan",dd:r.translate,M:"mjesec",MM:r.translate,y:"godinu",yy:r.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:true,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){if(e===12)e=0;if(t==="രാത്രി"&&e>=4||t==="ഉച്ച കഴിഞ്ഞ്"||t==="വൈകുന്നേരം")return e+12;else return e},meridiem:function(e,t,n){if(e<4)return"രാത്രി";else if(e<12)return"രാവിലെ";else if(e<17)return"ഉച്ച കഴിഞ്ഞ്";else if(e<20)return"വൈകുന്നേരം";else return"രാത്രി"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,a){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}var n;e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:true,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return e==="ҮХ"},meridiem:function(e,t,n){if(e<12)return"ҮӨ";else return"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;if(e===0)return e+"-ев";else if(n===0)return e+"-ен";else if(n>10&&n<20)return e+"-ти";else if(t===1)return e+"-ви";else if(t===2)return e+"-ри";else if(t===7||t===8)return e+"-ми";else return e+"-ти"},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},a;function r(e,t,n,a){var r="";if(t)switch(n){case"s":r="काही सेकंद";break;case"ss":r="%d सेकंद";break;case"m":r="एक मिनिट";break;case"mm":r="%d मिनिटे";break;case"h":r="एक तास";break;case"hh":r="%d तास";break;case"d":r="एक दिवस";break;case"dd":r="%d दिवस";break;case"M":r="एक महिना";break;case"MM":r="%d महिने";break;case"y":r="एक वर्ष";break;case"yy":r="%d वर्षे";break}else switch(n){case"s":r="काही सेकंदां";break;case"ss":r="%d सेकंदां";break;case"m":r="एका मिनिटा";break;case"mm":r="%d मिनिटां";break;case"h":r="एका तासा";break;case"hh":r="%d तासां";break;case"d":r="एका दिवसा";break;case"dd":r="%d दिवसां";break;case"M":r="एका महिन्या";break;case"MM":r="%d महिन्यां";break;case"y":r="एका वर्षा";break;case"yy":r="%d वर्षां";break}return r.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:true,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="पहाटे"||t==="सकाळी")return e;else if(t==="दुपारी"||t==="सायंकाळी"||t==="रात्री")return e>=12?e:e+12},meridiem:function(e,t,n){if(e>=0&&e<6)return"पहाटे";else if(e<12)return"सकाळी";else if(e<17)return"दुपारी";else if(e<20)return"सायंकाळी";else return"रात्री"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:true,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){if(e===12)e=0;if(t==="രാത്രി"&&e>=4||t==="ഉച്ച കഴിഞ്ഞ്"||t==="വൈകുന്നേരം")return e+12;else return e},meridiem:function(e,t,n){if(e<4)return"രാത്രി";else if(e<12)return"രാവിലെ";else if(e<17)return"ഉച്ച കഴിഞ്ഞ്";else if(e<20)return"വൈകുന്നേരം";else return"രാത്രി"}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="pagi")return e;else if(t==="tengahari")return e>=11?e:e+12;else if(t==="petang"||t==="malam")return e+12},meridiem:function(e,t,n){if(e<11)return"pagi";else if(e<15)return"tengahari";else if(e<19)return"petang";else return"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}var n;e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:true,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return e==="ҮХ"},meridiem:function(e,t,n){if(e<12)return"ҮӨ";else return"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="pagi")return e;else if(t==="tengahari")return e>=11?e:e+12;else if(t==="petang"||t==="malam")return e+12},meridiem:function(e,t,n){if(e<11)return"pagi";else if(e<15)return"tengahari";else if(e<19)return"petang";else return"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},a;function r(e,t,n,a){var r="";if(t)switch(n){case"s":r="काही सेकंद";break;case"ss":r="%d सेकंद";break;case"m":r="एक मिनिट";break;case"mm":r="%d मिनिटे";break;case"h":r="एक तास";break;case"hh":r="%d तास";break;case"d":r="एक दिवस";break;case"dd":r="%d दिवस";break;case"M":r="एक महिना";break;case"MM":r="%d महिने";break;case"y":r="एक वर्ष";break;case"yy":r="%d वर्षे";break}else switch(n){case"s":r="काही सेकंदां";break;case"ss":r="%d सेकंदां";break;case"m":r="एका मिनिटा";break;case"mm":r="%d मिनिटां";break;case"h":r="एका तासा";break;case"hh":r="%d तासां";break;case"d":r="एका दिवसा";break;case"dd":r="%d दिवसां";break;case"M":r="एका महिन्या";break;case"MM":r="%d महिन्यां";break;case"y":r="एका वर्षा";break;case"yy":r="%d वर्षां";break}return r.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:true,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="पहाटे"||t==="सकाळी")return e;else if(t==="दुपारी"||t==="सायंकाळी"||t==="रात्री")return e>=12?e:e+12},meridiem:function(e,t,n){if(e>=0&&e<6)return"पहाटे";else if(e<12)return"सकाळी";else if(e<17)return"दुपारी";else if(e<20)return"सायंकाळी";else return"रात्री"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="pagi")return e;else if(t==="tengahari")return e>=11?e:e+12;else if(t==="petang"||t==="malam")return e+12},meridiem:function(e,t,n){if(e<11)return"pagi";else if(e<15)return"tengahari";else if(e<19)return"petang";else return"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},a;e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="pagi")return e;else if(t==="tengahari")return e>=11?e:e+12;else if(t==="petang"||t==="malam")return e+12},meridiem:function(e,t,n){if(e<11)return"pagi";else if(e<15)return"tengahari";else if(e<19)return"petang";else return"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:true,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},a;e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:true,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="राति")return e<4?e:e+12;else if(t==="बिहान")return e;else if(t==="दिउँसो")return e>=10?e:e+12;else if(t==="साँझ")return e+12},meridiem:function(e,t,n){if(e<3)return"राति";else if(e<12)return"बिहान";else if(e<16)return"दिउँसो";else if(e<20)return"साँझ";else return"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},a;e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var n="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),a="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),t=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,o;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:true,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"én time",hh:"%d timer",d:"én dag",dd:"%d dager",w:"én uke",ww:"%d uker",M:"én måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var n="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),a="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),t=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,o;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},a;e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:true,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="राति")return e<4?e:e+12;else if(t==="बिहान")return e;else if(t==="दिउँसो")return e>=10?e:e+12;else if(t==="साँझ")return e+12},meridiem:function(e,t,n){if(e<3)return"राति";else if(e<12)return"बिहान";else if(e<16)return"दिउँसो";else if(e<20)return"साँझ";else return"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:true,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var n="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),a="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),t=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,o;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:true,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=e===1?"r":e===2?"n":e===3?"r":e===4?"t":"è";if(t==="w"||t==="W")n="a";return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var n="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),a="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),t=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,o;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){if(!e)return n;else if(/-MMM-/.test(t))return a[e.month()];else return n[e.month()]},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},a;e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="ਰਾਤ")return e<4?e:e+12;else if(t==="ਸਵੇਰ")return e;else if(t==="ਦੁਪਹਿਰ")return e>=10?e:e+12;else if(t==="ਸ਼ਾਮ")return e+12},meridiem:function(e,t,n){if(e<4)return"ਰਾਤ";else if(e<10)return"ਸਵੇਰ";else if(e<17)return"ਦੁਪਹਿਰ";else if(e<20)return"ਸ਼ਾਮ";else return"ਰਾਤ"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:true,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var n="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),a="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),t=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i],r;function o(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function i(e,t,n){var a=e+" ";switch(n){case"ss":return a+(o(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return a+(o(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return a+(o(e)?"godziny":"godzin");case"ww":return a+(o(e)?"tygodnie":"tygodni");case"MM":return a+(o(e)?"miesiące":"miesięcy");case"yy":return a+(o(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,t){if(!e)return n;else if(/D MMMM/.test(t))return a[e.month()];else return n[e.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:i,m:i,mm:i,h:i,hh:i,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:i,M:"miesiąc",MM:i,y:"rok",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:true,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=e===1?"r":e===2?"n":e===3?"r":e===4?"t":"è";if(t==="w"||t==="W")n="a";return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},a;e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="ਰਾਤ")return e<4?e:e+12;else if(t==="ਸਵੇਰ")return e;else if(t==="ਦੁਪਹਿਰ")return e>=10?e:e+12;else if(t==="ਸ਼ਾਮ")return e+12},meridiem:function(e,t,n){if(e<4)return"ਰਾਤ";else if(e<10)return"ਸਵੇਰ";else if(e<17)return"ਦੁਪਹਿਰ";else if(e<20)return"ਸ਼ਾਮ";else return"ਰਾਤ"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})}(n(9))},function(e,t,n){!function(e){"use strict"; +var n="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),a="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),t=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i],r;function o(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function i(e,t,n){var a=e+" ";switch(n){case"ss":return a+(o(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return a+(o(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return a+(o(e)?"godziny":"godzin");case"ww":return a+(o(e)?"tygodnie":"tygodni");case"MM":return a+(o(e)?"miesiące":"miesięcy");case"yy":return a+(o(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,t){if(!e)return n;else if(/D MMMM/.test(t))return a[e.month()];else return n[e.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:i,m:i,mm:i,h:i,hh:i,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:i,M:"miesiąc",MM:i,y:"rok",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n){var a={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"},r=" ";if(e%100>=20||e>=100&&e%100===0)r=" de ";return e+r+a[n]}var n;e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:true,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function r(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function t(e,t,n){var a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};if(n==="m")return t?"минута":"минуту";else return e+" "+r(a[n],+e)}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],a;e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()!==this.week())switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}else if(this.day()===2)return"[Во] dddd, [в] LT";else return"[В] dddd, [в] LT"},lastWeek:function(e){if(e.week()!==this.week())switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}else if(this.day()===2)return"[Во] dddd, [в] LT";else return"[В] dddd, [в] LT"},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){if(e<4)return"ночи";else if(e<12)return"утра";else if(e<17)return"дня";else return"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],a;e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){if(e<12)return"صبح";return"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n){var a={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"},r=" ";if(e%100>=20||e>=100&&e%100===0)r=" de ";return e+r+a[n]}var n;e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:true,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function r(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function t(e,t,n){var a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};if(n==="m")return t?"минута":"минуту";else return e+" "+r(a[n],+e)}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],a;e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()!==this.week())switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}else if(this.day()===2)return"[Во] dddd, [в] LT";else return"[В] dddd, [в] LT"},lastWeek:function(e){if(e.week()!==this.week())switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}else if(this.day()===2)return"[Во] dddd, [в] LT";else return"[В] dddd, [в] LT"},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){if(e<4)return"ночи";else if(e<12)return"утра";else if(e<17)return"дня";else return"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return e==="ප.ව."||e==="පස් වරු"},meridiem:function(e,t,n){if(e>11)return n?"ප.ව.":"පස් වරු";else return n?"පෙ.ව.":"පෙර වරු"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],a;e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){if(e<12)return"صبح";return"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),a;function o(e){return e>1&&e<5}function r(e,t,n,a){var r=e+" ";switch(n){case"s":return t||a?"pár sekúnd":"pár sekundami";case"ss":if(t||a)return r+(o(e)?"sekundy":"sekúnd");else return r+"sekundami";case"m":return t?"minúta":a?"minútu":"minútou";case"mm":if(t||a)return r+(o(e)?"minúty":"minút");else return r+"minútami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":if(t||a)return r+(o(e)?"hodiny":"hodín");else return r+"hodinami";case"d":return t||a?"deň":"dňom";case"dd":if(t||a)return r+(o(e)?"dni":"dní");else return r+"dňami";case"M":return t||a?"mesiac":"mesiacom";case"MM":if(t||a)return r+(o(e)?"mesiace":"mesiacov");else return r+"mesiacmi";case"y":return t||a?"rok":"rokom";case"yy":if(t||a)return r+(o(e)?"roky":"rokov");else return r+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,a){var r=e+" ";switch(n){case"s":return t||a?"nekaj sekund":"nekaj sekundami";case"ss":if(e===1)r+=t?"sekundo":"sekundi";else if(e===2)r+=t||a?"sekundi":"sekundah";else if(e<5)r+=t||a?"sekunde":"sekundah";else r+="sekund";return r;case"m":return t?"ena minuta":"eno minuto";case"mm":if(e===1)r+=t?"minuta":"minuto";else if(e===2)r+=t||a?"minuti":"minutama";else if(e<5)r+=t||a?"minute":"minutami";else r+=t||a?"minut":"minutami";return r;case"h":return t?"ena ura":"eno uro";case"hh":if(e===1)r+=t?"ura":"uro";else if(e===2)r+=t||a?"uri":"urama";else if(e<5)r+=t||a?"ure":"urami";else r+=t||a?"ur":"urami";return r;case"d":return t||a?"en dan":"enim dnem";case"dd":if(e===1)r+=t||a?"dan":"dnem";else if(e===2)r+=t||a?"dni":"dnevoma";else r+=t||a?"dni":"dnevi";return r;case"M":return t||a?"en mesec":"enim mesecem";case"MM":if(e===1)r+=t||a?"mesec":"mesecem";else if(e===2)r+=t||a?"meseca":"mesecema";else if(e<5)r+=t||a?"mesece":"meseci";else r+=t||a?"mesecev":"meseci";return r;case"y":return t||a?"eno leto":"enim letom";case"yy":if(e===1)r+=t||a?"leto":"letom";else if(e===2)r+=t||a?"leti":"letoma";else if(e<5)r+=t||a?"leta":"leti";else r+=t||a?"let":"leti";return r}}var n;e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return e==="ප.ව."||e==="පස් වරු"},meridiem:function(e,t,n){if(e>11)return n?"ප.ව.":"පස් වරු";else return n?"පෙ.ව.":"පෙර වරු"}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:true,meridiemParse:/PD|MD/,isPM:function(e){return e.charAt(0)==="M"},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),a;function o(e){return e>1&&e<5}function r(e,t,n,a){var r=e+" ";switch(n){case"s":return t||a?"pár sekúnd":"pár sekundami";case"ss":if(t||a)return r+(o(e)?"sekundy":"sekúnd");else return r+"sekundami";case"m":return t?"minúta":a?"minútu":"minútou";case"mm":if(t||a)return r+(o(e)?"minúty":"minút");else return r+"minútami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":if(t||a)return r+(o(e)?"hodiny":"hodín");else return r+"hodinami";case"d":return t||a?"deň":"dňom";case"dd":if(t||a)return r+(o(e)?"dni":"dní");else return r+"dňami";case"M":return t||a?"mesiac":"mesiacom";case"MM":if(t||a)return r+(o(e)?"mesiace":"mesiacov");else return r+"mesiacmi";case"y":return t||a?"rok":"rokom";case"yy":if(t||a)return r+(o(e)?"roky":"rokov");else return r+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var i={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,t){if(e%10>=1&&e%10<=4&&(e%100<10||e%100>=20))return e%10===1?t[0]:t[1];return t[2]},translate:function(e,t,n,a){var r=i.words[n],o;if(n.length===1){if(n==="y"&&t)return"jedna godina";return a||t?r[0]:r[1]}o=i.correctGrammaticalCase(e,r);if(n==="yy"&&t&&o==="godinu")return e+" godina";return e+" "+o}},t;e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:i.translate,m:i.translate,mm:i.translate,h:i.translate,hh:i.translate,d:i.translate,dd:i.translate,M:i.translate,MM:i.translate,y:i.translate,yy:i.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function t(e,t,n,a){var r=e+" ";switch(n){case"s":return t||a?"nekaj sekund":"nekaj sekundami";case"ss":if(e===1)r+=t?"sekundo":"sekundi";else if(e===2)r+=t||a?"sekundi":"sekundah";else if(e<5)r+=t||a?"sekunde":"sekundah";else r+="sekund";return r;case"m":return t?"ena minuta":"eno minuto";case"mm":if(e===1)r+=t?"minuta":"minuto";else if(e===2)r+=t||a?"minuti":"minutama";else if(e<5)r+=t||a?"minute":"minutami";else r+=t||a?"minut":"minutami";return r;case"h":return t?"ena ura":"eno uro";case"hh":if(e===1)r+=t?"ura":"uro";else if(e===2)r+=t||a?"uri":"urama";else if(e<5)r+=t||a?"ure":"urami";else r+=t||a?"ur":"urami";return r;case"d":return t||a?"en dan":"enim dnem";case"dd":if(e===1)r+=t||a?"dan":"dnem";else if(e===2)r+=t||a?"dni":"dnevoma";else r+=t||a?"dni":"dnevi";return r;case"M":return t||a?"en mesec":"enim mesecem";case"MM":if(e===1)r+=t||a?"mesec":"mesecem";else if(e===2)r+=t||a?"meseca":"mesecema";else if(e<5)r+=t||a?"mesece":"meseci";else r+=t||a?"mesecev":"meseci";return r;case"y":return t||a?"eno leto":"enim letom";case"yy":if(e===1)r+=t||a?"leto":"letom";else if(e===2)r+=t||a?"leti":"letoma";else if(e<5)r+=t||a?"leta":"leti";else r+=t||a?"let":"leti";return r}}var n;e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var i={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,t){if(e%10>=1&&e%10<=4&&(e%100<10||e%100>=20))return e%10===1?t[0]:t[1];return t[2]},translate:function(e,t,n,a){var r=i.words[n],o;if(n.length===1){if(n==="y"&&t)return"једна година";return a||t?r[0]:r[1]}o=i.correctGrammaticalCase(e,r);if(n==="yy"&&t&&o==="годину")return e+" година";return e+" "+o}},t;e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:true,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:i.translate,m:i.translate,mm:i.translate,h:i.translate,hh:i.translate,d:i.translate,dd:i.translate,M:i.translate,MM:i.translate,y:i.translate,yy:i.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:true,meridiemParse:/PD|MD/,isPM:function(e){return e.charAt(0)==="M"},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){if(e<11)return"ekuseni";else if(e<15)return"emini";else if(e<19)return"entsambama";else return"ebusuku"},meridiemHour:function(e,t){if(e===12)e=0;if(t==="ekuseni")return e;else if(t==="emini")return e>=11?e:e+12;else if(t==="entsambama"||t==="ebusuku"){if(e===0)return 0;return e+12}},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var i={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,t){if(e%10>=1&&e%10<=4&&(e%100<10||e%100>=20))return e%10===1?t[0]:t[1];return t[2]},translate:function(e,t,n,a){var r=i.words[n],o;if(n.length===1){if(n==="y"&&t)return"jedna godina";return a||t?r[0]:r[1]}o=i.correctGrammaticalCase(e,r);if(n==="yy"&&t&&o==="godinu")return e+" godina";return e+" "+o}},t;e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:true,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:i.translate,m:i.translate,mm:i.translate,h:i.translate,hh:i.translate,d:i.translate,dd:i.translate,M:i.translate,MM:i.translate,y:i.translate,yy:i.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?":e":t===1?":a":t===2?":a":t===3?":e":":e";return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var i={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,t){if(e%10>=1&&e%10<=4&&(e%100<10||e%100>=20))return e%10===1?t[0]:t[1];return t[2]},translate:function(e,t,n,a){var r=i.words[n],o;if(n.length===1){if(n==="y"&&t)return"једна година";return a||t?r[0]:r[1]}o=i.correctGrammaticalCase(e,r);if(n==="yy"&&t&&o==="годину")return e+" година";return e+" "+o}},t;e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:true,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:i.translate,m:i.translate,mm:i.translate,h:i.translate,hh:i.translate,d:i.translate,dd:i.translate,M:i.translate,MM:i.translate,y:i.translate,yy:i.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){if(e<11)return"ekuseni";else if(e<15)return"emini";else if(e<19)return"entsambama";else return"ebusuku"},meridiemHour:function(e,t){if(e===12)e=0;if(t==="ekuseni")return e;else if(t==="emini")return e>=11?e:e+12;else if(t==="entsambama"||t==="ebusuku"){if(e===0)return 0;return e+12}},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},a;e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){if(e<2)return" யாமம்";else if(e<6)return" வைகறை";else if(e<10)return" காலை";else if(e<14)return" நண்பகல்";else if(e<18)return" எற்பாடு";else if(e<22)return" மாலை";else return" யாமம்"},meridiemHour:function(e,t){if(e===12)e=0;if(t==="யாமம்")return e<2?e:e+12;else if(t==="வைகறை"||t==="காலை")return e;else if(t==="நண்பகல்")return e>=10?e:e+12;else return e+12},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?":e":t===1?":a":t===2?":a":t===3?":e":":e";return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:true,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="రాత్రి")return e<4?e:e+12;else if(t==="ఉదయం")return e;else if(t==="మధ్యాహ్నం")return e>=10?e:e+12;else if(t==="సాయంత్రం")return e+12},meridiem:function(e,t,n){if(e<4)return"రాత్రి";else if(e<10)return"ఉదయం";else if(e<17)return"మధ్యాహ్నం";else if(e<20)return"సాయంత్రం";else return"రాత్రి"},week:{dow:0,doy:6}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},a;e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){if(e<2)return" யாமம்";else if(e<6)return" வைகறை";else if(e<10)return" காலை";else if(e<14)return" நண்பகல்";else if(e<18)return" எற்பாடு";else if(e<22)return" மாலை";else return" யாமம்"},meridiemHour:function(e,t){if(e===12)e=0;if(t==="யாமம்")return e<2?e:e+12;else if(t==="வைகறை"||t==="காலை")return e;else if(t==="நண்பகல்")return e>=10?e:e+12;else return e+12},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var a={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"},t;e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="шаб")return e<4?e:e+12;else if(t==="субҳ")return e;else if(t==="рӯз")return e>=11?e:e+12;else if(t==="бегоҳ")return e+12},meridiem:function(e,t,n){if(e<4)return"шаб";else if(e<11)return"субҳ";else if(e<16)return"рӯз";else if(e<19)return"бегоҳ";else return"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var t=e%10,n=e>=100?100:null;return e+(a[e]||a[t]||a[n])},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:true,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="రాత్రి")return e<4?e:e+12;else if(t==="ఉదయం")return e;else if(t==="మధ్యాహ్నం")return e>=10?e:e+12;else if(t==="సాయంత్రం")return e+12},meridiem:function(e,t,n){if(e<4)return"రాత్రి";else if(e<10)return"ఉదయం";else if(e<17)return"మధ్యాహ్నం";else if(e<20)return"సాయంత్రం";else return"రాత్రి"},week:{dow:0,doy:6}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:true,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return e==="หลังเที่ยง"},meridiem:function(e,t,n){if(e<12)return"ก่อนเที่ยง";else return"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var o={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"},t;e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,t){switch(t){case"d":case"D":case"Do":case"DD":return e;default:if(e===0)return e+"'unjy";var n=e%10,a=e%100-n,r=e>=100?100:null;return e+(o[n]||o[a]||o[r])}},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var a={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"},t;e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="шаб")return e<4?e:e+12;else if(t==="субҳ")return e;else if(t==="рӯз")return e>=11?e:e+12;else if(t==="бегоҳ")return e+12},meridiem:function(e,t,n){if(e<4)return"шаб";else if(e<11)return"субҳ";else if(e<16)return"рӯз";else if(e<19)return"бегоҳ";else return"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var t=e%10,n=e>=100?100:null;return e+(a[e]||a[t]||a[n])},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:true,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return e==="หลังเที่ยง"},meridiem:function(e,t,n){if(e<12)return"ก่อนเที่ยง";else return"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var o="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_"),t;function n(e){var t=e;t=e.indexOf("jaj")!==-1?t.slice(0,-3)+"leS":e.indexOf("jar")!==-1?t.slice(0,-3)+"waQ":e.indexOf("DIS")!==-1?t.slice(0,-3)+"nem":t+" pIq";return t}function a(e){var t=e;t=e.indexOf("jaj")!==-1?t.slice(0,-3)+"Hu’":e.indexOf("jar")!==-1?t.slice(0,-3)+"wen":e.indexOf("DIS")!==-1?t.slice(0,-3)+"ben":t+" ret";return t}function r(e,t,n,a){var r=i(e);switch(n){case"ss":return r+" lup";case"mm":return r+" tup";case"hh":return r+" rep";case"dd":return r+" jaj";case"MM":return r+" jar";case"yy":return r+" DIS"}}function i(e){var t=Math.floor(e%1e3/100),n=Math.floor(e%100/10),a=e%10,r="";if(t>0)r+=o[t]+"vatlh";if(n>0)r+=(r!==""?" ":"")+o[n]+"maH";if(a>0)r+=(r!==""?" ":"")+o[a];return r===""?"pagh":r}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:true,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:n,past:a,s:"puS lup",ss:r,m:"wa’ tup",mm:r,h:"wa’ rep",hh:r,d:"wa’ jaj",dd:r,M:"wa’ jar",MM:r,y:"wa’ DIS",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var o={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"},t;e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,t){switch(t){case"d":case"D":case"Do":case"DD":return e;default:if(e===0)return e+"'unjy";var n=e%10,a=e%100-n,r=e>=100?100:null;return e+(o[n]||o[a]||o[r])}},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var o={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},t;e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){if(e<12)return n?"öö":"ÖÖ";else return n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return e==="ös"||e==="ÖS"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,t){switch(t){case"d":case"D":case"Do":case"DD":return e;default:if(e===0)return e+"'ıncı";var n=e%10,a=e%100-n,r=e>=100?100:null;return e+(o[n]||o[a]||o[r])}},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;function n(e,t,n,a){var r={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",""+e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",""+e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",""+e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",""+e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",""+e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",""+e+" ars"]};return a?r[n][0]:t?r[n][0]:r[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){if(e>11)return n?"d'o":"D'O";else return n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var o="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_"),t;function n(e){var t=e;t=e.indexOf("jaj")!==-1?t.slice(0,-3)+"leS":e.indexOf("jar")!==-1?t.slice(0,-3)+"waQ":e.indexOf("DIS")!==-1?t.slice(0,-3)+"nem":t+" pIq";return t}function a(e){var t=e;t=e.indexOf("jaj")!==-1?t.slice(0,-3)+"Hu’":e.indexOf("jar")!==-1?t.slice(0,-3)+"wen":e.indexOf("DIS")!==-1?t.slice(0,-3)+"ben":t+" ret";return t}function r(e,t,n,a){var r=i(e);switch(n){case"ss":return r+" lup";case"mm":return r+" tup";case"hh":return r+" rep";case"dd":return r+" jaj";case"MM":return r+" jar";case"yy":return r+" DIS"}}function i(e){var t=Math.floor(e%1e3/100),n=Math.floor(e%100/10),a=e%10,r="";if(t>0)r+=o[t]+"vatlh";if(n>0)r+=(r!==""?" ":"")+o[n]+"maH";if(a>0)r+=(r!==""?" ":"")+o[a];return r===""?"pagh":r}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:true,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:n,past:a,s:"puS lup",ss:r,m:"wa’ tup",mm:r,h:"wa’ rep",hh:r,d:"wa’ jaj",dd:r,M:"wa’ jar",MM:r,y:"wa’ DIS",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var o={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},t;e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){if(e<12)return n?"öö":"ÖÖ";else return n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return e==="ös"||e==="ÖS"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,t){switch(t){case"d":case"D":case"Do":case"DD":return e;default:if(e===0)return e+"'ıncı";var n=e%10,a=e%100-n,r=e>=100?100:null;return e+(o[n]||o[a]||o[r])}},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;function n(e,t,n,a){var r={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",""+e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",""+e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",""+e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",""+e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",""+e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",""+e+" ars"]};return a?r[n][0]:t?r[n][0]:r[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){if(e>11)return n?"d'o":"D'O";else return n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="يېرىم كېچە"||t==="سەھەر"||t==="چۈشتىن بۇرۇن")return e;else if(t==="چۈشتىن كېيىن"||t==="كەچ")return e+12;else return e>=11?e:e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"يېرىم كېچە";else if(a<900)return"سەھەر";else if(a<1130)return"چۈشتىن بۇرۇن";else if(a<1230)return"چۈش";else if(a<1800)return"چۈشتىن كېيىن";else return"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -function r(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function t(e,t,n){var a={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};if(n==="m")return t?"хвилина":"хвилину";else if(n==="h")return t?"година":"годину";else return e+" "+r(a[n],+e)}function n(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},a;if(e===true)return n["nominative"].slice(1,7).concat(n["nominative"].slice(0,1));if(!e)return n["nominative"];a=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative";return n[a][e.day()]}function a(e){return function(){return e+"о"+(this.hours()===11?"б":"")+"] LT"}}var o;e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:n,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:a("[Сьогодні "),nextDay:a("[Завтра "),lastDay:a("[Вчора "),nextWeek:a("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return a("[Минулої] dddd [").call(this);case 1:case 2:case 4:return a("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){if(e<4)return"ночі";else if(e<12)return"ранку";else if(e<17)return"дня";else return"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],a;e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){if(e<12)return"صبح";return"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="يېرىم كېچە"||t==="سەھەر"||t==="چۈشتىن بۇرۇن")return e;else if(t==="چۈشتىن كېيىن"||t==="كەچ")return e+12;else return e>=11?e:e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"يېرىم كېچە";else if(a<900)return"سەھەر";else if(a<1130)return"چۈشتىن بۇرۇن";else if(a<1230)return"چۈش";else if(a<1800)return"چۈشتىن كېيىن";else return"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +function r(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function t(e,t,n){var a={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};if(n==="m")return t?"хвилина":"хвилину";else if(n==="h")return t?"година":"годину";else return e+" "+r(a[n],+e)}function n(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},a;if(e===true)return n["nominative"].slice(1,7).concat(n["nominative"].slice(0,1));if(!e)return n["nominative"];a=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative";return n[a][e.day()]}function a(e){return function(){return e+"о"+(this.hours()===11?"б":"")+"] LT"}}var o;e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:n,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:a("[Сьогодні "),nextDay:a("[Завтра "),lastDay:a("[Вчора "),nextWeek:a("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return a("[Минулої] dddd [").call(this);case 1:case 2:case 4:return a("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){if(e<4)return"ночі";else if(e<12)return"ранку";else if(e<17)return"дня";else return"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],a;e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){if(e<12)return"صبح";return"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:true,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:true,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){if(e<12)return n?"sa":"SA";else return n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:true,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:true,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:true,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){if(e<12)return n?"sa":"SA";else return n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="下午"||t==="晚上")return e+12;else return e>=11?e:e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1130)return"上午";else if(a<1230)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){if(e.week()!==this.week())return"[下]dddLT";else return"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){if(this.week()!==e.week())return"[上]dddLT";else return"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:true,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:true,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1200)return"上午";else if(a===1200)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1130)return"上午";else if(a<1230)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(9))},function(e,t,n){!function(e){"use strict"; +var t;e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="下午"||t==="晚上")return e+12;else return e>=11?e:e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1130)return"上午";else if(a<1230)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){if(e.week()!==this.week())return"[下]dddLT";else return"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){if(this.week()!==e.week())return"[上]dddLT";else return"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(6))},function(e,t,n){!function(e){"use strict"; //! moment.js locale configuration -var t;e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1130)return"上午";else if(a<1230)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(9))},function(e,t,n){"use strict";t.__esModule=!0;var u=p(n(2)),a=p(n(4)),r=p(n(6)),o=p(n(7)),i=n(0),d=p(i),s=p(n(5)),c=p(n(17)),l=p(n(8)),f=n(11);function p(e){return e&&e.__esModule?e:{default:e}}h=i.Component,(0,o.default)(m,h),m.prototype.render=function(){var e,t=this.props,n=t.prefix,a=t.type,r=t.size,o=t.className,i=t.rtl,s=t.style,t=t.children,l=f.obj.pickOthers((0,u.default)({},m.propTypes),this.props),n=(0,c.default)(((e={})[n+"icon"]=!0,e[n+"icon-"+a]=!!a,e[""+n+r]=!!r&&"string"==typeof r,e[o]=!!o,e)),o=(i&&-1!==["arrow-left","arrow-right","arrow-double-left","arrow-double-right","switch","sorting","descending","ascending"].indexOf(a)&&(l.dir="rtl"),"number"==typeof r?{width:r,height:r,lineHeight:r+"px",fontSize:r}:{});return d.default.createElement("i",(0,u.default)({},l,{style:(0,u.default)({},o,s),className:n}),t)},i=n=m,n.propTypes=(0,u.default)({},l.default.propTypes,{type:s.default.string,children:s.default.node,size:s.default.oneOfType([s.default.oneOf(["xxs","xs","small","medium","large","xl","xxl","xxxl","inherit"]),s.default.number]),className:s.default.string,style:s.default.object}),n.defaultProps={prefix:"next-",size:"medium"},n._typeMark="icon";var h,o=i;function m(){return(0,a.default)(this,m),(0,r.default)(this,h.apply(this,arguments))}o.displayName="Icon",t.default=o,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var g=l(n(2)),y=l(n(12)),a=l(n(42)),r=l(n(4)),o=l(n(6)),i=l(n(7)),v=n(0),_=l(v),s=l(n(5)),b=n(163),w=l(n(541));function l(e){return e&&e.__esModule?e:{default:e}}function u(){}function M(e){return _.default.Children.toArray(e.children)[0]||null}d=v.Component,(0,i.default)(c,d),c.prototype.normalizeNames=function(e){return"string"==typeof e?{appear:e+"-appear",appearActive:e+"-appear-active",enter:e+"-enter",enterActive:e+"-enter-active",leave:e+"-leave",leaveActive:e+"-leave-active"}:"object"===(void 0===e?"undefined":(0,a.default)(e))?{appear:e.appear,appearActive:e.appear+"-active",enter:""+e.enter,enterActive:e.enter+"-active",leave:""+e.leave,leaveActive:e.leave+"-active"}:void 0},c.prototype.render=function(){var t=this,e=this.props,n=e.animation,a=e.children,r=e.animationAppear,o=e.singleMode,i=e.component,s=e.beforeAppear,l=e.onAppear,u=e.afterAppear,d=e.beforeEnter,c=e.onEnter,f=e.afterEnter,p=e.beforeLeave,h=e.onLeave,m=e.afterLeave,e=(0,y.default)(e,["animation","children","animationAppear","singleMode","component","beforeAppear","onAppear","afterAppear","beforeEnter","onEnter","afterEnter","beforeLeave","onLeave","afterLeave"]),a=v.Children.map(a,function(e){return _.default.createElement(w.default,{key:e.key,names:t.normalizeNames(n),onAppear:s,onAppearing:l,onAppeared:u,onEnter:d,onEntering:c,onEntered:f,onExit:p,onExiting:h,onExited:m},e)});return _.default.createElement(b.TransitionGroup,(0,g.default)({appear:r,component:o?M:i},e),a)},i=n=c,n.propTypes={animation:s.default.oneOfType([s.default.string,s.default.object]),animationAppear:s.default.bool,component:s.default.any,singleMode:s.default.bool,children:s.default.oneOfType([s.default.element,s.default.arrayOf(s.default.element)]),beforeAppear:s.default.func,onAppear:s.default.func,afterAppear:s.default.func,beforeEnter:s.default.func,onEnter:s.default.func,afterEnter:s.default.func,beforeLeave:s.default.func,onLeave:s.default.func,afterLeave:s.default.func},n.defaultProps={animationAppear:!0,component:"div",singleMode:!0,beforeAppear:u,onAppear:u,afterAppear:u,beforeEnter:u,onEnter:u,afterEnter:u,beforeLeave:u,onLeave:u,afterLeave:u};var d,s=i;function c(){return(0,r.default)(this,c),(0,o.default)(this,d.apply(this,arguments))}s.displayName="Animate",t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var a=function(e){{if(e&&e.__esModule)return e;var t,n={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&((t=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{}).get||t.set?Object.defineProperty(n,a,t):n[a]=e[a]);return n.default=e,n}}(n(5)),o=s(n(0)),i=s(n(24)),r=n(30);n(358);function s(e){return e&&e.__esModule?e:{default:e}}var l="unmounted",u=(t.UNMOUNTED=l,"exited"),d=(t.EXITED=u,"entering"),c=(t.ENTERING=d,"entered"),f=(t.ENTERED=c,"exiting"),n=(t.EXITING=f,function(r){var e;function t(e,t){var n,a=r.call(this,e,t)||this,t=t.transitionGroup,t=t&&!t.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?t?(n=u,a.appearStatus=d):n=c:n=e.unmountOnExit||e.mountOnEnter?l:u,a.state={status:n},a.nextCallback=null,a}e=r,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:u}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;e!==this.props&&(e=this.state.status,this.props.in?e!==d&&e!==c&&(t=d):e!==d&&e!==c||(t=f)),this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n=this.props.timeout,a=e=t=n;return null!=n&&"number"!=typeof n&&(a=n.exit,e=n.enter,t=void 0!==n.appear?n.appear:e),{exit:a,enter:e,appear:t}},n.updateStatus=function(e,t){var n;void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),n=i.default.findDOMNode(this),t===d?this.performEnter(n,e):this.performExit(n)):this.props.unmountOnExit&&this.state.status===u&&this.setState({status:l})},n.performEnter=function(e,t){var n=this,a=this.props.enter,r=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,o=this.getTimeouts(),i=r?o.appear:o.enter;t||a?(this.props.onEnter(e,r),this.safeSetState({status:d},function(){n.props.onEntering(e,r),n.onTransitionEnd(e,i,function(){n.safeSetState({status:c},function(){n.props.onEntered(e,r)})})})):this.safeSetState({status:c},function(){n.props.onEntered(e)})},n.performExit=function(e){var t=this,n=this.props.exit,a=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:f},function(){t.props.onExiting(e),t.onTransitionEnd(e,a.exit,function(){t.safeSetState({status:u},function(){t.props.onExited(e)})})})):this.safeSetState({status:u},function(){t.props.onExited(e)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(t){var n=this,a=!0;return this.nextCallback=function(e){a&&(a=!1,n.nextCallback=null,t(e))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);n=null==t&&!this.props.addEndListener;!e||n?setTimeout(this.nextCallback,0):(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t))},n.render=function(){var e,t,n=this.state.status;return n===l?null:(e=(t=this.props).children,delete(t=function(e,t){if(null==e)return{};for(var n,a={},r=Object.keys(e),o=0;o 16.8.0"),null)},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var L=l(n(2)),a=l(n(4)),r=l(n(6)),o=l(n(7)),p=n(0),O=l(p),i=l(n(5)),D=l(n(17)),h=l(n(26)),N=n(11),s=l(n(372)),P=l(n(373));function l(e){return e&&e.__esModule?e:{default:e}}function m(e){e.preventDefault()}u=s.default,(0,o.default)(j,u),j.prototype.getValueLength=function(e){var e=""+e,t=this.props.getValueLength(e);return t="number"!=typeof t?e.length:t},j.prototype.renderControl=function(){var e=this,t=this.props,n=t.hasClear,a=t.readOnly,r=t.state,o=t.prefix,i=t.hint,s=t.extra,l=t.locale,u=t.disabled,t=t.hoverShowClear,d=this.renderLength(),c=null,f=("success"===r?c=O.default.createElement(h.default,{type:"success-filling",className:o+"input-success-icon"}):"loading"===r?c=O.default.createElement(h.default,{type:"loading",className:o+"input-loading-icon"}):"warning"===r&&(c=O.default.createElement(h.default,{type:"warning",className:o+"input-warning-icon"})),null),a=n&&!a&&!!(""+this.state.value)&&!u;return(i||a)&&(u=null,u=i?"string"==typeof i?O.default.createElement(h.default,{type:i,className:o+"input-hint"}):(0,p.isValidElement)(i)?(0,p.cloneElement)(i,{className:(0,D.default)(i.props.className,o+"input-hint")}):i:(t=(0,D.default)(((a={})[o+"input-hint"]=!0,a[o+"input-clear-icon"]=!0,a[o+"input-hover-show"]=t,a)),O.default.createElement(h.default,{type:"delete-filling",role:"button",tabIndex:"0",className:t,"aria-label":l.clear,onClick:this.onClear.bind(this),onMouseDown:m,onKeyDown:this.handleKeyDownFromClear})),f=O.default.createElement("span",{className:o+"input-hint-wrap"},n&&i?O.default.createElement(h.default,{type:"delete-filling",role:"button",tabIndex:"0",className:o+"input-clear "+o+"input-clear-icon","aria-label":l.clear,onClick:this.onClear.bind(this),onMouseDown:m,onKeyDown:this.handleKeyDownFromClear}):null,u)),(f="loading"===r?null:f)||d||c||s?O.default.createElement("span",{onClick:function(){return e.focus()},className:o+"input-control"},f,d,c,s):null},j.prototype.renderLabel=function(){var e=this.props,t=e.label,n=e.prefix,e=e.id;return t?O.default.createElement("label",{className:n+"input-label",htmlFor:e},t):null},j.prototype.renderInner=function(e,t){return e?O.default.createElement("span",{className:t},e):null},j.prototype.onClear=function(e){this.props.disabled||("value"in this.props||this.setState({value:""}),this.props.onChange("",e,"clear"),this.focus())},j.prototype.render=function(){var e,t=this.props,n=t.size,a=t.htmlType,r=t.htmlSize,o=t.autoComplete,i=t.autoFocus,s=t.disabled,l=t.style,u=t.innerBefore,d=t.innerAfter,c=t.innerBeforeClassName,f=t.innerAfterClassName,p=t.className,h=t.hasBorder,m=t.prefix,g=t.isPreview,y=t.renderPreview,v=t.addonBefore,_=t.addonAfter,b=t.addonTextBefore,w=t.addonTextAfter,M=t.inputRender,k=t.rtl,t=t.composition,S=v||_||b||w,h=(0,D.default)(this.getClass(),((E={})[""+m+n]=!0,E[m+"hidden"]="hidden"===this.props.htmlType,E[m+"noborder"]=!h||"file"===this.props.htmlType,E[m+"input-group-auto-width"]=S,E[m+"disabled"]=s,E[p]=!!p&&!S,E)),E=m+"input-inner",c=(0,D.default)(((x={})[E]=!0,x[m+"before"]=!0,x[c]=c,x)),E=(0,D.default)(((x={})[E]=!0,x[m+"after"]=!0,x[m+"input-inner-text"]="string"==typeof d,x[f]=f,x)),x=(0,D.default)(((f={})[m+"form-preview"]=!0,f[p]=!!p,f)),f=this.getProps(),C=N.obj.pickAttrsWith(this.props,"data-"),T=N.obj.pickOthers((0,L.default)({},C,j.propTypes),this.props);return g?(g=f.value,e=this.props.label,"function"==typeof y?O.default.createElement("div",(0,L.default)({},T,{className:x}),y(g,this.props)):O.default.createElement("div",(0,L.default)({},T,{className:x}),v||b,e,u,g,d,_||w)):(y={},t&&(y.onCompositionStart=this.handleCompositionStart,y.onCompositionEnd=this.handleCompositionEnd),x=O.default.createElement("input",(0,L.default)({},T,f,y,{height:"100%",type:a,size:r,autoFocus:i,autoComplete:o,onKeyDown:this.handleKeyDown,ref:this.saveRef})),e=O.default.createElement("span",(0,L.default)({},C,{dir:k?"rtl":void 0,className:h,style:S?void 0:l}),this.renderLabel(),this.renderInner(u,c),M(x),this.renderInner(d,E),this.renderControl()),t=(0,D.default)(((g={})[m+"input-group-text"]=!0,g[""+m+n]=!!n,g[m+"disabled"]=s,g)),f=(0,D.default)(((T={})[t]=b,T)),a=(0,D.default)(((y={})[t]=w,y)),S?O.default.createElement(P.default,(0,L.default)({},C,{prefix:m,className:p,style:l,disabled:s,addonBefore:v||b,addonBeforeClassName:f,addonAfter:_||w,addonAfterClassName:a}),e):e)},o=n=j,n.displayName="Input",n.getDerivedStateFromProps=s.default.getDerivedStateFromProps,n.propTypes=(0,L.default)({},s.default.propTypes,{label:i.default.node,hasClear:i.default.bool,hasBorder:i.default.bool,state:i.default.oneOf(["error","loading","success","warning"]),onPressEnter:i.default.func,htmlType:i.default.string,htmlSize:i.default.string,hint:i.default.oneOfType([i.default.string,i.default.node]),innerBefore:i.default.node,innerAfter:i.default.node,addonBefore:i.default.node,addonAfter:i.default.node,addonTextBefore:i.default.node,addonTextAfter:i.default.node,autoComplete:i.default.string,autoFocus:i.default.bool,inputRender:i.default.func,extra:i.default.node,innerBeforeClassName:i.default.string,innerAfterClassName:i.default.string,isPreview:i.default.bool,renderPreview:i.default.func,hoverShowClear:i.default.bool}),n.defaultProps=(0,L.default)({},s.default.defaultProps,{autoComplete:"off",hasBorder:!0,isPreview:!1,hoverShowClear:!1,onPressEnter:N.func.noop,inputRender:function(e){return e}});var u,i=o;function j(e){(0,a.default)(this,j);var t=(0,r.default)(this,u.call(this,e)),n=(t.handleKeyDown=function(e){13===e.keyCode&&t.props.onPressEnter(e),t.onKeyDown(e)},t.handleKeyDownFromClear=function(e){13===e.keyCode&&t.onClear(e)},void 0),n="value"in e?e.value:e.defaultValue;return t.state={value:void 0===n?"":n},t}t.default=i,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,r=h(n(2)),o=h(n(4)),i=h(n(6)),s=h(n(7)),l=h(n(0)),u=h(n(5)),d=h(n(17)),c=n(30),f=h(n(8)),p=n(11),n=h(n(44));function h(e){return e&&e.__esModule?e:{default:e}}m=l.default.Component,(0,s.default)(g,m),g.getDerivedStateFromProps=function(e,t){return"value"in e&&e.value!==t.value&&!t.composition?{value:null==(t=e.value)?"":t}:null},g.prototype.ieHack=function(e){return e},g.prototype.onChange=function(e){"stopPropagation"in e?e.stopPropagation():"cancelBubble"in e&&e.cancelBubble();var t=e.target.value;this.props.trim&&(t=t.trim()),t=this.ieHack(t),"value"in this.props&&!this.state.composition||this.setState({value:t}),this.state.composition||(t&&"number"===this.props.htmlType&&(t=Number(t)),this.props.onChange(t,e))},g.prototype.onKeyDown=function(e){var t=e.target.value,n=this.props.maxLength,t=0>6]+d[128|63&l]:l<55296||57344<=l?i+=d[224|l>>12]+d[128|l>>6&63]+d[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&o.charCodeAt(s)),i+=d[240|l>>18]+d[128|l>>12&63]+d[128|l>>6&63]+d[128|63&l])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(m(e)){for(var n=[],a=0;athis.popupNode.offsetWidth&&p(this.popupNode,"width",s.offsetWidth+"px"),"outside"!==a||"hoz"===r&&1===n||(p(this.popupNode,"height",u.offsetHeight+"px"),this.popupNode.firstElementChild&&p(this.popupNode.firstElementChild,"overflow-y","auto")),this.popupProps);d.onOpen&&d.onOpen()}catch(e){return null}},S.prototype.handlePopupClose=function(){var e=this.props.root.popupNodes,t=e.indexOf(this.popupNode),e=(-1t?r[t+1]:r[0])}),n[a]||(o=r[0]),i.onSort(a,o)},i.keydownHandler=function(e){e.preventDefault(),e.stopPropagation(),e.keyCode===s.KEYCODE.ENTER&&i.handleClick()},i.onSort=function(e,t){var n={};i.props.onSort(e,n[e]=t,n)},(0,o.default)(i,e)}i.displayName="Sort",t.default=i,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(2)),a=c(n(4)),o=c(n(6)),i=c(n(7)),s=c(n(0)),l=c(n(5)),u=c(n(17)),d=c(n(401));function c(e){return e&&e.__esModule?e:{default:e}}f=s.default.Component,(0,i.default)(p,f),p.prototype.render=function(){var e=this.props,t=e.className,n=e.record,e=e.primaryKey,a=this.context.selectedRowKeys,n=(0,u.default)(((a={selected:-1t.highWaterMark&&(t.highWaterMark=(p<=(n=e)?n=p:(n--,n=(n=(n=(n=(n|=n>>>1)|n>>>2)|n>>>4)|n>>>8)|n>>>16,n++),n)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function b(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y.nextTick(w,e):w(e))}function w(e){_("emit readable"),e.emit("readable"),x(e)}function M(e,t){t.readingMore||(t.readingMore=!0,y.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var a;eo.length?o.length:e;if(i===o.length?r+=o:r+=o.slice(0,e),0===(e-=i)){i===o.length?(++a,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=o.slice(i);break}++a}return t.length-=a,r}:function(e,t){var n=d.allocUnsafe(e),a=t.head,r=1;a.data.copy(n),e-=a.data.length;for(;a=a.next;){var o=a.data,i=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,i),0===(e-=i)){i===o.length?(++r,a.next?t.head=a.next:t.head=t.tail=null):(t.head=a).data=o.slice(i);break}++r}return t.length-=r,n})(e,t);return a}(e,t.buffer,t.decoder),n)}function T(e){var t=e._readableState;if(0=n.highWaterMark||n.ended)?(_("read: emitReadable",n.length,n.ended),(0===n.length&&n.ended?T:b)(this),null):0===(e=h(e,n))&&n.ended?(0===n.length&&T(this),null):(t=n.needReadable,_("need readable",t),(0===n.length||n.length-e - * @license MIT - */ -var S=P(693),o=P(694),s=P(695);function n(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var n=(e="string"!=typeof e?""+e:e).length;if(0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return O(e).length;default:if(a)return L(e).length;t=(""+t).toLowerCase(),a=!0}}function t(e,t,n){var a,r=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,i=t,s=n,l=o.length;(!s||s<0||l=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,a)),c.isBuffer(t))return 0===t.length?-1:m(e,t,n,a,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(r?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):m(e,[t],n,a,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,a,r){var o=1,i=e.length,s=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i/=o=2,s/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r)for(var u=-1,d=n;d>8,r.push(n%256),r.push(a);return r}(t,e.length-n),e,n,a)}function E(e,t,n){n=Math.min(e.length,n);for(var a=[],r=t;r>>10&1023|55296),d=56320|1023&d),a.push(d),r+=c}var f=a,p=f.length;if(p<=v)return String.fromCharCode.apply(String,f);for(var h="",m=0;mt)&&(e+=" ... "),""},c.prototype.compare=function(e,t,n,a,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),(t=void 0===t?0:t)<0||n>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(r<=a&&n<=t)return 0;if(r<=a)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(o,i),l=this.slice(a,r),u=e.slice(t,n),d=0;dthis.length)throw new RangeError("Attempt to write outside buffer bounds");a=a||"utf8";for(var o,i,s,l=!1;;)switch(a){case"hex":var u=this,d=e,c=t,f=n,p=(c=Number(c)||0,u.length-c);if((!f||p<(f=Number(f)))&&(f=p),(p=d.length)%2!=0)throw new TypeError("Invalid hex string");p/2e.length)throw new RangeError("Index out of range")}function w(e,t,n,a){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(a?r:1-r)}function M(e,t,n,a){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(a?r:3-r)&255}function k(e,t,n,a){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,a,r){return r||k(e,0,n,4),o.write(e,t,n,a,23,4),n+4}function C(e,t,n,a,r){return r||k(e,0,n,8),o.write(e,t,n,a,52,8),n+8}c.prototype.slice=function(e,t){var n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n>>8):w(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=0,o=1,i=0;for(this[t]=255&e;++r>0)-i&255;return t+n},c.prototype.writeIntBE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=n-1,o=1,i=0;for(this[t+r]=255&e;0<=--r&&(o*=256);)e<0&&0===i&&0!==this[t+r+1]&&(i=1),this[t+r]=(e/o>>0)-i&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):w(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,a){if(n=n||0,a||0===a||(a=this.length),t>=e.length&&(t=e.length),(a=0=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length);var r,o=(a=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function O(e){return S.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}.call(this,P(65))},function(e,t,n){"use strict";var o=n(136);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return a||r?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(i,this,e)):o.nextTick(i,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,o.nextTick(i,n,e)):o.nextTick(i,n,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var a=n(137).Buffer,r=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||a.isEncoding!==r&&r(e))return t||e;throw new Error("Unknown encoding: "+e)}function i(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=d,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t,n=this.lastTotal-this.lastNeed,a=(t=this,128!=(192&(a=e)[0])?(t.lastNeed=0,"�"):1e.slidesToShow&&(n=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0&&(t=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow,t=e.rtl?(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow:t)&&(o=e.slideIndex>e.slideCount?(n=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(n=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1))):e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(n=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth),e.centerMode&&(e.infinite?n+=e.slideWidth*Math.floor(e.slidesToShow/2):n=e.slideWidth*Math.floor(e.slidesToShow/2)),a=e.vertical?e.slideIndex*e.slideHeight*-1+o:e.slideIndex*e.slideWidth*-1+n,!0===e.variableWidth&&(t=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(t=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[t]))?-1*r.offsetLeft:0,!0===e.centerMode)&&(r=!1===e.infinite?i.default.findDOMNode(e.trackRef).children[e.slideIndex]:i.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])?-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2:a)}},function(e,t,n){"use strict";t.__esModule=!0;var p=u(n(2)),h=u(n(12)),o=u(n(4)),i=u(n(6)),a=u(n(7)),m=u(n(0)),r=u(n(5)),g=u(n(17)),s=u(n(8)),y=u(n(26)),l=n(11);function u(e){return e&&e.__esModule?e:{default:e}}d=m.default.Component,(0,a.default)(c,d),c.prototype.render=function(){var e=this.props,t=e.title,n=e.children,a=e.className,r=e.isExpanded,o=e.disabled,i=e.style,s=e.prefix,l=e.onClick,u=e.id,e=(0,h.default)(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),a=(0,g.default)(((d={})[s+"collapse-panel"]=!0,d[s+"collapse-panel-hidden"]=!r,d[s+"collapse-panel-expanded"]=r,d[s+"collapse-panel-disabled"]=o,d[a]=a,d)),d=(0,g.default)(((d={})[s+"collapse-panel-icon"]=!0,d[s+"collapse-panel-icon-expanded"]=r,d)),c=u?u+"-heading":void 0,f=u?u+"-region":void 0;return m.default.createElement("div",(0,p.default)({className:a,style:i,id:u},e),m.default.createElement("div",{id:c,className:s+"collapse-panel-title",onClick:l,onKeyDown:this.onKeyDown,tabIndex:"0","aria-disabled":o,"aria-expanded":r,"aria-controls":f,role:"button"},m.default.createElement(y.default,{type:"arrow-right",className:d,"aria-hidden":"true"}),t),m.default.createElement("div",{className:s+"collapse-panel-content",role:"region",id:f},n))},a=n=c,n.propTypes={prefix:r.default.string,style:r.default.object,children:r.default.any,isExpanded:r.default.bool,disabled:r.default.bool,title:r.default.node,className:r.default.string,onClick:r.default.func,id:r.default.string},n.defaultProps={prefix:"next-",isExpanded:!1,onClick:l.func.noop},n.isNextPanel=!0;var d,r=a;function c(){var e,n;(0,o.default)(this,c);for(var t=arguments.length,a=Array(t),r=0;r\n com.alibaba.nacos\n nacos-client\n ${version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n *\n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("receive:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"getCSharpCode",value:function(e){return'/*\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n string serverAddr = "http://localhost:8848";\n string dataId = "'.concat(e.dataId,'";\n string group = "').concat(e.group,'";\n\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Config(x =>\n {\n x.ServerAddresses = new List { serverAddr };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.ConfigUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var configSvc = serviceProvider.GetService();\n\n var content = await configSvc.GetConfig(dataId, group, 3000);\n Console.WriteLine(content);\n\n var listener = new ConfigListener();\n\n await configSvc.AddListener(dataId, group, listener);\n\n var isPublishOk = await configSvc.PublishConfig(dataId, group, "content");\n Console.WriteLine(isPublishOk);\n\n await Task.Delay(3000);\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n\n var isRemoveOk = await configSvc.RemoveConfig(dataId, group);\n Console.WriteLine(isRemoveOk);\n await Task.Delay(3000);\n\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n await Task.Delay(300000);\n }\n\n internal class ConfigListener : IListener\n {\n public void ReceiveConfigInfo(string configInfo)\n {\n Console.WriteLine("receive:" + configInfo);\n }\n }\n}\n\n/*\nRefer to document: https://github.com/nacos-group/nacos-sdk-csharp/tree/dev/samples/MsConfigApp\nDemo for ASP.NET Core Integration\nMsConfigApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.Hosting;\nusing Serilog;\nusing Serilog.Events;\n\npublic class Program\n{\n public static void Main(string[] args)\n {\n Log.Logger = new LoggerConfiguration()\n .Enrich.FromLogContext()\n .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)\n .MinimumLevel.Override("System", LogEventLevel.Warning)\n .MinimumLevel.Debug()\n .WriteTo.Console()\n .CreateLogger();\n\n try\n {\n Log.ForContext().Information("Application starting...");\n CreateHostBuilder(args, Log.Logger).Build().Run();\n }\n catch (System.Exception ex)\n {\n Log.ForContext().Fatal(ex, "Application start-up failed!!");\n }\n finally\n {\n Log.CloseAndFlush();\n }\n }\n\n public static IHostBuilder CreateHostBuilder(string[] args, Serilog.ILogger logger) =>\n Host.CreateDefaultBuilder(args)\n .ConfigureAppConfiguration((context, builder) =>\n {\n var c = builder.Build();\n builder.AddNacosV2Configuration(c.GetSection("NacosConfig"), logAction: x => x.AddSerilog(logger));\n })\n .ConfigureWebHostDefaults(webBuilder =>\n {\n webBuilder.UseStartup().UseUrls("http://*:8787");\n })\n .UseSerilog();\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return x.a.createElement("div",null,x.a.createElement(y.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:x.a.createElement("div",null),onClose:this.closeDialog.bind(this)},x.a.createElement("div",{style:{height:500}},x.a.createElement(R.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},x.a.createElement(O.a,{shape:"text",style:{height:40,paddingBottom:10}},x.a.createElement(D,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),x.a.createElement(D,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),x.a.createElement(D,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),x.a.createElement(D,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),x.a.createElement(D,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),x.a.createElement(D,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),x.a.createElement(D,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),x.a.createElement(D,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),x.a.createElement("div",{ref:"codepreview"})))))}}]),n}(x.a.Component)).displayName="ShowCodeing",S=S))||S,S=(t(69),t(40)),S=t.n(S),F=(t(752),S.a.Row),N=S.a.Col,z=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(e){return Object(_.a)(this,n),(e=t.call(this,e)).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},e}return Object(b.a)(n,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale;this.setState({title:(void 0===e?{}:e).confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=x.a.createElement("div",{style:{textAlign:"right"}},x.a.createElement(d.a,{type:"primary",onClick:this.closeDialog.bind(this)},e.determine));return x.a.createElement("div",null,x.a.createElement(y.a,{visible:this.state.visible,footer:t,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:e.deletetitle},x.a.createElement("div",null,x.a.createElement(F,null,x.a.createElement(N,{span:"4",style:{paddingTop:16}},x.a.createElement(m.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),x.a.createElement(N,{span:"20"},x.a.createElement("div",null,x.a.createElement("h3",null,this.state.isok?e.deletedSuccessfully:e.deleteFailed),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":x.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(x.a.Component)).displayName="DeleteDialog",S=S))||S,S=(t(753),t(434)),W=t.n(S),B=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(b.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,t=void 0===t?{}:t,n=e.height,e=e.locale,a=void 0===e?{}:e;return x.a.createElement("div",null,"notice"===t.modeType?x.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},x.a.createElement(W.a,{style:{marginBottom:1\n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.deregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.subscribe("').concat(this.record.name,'", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}')}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n \n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringBootCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n* pom.xml\n \n com.alibaba.boot\n nacos-discovery-spring-boot-starter\n ${latest.version}\n \n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringCloudCode",value:function(e){return"/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml\n \n org.springframework.cloud\n spring-cloud-starter-alibaba-nacos-discovery\n ${latest.version}\n \n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=".concat(this.record.name,'\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosProviderApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(NacosProviderApplication.class, args);\n}\n\n @RestController\n class EchoController {\n @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n public String echo(@PathVariable String string) {\n return "Hello Nacos Discovery " + string;\n }\n }\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=micro-service-oauth2\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"getCSharpCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Naming(x =>\n {\n x.ServerAddresses = new List { "http://localhost:8848/" };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.NamingUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var namingSvc = serviceProvider.GetService();\n\n await namingSvc.RegisterInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n await namingSvc.RegisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(await namingSvc.GetAllInstances("').concat(this.record.name,'")));\n\n await namingSvc.DeregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n var listener = new EventListener();\n\n await namingSvc.Subscribe("').concat(this.record.name,'", listener);\n }\n\n internal class EventListener : IEventListener\n {\n public Task OnEvent(IEvent @event)\n {\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(@event));\n return Task.CompletedTask;\n }\n }\n}\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for ASP.NET Core Integration\nApp.csproj\n\n\n \n\n*/\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/appsettings.json\n* appsettings.json\n{\n "nacos": {\n "ServerAddresses": [ "http://localhost:8848" ],\n "DefaultTimeOut": 15000,\n "Namespace": "cs",\n "ServiceName": "App1",\n "GroupName": "DEFAULT_GROUP",\n "ClusterName": "DEFAULT",\n "Port": 0,\n "Weight": 100,\n "RegisterEnabled": true,\n "InstanceEnabled": true,\n "Ephemeral": true,\n "NamingUseRpc": true,\n "NamingLoadCacheAtStart": ""\n }\n}\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/Startup.cs\nusing Nacos.AspNetCore.V2;\n\npublic class Startup\n{\n public Startup(IConfiguration configuration)\n {\n Configuration = configuration;\n }\n\n public IConfiguration Configuration { get; }\n\n public void ConfigureServices(IServiceCollection services)\n {\n // ....\n services.AddNacosAspNet(Configuration);\n }\n\n public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n {\n // ....\n }\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return O.a.createElement("div",null,O.a.createElement(o.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:O.a.createElement("div",null),onClose:this.closeDialog.bind(this)},O.a.createElement("div",{style:{height:500}},O.a.createElement(h.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},O.a.createElement(m.a,{shape:"text",style:{height:40,paddingBottom:10}},O.a.createElement(g,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),O.a.createElement(g,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),O.a.createElement(g,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),O.a.createElement(g,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),O.a.createElement(g,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),O.a.createElement(g,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),O.a.createElement(g,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),O.a.createElement(g,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),O.a.createElement(g,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),O.a.createElement("div",{ref:"codepreview"})))))}}]),n}(O.a.Component)).displayName="ShowServiceCodeing",f=f))||f,Y=t(51),I=(t(774),t(23)),A=L.a.Item,R=c.a.Row,H=c.a.Col,F=T.a.Column,c=(0,n.a.config)(((f=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return a.queryServiceList()})},a.showcode=function(){setTimeout(function(){return a.queryServiceList()})},a.setNowNameSpace=function(e,t,n){return a.setState({nowNamespaceName:e,nowNamespaceId:t,nowNamespaceDesc:n})},a.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},a.editServiceDialog=O.a.createRef(),a.showcode=O.a.createRef(),a.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:Object(p.a)("serviceNameParam")||"",groupName:Object(p.a)("groupNameParam")||""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},a.field=new i.a(Object(l.a)(a)),a}return Object(a.a)(n,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.search,o=e.withInstances,o=void 0!==o&&o,e=e.hasIpCount,e=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];Object(p.d)({serviceNameParam:r.serviceName,groupNameParam:r.groupName}),this.openLoading(),Object(p.c)({url:"v1/ns/catalog/services?".concat(e.join("&")),success:function(){var e=0o&&v.a.createElement(u.a,{className:"users-pagination",current:i,total:n.totalCount,pageSize:o,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.c)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),v.a.createElement(x.a,{visible:l,username:e,onOk:function(e){return Object(_.k)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0,passwordResetUserVisible:!1})}}))}}]),n}(v.a.Component)).displayName="UserManagement",n=o))||n)||n;t.a=r},function(e,t,n){"use strict";n(67);var a=n(46),l=n.n(a),a=(n(36),n(18)),u=n.n(a),d=n(34),a=(n(66),n(21)),c=n.n(a),a=(n(32),n(19)),f=n.n(a),a=(n(92),n(54)),p=n.n(a),a=(n(38),n(3)),h=n.n(a),a=(n(37),n(10)),m=n.n(a),i=n(13),s=n(14),g=n(22),y=n(16),v=n(15),a=(n(27),n(8)),a=n.n(a),r=n(0),_=n.n(r),r=n(33),b=n(45),o=n(85),w=n(52),M=(n(49),n(28)),k=n.n(M),M=(n(59),n(29)),S=n.n(M),E=h.a.Item,x=S.a.Option,C={labelCol:{fixedSpan:4},wrapperCol:{span:19}},T=Object(r.b)(function(e){return{namespaces:e.namespace.namespaces}},{getNamespaces:o.b,searchRoles:b.l})(M=(0,a.a.config)(((M=function(e){Object(y.a)(o,e);var r=Object(v.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ai&&_.a.createElement(l.a,{className:"users-pagination",current:s,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),_.a.createElement(T,{visible:n,onOk:function(e){return Object(b.a)(e).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})},onCancel:function(){return a.colseCreatePermission()}}))}}]),n}(_.a.Component)).displayName="PermissionsManagement",n=M))||n)||n);t.a=r},function(e,t,n){"use strict";n(67);var a=n(46),l=n.n(a),a=(n(36),n(18)),u=n.n(a),a=(n(66),n(21)),d=n.n(a),a=(n(32),n(19)),c=n.n(a),a=(n(92),n(54)),f=n.n(a),a=(n(38),n(3)),p=n.n(a),a=(n(37),n(10)),h=n.n(a),i=n(13),s=n(14),m=n(22),g=n(16),y=n(15),a=(n(27),n(8)),a=n.n(a),r=n(0),v=n.n(r),r=n(33),_=n(45),b=n(52),o=(n(59),n(29)),w=n.n(o),o=(n(49),n(28)),M=n.n(o),k=p.a.Item,S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=Object(r.b)(function(e){return{users:e.authority.users}},{searchUsers:_.m})(o=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ao&&v.a.createElement(l.a,{className:"users-pagination",current:i,total:t.totalCount,pageSize:o,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.b)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}]),n}(v.a.Component)).displayName="RolesManagement",n=o))||n)||n);t.a=r},function(e,t,n){"use strict";n(36);function l(e){var t=void 0===(t=localStorage.token)?"{}":t,t=(Object(_.c)(t)&&JSON.parse(t)||{}).globalAdmin,n=[];return"naming"===e?n.push(b):"config"===e?n.push(w):n.push(w,b),t&&n.push(M),n.push(k),n.push(S),n.push(E),n.filter(function(e){return e})}var a=n(18),u=n.n(a),a=(n(48),n(25)),d=n.n(a),a=(n(43),n(26)),c=n.n(a),r=n(13),o=n(14),i=n(16),s=n(15),a=(n(27),n(8)),a=n.n(a),f=n(20),p=(n(83),n(50)),h=n.n(p),p=n(0),m=n.n(p),p=n(39),g=n(33),y=n(141),v=n(60),_=n(47),b={key:"serviceManagementVirtual",children:[{key:"serviceManagement",url:"/serviceManagement"},{key:"subscriberList",url:"/subscriberList"}]},w={key:"configurationManagementVirtual",children:[{key:"configurationManagement",url:"/configurationManagement"},{key:"historyRollback",url:"/historyRollback"},{key:"listeningToQuery",url:"/listeningToQuery"}]},M={key:"authorityControl",children:[{key:"userList",url:"/userManagement"},{key:"roleManagement",url:"/rolesManagement"},{key:"privilegeManagement",url:"/permissionsManagement"}]},k={key:"namespace",url:"/namespace"},S={key:"clusterManagementVirtual",children:[{key:"clusterManagement",url:"/clusterManagement"}]},E={key:"settingCenter",url:"/settingCenter"},x=(n(384),h.a.SubMenu),C=h.a.Item,p=(n=Object(g.b)(function(e){return Object(f.a)(Object(f.a)({},e.locale),e.base)},{getState:v.d,getNotice:v.c,getGuide:v.b}),g=a.a.config,Object(p.g)(a=n(a=g(((v=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){return Object(r.a)(this,n),(e=t.call(this,e)).state={visible:!0},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.props.getState(),this.props.getNotice(),this.props.getGuide()}},{key:"goBack",value:function(){this.props.history.goBack()}},{key:"navTo",value:function(e){var t=this.props.location.search,t=new URLSearchParams(t);t.set("namespace",window.nownamespace),t.set("namespaceShowName",window.namespaceShowName),this.props.history.push([e,"?",t.toString()].join(""))}},{key:"isCurrentPath",value:function(e){return e===this.props.location.pathname?"current-path next-selected":void 0}},{key:"defaultOpenKeys",value:function(){for(var t=this,e=l(this.props.functionMode),n=0,a=e.length;nthis.state.pageSize&&S.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},S.a.createElement(v.a,{current:this.state.pageNo,total:a,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}]),n}(S.a.Component)).displayName="SubscriberList",c=n))||c)||c;t.a=f},function(e,t,n){"use strict";n(53);var a=n(35),d=n.n(a),a=(n(67),n(46)),c=n.n(a),a=(n(180),n(77)),f=n.n(a),a=(n(37),n(10)),p=n.n(a),a=(n(32),n(19)),h=n.n(a),a=(n(36),n(18)),r=n.n(a),a=(n(48),n(25)),o=n.n(a),a=(n(49),n(28)),i=n.n(a),s=n(13),l=n(14),u=n(22),m=n(16),g=n(15),a=(n(27),n(8)),a=n.n(a),y=(n(419),n(122)),v=n.n(y),y=(n(66),n(21)),_=n.n(y),y=(n(69),n(40)),y=n.n(y),b=(n(38),n(3)),w=n.n(b),b=n(0),M=n.n(b),k=n(1),b=n(143),S=n.n(b),E=n(51),x=(n(777),w.a.Item),C=y.a.Row,T=y.a.Col,L=_.a.Column,O=v.a.Panel,y=(0,a.a.config)(((b=function(e){Object(m.a)(a,e);var t=Object(g.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return n.queryClusterStateList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:(e.voteFor,"")}},n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new i.a(Object(u.a)(n)),n}return Object(l.a)(a,[{key:"componentDidMount",value:function(){this.getQueryLater()}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"queryClusterStateList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.keyword,e=e.withInstances,e=["withInstances=".concat(void 0!==e&&e),"pageNo=".concat(t),"pageSize=".concat(a),"keyword=".concat(r)];Object(k.c)({url:"v1/core/cluster/nodes?".concat(e.join("&")),beforeSend:function(){return n.openLoading()},success:function(){var e=0this.state.pageSize&&M.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},M.a.createElement(c.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return t.setState({currentPage:e},function(){return t.queryClusterStateList()})}}))))}}]),a}(M.a.Component)).displayName="ClusterNodeList",n=b))||n;t.a=y},function(e,t,n){"use strict";n(32);var a=n(19),r=n.n(a),o=n(13),i=n(14),s=n(16),l=n(15),a=(n(27),n(8)),a=n.n(a),u=n(20),d=(n(113),n(74)),d=n.n(d),c=n(0),f=n.n(c),p=(n(780),n(51)),c=n(86),h=n(146),m=n(33),g=n(23),y=d.a.Group,m=Object(m.b)(function(e){return Object(u.a)({},e.locale)},{changeLanguage:c.a,changeTheme:h.a})(d=(0,a.a.config)(((n=function(e){Object(s.a)(a,e);var n=Object(l.a)(a);function a(e){Object(o.a)(this,a),e=n.call(this,e);var t=localStorage.getItem(g.o);return e.state={theme:"dark"===t?"dark":"light",language:localStorage.getItem(g.g)},e}return Object(i.a)(a,[{key:"newTheme",value:function(e){this.setState({theme:e})}},{key:"newLanguage",value:function(e){this.setState({language:e})}},{key:"submit",value:function(){var e=this.props,t=e.changeLanguage,e=e.changeTheme,n=this.state.language,a=this.state.theme;t(n),e(a)}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=[{value:"light",label:e.settingLight},{value:"dark",label:e.settingDark}];return f.a.createElement(f.a.Fragment,null,f.a.createElement(p.a,{title:e.settingTitle}),f.a.createElement("div",{className:"setting-box"},f.a.createElement("div",{className:"text-box"},f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingTheme),f.a.createElement(y,{dataSource:t,value:this.state.theme,onChange:this.newTheme.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingLocale),f.a.createElement(y,{dataSource:[{value:"en-US",label:"English"},{value:"zh-CN",label:"中文"}],value:this.state.language,onChange:this.newLanguage.bind(this)}))),f.a.createElement(r.a,{type:"primary",onClick:this.submit.bind(this)},e.settingSubmit)))}}]),a}(f.a.Component)).displayName="SettingCenter",d=n))||d)||d;t.a=m},function(e,t,B){"use strict";B.r(t),function(e){B(53);var t=B(35),a=B.n(t),t=(B(27),B(8)),r=B.n(t),o=B(13),i=B(14),s=B(16),l=B(15),n=B(20),t=B(0),u=B.n(t),t=B(24),t=B.n(t),d=B(124),c=B(427),f=B(438),p=B(33),h=B(39),m=B(84),g=(B(474),B(447)),y=B(23),v=B(448),_=B(441),b=B(449),w=B(450),M=B(442),k=B(451),S=B(452),E=B(453),x=B(454),C=B(455),T=B(439),L=B(443),O=B(440),D=B(456),N=B(457),P=B(444),j=B(445),I=B(446),A=B(436),R=B(458),Y=B(437),H=B(86),F=B(60),z=B(146),e=(B(781),e.hot,localStorage.getItem(y.g)||localStorage.setItem(y.g,"zh-CN"===navigator.language?"zh-CN":"en-US"),Object(d.b)(Object(n.a)(Object(n.a)({},Y.a),{},{routing:c.routerReducer}))),Y=Object(d.d)(e,Object(d.c)(Object(d.a)(f.a),window[y.k]?window[y.k]():function(e){return e})),W=[{path:"/",exact:!0,render:function(){return u.a.createElement(h.a,{to:"/welcome"})}},{path:"/welcome",component:A.a},{path:"/namespace",component:_.a},{path:"/newconfig",component:b.a},{path:"/configsync",component:w.a},{path:"/configdetail",component:M.a},{path:"/configeditor",component:k.a},{path:"/historyDetail",component:S.a},{path:"/configRollback",component:E.a},{path:"/historyRollback",component:x.a},{path:"/listeningToQuery",component:C.a},{path:"/configurationManagement",component:T.a},{path:"/serviceManagement",component:L.a},{path:"/serviceDetail",component:O.a},{path:"/subscriberList",component:D.a},{path:"/clusterManagement",component:N.a},{path:"/userManagement",component:P.a},{path:"/rolesManagement",component:I.a},{path:"/permissionsManagement",component:j.a},{path:"/settingCenter",component:R.a}],e=Object(p.b)(function(e){return Object(n.a)(Object(n.a)({},e.locale),e.base)},{changeLanguage:H.a,getState:F.d,changeTheme:z.a})(c=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){return Object(o.a)(this,n),(e=t.call(this,e)).state={shownotice:"none",noticecontent:"",nacosLoading:{}},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.props.getState();var e=localStorage.getItem(y.g),t=localStorage.getItem(y.o);this.props.changeLanguage(e),this.props.changeTheme(t)}},{key:"router",get:function(){var e=this.props,t=e.loginPageEnabled,e=e.consoleUiEnable;return u.a.createElement(m.a,null,u.a.createElement(h.d,null,t&&"false"===t?null:u.a.createElement(h.b,{path:"/login",component:v.a}),u.a.createElement(g.a,null,e&&"true"===e&&W.map(function(e){return u.a.createElement(h.b,Object.assign({key:e.path},e))}))))}},{key:"render",value:function(){var e=this.props,t=e.locale,e=e.loginPageEnabled;return u.a.createElement(a.a,Object.assign({className:"nacos-loading",shape:"flower",tip:"loading...",visible:!e,fullScreen:!0},this.state.nacosLoading),u.a.createElement(r.a,{locale:t},this.router))}}]),n}(u.a.Component))||c;t.a.render(u.a.createElement(p.a,{store:Y},u.a.createElement(e,null)),document.getElementById("root"))}.call(this,B(460)(e))},function(e,t){e.exports=function(e){var t;return e.webpackPolyfill||((t=Object.create(e)).children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(I,e,t){"use strict"; +var t;e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1200)return"上午";else if(a===1200)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(6))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t;e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1130)return"上午";else if(a<1230)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(6))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t;e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var a=e*100+t;if(a<600)return"凌晨";else if(a<900)return"早上";else if(a<1130)return"上午";else if(a<1230)return"中午";else if(a<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(6))},function(e,t,n){var o=n(506);e.exports=function(a,r,e){if(o(a),void 0===r)return a;switch(e){case 1:return function(e){return a.call(r,e)};case 2:return function(e,t){return a.call(r,e,t)};case 3:return function(e,t,n){return a.call(r,e,t,n)}}return function(){return a.apply(r,arguments)}}},function(e,t,n){e.exports=!n(84)&&!n(116)(function(){return 7!=Object.defineProperty(n(351)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var a=n(101),r=n(82).document,o=a(r)&&a(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}},function(e,t,n){var i=n(92),s=n(102),l=n(508)(!1),u=n(158)("IE_PROTO");e.exports=function(e,t){var n,a=s(e),r=0,o=[];for(n in a)n!=u&&i(a,n)&&o.push(n);for(;t.length>r;)!i(a,n=t[r++])||~l(o,n)||o.push(n);return o}},function(e,t,n){var a=n(354);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==a(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";function y(){return this}var v=n(130),_=n(99),b=n(356),w=n(100),M=n(163),S=n(515),k=n(165),E=n(518),x=n(103)("iterator"),C=!([].keys&&"next"in[].keys()),T="values";e.exports=function(e,t,n,a,r,o,i){S(n,t,a);function s(e){if(!C&&e in f)return f[e];switch(e){case"keys":case T:return function(){return new n(this,e)}}return function(){return new n(this,e)}}var l,u,a=t+" Iterator",c=r==T,d=!1,f=e.prototype,p=f[x]||f["@@iterator"]||r&&f[r],h=p||s(r),m=r?c?s("entries"):h:void 0,g="Array"==t&&f.entries||p;if(g&&(g=E(g.call(new e)))!==Object.prototype&&g.next&&(k(g,a,!0),v||"function"==typeof g[x]||w(g,x,y)),c&&p&&p.name!==T&&(d=!0,h=function(){return p.call(this)}),v&&!i||!C&&!d&&f[x]||w(f,x,h),M[t]=h,M[a]=y,r)if(l={values:c?h:s(T),keys:o?h:s("keys"),entries:m},i)for(u in l)u in f||b(f,u,l[u]);else _(_.P+_.F*(C||d),t,l);return l}},function(e,t,n){e.exports=n(100)},function(e,t,n){var a=n(352),r=n(160).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,r)}},function(e,t,n){var a=n(132),r=n(128),o=n(102),i=n(155),s=n(92),l=n(350),u=Object.getOwnPropertyDescriptor;t.f=n(84)?u:function(e,t){if(e=o(e),t=i(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return r(!a.f.call(e,t),e[t])}},function(e,t,n){"use strict";t.__esModule=!0;var u=p(n(7)),a=p(n(8)),r=p(n(10)),o=p(n(11)),i=n(0),c=p(i),s=p(n(4)),d=p(n(19)),l=p(n(3)),f=n(12);function p(e){return e&&e.__esModule?e:{default:e}}h=i.Component,(0,o.default)(m,h),m.prototype.render=function(){var e,t=this.props,n=t.prefix,a=t.type,r=t.size,o=t.className,i=t.rtl,s=t.style,t=t.children,l=f.obj.pickOthers((0,u.default)({},m.propTypes),this.props),n=(0,d.default)(((e={})[n+"icon"]=!0,e[n+"icon-"+a]=!!a,e[""+n+r]=!!r&&"string"==typeof r,e[o]=!!o,e)),o=(i&&-1!==["arrow-left","arrow-right","arrow-double-left","arrow-double-right","switch","sorting","descending","ascending"].indexOf(a)&&(l.dir="rtl"),"number"==typeof r?{width:r,height:r,lineHeight:r+"px",fontSize:r}:{});return c.default.createElement("i",(0,u.default)({},l,{style:(0,u.default)({},o,s),className:n}),t)},i=n=m,n.propTypes=(0,u.default)({},l.default.propTypes,{type:s.default.string,children:s.default.node,size:s.default.oneOfType([s.default.oneOf(["xxs","xs","small","medium","large","xl","xxl","xxxl","inherit"]),s.default.number]),className:s.default.string,style:s.default.object}),n.defaultProps={prefix:"next-",size:"medium"},n._typeMark="icon";var h,o=i;function m(){return(0,a.default)(this,m),(0,r.default)(this,h.apply(this,arguments))}o.displayName="Icon",t.default=o,e.exports=t.default,e.exports.default=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function a(){}function g(e){return v.default.Children.toArray(e.children)[0]||null}var r,y=n(13),v=y.__importStar(n(0)),o=y.__importDefault(n(4)),_=n(168),b=y.__importDefault(n(548)),n=(r=v.Component,y.__extends(i,r),i.prototype.normalizeNames=function(e){return"string"==typeof e?{appear:"".concat(e,"-appear"),appearActive:"".concat(e,"-appear-active"),enter:"".concat(e,"-enter"),enterActive:"".concat(e,"-enter-active"),leave:"".concat(e,"-leave"),leaveActive:"".concat(e,"-leave-active")}:"object"==typeof e?{appear:e.appear,appearActive:"".concat(e.appear,"-active"),enter:"".concat(e.enter),enterActive:"".concat(e.enter,"-active"),leave:"".concat(e.leave),leaveActive:"".concat(e.leave,"-active")}:void 0},i.prototype.render=function(){var t=this,e=this.props,n=e.animation,a=e.children,r=e.animationAppear,o=e.singleMode,i=e.component,s=e.beforeAppear,l=e.onAppear,u=e.afterAppear,c=e.beforeEnter,d=e.onEnter,f=e.afterEnter,p=e.beforeLeave,h=e.onLeave,m=e.afterLeave,e=y.__rest(e,["animation","children","animationAppear","singleMode","component","beforeAppear","onAppear","afterAppear","beforeEnter","onEnter","afterEnter","beforeLeave","onLeave","afterLeave"]),a=v.Children.map(a,function(e){return v.default.createElement(b.default,{key:null==e?void 0:e.key,names:t.normalizeNames(n),onAppear:s,onAppearing:l,onAppeared:u,onEnter:c,onEntering:d,onEntered:f,onExit:p,onExiting:h,onExited:m},e)});return v.default.createElement(_.TransitionGroup,y.__assign({appear:r,component:o?g:i},e),a)},i.displayName="Animate",i.propTypes={animation:o.default.oneOfType([o.default.string,o.default.object]),animationAppear:o.default.bool,component:o.default.any,singleMode:o.default.bool,children:o.default.oneOfType([o.default.element,o.default.arrayOf(o.default.element)]),beforeAppear:o.default.func,onAppear:o.default.func,afterAppear:o.default.func,beforeEnter:o.default.func,onEnter:o.default.func,afterEnter:o.default.func,beforeLeave:o.default.func,onLeave:o.default.func,afterLeave:o.default.func},i.defaultProps={animationAppear:!0,component:"div",singleMode:!0,beforeAppear:a,onAppear:a,afterAppear:a,beforeEnter:a,onEnter:a,afterEnter:a,beforeLeave:a,onLeave:a,afterLeave:a},i);function i(){return null!==r&&r.apply(this,arguments)||this}t.default=n},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var a=function(e){{if(e&&e.__esModule)return e;var t,n={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&((t=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{}).get||t.set?Object.defineProperty(n,a,t):n[a]=e[a]);return n.default=e,n}}(n(4)),o=s(n(0)),i=s(n(26)),r=n(32);n(362);function s(e){return e&&e.__esModule?e:{default:e}}var l="unmounted",u=(t.UNMOUNTED=l,"exited"),c=(t.EXITED=u,"entering"),d=(t.ENTERING=c,"entered"),f=(t.ENTERED=d,"exiting"),n=(t.EXITING=f,function(r){var e;function t(e,t){var n,a=r.call(this,e,t)||this,t=t.transitionGroup,t=t&&!t.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?t?(n=u,a.appearStatus=c):n=d:n=e.unmountOnExit||e.mountOnEnter?l:u,a.state={status:n},a.nextCallback=null,a}e=r,(n=t).prototype=Object.create(e.prototype),(n.prototype.constructor=n).__proto__=e;var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:u}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;e!==this.props&&(e=this.state.status,this.props.in?e!==c&&e!==d&&(t=c):e!==c&&e!==d||(t=f)),this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n=this.props.timeout,a=e=t=n;return null!=n&&"number"!=typeof n&&(a=n.exit,e=n.enter,t=void 0!==n.appear?n.appear:e),{exit:a,enter:e,appear:t}},n.updateStatus=function(e,t){var n;void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),n=i.default.findDOMNode(this),t===c?this.performEnter(n,e):this.performExit(n)):this.props.unmountOnExit&&this.state.status===u&&this.setState({status:l})},n.performEnter=function(e,t){var n=this,a=this.props.enter,r=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,o=this.getTimeouts(),i=r?o.appear:o.enter;t||a?(this.props.onEnter(e,r),this.safeSetState({status:c},function(){n.props.onEntering(e,r),n.onTransitionEnd(e,i,function(){n.safeSetState({status:d},function(){n.props.onEntered(e,r)})})})):this.safeSetState({status:d},function(){n.props.onEntered(e)})},n.performExit=function(e){var t=this,n=this.props.exit,a=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:f},function(){t.props.onExiting(e),t.onTransitionEnd(e,a.exit,function(){t.safeSetState({status:u},function(){t.props.onExited(e)})})})):this.safeSetState({status:u},function(){t.props.onExited(e)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(t){var n=this,a=!0;return this.nextCallback=function(e){a&&(a=!1,n.nextCallback=null,t(e))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);n=null==t&&!this.props.addEndListener;!e||n?setTimeout(this.nextCallback,0):(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t))},n.render=function(){var e,t,n=this.state.status;return n===l?null:(e=(t=this.props).children,delete(t=function(e,t){if(null==e)return{};for(var n,a={},r=Object.keys(e),o=0;o 16.8.0"),null)}},function(e,t,n){"use strict";t.__esModule=!0;var L=l(n(7)),a=l(n(8)),r=l(n(10)),o=l(n(11)),p=n(0),O=l(p),i=l(n(4)),D=l(n(19)),h=l(n(28)),N=n(12),s=l(n(373)),j=l(n(374));function l(e){return e&&e.__esModule?e:{default:e}}function m(e){e.preventDefault()}u=s.default,(0,o.default)(P,u),P.prototype.getValueLength=function(e){var e=""+e,t=this.props.getValueLength(e);return t="number"!=typeof t?e.length:t},P.prototype.renderControl=function(){var e=this,t=this.props,n=t.hasClear,a=t.readOnly,r=t.state,o=t.prefix,i=t.hint,s=t.extra,l=t.locale,u=t.disabled,t=t.hoverShowClear,c=this.renderLength(),d=null,f=("success"===r?d=O.default.createElement(h.default,{type:"success-filling",className:o+"input-success-icon"}):"loading"===r?d=O.default.createElement(h.default,{type:"loading",className:o+"input-loading-icon"}):"warning"===r&&(d=O.default.createElement(h.default,{type:"warning",className:o+"input-warning-icon"})),null),a=n&&!a&&!!(""+this.state.value)&&!u;return(i||a)&&(u=null,u=i?"string"==typeof i?O.default.createElement(h.default,{type:i,className:o+"input-hint"}):(0,p.isValidElement)(i)?(0,p.cloneElement)(i,{className:(0,D.default)(i.props.className,o+"input-hint")}):i:(t=(0,D.default)(((a={})[o+"input-hint"]=!0,a[o+"input-clear-icon"]=!0,a[o+"input-hover-show"]=t,a)),O.default.createElement(h.default,{type:"delete-filling",role:"button",tabIndex:"0",className:t,"aria-label":l.clear,onClick:this.onClear.bind(this),onMouseDown:m,onKeyDown:this.handleKeyDownFromClear})),f=O.default.createElement("span",{className:o+"input-hint-wrap"},n&&i?O.default.createElement(h.default,{type:"delete-filling",role:"button",tabIndex:"0",className:o+"input-clear "+o+"input-clear-icon","aria-label":l.clear,onClick:this.onClear.bind(this),onMouseDown:m,onKeyDown:this.handleKeyDownFromClear}):null,u)),(f="loading"===r?null:f)||c||d||s?O.default.createElement("span",{onClick:function(){return e.focus()},className:o+"input-control"},f,c,d,s):null},P.prototype.renderLabel=function(){var e=this.props,t=e.label,n=e.prefix,e=e.id;return t?O.default.createElement("label",{className:n+"input-label",htmlFor:e},t):null},P.prototype.renderInner=function(e,t){return e?O.default.createElement("span",{className:t},e):null},P.prototype.render=function(){var e,t=this.props,n=t.size,a=t.htmlType,r=t.htmlSize,o=t.autoComplete,i=t.autoFocus,s=t.disabled,l=t.style,u=t.innerBefore,c=t.innerAfter,d=t.innerBeforeClassName,f=t.innerAfterClassName,p=t.className,h=t.hasBorder,m=t.prefix,g=t.isPreview,y=t.renderPreview,v=t.addonBefore,_=t.addonAfter,b=t.addonTextBefore,w=t.addonTextAfter,M=t.inputRender,S=t.rtl,t=t.composition,k=v||_||b||w,h=(0,D.default)(this.getClass(),((E={})[""+m+n]=!0,E[m+"hidden"]="hidden"===this.props.htmlType,E[m+"noborder"]=!h||"file"===this.props.htmlType,E[m+"input-group-auto-width"]=k,E[m+"disabled"]=s,E[p]=!!p&&!k,E)),E=m+"input-inner",d=(0,D.default)(((x={})[E]=!0,x[m+"before"]=!0,x[d]=d,x)),E=(0,D.default)(((x={})[E]=!0,x[m+"after"]=!0,x[m+"input-inner-text"]="string"==typeof c,x[f]=f,x)),x=(0,D.default)(((f={})[m+"form-preview"]=!0,f[p]=!!p,f)),f=this.getProps(),C=N.obj.pickAttrsWith(this.props,"data-"),T=N.obj.pickOthers((0,L.default)({},C,P.propTypes),this.props);return g?(g=f.value,e=this.props.label,"function"==typeof y?O.default.createElement("div",(0,L.default)({},T,{className:x}),y(g,this.props)):O.default.createElement("div",(0,L.default)({},T,{className:x}),v||b,e,u,g,c,_||w)):(y={},t&&(y.onCompositionStart=this.handleCompositionStart,y.onCompositionEnd=this.handleCompositionEnd),x=O.default.createElement("input",(0,L.default)({},T,f,y,{height:"100%",type:a,size:r,autoFocus:i,autoComplete:o,onKeyDown:this.handleKeyDown,ref:this.saveRef})),e=O.default.createElement("span",(0,L.default)({},C,{dir:S?"rtl":void 0,className:h,style:k?void 0:l}),this.renderLabel(),this.renderInner(u,d),M(x),this.renderInner(c,E),this.renderControl()),t=(0,D.default)(((g={})[m+"input-group-text"]=!0,g[""+m+n]=!!n,g[m+"disabled"]=s,g)),f=(0,D.default)(((T={})[t]=b,T)),a=(0,D.default)(((y={})[t]=w,y)),k?O.default.createElement(j.default,(0,L.default)({},C,{prefix:m,className:p,style:l,disabled:s,addonBefore:v||b,addonBeforeClassName:f,addonAfter:_||w,addonAfterClassName:a}),e):e)},o=n=P,n.displayName="Input",n.getDerivedStateFromProps=s.default.getDerivedStateFromProps,n.propTypes=(0,L.default)({},s.default.propTypes,{label:i.default.node,hasClear:i.default.bool,hasBorder:i.default.bool,state:i.default.oneOf(["error","loading","success","warning"]),onPressEnter:i.default.func,htmlType:i.default.string,htmlSize:i.default.string,hint:i.default.oneOfType([i.default.string,i.default.node]),innerBefore:i.default.node,innerAfter:i.default.node,addonBefore:i.default.node,addonAfter:i.default.node,addonTextBefore:i.default.node,addonTextAfter:i.default.node,autoComplete:i.default.string,autoFocus:i.default.bool,inputRender:i.default.func,extra:i.default.node,innerBeforeClassName:i.default.string,innerAfterClassName:i.default.string,isPreview:i.default.bool,renderPreview:i.default.func,hoverShowClear:i.default.bool}),n.defaultProps=(0,L.default)({},s.default.defaultProps,{autoComplete:"off",hasBorder:!0,isPreview:!1,hoverShowClear:!1,onPressEnter:N.func.noop,inputRender:function(e){return e}});var u,i=o;function P(e){(0,a.default)(this,P);var t=(0,r.default)(this,u.call(this,e)),n=(t.handleKeyDown=function(e){13===e.keyCode&&t.props.onPressEnter(e),t.onKeyDown(e)},void 0),n="value"in e?e.value:e.defaultValue;return t.state={value:void 0===n?"":n},t}t.default=i,e.exports=t.default,e.exports.default=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,r=h(n(7)),o=h(n(8)),i=h(n(10)),s=h(n(11)),l=h(n(0)),u=h(n(4)),c=h(n(19)),d=n(32),f=h(n(3)),p=n(12),n=h(n(45));function h(e){return e&&e.__esModule?e:{default:e}}m=l.default.Component,(0,s.default)(g,m),g.getDerivedStateFromProps=function(e,t){return"value"in e&&e.value!==t.value&&!t.composition?{value:null==(t=e.value)?"":t}:null},g.prototype.ieHack=function(e){return e},g.prototype.onChange=function(e){"stopPropagation"in e?e.stopPropagation():"cancelBubble"in e&&e.cancelBubble();var t=e.target.value;this.props.trim&&(t=t.trim()),t=this.ieHack(t),"value"in this.props&&!this.state.composition||this.setState({value:t}),this.state.composition||(t&&"number"===this.props.htmlType&&(t=Number(t)),this.props.onChange(t,e))},g.prototype.onKeyDown=function(e){var t=e.target.value,n=this.props.maxLength,t=0>6]+p[128|63&d]:d<55296||57344<=d?u[u.length]=p[224|d>>12]+p[128|d>>6&63]+p[128|63&d]:(c+=1,d=65536+((1023&d)<<10|1023&l.charCodeAt(c)),u[u.length]=p[240|d>>18]+p[128|d>>12&63]+p[128|d>>6&63]+p[128|63&d])}i+=u.join("")}return i},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(m(e)){for(var n=[],a=0;athis.popupNode.offsetWidth&&p(this.popupNode,"width",s.offsetWidth+"px"),"outside"!==a||"hoz"===r&&1===n||(p(this.popupNode,"height",u.offsetHeight+"px"),this.popupNode.firstElementChild&&p(this.popupNode.firstElementChild,"overflow-y","auto")),this.popupProps);c.onOpen&&c.onOpen()}catch(e){return null}},k.prototype.handlePopupClose=function(){var e=this.props.root.popupNodes,t=e.indexOf(this.popupNode),e=(-1t?r[t+1]:r[0])}),n[a]||(o=r[0]),i.onSort(a,o)},i.keydownHandler=function(e){e.preventDefault(),e.stopPropagation(),e.keyCode===s.KEYCODE.ENTER&&i.handleClick()},i.onSort=function(e,t){var n={};i.props.onSort(e,n[e]=t,n)},(0,o.default)(i,e)}i.displayName="Sort",t.default=i,e.exports=t.default,e.exports.default=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=d(n(7)),a=d(n(8)),o=d(n(10)),i=d(n(11)),s=d(n(0)),l=d(n(4)),u=d(n(19)),c=d(n(403));function d(e){return e&&e.__esModule?e:{default:e}}f=s.default.Component,(0,i.default)(p,f),p.prototype.render=function(){var e=this.props,t=e.className,n=e.record,e=e.primaryKey,a=this.context.selectedRowKeys,n=(0,u.default)(((a={selected:-1t.highWaterMark&&(t.highWaterMark=(p<=(n=e)?n=p:(n--,n=(n=(n=(n=(n|=n>>>1)|n>>>2)|n>>>4)|n>>>8)|n>>>16,n++),n)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function b(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y.nextTick(w,e):w(e))}function w(e){_("emit readable"),e.emit("readable"),x(e)}function M(e,t){t.readingMore||(t.readingMore=!0,y.nextTick(S,e,t))}function S(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var a;eo.length?o.length:e;if(i===o.length?r+=o:r+=o.slice(0,e),0===(e-=i)){i===o.length?(++a,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=o.slice(i);break}++a}return t.length-=a,r}:function(e,t){var n=c.allocUnsafe(e),a=t.head,r=1;a.data.copy(n),e-=a.data.length;for(;a=a.next;){var o=a.data,i=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,i),0===(e-=i)){i===o.length?(++r,a.next?t.head=a.next:t.head=t.tail=null):(t.head=a).data=o.slice(i);break}++r}return t.length-=r,n})(e,t);return a}(e,t.buffer,t.decoder),n)}function T(e){var t=e._readableState;if(0=n.highWaterMark||n.ended)?(_("read: emitReadable",n.length,n.ended),(0===n.length&&n.ended?T:b)(this),null):0===(e=h(e,n))&&n.ended?(0===n.length&&T(this),null):(t=n.needReadable,_("need readable",t),(0===n.length||n.length-e>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t,n=this.lastTotal-this.lastNeed,a=(t=this,128!=(192&(a=e)[0])?(t.lastNeed=0,"�"):1e.slidesToShow&&(n=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0&&(t=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow,t=e.rtl?(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow:t)&&(o=e.slideIndex>e.slideCount?(n=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(n=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1))):e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(n=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth),e.centerMode&&(e.infinite?n+=e.slideWidth*Math.floor(e.slidesToShow/2):n=e.slideWidth*Math.floor(e.slidesToShow/2)),e.vertical?(a=e.slideIndex*e.slideHeight*-1+o,e.adaptiveHeight&&(t=e.infinite?e.slideIndex+1:e.slideIndex,a=-1*e.slideHeightList.slice(0,t).reduce(function(e,t){return e+t},0))):a=e.slideIndex*e.slideWidth*-1+n,!0===e.variableWidth&&(o=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(o=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[o]))?-1*r.offsetLeft:0,!0===e.centerMode)&&(r=!1===e.infinite?i.default.findDOMNode(e.trackRef).children[e.slideIndex]:i.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])?-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2:a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,p=n(13),h=p.__importDefault(n(0)),r=p.__importDefault(n(4)),m=p.__importDefault(n(19)),o=p.__importDefault(n(3)),g=p.__importDefault(n(28)),i=n(12),n=(a=h.default.Component,p.__extends(s,a),s.prototype.render=function(){var e=this.props,t=e.title,n=e.children,a=e.className,r=e.isExpanded,o=e.disabled,i=e.style,s=e.prefix,l=e.onClick,u=e.id,e=p.__rest(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),a=(0,m.default)(((c={})["".concat(s,"collapse-panel")]=!0,c["".concat(s,"collapse-panel-hidden")]=!r,c["".concat(s,"collapse-panel-expanded")]=r,c["".concat(s,"collapse-panel-disabled")]=o,c[a]=a,c)),c=(0,m.default)(((c={})["".concat(s,"collapse-panel-icon")]=!0,c["".concat(s,"collapse-panel-icon-expanded")]=r,c)),d=u?"".concat(u,"-heading"):void 0,f=u?"".concat(u,"-region"):void 0;return h.default.createElement("div",p.__assign({className:a,style:i,id:u},e),h.default.createElement("div",{id:d,className:"".concat(s,"collapse-panel-title"),onClick:l,onKeyDown:this.onKeyDown,tabIndex:0,"aria-disabled":o,"aria-expanded":r,"aria-controls":f,role:"button"},h.default.createElement(g.default,{type:"arrow-right",className:c,"aria-hidden":"true"}),t),h.default.createElement("div",{className:"".concat(s,"collapse-panel-content"),role:"region",id:f},n))},s.propTypes={prefix:r.default.string,style:r.default.object,children:r.default.any,isExpanded:r.default.bool,disabled:r.default.bool,title:r.default.node,className:r.default.string,onClick:r.default.func,id:r.default.string},s.defaultProps={prefix:"next-",isExpanded:!1,onClick:i.func.noop},s.isNextPanel=!0,s);function s(){var n=a.apply(this,p.__spreadArray([],p.__read(arguments),!1))||this;return n.onKeyDown=function(e){var t;e.keyCode===i.KEYCODE.SPACE&&(t=n.props.onClick,e.preventDefault(),t)&&t(e)},n}t.default=o.default.config(n)},function(e,t,n){"use strict";t.__esModule=!0;var n=n(24),i=(n=n)&&n.__esModule?n:{default:n};t.default=function(e,t){var n=e.listType,a=e.defaultFileList,r=e.fileList,o=(0,i.default)(e,["listType","defaultFileList","fileList"]);return"text-image"===n?(t("listType=text-image","listType=image","Upload"),o.listType="image"):"picture-card"===n?(t("listType=picture-card","listType=card","Upload"),o.listType="card"):o.listType=n,"defaultFileList"in e&&(t("defaultFileList","defaultValue","Upload"),o.defaultValue=a),"fileList"in e&&(t("fileList","value","Upload"),o.value=r),o},e.exports=t.default,e.exports.default=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var o=r(n(8)),i=r(n(10)),a=r(n(11)),n=n(0);function r(e){return e&&e.__esModule?e:{default:e}}s=n.Component,(0,a.default)(l,s),l.prototype.abort=function(e){this.uploaderRef.abort(e)},l.prototype.startUpload=function(){this.uploaderRef.startUpload()},l.prototype.isUploading=function(){return this.uploaderRef.isUploading()};var s,n=l;function l(){var e,t;(0,o.default)(this,l);for(var n=arguments.length,a=Array(n),r=0;r\n com.alibaba.nacos\n nacos-client\n ${version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n *\n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("receive:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"getCSharpCode",value:function(e){return'/*\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n string serverAddr = "http://localhost:8848";\n string dataId = "'.concat(e.dataId,'";\n string group = "').concat(e.group,'";\n\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Config(x =>\n {\n x.ServerAddresses = new List { serverAddr };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.ConfigUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var configSvc = serviceProvider.GetService();\n\n var content = await configSvc.GetConfig(dataId, group, 3000);\n Console.WriteLine(content);\n\n var listener = new ConfigListener();\n\n await configSvc.AddListener(dataId, group, listener);\n\n var isPublishOk = await configSvc.PublishConfig(dataId, group, "content");\n Console.WriteLine(isPublishOk);\n\n await Task.Delay(3000);\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n\n var isRemoveOk = await configSvc.RemoveConfig(dataId, group);\n Console.WriteLine(isRemoveOk);\n await Task.Delay(3000);\n\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n await Task.Delay(300000);\n }\n\n internal class ConfigListener : IListener\n {\n public void ReceiveConfigInfo(string configInfo)\n {\n Console.WriteLine("receive:" + configInfo);\n }\n }\n}\n\n/*\nRefer to document: https://github.com/nacos-group/nacos-sdk-csharp/tree/dev/samples/MsConfigApp\nDemo for ASP.NET Core Integration\nMsConfigApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.Hosting;\nusing Serilog;\nusing Serilog.Events;\n\npublic class Program\n{\n public static void Main(string[] args)\n {\n Log.Logger = new LoggerConfiguration()\n .Enrich.FromLogContext()\n .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)\n .MinimumLevel.Override("System", LogEventLevel.Warning)\n .MinimumLevel.Debug()\n .WriteTo.Console()\n .CreateLogger();\n\n try\n {\n Log.ForContext().Information("Application starting...");\n CreateHostBuilder(args, Log.Logger).Build().Run();\n }\n catch (System.Exception ex)\n {\n Log.ForContext().Fatal(ex, "Application start-up failed!!");\n }\n finally\n {\n Log.CloseAndFlush();\n }\n }\n\n public static IHostBuilder CreateHostBuilder(string[] args, Serilog.ILogger logger) =>\n Host.CreateDefaultBuilder(args)\n .ConfigureAppConfiguration((context, builder) =>\n {\n var c = builder.Build();\n builder.AddNacosV2Configuration(c.GetSection("NacosConfig"), logAction: x => x.AddSerilog(logger));\n })\n .ConfigureWebHostDefaults(webBuilder =>\n {\n webBuilder.UseStartup().UseUrls("http://*:8787");\n })\n .UseSerilog();\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return C.a.createElement("div",null,C.a.createElement(y.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:C.a.createElement("div",null),onClose:this.closeDialog.bind(this)},C.a.createElement("div",{style:{height:500}},C.a.createElement(H.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},C.a.createElement(O.a,{shape:"text",style:{height:40,paddingBottom:10}},C.a.createElement(D,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),C.a.createElement(D,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),C.a.createElement(D,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),C.a.createElement(D,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),C.a.createElement(D,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),C.a.createElement(D,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),C.a.createElement(D,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),C.a.createElement(D,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),C.a.createElement("div",{ref:"codepreview"})))))}}])}(C.a.Component)).displayName="ShowCodeing",E=E))||E,E=(t(73),t(42)),E=t.n(E);t(750);var z=E.a.Row,N=E.a.Col,W=(0,n.a.config)(((E=function(e){function a(e){var t,n;return Object(_.a)(this,a),t=this,n=a,e=[e],n=Object(S.a)(n),(n=Object(w.a)(t,Object(M.a)()?Reflect.construct(n,e||[],Object(S.a)(t).constructor):n.apply(t,e))).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},n}return Object(k.a)(a,e),Object(b.a)(a,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale;this.setState({title:(void 0===e?{}:e).confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=C.a.createElement("div",{style:{textAlign:"right"}},C.a.createElement(c.a,{type:"primary",onClick:this.closeDialog.bind(this)},e.determine));return C.a.createElement("div",null,C.a.createElement(y.a,{visible:this.state.visible,footer:t,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:e.deletetitle},C.a.createElement("div",null,C.a.createElement(z,null,C.a.createElement(N,{span:"4",style:{paddingTop:16}},C.a.createElement(m.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),C.a.createElement(N,{span:"20"},C.a.createElement("div",null,C.a.createElement("h3",null,this.state.isok?e.deletedSuccessfully:e.deleteFailed),C.a.createElement("p",null,C.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID"),C.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),C.a.createElement("p",null,C.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group"),C.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":C.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}])}(C.a.Component)).displayName="DeleteDialog",E=E))||E,E=(t(751),t(437)),B=t.n(E);var U=(0,n.a.config)(((E=function(e){function a(){return Object(_.a)(this,a),e=this,t=a,n=arguments,t=Object(S.a)(t),Object(w.a)(e,Object(M.a)()?Reflect.construct(t,n||[],Object(S.a)(e).constructor):t.apply(e,n));var e,t,n}return Object(k.a)(a,e),Object(b.a)(a,[{key:"render",value:function(){var e=this.props,t=e.data,t=void 0===t?{}:t,n=e.height,e=e.locale,a=void 0===e?{}:e;return C.a.createElement("div",null,"notice"===t.modeType?C.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},C.a.createElement(B.a,{style:{marginBottom:1\n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.deregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.subscribe("').concat(this.record.name,'", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}')}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n \n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringBootCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n* pom.xml\n \n com.alibaba.boot\n nacos-discovery-spring-boot-starter\n ${latest.version}\n \n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringCloudCode",value:function(e){return"/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml\n \n org.springframework.cloud\n spring-cloud-starter-alibaba-nacos-discovery\n ${latest.version}\n \n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=".concat(this.record.name,'\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosProviderApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(NacosProviderApplication.class, args);\n}\n\n @RestController\n class EchoController {\n @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n public String echo(@PathVariable String string) {\n return "Hello Nacos Discovery " + string;\n }\n }\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=micro-service-oauth2\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"getCSharpCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Naming(x =>\n {\n x.ServerAddresses = new List { "http://localhost:8848/" };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.NamingUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var namingSvc = serviceProvider.GetService();\n\n await namingSvc.RegisterInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n await namingSvc.RegisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(await namingSvc.GetAllInstances("').concat(this.record.name,'")));\n\n await namingSvc.DeregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n var listener = new EventListener();\n\n await namingSvc.Subscribe("').concat(this.record.name,'", listener);\n }\n\n internal class EventListener : IEventListener\n {\n public Task OnEvent(IEvent @event)\n {\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(@event));\n return Task.CompletedTask;\n }\n }\n}\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for ASP.NET Core Integration\nApp.csproj\n\n\n \n\n*/\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/appsettings.json\n* appsettings.json\n{\n "nacos": {\n "ServerAddresses": [ "http://localhost:8848" ],\n "DefaultTimeOut": 15000,\n "Namespace": "cs",\n "ServiceName": "App1",\n "GroupName": "DEFAULT_GROUP",\n "ClusterName": "DEFAULT",\n "Port": 0,\n "Weight": 100,\n "RegisterEnabled": true,\n "InstanceEnabled": true,\n "Ephemeral": true,\n "NamingUseRpc": true,\n "NamingLoadCacheAtStart": ""\n }\n}\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/Startup.cs\nusing Nacos.AspNetCore.V2;\n\npublic class Startup\n{\n public Startup(IConfiguration configuration)\n {\n Configuration = configuration;\n }\n\n public IConfiguration Configuration { get; }\n\n public void ConfigureServices(IServiceCollection services)\n {\n // ....\n services.AddNacosAspNet(Configuration);\n }\n\n public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n {\n // ....\n }\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return O.a.createElement("div",null,O.a.createElement(i.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:O.a.createElement("div",null),onClose:this.closeDialog.bind(this)},O.a.createElement("div",{style:{height:500}},O.a.createElement(m.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},O.a.createElement(g.a,{shape:"text",style:{height:40,paddingBottom:10}},O.a.createElement(y,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),O.a.createElement(y,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),O.a.createElement(y,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),O.a.createElement(y,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),O.a.createElement(y,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),O.a.createElement(y,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),O.a.createElement(y,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),O.a.createElement(y,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),O.a.createElement(y,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),O.a.createElement("div",{ref:"codepreview"})))))}}])}(O.a.Component)).displayName="ShowServiceCodeing",r=r))||r,Y=t(54),I=(t(772),t(25));var A=L.a.Item,R=a.a.Row,H=a.a.Col,F=T.a.Column,a=(0,n.a.config)(((r=function(e){function r(e){var a,t,n;return Object(l.a)(this,r),t=this,n=r,e=[e],n=Object(f.a)(n),(a=Object(c.a)(t,Object(d.a)()?Reflect.construct(n,e||[],Object(f.a)(t).constructor):n.apply(t,e))).getQueryLater=function(){setTimeout(function(){return a.queryServiceList()})},a.showcode=function(){setTimeout(function(){return a.queryServiceList()})},a.setNowNameSpace=function(e,t,n){return a.setState({nowNamespaceName:e,nowNamespaceId:t,nowNamespaceDesc:n})},a.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},a.editServiceDialog=O.a.createRef(),a.showcode=O.a.createRef(),a.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:Object(h.b)("serviceNameParam")||"",groupName:Object(h.b)("groupNameParam")||""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},a.field=new s.a(a),a}return Object(p.a)(r,e),Object(u.a)(r,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.search,o=e.withInstances,o=void 0!==o&&o,e=e.hasIpCount,e=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];Object(h.e)({serviceNameParam:r.serviceName,groupNameParam:r.groupName}),this.openLoading(),Object(h.d)({url:"v1/ns/catalog/services?".concat(e.join("&")),success:function(){var e=0o&&v.a.createElement(u.a,{className:"users-pagination",current:i,total:n.totalCount,pageSize:o,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),v.a.createElement(x,{visible:s,onOk:function(e){return Object(_.c)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),v.a.createElement(C.a,{visible:l,username:e,onOk:function(e){return Object(_.k)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0,passwordResetUserVisible:!1})}}))}}])}(v.a.Component)).displayName="UserManagement",n=M))||n)||n;t.a=i},function(e,t,n){"use strict";n(71);var a=n(48),l=n.n(a),a=(n(37),n(20)),u=n.n(a),c=n(34),a=(n(70),n(23)),d=n.n(a),a=(n(36),n(22)),f=n.n(a),a=(n(94),n(58)),p=n.n(a),a=(n(40),n(2)),h=n.n(a),a=(n(39),n(9)),m=n.n(a),g=n(14),r=n(15),y=n(18),v=n(16),_=n(5),o=n(17),a=(n(29),n(3)),a=n.n(a),i=n(0),b=n.n(i),i=n(33),w=n(46),s=n(88),M=n(55),S=(n(51),n(30)),k=n.n(S),S=(n(65),n(31)),E=n.n(S);var x=h.a.Item,C=E.a.Option,T={labelCol:{fixedSpan:4},wrapperCol:{span:19}},L=Object(i.b)(function(e){return{namespaces:e.namespace.namespaces}},{getNamespaces:s.b,searchRoles:w.l})(S=(0,a.a.config)(((S=function(e){function s(){var t;Object(g.a)(this,s);for(var e,n,a,r=arguments.length,o=new Array(r),i=0;ii&&b.a.createElement(l.a,{className:"users-pagination",current:s,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),b.a.createElement(L,{visible:n,onOk:function(e){return Object(w.a)(e).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})},onCancel:function(){return a.colseCreatePermission()}}))}}])}(b.a.Component)).displayName="PermissionsManagement",n=S))||n)||n;t.a=i},function(e,t,n){"use strict";n(71);var a=n(48),l=n.n(a),a=(n(37),n(20)),u=n.n(a),a=(n(70),n(23)),c=n.n(a),a=(n(36),n(22)),d=n.n(a),a=(n(94),n(58)),f=n.n(a),a=(n(40),n(2)),p=n.n(a),a=(n(39),n(9)),h=n.n(a),m=n(14),r=n(15),g=n(18),y=n(16),v=n(5),o=n(17),a=(n(29),n(3)),a=n.n(a),i=n(0),_=n.n(i),i=n(33),b=n(46),w=n(55),s=(n(65),n(31)),M=n.n(s),s=(n(51),n(30)),S=n.n(s);var k=p.a.Item,E={labelCol:{fixedSpan:4},wrapperCol:{span:19}},x=Object(i.b)(function(e){return{users:e.authority.users}},{searchUsers:b.m})(s=(0,a.a.config)(((s=function(e){function s(){var t;Object(m.a)(this,s);for(var e,n,a,r=arguments.length,o=new Array(r),i=0;io&&_.a.createElement(l.a,{className:"users-pagination",current:i,total:t.totalCount,pageSize:o,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),_.a.createElement(x,{visible:s,onOk:function(e){return Object(b.b)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}])}(_.a.Component)).displayName="RolesManagement",n=s))||n)||n;t.a=i},function(e,t,n){"use strict";n(37);function l(e){var t=void 0===(t=localStorage.token)?"{}":t,t=(Object(w.c)(t)&&JSON.parse(t)||{}).globalAdmin,n=[];return"naming"===e?n.push(M):"config"===e?n.push(S):n.push(S,M),t&&n.push(k),n.push(E),n.push(x),n.push(C),n.filter(function(e){return e})}var a=n(20),u=n.n(a),a=(n(50),n(27)),c=n.n(a),a=(n(44),n(28)),d=n.n(a),r=n(14),o=n(15),i=n(18),s=n(16),f=n(5),p=n(17),a=(n(29),n(3)),a=n.n(a),h=n(21),m=(n(86),n(53)),g=n.n(m),m=n(0),y=n.n(m),m=n(41),v=n(33),_=n(111),b=n(57),w=n(49),M={key:"serviceManagementVirtual",children:[{key:"serviceManagement",url:"/serviceManagement"},{key:"subscriberList",url:"/subscriberList"}]},S={key:"configurationManagementVirtual",children:[{key:"configurationManagement",url:"/configurationManagement"},{key:"historyRollback",url:"/historyRollback"},{key:"listeningToQuery",url:"/listeningToQuery"}]},k={key:"authorityControl",children:[{key:"userList",url:"/userManagement"},{key:"roleManagement",url:"/rolesManagement"},{key:"privilegeManagement",url:"/permissionsManagement"}]},E={key:"namespace",url:"/namespace"},x={key:"clusterManagementVirtual",children:[{key:"clusterManagement",url:"/clusterManagement"}]},C={key:"settingCenter",url:"/settingCenter"};n(387);var T=g.a.SubMenu,L=g.a.Item,m=(n=Object(v.b)(function(e){return Object(h.a)(Object(h.a)({},e.locale),e.base)},{getState:b.e,getNotice:b.d,getGuide:b.c}),v=a.a.config,Object(m.g)(a=n(a=v(((b=function(e){function a(e){var t,n;return Object(r.a)(this,a),t=this,n=a,e=[e],n=Object(f.a)(n),(n=Object(i.a)(t,Object(s.a)()?Reflect.construct(n,e||[],Object(f.a)(t).constructor):n.apply(t,e))).state={visible:!0},n}return Object(p.a)(a,e),Object(o.a)(a,[{key:"componentDidMount",value:function(){this.props.getState(),this.props.getNotice(),this.props.getGuide()}},{key:"goBack",value:function(){this.props.history.goBack()}},{key:"navTo",value:function(e){var t=this.props.location.search,t=new URLSearchParams(t);t.set("namespace",window.nownamespace),t.set("namespaceShowName",window.namespaceShowName),this.props.history.push([e,"?",t.toString()].join(""))}},{key:"isCurrentPath",value:function(e){return e===this.props.location.pathname?"current-path next-selected":void 0}},{key:"defaultOpenKeys",value:function(){for(var t=this,e=l(this.props.functionMode),n=0,a=e.length;nthis.state.pageSize&&k.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},k.a.createElement(v.a,{current:this.state.pageNo,total:a,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}])}(k.a.Component)).displayName="SubscriberList",r=n))||r)||r;t.a=p},function(e,t,n){"use strict";n(56);var a=n(38),c=n.n(a),a=(n(71),n(48)),d=n.n(a),a=(n(181),n(80)),f=n.n(a),a=(n(39),n(9)),p=n.n(a),a=(n(36),n(22)),h=n.n(a),a=(n(37),n(20)),o=n.n(a),a=(n(50),n(27)),i=n.n(a),a=(n(51),n(30)),s=n.n(a),l=n(14),u=n(15),m=n(18),g=n(16),y=n(5),v=n(17),a=(n(29),n(3)),a=n.n(a),r=(n(421),n(125)),_=n.n(r),r=(n(70),n(23)),b=n.n(r),r=(n(73),n(42)),r=n.n(r),w=(n(40),n(2)),M=n.n(w),w=n(0),S=n.n(w),k=n(1),w=n(146),E=n.n(w),x=n(54);n(775);var C=M.a.Item,T=r.a.Row,L=r.a.Col,O=b.a.Column,D=_.a.Panel,r=(0,a.a.config)(((w=function(e){function r(e){var n,t,a;return Object(l.a)(this,r),t=this,a=r,e=[e],a=Object(y.a)(a),(n=Object(m.a)(t,Object(g.a)()?Reflect.construct(a,e||[],Object(y.a)(t).constructor):a.apply(t,e))).getQueryLater=function(){setTimeout(function(){return n.queryClusterStateList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:(e.voteFor,"")}},n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new s.a(n),n}return Object(v.a)(r,e),Object(u.a)(r,[{key:"componentDidMount",value:function(){this.getQueryLater()}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"queryClusterStateList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.keyword,e=e.withInstances,e=["withInstances=".concat(void 0!==e&&e),"pageNo=".concat(t),"pageSize=".concat(a),"keyword=".concat(r)];Object(k.d)({url:"v1/core/cluster/nodes?".concat(e.join("&")),beforeSend:function(){return n.openLoading()},success:function(){var e=0this.state.pageSize&&S.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},S.a.createElement(d.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return t.setState({currentPage:e},function(){return t.queryClusterStateList()})}}))))}}])}(S.a.Component)).displayName="ClusterNodeList",n=w))||n;t.a=r},function(e,t,n){"use strict";n(36);var a=n(22),r=n.n(a),o=n(14),i=n(15),s=n(18),l=n(16),u=n(5),c=n(17),a=(n(29),n(3)),a=n.n(a),d=n(21),f=(n(117),n(79)),f=n.n(f),p=n(0),h=n.n(p),m=(n(778),n(54)),p=n(89),g=n(149),y=n(33),v=n(25);var _=f.a.Group,y=Object(y.b)(function(e){return Object(d.a)({},e.locale)},{changeLanguage:p.a,changeTheme:g.a})(f=(0,a.a.config)(((n=function(e){function a(e){Object(o.a)(this,a),n=this,t=a,e=[e],t=Object(u.a)(t),t=Object(s.a)(n,Object(l.a)()?Reflect.construct(t,e||[],Object(u.a)(n).constructor):t.apply(n,e));var t,n=localStorage.getItem(v.o);return t.state={theme:"dark"===n?"dark":"light",language:localStorage.getItem(v.g)},t}return Object(c.a)(a,e),Object(i.a)(a,[{key:"newTheme",value:function(e){this.setState({theme:e})}},{key:"newLanguage",value:function(e){this.setState({language:e})}},{key:"submit",value:function(){var e=this.props,t=e.changeLanguage,e=e.changeTheme,n=this.state.language,a=this.state.theme;t(n),e(a)}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=[{value:"light",label:e.settingLight},{value:"dark",label:e.settingDark}];return h.a.createElement(h.a.Fragment,null,h.a.createElement(m.a,{title:e.settingTitle}),h.a.createElement("div",{className:"setting-box"},h.a.createElement("div",{className:"text-box"},h.a.createElement("div",{className:"setting-checkbox"},h.a.createElement("div",{className:"setting-span"},e.settingTheme),h.a.createElement(_,{dataSource:t,value:this.state.theme,onChange:this.newTheme.bind(this)})),h.a.createElement("div",{className:"setting-checkbox"},h.a.createElement("div",{className:"setting-span"},e.settingLocale),h.a.createElement(_,{dataSource:[{value:"en-US",label:"English"},{value:"zh-CN",label:"中文"}],value:this.state.language,onChange:this.newLanguage.bind(this)}))),h.a.createElement(r.a,{type:"primary",onClick:this.submit.bind(this)},e.settingSubmit)))}}])}(h.a.Component)).displayName="SettingCenter",f=n))||f)||f;t.a=y},function(e,t,K){"use strict";K.r(t),function(e){K(56);var t=K(38),n=K.n(t),t=(K(29),K(3)),r=K.n(t),o=K(14),i=K(15),s=K(18),l=K(16),u=K(5),c=K(17),a=K(21),t=K(0),d=K.n(t),t=K(26),t=K.n(t),f=K(127),p=K(430),h=K(441),m=K(33),g=K(41),y=K(77),v=(K(478),K(450)),_=K(25),b=K(451),w=K(452),M=K(444),S=K(453),k=K(454),E=K(445),x=K(455),C=K(456),T=K(457),L=K(458),O=K(459),D=K(442),N=K(446),j=K(443),P=K(460),I=K(461),A=K(447),R=K(448),H=K(449),F=K(439),z=K(462),Y=K(440),W=K(89),B=K(57),U=K(149);K(779);e.hot,localStorage.getItem(_.g)||localStorage.setItem(_.g,"zh-CN"===navigator.language?"zh-CN":"en-US");var e=Object(f.b)(Object(a.a)(Object(a.a)({},Y.a),{},{routing:p.routerReducer})),Y=Object(f.d)(e,Object(f.c)(Object(f.a)(h.a),window[_.k]?window[_.k]():function(e){return e})),V=[{path:"/",exact:!0,render:function(){return d.a.createElement(g.a,{to:"/welcome"})}},{path:"/welcome",component:F.a},{path:"/namespace",component:M.a},{path:"/newconfig",component:S.a},{path:"/configsync",component:k.a},{path:"/configdetail",component:E.a},{path:"/configeditor",component:x.a},{path:"/historyDetail",component:C.a},{path:"/configRollback",component:T.a},{path:"/historyRollback",component:L.a},{path:"/listeningToQuery",component:O.a},{path:"/configurationManagement",component:D.a},{path:"/serviceManagement",component:N.a},{path:"/serviceDetail",component:j.a},{path:"/subscriberList",component:P.a},{path:"/clusterManagement",component:I.a},{path:"/userManagement",component:A.a},{path:"/rolesManagement",component:H.a},{path:"/permissionsManagement",component:R.a},{path:"/settingCenter",component:z.a}],e=Object(m.b)(function(e){return Object(a.a)(Object(a.a)({},e.locale),e.base)},{changeLanguage:W.a,getState:B.e,changeTheme:U.a})(p=function(e){function a(e){var t,n;return Object(o.a)(this,a),t=this,n=a,e=[e],n=Object(u.a)(n),(n=Object(s.a)(t,Object(l.a)()?Reflect.construct(n,e||[],Object(u.a)(t).constructor):n.apply(t,e))).state={shownotice:"none",noticecontent:"",nacosLoading:{}},n}return Object(c.a)(a,e),Object(i.a)(a,[{key:"componentDidMount",value:function(){this.props.getState();var e=localStorage.getItem(_.g),t=localStorage.getItem(_.o);this.props.changeLanguage(e),this.props.changeTheme(t)}},{key:"router",get:function(){var e=this.props,t=e.loginPageEnabled,e=e.consoleUiEnable;return d.a.createElement(y.a,null,d.a.createElement(g.d,null,t&&"false"===t?null:d.a.createElement(g.b,{path:"/login",component:b.a}),d.a.createElement(g.b,{path:"/register",component:w.a}),d.a.createElement(v.a,null,e&&"true"===e&&V.map(function(e){return d.a.createElement(g.b,Object.assign({key:e.path},e))}))))}},{key:"render",value:function(){var e=this.props,t=e.locale,e=e.loginPageEnabled;return d.a.createElement(n.a,Object.assign({className:"nacos-loading",shape:"flower",tip:"loading...",visible:!e,fullScreen:!0},this.state.nacosLoading),d.a.createElement(r.a,{locale:t},this.router))}}])}(d.a.Component))||p;t.a.render(d.a.createElement(m.a,{store:Y},d.a.createElement(e,null)),document.getElementById("root"))}.call(this,K(464)(e))},function(e,t){e.exports=function(e){var t;return e.webpackPolyfill||((t=Object.create(e)).children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(I,e,t){"use strict"; /** @license React v16.14.0 * react.production.min.js * @@ -303,7 +307,7 @@ var S=P(693),o=P(694),s=P(695);function n(){return c.TYPED_ARRAY_SUPPORT?2147483 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var d=t(198),t="function"==typeof Symbol&&Symbol.for,c=t?Symbol.for("react.element"):60103,u=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,i=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.forward_ref"):60112,l=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,h="function"==typeof Symbol&&Symbol.iterator;function m(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n